Wedge
Public area => Plugins => The Pub => Plugin Support => Topic started by: CerealGuy on October 3rd, 2014, 03:23 PM
-
In the moment im working on a plugin which should show how many likes the user recieved and gave on his Profile.
In the invitemod plugin i did it with add_js, but thats in my opinion not a really good way. Wouldnt it a good thing to have some 'custom_field' hook?
Or is there another better way?
-
Still have no idea what this is about lol. I'll focus on plugins once 1.0 is out I guess..?
Anyway I should tell you that the feature in working on is precisely a rewrite of the like feature. I felt that since likes were an exclusive feature of Wedge and that elk now ships a 1.0 with the same feature (although not a good a ours: P), Wedge needs to retain its crown.
So... It will change eventually.
-
Focusing on Plugins is a good idea. Did some stuff with showing posts like http://wedge.org/profile/?area=showposts;sa=messages and it was a mess. Needed to copy nearly everything of showPosts(), which is a bit useless and could be done nicer. By the way it was for the same plugin :D
I feel like there are some hooks missing which could be quite important and are perhaps a reason why there are so less 3rd party developer on wedge.
Perhaps someone is interested in it: https://github.com/C3realGuy/we_CountLikes
-
Where should this hook be added..?
Also, FYI, it's "received", not "recieved". ;) (see your README and plugin-info.xml files!)
-
In the moment i have it at the end of the loadCustomFields function in Profile.php.
call_hook('custom_fields', array($memID, $area, &$context['custom_fields']));
It's working, but needs a check for $area, otherwise it gets displayed in modify profile and on registration?! which would cause trouble. Also i didnt got fixed the privacy stuff for those fields. Privacy doesnt know those fields and throws errors.
Thanks for the FIY, helps me alot :cool: