PDA

View Full Version : Show Thread Enhancements - [AJAX] Post Groan Hack


mohammad6006
12-13-2010, 10:00 PM
Post Groan Hack


About this hack:
This hack was requested by users who like Abe1 (https://vborg.vbsupport.ru/member.php?u=49809) "Post Thank You Hack" and "Post Groan Hack" . Both can run together on the same forum.

This hack adds a "groan" button to all posts. Any user can "groan" at a post. This will reduce the amount of "junk" posts your forum gets.


INSTALLATIONS:

1) upload the 'upload via ftp' folder
--------------------------------------------------------------------
post_groans.php -> \
post_groans_admin.php -> \admincp\
post_groans.js -> \clientscript\
functions_post_groans.php -> \includes\
cpnav_post_groans.xml -> \includes\xml\
hooks_post_groans.xml -> \includes\xml\
post_groans.png -> \images\buttons\ (and into EVERY "buttons" folder in every style you have)
post_groans-hover.png -> \images\buttons\ (and into EVERY "buttons" folder in every style you have)
--------------------------------------------------------------------

2) Import product-post_groans.xml into PRODUCTS. Allow Overwrite "YES" (admincp -> Plugin System -> Manage Products -> [Add/Import Product])

Click 'install' in the thread you downloaded this from.

Features:
Uses vBulletin easy Product installer/updater/uninstaller
Uses AJAX technology so your users don't have to refresh when they groan.
Places an easy to use button next to the edit and Thanks button
Separate looks for postbit and postbit_legacy
Places all groans into one small box
Uses only ONE query every time you view a showthread page!
Users can't groan twice
Option to not allow users to groan their own post
Guests don't see 'geoan' button
Counts how many groans a user gives
Counts how many groans a post gets
Shows how many groans a user gave in every post of his
Shows how many groans a user gave in profile
Shows how many groans a user got
Shows how many posts or a user are groaned
Shows info in profile
Search for a users groaned posts
Search for all groaned posts
Administrator can remove all groans from a single post
Users can remove their own groans
Turn on and off hack totally
Turn on and off hack for only some forums
Option to turn off hack for all but the first post of a thread
Option to turn off hack for all but the first post of a thread in specific forums
Option to turn off hack view of date for specific or all forums
Option to add to post count when someone clicks 'groans'.
Option to give a user who receives groans reputation points.
Ban Usergroups
Ban Users
Uses Phrases
Cache Templates
Guaranteed to be liked by ALL users on your forum!NOTE: I just edit [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=231666) for create this add-ons
i request and waiting for [AJAX] Post Groan Hack in (https://vborg.vbsupport.ru/showthread.php?t=193489) and after not have any answer decide to edit post thank you hack for create post groan hack and test in my forum

DEMO: http://forum.tractorfc.com

mohammad6006
12-14-2010, 09:30 PM
reserved for translation files

sulasno
12-14-2010, 10:02 PM
tagged and thanks

will it work in 4.1.0 PL2 ?

mohammad6006
12-14-2010, 10:16 PM
tagged and thanks

will it work in 4.1.0 PL2 ?

i dont test still in 4.1.x version

Doctor Death
12-15-2010, 01:14 AM
The answer is NO it wont work.

Install in 4.1.0 and get error message:


The following dependencies were not met:
1.This product is not compatible with version 4.1.0 of vBulletin. (Compatible starting with 4.0.0 beta 4 / Incompatible with 4.1.0 alpha 1 and greater)

Before you post mods and say they are "4.x.x" compatible, please check your work and apply due dilligence.

Dont install this.

Taurus1
12-15-2010, 01:56 AM
I changed the dependencies in the XML, and installed it. Everything works great on 4.1 PL2.

Thank you very much!!

Doctor Death
12-15-2010, 01:59 AM
I changed the dependencies in the XML, and installed it. Everything works great on 4.1 PL2.

Thank you very much!!

Explain what you did to get it working in 4.1 please.

onehost
12-15-2010, 02:33 AM
It told me that it would not install, even if i overwrite, denied...

will not worry about it, there are other like/dislike mods out....

no worries...

If mods do not have time to update, then I do not have time to bother with them.

mohammad6006
12-15-2010, 07:32 AM
OK

Thank for report

i edit XML file to work great on 4.x.x versions

sempoi
12-15-2010, 12:52 PM
thanks..
work perfect on my forum..
i'm using vbulletin 4.1.0 PL2

morrow
12-17-2010, 03:55 AM
Thanks, I've been waiting for this one. Perhaps you can make one for facebook posts? :)

I've attached the modified version. This one will allow you to install on vb4.1pl2. It's working great for me so far.

sulasno
12-18-2010, 12:30 AM
I do not have "The following xx users say" in my display;
could it be because of my style ?

mohammad6006
12-18-2010, 06:59 PM
I do not have "The following xx users say" in my display;
could it be because of my style ?

if you use tank you hack and show the following xx user say tank you so must not have any problem for this mod

sulasno
12-19-2010, 02:57 AM
I am having the same problem with the thank you hack

mohammad6006
12-19-2010, 08:04 PM
I am having the same problem with the thank you hack

test in default style if everything is ok so yo can set style setting for thank you and groan mod manually

haidm
12-20-2010, 01:36 AM
Is this mod appear in VSa - Advance Forum Statics?

sadiq6210
12-20-2010, 03:36 AM
Thanks Mohammed
I have a question in Abe1 hack
As a user, How can I know who "thanked/groaned" me and where ?

I really need this feature

POL_ED
12-20-2010, 10:51 PM
Work in 4.1.0 PL2
Thanks

gurler
12-23-2010, 08:51 AM
Hello great mod!
Thank you very much. nominated.

Is there any options to any user search his / her own post which got groans ?

or his groaned post list.

Welshy2008
01-24-2011, 02:19 AM
Can you help with the following Fatal Error, Please?

Fatal error: Cannot redeclare can_groan_this_post() (previously declared in /XXXX/includes/functions_post_groan.php:50) in /XXXX/includes/functions_post_groans.php on line 114

Also, I had the original Groan mod on 3.8.X, as you have taken over this Groan, I trust I can keep all of my members' previous groans?


Many Thanks.

Welshy2008
01-25-2011, 01:44 PM
What on earth is the error below, and how do I correct it, Please?


Database error in vBulletin 4.0.7:

Invalid SQL:

SELECT post_groan.postid AS postid
FROM vbpost_groan AS post_groan
LEFT JOIN vbpost AS post USING (postid)
INNER JOIN vbthread AS thread ON(thread.threadid = post.threadid)
WHERE post_groan.userid = 5405
AND thread.forumid IN(68,3,4,75,19,77,62,78,50,34,5,6,32,27,10,29,30, 70,74,11,33,71,9,16,24,13,15,69,64,17,18,67,51,61, 40,41,52,14,53,54,55)
ORDER BY post.dateline DESC
LIMIT 1000;

MySQL Error : Table 'my_database.vbpost_groan' doesn't exist
Error Number : 1146
Request Date : Tuesday, January 25th 2011 @ 10:01:26 AM
Error Date : Tuesday, January 25th 2011 @ 10:01:26 AM
Script : http://www.myforum.com/post_groan.php?do=findgroans_user_gave&u=5405
Referrer :
IP Address : 66.249.66.104
Username : Unregistered
Classname : vB_Database
MySQL Version :

BANDiT600
03-10-2011, 01:33 PM
Thanks, works with 4.1.2

Phaedrus
03-16-2011, 04:34 AM
Crap, they don't integrate like they did in 3.8... Whatever happened to Abe1?

Phaedrus
03-24-2011, 12:55 AM
Okay... After many hours, I think I fixed it. They integrate and everything. If you are using the reputation option, use a negative number for groans as I didn't want to search out the right $reputation - $reputation(blah blah) string. It was just easier to use a minus sign in the settings. I didn't change any of the phrases. You get what you get...

:D

And yes, the author can take my fixes and improve upon them, anybody can use them and enjoy. Thanks/Groans integrate and act like pals on my site now. Man, there are a lot of groan/groans in that script and I had to use the right one in the right place...

BTW - Uninstall the previous version then install this one, for some reason overwriting causes one of the tables in the database to duplicate.

sulasno
03-24-2011, 01:53 AM
thanks;
can you post the Thanks fixed as well ?

Phaedrus
03-24-2011, 02:44 AM
I don't remember fixing that one. Was there something wrong with it? It's been a long few nights...

Phaedrus
03-24-2011, 02:45 AM
I'm pretty sure that Thanks was right to begin with, Groans needed to be fixed for integration and a couple variable mismatches. Yeah, and it appears as if somebody already uploaded one for "4.1.2", the only fix necessary was to change the version maximum on the xml file though, so I hope he didn't change much of the code. I like the integration.

combs
03-30-2011, 04:18 PM
Is there a way to stop people from groaning and saying thanks to the same post.

Also, a way to change the backgrounds of just the thanks/groans?

Phaedrus
04-02-2011, 04:48 AM
Hold on... I'm testing an integrated groan/thanks on my board right now. I think I've finally solved some of the issues I was having previously with it and will upload it soon.

hoadiem
04-02-2011, 11:16 PM
vb 4.1.2

how do i fix this issue:

Thanks: 2
Thanks 2 Times in 2 Posts0 ( where the 0 should be on Groans line)
Groans :
---------->Groaned 1 Time in 1 Post

should be looking like this:

Thanks: 2
Thanks 2 Times in 2 Posts
Groans : 0
Groaned 1 Time in 1 Post

Phaedrus
04-03-2011, 02:04 AM
vb 4.1.2

how do i fix this issue:

Thanks: 2
Thanks 2 Times in 2 Posts0 ( where the 0 should be on Groans line)
Groans :
---------->Groaned 1 Time in 1 Post

should be looking like this:

Thanks: 2
Thanks 2 Times in 2 Posts
Groans : 0
Groaned 1 Time in 1 Post

In the post_groans_postbit_info template, change stylevar right to read stylevar left.

Phaedrus
04-06-2011, 02:06 AM
Okay, I'm going to post the version that I have integrated with the thanks hack on my site, the search feature is off until I can figure out the correct search string to find all thanks/groans. I'll also post the thanks that I added changed slightly for integration. If you upgrade check your dbase for an extra "post" in your dbase in the post_thanks/post_groans tables. For some reason it adds an extra one that is useless.

Tell me if there are any issues, if this is clean I guess I can post a new thread with both hacks with credit to the original coders...

chrisdaman
04-06-2011, 06:20 PM
Okay, I'm going to post the version that I have integrated with the thanks hack on my site, the search feature is off until I can figure out the correct search string to find all thanks/groans. I'll also post the thanks that I added changed slightly for integration. If you upgrade check your dbase for an extra "post" in your dbase in the post_thanks/post_groans tables. For some reason it adds an extra one that is useless.

Tell me if there are any issues, if this is clean I guess I can post a new thread with both hacks with credit to the original coders...

Ok, the 2 seem to be working fine together, thanks and groans.

The only issue I see with the groans, is if someone gives a groan beneath the first post (eg. 2nd or 4th, 5th post), it will show up, but after you refresh the page, it will still show your groan given, but not your username. It just shows a blank space where your username should be within the groan box.

Any ideas?

Phaedrus
04-06-2011, 06:22 PM
Ok, the 2 seem to be working fine together, thanks and groans.

The only issue I see with the groans, is if someone gives a groan beneath the first post (eg. 2nd or 4th, 5th post), it will show up, but after you refresh the page, it will still show your groan given, but not your username. It just shows a blank space where your username should be within the groan box.

Any ideas?

I'll look into it, the java must be calling a dbase string that isn't rendering the username. Dangit, I thought I had it. Garrr... This mod will be the end of me. It should work. Thanks for reporting back though. My users really want this, and just as you mentioned it my first "groans" hit and I'm seeing some, but not all, of the groans. I don't get it. It seems to work in every other aspect though, so there's got to be something simple I am missing. Unfortunately I'm learning as I go, and this mod's variables are a string of groans groaned groan times blah...

Phaedrus
04-06-2011, 08:59 PM
Okay, I had an odd hiccough, however I shut it off, cleared the cache, rebuilt post cache, turned it back on.. and boom, it's working. Give that a quick test and see if it works for you. All this rendering, etc. has changed how hacks load. I think we'll be running a lot of post cache rebuilds...

Also, if you are upgrading, run your counters for the mod (they're in the Mod's settings) after you are done and make sure to set it to overwrite. I have some tweaks to make to the phrases, etc. (especially the postbit, I changed the templates a bit and need to add those to the mod), for some reason the blog links get in the way and I haven't figured out how to make it not straddle the blog button and link in the postbit... My users are ecstatic, they're favorite mod is working again... (hopefully permanently).

But if this actually will work on other boards, it is ready with just minor changes and I'll upload both mods with total credit given to the original authors.

Oddly enough, I went on as a "guest" to my site and saw every groan with no problem. Logged in as a registered user, some groans, some I couldn't see. Logged back out, saw them all again... Logged back in as an Administrator, some there some not... There's something very odd going on, there is no limitation as to who can see the groan box that part of the hack is exactly the same as the Thank you hack with a one-word change.

baileyjojoms
04-07-2011, 03:50 AM
Excellent! I added the Groan and your fixed Thank You! Worked like a charm on VB4.1.2

Phaedrus
04-07-2011, 05:23 AM
Most excellent.

Phaedrus
04-07-2011, 02:59 PM
I'm making some updates, when I am done and tested I will create new threads for both so people can receive updates. If the original authors come back, I'll hand it all over to them. Mine Gott...

BTW - chrisdaman, the two mods were working on the same executionorder and that is causing some of the problems, I've updated that on the next release as well as making cosmetic changes to where the buttons show up if you have the blog feature turned on and in the postbit info section as to how the thanks/groans information shows up. Previously if you had the blog feature turned on it would straddle them and the information got all mucked, I've fixed that on my site.

chrisdaman
04-07-2011, 03:40 PM
Sounds good, thanks! I did as you said and turned off product, cleared cache and rebuilt post and it seems to be showing up correctly. But I will still update to the next release.

Phaedrus
04-07-2011, 05:33 PM
Very good.

Phaedrus
04-12-2011, 03:12 AM
Version updated for Thank You Integration and Phrases can be found here:

https://vborg.vbsupport.ru/showthread.php?t=261869

Paul M
04-12-2011, 10:56 AM
Is this using the original authors code ? If so, do you have their permission to release this ?

Edog
04-12-2011, 04:00 PM
What template edits the arrangement of these buttons on the post bit footer? I need to arrange them a tad better at least for admins and cant for the life of me find where this is.