GithubHelp home page GithubHelp logo

bymayo / craft-follow Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 3.35 MB

Let users follow elements within Craft CMS. E.g. Users can follow other users, or follow categories to generate following lists

License: Other

PHP 100.00%
craftcms craftcms3 craftcms-plugin

craft-follow's Introduction

๐Ÿ‘‹

Hi. I'm Jason, but most people call me Mayo, based in Manchester. I've been a self taught developer for around 15 years, but with a traditional graphic design background. Right now, I'm the Co-founder of MadeByShape, where I am the lead developer and work with global brands such as BBC, BlackBerry and 20th Century Fox right through to small-medium start ups.

On the side I'm a digital product developer working on my own ventures, as well as a Craft CMS Developer.

Working on ๐Ÿ‘จโ€๐Ÿ’ป

  • Every Creative ~ Hiring platform built specifically for creative studios/agencies & products ๐Ÿš€
  • Tap Tourist ~ A little guide to finding the best craft beer spots in and around Manchester ๐Ÿบ

Stack ๐Ÿค“

Currently using Craft CMS, Tailwind CSS, VueJS, AlpineJS, Netlify + DigitalOcean.

Writing ๐Ÿ“

I try to write every so often on various topics, have a read.

craft-follow's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

craft-follow's Issues

When will roadmap items be added?

I really love the functionality of this plugin and will probably buy it for a site I'm working on but there are a few items listed in the Roadmap that I'd like to have. I'm wondering if these items will ever make it into the plugin?

Update issue - had to revert back to 1.0.1

Hi @bymayo
Just updated to latest version and it started causing issues - little hard to explain on here (I know thats not helpful but just checking if you changed any of the core or just added a few bits in?
Reverting back to 1.0.1 solves my issue.

I'm using that new Sprig Plugin (reactive components) for Craft to display a list of people you follow in a modal on click.

The code for displaying this info remains the same regardless of Sprigs use.

But on the new version it breaks it and starts throwing errors. Other Follow areas where I have info seem to display fine.

Reverting back to 1.0.1 solves the issue and all is displayed.

Might be something I need to jump on and show you when you get a chance. But wanted to see if anything has been changed to the core workings of the plugin that I might not be aware of?

Thanks

use group of followers for an email list

Is there a way to use a list of followers for an email list? For a specific entry or category, I want to do something like "Follow to keep up to date..." Be nice if I could grab a follower list and use it with Campaign.

Can't follow Entries

I can't seem to get the plugin to follow entries and display the user's saved entries. I'm trying to make it so that the user can save entries, then display all the entries relating to their saved entry.

follow.php

<?php

return [
   '*' => [
      'allowedElementClasses' => [
         'craft\elements\Entry'
      ]
   ]
];

Follow Button

{% if craft.follow.check(entry.id) %}
  <a class="btn btn-sm btn-light py-2 px-3 mr-2" rel="nofollow" href="{{ craft.follow.unfollowUrl(entry.id) }}"><span class="material-icons mr-2 md-18">favorite_border</span>Unfollow Brand</a>
{% else %}
  <a class="btn btn-sm btn-light py-2 px-3 mr-2" rel="nofollow" href="{{ craft.follow.followUrl(entry.id) }}"><span class="material-icons mr-2 md-18">favorite_border</span>Follow Brand</a>
{% endif %}

Error

Argument 1 passed to bymayo\follow\services\ElementService::check() must be of the type array, int given, called in /home/ubuntu/sites/vt-nitro/vendor/bymayo/follow/src/variables/FollowVariable.php on line 33

Getting number of followers not working properly

Hi Jason,
Running the below code returns the incorrect follower numbers for the current user.

The numbers outputted don't seem to represent an obvious pattern because two users with technically the same followers show different follower count, tried to see how the data is stored in the database and can't work out why I'm getting the numbers im getting.

  • As you can see from the table the userId 1 is followed by two other users. But the number on the front end is outputted as 5.

  • The userId 54 is also followed by 2 users but on the frontend it outputs 3 users?

  • And the userId 2 is followed by one user but on the frontend it outputs 2 followers and not 1.

{% set myfollowers = craft.follow.followers() %}
<p><span style="font-weight: bold">Total:</span>{{ myfollowers|length }}</p>

Thanks
db-table

Possible to follow an entry?

Hi,

found below sentences in the docs

You simply pass an element ID to it, whether this is a user, category or tag

I want to create like/bookmark functionality similar with instagram.
The use case might be :

  • like/unlike an entry
  • bookmark/unbookmark an entry

Does this plugin able to handle above use cases?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.