[Plugin] CountLikes
[Plugin] HideMod v1 (old) »

CerealGuy

  • Posts: 343

madfitz

  • Elite Class Non Coder
  • Posts: 97
[Plugin] Re: CountLikes
« Reply #1, on December 28th, 2014, 11:34 AM »
Not something I would use but it gets a thumbs up from me for the achievement. Thumbs up to any plugin authors because I can't do it!

Well done CG!

Nao

  • Dadman with a boy
  • Posts: 16,012
[Plugin] Re: CountLikes
« Reply #2, on March 10th, 2015, 11:15 AM »
Fixed a weird error with an unrecognized index on fetch_row... I have no idea why it didn't work, possibly a PHP version specific issue.
Here's the file... Also, fixed some indenting, and stuff.

 CountLikes.rar - 2.84 kB, downloaded 29 times.


CerealGuy

  • Posts: 343
[Plugin] Re: CountLikes
« Reply #3, on March 10th, 2015, 12:42 PM »Last edited on March 10th, 2015, 04:52 PM
Feel free to do a pull request, otherwise i will have a look at it this afternoon.
 Thank you for providing your changes :).
If I remember  it correctly, the view of the liked posts needs some improvement. I had to apply a complete template, perhaps this could be solved better?! Because in general its the same like the view posts stuff, only different query and other texts. A more general function for that would be helpful maybe. I dont like duplex code :D.

EDIT: Updated git repo

Nao

  • Dadman with a boy
  • Posts: 16,012
[Plugin] Re: CountLikes
« Reply #4, on March 20th, 2015, 11:26 PM »
On line 90, $context['is_topics'] is undefined... It's copy-pasted from Profile-View.php, where it's defined earlier...
I just removed that code block, working fine now.

CerealGuy

  • Posts: 343
[Plugin] Re: CountLikes
« Reply #5, on March 21st, 2015, 01:53 PM »
Didn't get that error yet :hmm:. But thats a block of code where I really don't know what it does.

Nao

  • Dadman with a boy
  • Posts: 16,012
[Plugin] Re: CountLikes
« Reply #6, on March 22nd, 2015, 11:15 AM »
Doesn't matter, you're not offering to view liked topics, only viewed posts, so off it goes.. ;)
[Plugin] Re: CountLikes
« Reply #7,  »
Okay, I'm just gonna upload this fixed version of the main file. It gave me an error if attempting to view likes that didn't belong to a post. ;)
I used the opportunity to clean it up: fix typos, spacing, and a few database issues.

 CountLikes.zip - 2.87 kB, downloaded 6 times.


CerealGuy

  • Posts: 343
[Plugin] Re: CountLikes
« Reply #8,  »
Nice, thank you!
One plugin less to refactor. Did it for hide (actually i completely rewrote it) and recently started it for the invite plugin (should rewrite this one too, but not really worth the time). Doesn't make too much fun, it's just ugly code. I will apply your changes to repo in the next days.

Nao

  • Dadman with a boy
  • Posts: 16,012
[Plugin] Re: CountLikes
« Reply #9,  »
Well, I guess I'm lucky, since I couldn't remember where your repo was (I still don't :P), I didn't update it, so I could have redone the same thing you did... As I said, I'm lucky, because I hate wasting time. :P

Hmm, I noticed that Lestrades.com doesn't seem to enable my plugins when I try to turn them on... It only accepts one, I don't know why. So weird.

CerealGuy

  • Posts: 343
[Plugin] Re: CountLikes
« Reply #10,  »
Quote from Nao on March 29th, 11:16 PM
Well, I guess I'm lucky, since I couldn't remember where your repo was (I still don't :P), I didn't update it, so I could have redone the same thing you did... As I said, I'm lucky, because I hate wasting time. :P
If it's not in C3realGuys repos, there maybe is no repo for it. But it should be in the wedge/plugins repo.
Quote from Nao on March 29th, 11:16 PM
Hmm, I noticed that Lestrades.com doesn't seem to enable my plugins when I try to turn them on... It only accepts one, I don't know why. So weird.
Wtf. I (maybe, at least it sounds very similiar) have the same exact problem on one install (sadly the productional). What works for me is to enable them in acp and then add it manually to Settings.php enabled plugins. I have no fuckin clue why this happens, but as soon as i get redirected from the enableplugin action to the plugin overview, it changes back to previous enabled plugins. No idea why this happens as it only happens on one install.
Didn't open a bug report yet because i believed it's something with my setup (some weird third party caching or something similiar).

Kian

  • Posts: 39
[Plugin] Re: CountLikes
« Reply #12,  »
Quote from Nao on March 20th, 2015, 11:26 PM
On line 90, $context['is_topics'] is undefined... It's copy-pasted from Profile-View.php, where it's defined earlier...
I just removed that code block, working fine now.
I just resurrected my forum by commenting lines 90 & 91 :^^;:

Code: [Select]
PHP Fatal error:  Class 'Likes_Notifier' not found in /opt/sites/www.potesnroll.com/www/gz/app/Notifications.php on line 90


Code: [Select]
              # self::$notifiers['likes'] = new Likes_Notifier();
               # self::$notifiers['likes_thought'] = new Likes_Thought_Notifier();

(90 + 91)


Using an up to date Debian with Apache 2.4 and PHP 5.6

CerealGuy

  • Posts: 343
[Plugin] Re: CountLikes
« Reply #13,  »
@Kian
do you get the error because of the CountLikes Plugin?

Kian

  • Posts: 39
[Plugin] Re: CountLikes
« Reply #14,  »
Quote from CerealGuy on April 4th, 03:55 PM
@Kian
do you get the error because of the CountLikes Plugin?
Actually, no, I dont have it, wrong topic :oops: