vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - [AJAX] Helpful Answers - Allow users to rate individual posts (https://vborg.vbsupport.ru/showthread.php?t=233296)

Ted S 04-16-2012 05:51 PM

Quote:

Originally Posted by Trevor Matthews (Post 2320669)
It has been sorted, I had to modify the template.
Details are Here, should be sorted in later releases.

Removing template hooks will definitely impact mods (and not just this one)... Glad they sorted it out and are returning those as options.

wilford brimley 04-17-2012 05:02 AM

i dont know alot about editing vbulletin, ive only used phpbb/

how cna i remove the "did you find this helpful" phrase.

and two, how can i move the plus/minus to beside the post number.

this is a good mod but its ugly so i dont think ill use it.

Ted S 04-17-2012 05:44 AM

Quote:

Originally Posted by wilford brimley (Post 2320799)
i dont know alot about editing vbulletin, ive only used phpbb/

how cna i remove the "did you find this helpful" phrase.

and two, how can i move the plus/minus to beside the post number.

this is a good mod but its ugly so i dont think ill use it.

As you don't like the mod don't use it.

wilford brimley 04-19-2012 02:09 AM

Quote:

Originally Posted by Ted S (Post 2320803)
As you don't like the mod don't use it.

i dont like the way it looks because when it is in the thread text box it jumbles up close to the post when the skin is fluid and compressed. i was asking if it can be made to look good for me up beside the number of the post on thread (logical placement)

Ted S 04-19-2012 05:48 AM

Quote:

Originally Posted by wilford brimley (Post 2321443)
i dont like the way it looks because when it is in the thread text box it jumbles up close to the post when the skin is fluid and compressed. i was asking if it can be made to look good for me up beside the number of the post on thread (logical placement)

With templates you can move elements wherever you want, however you want. Mods are merely a starting point to serve the general community.

blacklynx 04-24-2012 09:08 PM

when ranked , appears a error:

<div id="helpfulanswers_box_" style="text-align:right;">
<br /><hr size="1" style="color:$stylevar[tborder_bgcolor]" />



<i> <font size="2" color="green">+ 3 </font><font size="1" color="green">Galletas </i></font>
<br><br>








<strong><font size="1" color="green">thank you!</font></strong>

</div>


What´s going on?

Ted S 04-25-2012 05:39 AM

Quote:

Originally Posted by blacklynx (Post 2323198)
What?s going on?

Have you modified any of the templates from the addon or your post/ post legacy style?

blacklynx 04-25-2012 03:43 PM

nope. Im using a vbulleting generated style.

michaelbang 04-25-2012 10:18 PM

Resolved (disabled negative voting): When members vote, and the "1 out of 1 members..." come up, the icons (the red/green hands) disappear. What to do?

Resolved (edited helpful-answers template): And when giving thumbs up or down in post (not the first one) the text "1 out of 1 members..." is RIGHT above the posts text. Can I do so that the post text is one line lower? It seems a bit cramped up.

I use v. 4.1.11.

Thanks.

Ted S 04-27-2012 05:27 AM

Quote:

Originally Posted by michaelbang (Post 2323547)
Resolved (disabled negative voting): When members vote, and the "1 out of 1 members..." come up, the icons (the red/green hands) disappear. What to do?

Resolved (edited helpful-answers template): And when giving thumbs up or down in post (not the first one) the text "1 out of 1 members..." is RIGHT above the posts text. Can I do so that the post text is one line lower? It seems a bit cramped up.

I use v. 4.1.11.

Thanks.

All good or is there anything still outstanding you want to do?

Naijasite 05-08-2012 03:18 PM

I have install and enable the Mode but can not see the icon or rate mode on post.

Please what could be the problem?

Ted S 05-09-2012 01:12 AM

Quote:

Originally Posted by felixkomo (Post 2327363)
I have install and enable the Mode but can not see the icon or rate mode on post.

Please what could be the problem?

Have you enabled it in the forum you are viewing? Have you changed other settings which would impact who sees the voting options such as usergroup restrictions?

socialteenz 05-19-2012 06:20 PM

First of all thank you for this mod.

But i am facing a strange problem, when this mod is enabled in the forumdisplay page, threads are not sorted properly by the last post date.

When disabled everything works fine.

Any idea?

Ted S 05-23-2012 01:00 AM

Voting features work with vB 4.2. Should you find anything broken please report it back to this thread.

Ted S 05-25-2012 03:08 AM

Quote:

Originally Posted by socialteenz (Post 2330779)
First of all thank you for this mod.

But i am facing a strange problem, when this mod is enabled in the forumdisplay page, threads are not sorted properly by the last post date.

When disabled everything works fine.

Any idea?

What, if any, settings have you changed? How are threads ranked by default?

socialteenz 05-25-2012 08:05 PM

Quote:

Originally Posted by Ted S (Post 2332590)
What, if any, settings have you changed? How are threads ranked by default?

By default they are ranked by descending order. I tried disabling your mod, everything looked fine. If you want, i can pm you the screen shots.

Ted S 05-25-2012 09:54 PM

Quote:

Originally Posted by socialteenz (Post 2332837)
By default they are ranked by descending order. I tried disabling your mod, everything looked fine. If you want, i can pm you the screen shots.

And your settings for the mod....?

Eole 06-03-2012 09:50 PM

Hi,

When someone vote on a post, the thread appears as many time as there are posts that have been voted (+ or -). Who to avoid this duplicates ?

Thanks.

Ted S 06-03-2012 11:11 PM

Quote:

Originally Posted by Eole (Post 2336297)
Hi,

When someone vote on a post, the thread appears as many time as there are posts that have been voted (+ or -). Who to avoid this duplicates ?

Thanks.

That's certainly not something that should be happening... It sounds like something is going wrong with your mySQL records...

Take a look at the table helpfulpost and a post that shows up multiple times. There should be just one entry per postid.

I.E. SELECT COUNT(*) FROM helpfulpost WHERE postid = '12345';

bfdzio 06-04-2012 01:43 PM

Quote:

Originally Posted by bfdzio (Post 2316414)
Anyone interested in building a file like the helpfulanswers.php but that would display 'most helpful' posts from the past 24 hours?

Quote:

Originally Posted by bfdzio (Post 2318000)
Got it working, now I just need to make it show a preview of the post (or the whole post).

Probably more work involved in that though.


Ted S...do you have any idea on how I might do this (the second quote)? I got it working thanks to your help but just saw this post was bumped and recalled I never did figure out how to make it preview the posts.

I can probably handle the design part of it but is that a specific code I am looking for or anything?

Ted S 06-04-2012 03:13 PM

Quote:

Originally Posted by bfdzio (Post 2336475)
Ted S...do you have any idea on how I might do this (the second quote)? I got it working thanks to your help but just saw this post was bumped and recalled I never did figure out how to make it preview the posts.

I can probably handle the design part of it but is that a specific code I am looking for or anything?

You'll need to alter the script's query to join the post table, get the body message, potentially parse it through the editor if you allow styling and that's about it.

SELECT <existing stuff>,post.message

JOIN post ON helpfulpost.postid = post.postID

socialteenz 06-04-2012 07:30 PM

Quote:

Originally Posted by Ted S (Post 2332864)
And your settings for the mod....?

I am using the default settings. Everything is fine, if the mod is disabled.

Ted S 06-04-2012 08:34 PM

Quote:

Originally Posted by socialteenz (Post 2336554)
I am using the default settings. Everything is fine, if the mod is disabled.

Modify the plugin hook forumdisplay_query_threadid to

Code:

if($foruminfo['helpfulanswerbits'] AND $foruminfo['helpfulanswerorderbits']){
                    $hook_query_joins .= "LEFT JOIN " . TABLE_PREFIX . "helpfulpost AS helpfulpost ON(thread.threadid = helpfulpost.threadid)";
                }

And let me know if that fixes it

socialteenz 06-05-2012 03:39 AM

Quote:

Originally Posted by Ted S (Post 2336567)
Modify the plugin hook forumdisplay_query_threadid to

Code:

if($foruminfo['helpfulanswerbits'] AND $foruminfo['helpfulanswerorderbits']){
                    $hook_query_joins .= "LEFT JOIN " . TABLE_PREFIX . "helpfulpost AS helpfulpost ON(thread.threadid = helpfulpost.threadid)";
                }

And let me know if that fixes it


Still no luck Ted!

socialteenz 06-05-2012 03:49 AM

Update: I modified forumdisplay_query hook with your code.

That seems to fix my problem.

Ted S 06-05-2012 06:38 AM

Quote:

Originally Posted by socialteenz (Post 2336640)
Update: I modified forumdisplay_query hook with your code.

That seems to fix my problem.

Great. We'll roll that into the next official release.

Eole 06-12-2012 07:44 PM

Quote:

Originally Posted by Ted S (Post 2336312)
That's certainly not something that should be happening... It sounds like something is going wrong with your mySQL records...

Take a look at the table helpfulpost and a post that shows up multiple times. There should be just one entry per postid.

I.E. SELECT COUNT(*) FROM helpfulpost WHERE postid = '12345';

Hello TedS,

in the helpfulpost table, every postid has a single line, no duplicate in database. But there are always here in the forum pages. the threadid has 5 line in helpfulpost table (5 distinct postid) that seems correct, but I have exactly 5 duplicate threads on the thread page of the forum.

Regards.

Ted S 06-12-2012 09:42 PM

Quote:

Originally Posted by Eole (Post 2339084)
Hello TedS,

in the helpfulpost table, every postid has a single line, no duplicate in database. But there are always here in the forum pages. the threadid has 5 line in helpfulpost table (5 distinct postid) that seems correct, but I have exactly 5 duplicate threads on the thread page of the forum.

Regards.

And when you disable just this mod that goes away, correct?

penmai.com 06-25-2012 07:24 PM

please help me, how to make only certain usergroup can vote it, for example only moderator and supermod can vote it.

Ted S 06-25-2012 07:33 PM

Quote:

Originally Posted by penmai.com (Post 2342845)
please help me, how to make only certain usergroup can vote it, for example only moderator and supermod can vote it.

That's not something built in but you can hack the mod to do it through both the XML and php file.

penmai.com 06-25-2012 07:36 PM

Thank you for your immediate reply.

Can you tell me, whats the exact code i have to change, to get the feature?

Ted S 06-25-2012 11:31 PM

Quote:

Originally Posted by penmai.com (Post 2342851)
Thank you for your immediate reply.

Can you tell me, whats the exact code i have to change, to get the feature?

In the xml file there's an existing set of functions that check for a user's rights to vote in the hook postbit_display_complete. A very similar routine exists in the rate function of helpfulanswers.php. You'll want to change both so only approved users see the option to vote on the frontend and so that no one can trick a vote in on the backend.

Beyond that I can't teach you how to code but there are many great resources out there that will... Start hacking and searching, that's the best way to learn.

Impromptu 07-11-2012 11:49 PM

Quote:

Originally Posted by Eole (Post 2336297)
Hi,

When someone vote on a post, the thread appears as many time as there are posts that have been voted (+ or -). Who to avoid this duplicates ?

Thanks.

First of all thanks for the Mod.

I have the same problem as Eole in that while it works fine, it replicates the thread like three times. If I switch disable Helpful Answers the replicated threads are deleted.

I read the suggestions but really dont get it. :(

Ted S 07-12-2012 02:05 AM

Quote:

Originally Posted by Impromptu (Post 2347132)
First of all thanks for the Mod.

I have the same problem as Eole in that while it works fine, it replicates the thread like three times. If I switch disable Helpful Answers the replicated threads are deleted.

I read the suggestions but really dont get it. :(

He stopped responding [can't say I blame him] so we never sorted out the issue for his forum... Back to square one.

Take a look at the table helpfulpost and a post that shows up multiple times. There should be just one entry per postid.

I.E. SELECT COUNT(*) FROM helpfulpost WHERE postid = '12345';

Impromptu 07-12-2012 02:01 PM

Quote:

Originally Posted by Ted S (Post 2347154)
He stopped responding [can't say I blame him] so we never sorted out the issue for his forum... Back to square one.

Take a look at the table helpfulpost and a post that shows up multiple times. There should be just one entry per postid.

I.E. SELECT COUNT(*) FROM helpfulpost WHERE postid = '12345';

Hey Ted,

First of all thanks for the response.

Unfortunately, I'm a layman in I.T and have no idea what you mean in terms of table?

I might just try to find an easier Mod, which is ashame as I 'liked' this one

But thanks again for responding

Ted S 07-12-2012 04:14 PM

Gotcha... Well best of luck with your site!

Eole 07-22-2012 01:39 PM

Quote:

Originally Posted by Ted S (Post 2339116)
And when you disable just this mod that goes away, correct?

Hi Ted S,

Yes, when disabling the mod, everything looks right.

I found the options that generate duplicate entries in the forum page :
On your forum, when activating "Order By Helpful Answers Votes?" (set to yes), every thread that have multiple post with a note, the thraed appears multiple times in the thread page of the forum.

I have disable this option at this time (not useful for my forum).

I have an other question : did you think about sorting posts in a thread depending on the number of positive/negative vote. this could give users show rapidly the bests answers (when multiple) just below the question. I'm just working on it, but maybe not with the best way than you.

Bye.

faisaly.com 08-11-2012 04:42 PM

Hello all .
There is a nasty bug with this hack .
If someone tries to copy the link of a yes/no button which is used for rating while he is logged in , and then logs out and enters it in a browser, the rate gets accepted!!
(suppose the link to the yest button is like this : http://forum.ustmb.ir/helpfulanswers...id=5662&rank=1 , if you copy this to your address bar and press enter, the rate will be accepted! while you are not logged in at all!)
This causes mischievous users to abuse the system for giving positive or negative rates as they wish!
would someone please think about it ?

Ted S 08-11-2012 07:02 PM

1 Attachment(s)
Quote:

Originally Posted by faisaly.com (Post 2356244)
Hello all .
There is a nasty bug with this hack .
If someone tries to copy the link of a yes/no button which is used for rating while he is logged in , and then logs out and enters it in a browser, the rate gets accepted!!
(suppose the link to the yest button is like this : http://forum.ustmb.ir/helpfulanswers...id=5662&rank=1 , if you copy this to your address bar and press enter, the rate will be accepted! while you are not logged in at all!)
This causes mischievous users to abuse the system for giving positive or negative rates as they wish!
would someone please think about it ?

Interesting.... There's 5 of 6 different options that would stop this from happening like if you had a post minimum, votes per day, etc. but in the absence of those it looks like you are correct. And it's gone unnoticed for years too :D

Simple fix with the attached xml and voting script.

I'll test around more this evening and clean it up for a release.

Ted S 08-12-2012 12:03 AM

HA version 2.4.2 has been released this evening to fix two small but important bugs.

The first resolves issues where selected voting types should show strange characters in the ajax posted votes [i.e. %1$s voted...]. This changes phrases only.

The second and more devious issue was spotted by faisaly.com in which users could copy a vote link, logout and use it multiple times to game the system. Forums with minimum post counts and voting limits were not impacted but given the potential impact it's suggested all forums update.

Changes are made to the XML file and /upload/helpfulanswers.php only.

No templates were modified.


All times are GMT. The time now is 08:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05785 seconds
  • Memory Usage 1,854KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (27)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete