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)

netzwart 02-21-2011 08:45 AM

Hi,

i love this MOD! However, before i am going to make it available to my users, i need to find a solution to the following problem:

In the backend, i activated/enabled "Most Helpful Answers", so that a page of the top answers (posts) based on overall votes should be displayed.

1. Where do i find this page?
2. Will there be a link in the navbar being directed to said page?

Thank you in advance

Netzwart

d2gaming 02-25-2011 03:21 AM

Is this working for 4.1.2? Nothing seems to be showing up in the post

Ted S 02-26-2011 01:05 AM

Quote:

Originally Posted by d2gaming (Post 2166582)
Is this working for 4.1.2? Nothing seems to be showing up in the post

Have you enabled it in the forum you are viewing?

Vick98 02-26-2011 05:34 AM

Quote:

Originally Posted by d2gaming (Post 2166582)
Is this working for 4.1.2? Nothing seems to be showing up in the post

I am having the same issue and yes it is enabled.

TheLastSuperman 02-26-2011 05:57 AM

Quote:

Originally Posted by netzwart (Post 2164889)
Hi,

i love this MOD! However, before i am going to make it available to my users, i need to find a solution to the following problem:

In the backend, i activated/enabled "Most Helpful Answers", so that a page of the top answers (posts) based on overall votes should be displayed.

1. Where do i find this page?
2. Will there be a link in the navbar being directed to said page?

Thank you in advance

Netzwart

Code:

http://www.yoursite.com/helpfulanswers.php
OR
http://www.yoursite.com/forum/helpfulanswers.php

There is no link in the navbar, I'll code that in as an option via plugin this weekend.

Quote:

Originally Posted by Vick98 (Post 2167034)
I am having the same issue and yes it is enabled.

See Ted's quote below, you have enabled the Helpful answers in the Forum Manager correct? Edit the desired forum and near the bottom are the options ;).

Quote:

Originally Posted by Ted S (Post 2166982)
Have you enabled it in the forum you are viewing?


Munkholm 03-03-2011 12:26 PM

Quote:

Originally Posted by TheLastSuperman (Post 2167037)
...There is no link in the navbar, I'll code that in as an option via plugin this weekend.

That would be AWESOME ! Is it possible to show a "top ten" of the most helpful answers for each month ?? I?ll need something like that before I install on the live site ;)

Have been trying to get a "top list" by making up a url like:
http://mydomain.org/admincp/helpfula...&orderby=count

Thanks a ton for your efforts !!

netzwart 03-04-2011 07:37 AM

Quote:

Originally Posted by TheLastSuperman (Post 2167037)
Code:

http://www.yoursite.com/helpfulanswers.php
OR
http://www.yoursite.com/forum/helpfulanswers.php

There is no link in the navbar, I'll code that in as an option via plugin this weekend.

Hi LastSuperman,

did you already code that? If YES, how can i integrate this plugin into my installation ?

Greetings

Netzwart

Munkholm 03-04-2011 07:46 AM

Quote:

Originally Posted by netzwart (Post 2169433)
Hi LastSuperman,

did you already code that? If YES, how can i integrate this plugin into my installation ?

Greetings

Netzwart

Don?t think that it?s coded already, but it?s easy to get the link to helpfulanswers.php in the navbar by using this mod.

I really hope that TheLastSuperman or Ted S will focus on the functionality of the "most helpful answers" page instead.
Preferably letting users select Month and Year, and display the "Top ten" list by those inputs ;) Pleeaase... Am willing to donate money for this :)

PS: Am looking to use this mod for a "nomination system" where users can "nominate" each post for "Post of the Month"

Munkholm 03-04-2011 09:03 AM

TheLastSuperman & Ted S.

I know nothing about coding, but I would think that you could borrow a lot of the needed coding from the Top Poster of the Month/Year mod ?

"Just" change:
User Id > Post Id
Total Posts > Total Helpful Votes
Join Date > Post Date
[S]Posts In Month[/S]

Wish I knew how to do this myself.

netzwart 03-04-2011 09:16 AM

Quote:

Originally Posted by Munkholm (Post 2169435)
Don?t think that it?s coded already, but it?s easy to get the link to helpfulanswers.php in the navbar by using this mod.

Great Hint !!!! :up:

Thank you

Netzwart

El Orans 03-10-2011 10:39 PM

Quote:

Originally Posted by Ted S (Post 2103200)
Try reverting the templates. vBulletin has an issue where data gets "stuck" and needs to be forcefully updated.

I have reverted everything, still the same issue. Any other options?

Alan_SP 03-13-2011 11:43 AM

Quote:

Originally Posted by Ted S (Post 1957576)
Tips & Tricks Using Template Variables:

{vb:raw post.totalrank} - The total number of ratings
{vb:raw post.goodrank} - The number of good ratings
{vb:raw post.badrank} - The number of bad ratings
{vb:raw post.helpfulgood} - True if the post is positive overall (more good than bad ratings)
{vb:raw post.rate_helpfulanswer} - True if the user can rate the post (false if they are banned or have rated it).
{vb:raw post.helpfulanswerid} - True if the user has already rated the post.

I would really like to have something like that to use in postbit (and of course in postbit_legacy).

For example:

User rated: Total/Pos/Neg
User get rated: Total/Pos/Neg

Or just Pos/Neg

As it is used in Post Thanks and Post Groan mod. Now you have to go to profile to see stats like this.

Ted S 03-13-2011 06:28 PM

Quote:

Originally Posted by Alan_SP (Post 2172817)
I would really like to have something like that to use in postbit (and of course in postbit_legacy).

For example:

User rated: Total/Pos/Neg
User get rated: Total/Pos/Neg

Or just Pos/Neg

As it is used in Post Thanks and Post Groan mod. Now you have to go to profile to see stats like this.

Thanks for the suggestion. These variables are excluded as they would (currently) require a query per post which is not ideal for load.

Alan_SP 03-14-2011 02:40 PM

Yes, I understand, that is a problem. So, you would need to rewrite mod...

sticky 03-15-2011 07:02 AM

1 Attachment(s)
Ted, I was wondering if it would be possible to model the hide post feature after the ignore feature. That way it would work for all styles and users could click to see the negatively rated post if they still desired.

Example:

Phaedrus 03-16-2011 04:10 AM

Is there a way to make a list of who has liked and disliked at the bottom of the post? My users liked that in the Thank/Groans hacks.

Ted S 03-17-2011 01:33 AM

Quote:

Originally Posted by Phaedrus (Post 2173869)
Is there a way to make a list of who has liked and disliked at the bottom of the post? My users liked that in the Thank/Groans hacks.

With the current code this would require a query per post which is not ideal. You could hack the hack to store this more easily.

ayam 03-20-2011 09:53 PM

Quote:

Originally Posted by Munkholm (Post 2169097)
That would be AWESOME ! Is it possible to show a "top ten" of the most helpful answers for each month ?? I?ll need something like that before I install on the live site ;)

Have been trying to get a "top list" by making up a url like:
http://mydomain.org/admincp/helpfula...&orderby=count

Thanks a ton for your efforts !!

this is what i've been looking too

hoping that Ted and Superman can add this for us. to make it visible to users is better

Ted S 03-21-2011 04:43 AM

Quote:

Originally Posted by ayam (Post 2175594)
this is what i've been looking too

hoping that Ted and Superman can add this for us. to make it visible to users is better

Making up urls won't work in this case... but nice try. :D

As far as the feature, I'm looking at a version update this summer. If you want it in shorter order it's not a particularly difficult hack if you, or someone you know, has some decent coding skills... Votes are stored as individual entries and an overall score by post. The top helpful answers page uses the post scores, you'd have to switch things up to the vote log, add a little time checking and there you go. Nothing crazy but certainly not basic HTML either.

ayam 03-21-2011 06:37 AM

Quote:

Originally Posted by Ted S (Post 2175699)
Making up urls won't work in this case... but nice try. :D

As far as the feature, I'm looking at a version update this summer. If you want it in shorter order it's not a particularly difficult hack if you, or someone you know, has some decent coding skills... Votes are stored as individual entries and an overall score by post. The top helpful answers page uses the post scores, you'd have to switch things up to the vote log, add a little time checking and there you go. Nothing crazy but certainly not basic HTML either.

i don't want to mess up anything with the coding or the forum so better to play safe, waiting for ur update :D

1 more question, is it normal when someone rating a post, they will be brought back to the 1st post?

Tom Kagan 03-23-2011 03:45 PM

Nice product - well coded. Kudos!

A couple of nitpicks:
  • Still some usage of '&' in some urls instead of '&'
  • No need for './' when specifying href in anchor elements
  • Hardcoded 'images/buttons' instead of using {vb:stylevar imgdir_button}
  • Hardcoded <img> elements in .xml file lines 934-946 instead of in template
  • Still using vb3.x syntax to specify stylevar color on <hr> which obviously doesn't work on vb4.x
  • Still using vb3.x post url syntax 'showthread.php?p=<post#>#post<post#> to jump to post from stat screen instead of vb4.x canonical syntax 'showthread.php?t=<thread#>&viewfull=1&p=<post#>#p ost<post#>'
  • Erroneous double call to $templater->render() in helpfulanswers.php lines 510 & 532
  • Not really a need for a 2nd code path in helpfulanswers.php for 'guestrate' param. The 'rate' param path could just check if user is logged in.
  • vb parameter 'sessionurl' and/or 'sessionurl_q' should be used in all cases
  • Urls to posts should be run through the 'Friendly Urls' munger.
  • Soft deleted posts should not show up in helpfulanswers statistics; user totals updated accordingly.
  • Hard deleted posts should have helpfulanswer ratings on post also deleted
  • Option 'Enable Single Post Voting' would probably be more useful per forum instead of global
  • A minimum rep amount might be nice when using user's rep power or percentage
  • 'Least Helpful Answers' stats/marking would be nice instead of just ignoring them. :)
  • When you get it working, anonymous reporting should use class_vurl instead of curl
  • Admincp deleting post ratings does not update helpfulpost
  • Admincp option 'Enable Single Post Voting' is missing descriptive phrase due to phrase name misspelling
  • Admincp phrases should be in own group instead of spread to various preexisting groups. There also appears to be some redundancies.
  • Admincp 'Rating History and Editing' & 'Bulk Forum Enabler' should instead be in maintenance block
  • Admincp needs way to repair/recalculate user totals due to system error/User merging/deleting etc.
  • Admincp templates should be in own group instead of 'Help Templates'
  • Using 'onmouseover', 'onmouseout' should be removed in favor of css 'hover'
  • Using 'onclick' for AJAX call should be removed in favor of progressive enhancement style javascript. If done, <script> element could be moved to just before </body>

If the above were implemented along with some of your enhancements already planned, this hack would go from 'great' to 'near perfect'. ;)

tightjeansforum 03-23-2011 04:59 PM

I have this installed and turned on in every forum but I dont see the rep system.

Ted S 03-26-2011 01:57 AM

Quote:

Originally Posted by ayam (Post 2175713)
i don't want to mess up anything with the coding or the forum so better to play safe, waiting for ur update :D

1 more question, is it normal when someone rating a post, they will be brought back to the 1st post?

Are you not using ajax on your site?

Ted S 03-26-2011 01:58 AM

Quote:

Originally Posted by Tom Kagan (Post 2176571)
Nice product - well coded. Kudos!

A couple of nitpicks:
  • Still some usage of '&' in some urls instead of '&amp;'
  • No need for './' when specifying href in anchor elements
  • Hardcoded 'images/buttons' instead of using {vb:stylevar imgdir_button}
  • Hardcoded <img> elements in .xml file lines 934-946 instead of in template
  • Still using vb3.x syntax to specify stylevar color on <hr> which obviously doesn't work on vb4.x
  • Still using vb3.x post url syntax 'showthread.php?p=<post#>#post<post#> to jump to post from stat screen instead of vb4.x canonical syntax 'showthread.php?t=<thread#>&viewfull=1&p=<post#>#p ost<post#>'
  • Erroneous double call to $templater->render() in helpfulanswers.php lines 510 & 532
  • Not really a need for a 2nd code path in helpfulanswers.php for 'guestrate' param. The 'rate' param path could just check if user is logged in.
  • vb parameter 'sessionurl' and/or 'sessionurl_q' should be used in all cases
  • Urls to posts should be run through the 'Friendly Urls' munger.
  • Soft deleted posts should not show up in helpfulanswers statistics; user totals updated accordingly.
  • Hard deleted posts should have helpfulanswer ratings on post also deleted
  • Option 'Enable Single Post Voting' would probably be more useful per forum instead of global
  • A minimum rep amount might be nice when using user's rep power or percentage
  • 'Least Helpful Answers' stats/marking would be nice instead of just ignoring them. :)
  • When you get it working, anonymous reporting should use class_vurl instead of curl
  • Admincp deleting post ratings does not update helpfulpost
  • Admincp option 'Enable Single Post Voting' is missing descriptive phrase due to phrase name misspelling
  • Admincp phrases should be in own group instead of spread to various preexisting groups. There also appears to be some redundancies.
  • Admincp 'Rating History and Editing' & 'Bulk Forum Enabler' should instead be in maintenance block
  • Admincp needs way to repair/recalculate user totals due to system error/User merging/deleting etc.
  • Admincp templates should be in own group instead of 'Help Templates'
  • Using 'onmouseover', 'onmouseout' should be removed in favor of css 'hover'
  • Using 'onclick' for AJAX call should be removed in favor of progressive enhancement style javascript. If done, <script> element could be moved to just before </body>
If the above were implemented along with some of your enhancements already planned, this hack would go from 'great' to 'near perfect'. ;)

That's one heck of a list. Thanks.

Tom Kagan 03-27-2011 01:23 AM

Quote:

Originally Posted by Ted S (Post 2177552)
That's one heck of a list. Thanks.

You are welcome. I help out a friend who runs a large site on a shoestring. I take my code audits seriously. :) Especially considering some of the other hacks I've looked at, I was impressed by this hack's attention to detail, so I felt a similar level would be in order when making comments.

anht1706@hotmai 04-06-2011 06:45 PM

I want to change the word " found this post helpful", which file should I edit? Thanks

Ted S 04-10-2011 07:56 AM

Quote:

Originally Posted by anht1706@hotmai (Post 2181616)
I want to change the word " found this post helpful", which file should I edit? Thanks

Search your phrase manager and translate the bit.

kingMOB 04-10-2011 08:22 PM

Hi Ted, is there a way to move the "See the top rated post in this thread" to the thread tools bar? And print in the thread list, just beside a thread tittle, the number of ratings that was given to it?

Ted S 04-13-2011 05:27 PM

Quote:

Originally Posted by kingMOB (Post 2183123)
Hi Ted, is there a way to move the "See the top rated post in this thread" to the thread tools bar? And print in the thread list, just beside a thread tittle, the number of ratings that was given to it?

You would have to change the hook location in the xml file at this time but it would be fairly simple to do.

The Rocketeer 04-20-2011 05:56 AM

Hi, could you help me adding some space between this and the forum postbit border please?

currently its touching it.

https://vborg.vbsupport.ru/external/2011/04/13.jpg

edit: would also be nice if you introduced some new and more professional looking thumbs icons

netzwart 04-20-2011 06:13 AM

I need this information too! Thanks ...

Quote:

Originally Posted by The Rocketeer (Post 2186557)
edit: would also be nice if you introduced some new and more professional looking thumbs icons

You may exchange the corresponding files (e. g. ha_thumbsup.gif) in

forum/images/buttons

in order to have more professional looking thumbs. There are a lot of professional thumb-files in the www ....

Netzwart

The Rocketeer 04-20-2011 06:41 AM

Quote:

Originally Posted by netzwart (Post 2186561)
I need this information too! Thanks ...



You may exchange the corresponding files (e. g. ha_thumbsup.gif) in

forum/images/buttons

in order to have more professional looking thumbs. There are a lot of professional thumb-files in the www ....

Netzwart

well I have searched google, nothing much pro...

can you post a few that you think are pro? thanks

netzwart 04-20-2011 06:53 AM

Quote:

Originally Posted by The Rocketeer (Post 2186570)
can you post a few that you think are pro? thanks

Sorry, but I don?t know what you think how a professional thumb should look like ;). Just use the picture search of google. There must be something for you ...

Netzwart

Silviu 04-20-2011 11:49 AM

Hello Ted,

Question: is there a way to hide the "helpfulanswer_x_out_of_y" variable if the user hasn't rated a reply yet? :confused:

Right now, the "x out of y members found this post useful" is displayed right next to the thumbs up / down buttons, which we don't really want, because it can bias the opinion of the would-be voter (oh, look, this reply has only 2 positive votes out of 5, i won't bother to read it, just hit minus and be done with it)

Ted S 04-24-2011 02:11 AM

Quote:

Originally Posted by Silviu (Post 2186631)
Hello Ted,

Question: is there a way to hide the "helpfulanswer_x_out_of_y" variable if the user hasn't rated a reply yet? :confused:

Right now, the "x out of y members found this post useful" is displayed right next to the thumbs up / down buttons, which we don't really want, because it can bias the opinion of the would-be voter (oh, look, this reply has only 2 positive votes out of 5, i won't bother to read it, just hit minus and be done with it)

Sure...

Just modify the conditional...

Code:

<if condition="$post['totalrank']">
      <phrase 1="$post[goodrank]" 2="$post[totalrank]" 3="$post[badrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>
    </if>

To something like

Code:

<if condition="$post['totalrank'] AND $post['helpfulanswerid']">
  <phrase 1="$post[goodrank]" 2="$post[totalrank]" 3="$post[badrank]">$vbphrase[helpfulanswer_x_out_of_y]</phrase>
 </if>


JasonP38 04-24-2011 11:25 PM

I installed this mod on my site today and every thing looks good but when I tried to use it I got this message.

https://vborg.vbsupport.ru/external/2011/04/15.jpg

Ted S 04-24-2011 11:57 PM

Quote:

Originally Posted by JasonP38 (Post 2188291)
I installed this mod on my site today and every thing looks good but when I tried to use it I got this message.

The helpfulanswers.php script isn't found indicating you either did not upload it to the right folder or your settings do not match your forum directories properly. You can manually adjust the urls by editing the template if you have a custom installation.

JasonP38 04-25-2011 12:03 AM

thanks Ted, I have it working now. :)

The Rocketeer 04-25-2011 02:59 AM

Hello Ted, Wondering If you could please help us out with this question https://vborg.vbsupport.ru/showpost....&postcount=872

we need some space between this and the forum border

Cybertims 04-25-2011 09:33 AM

Quote:

Originally Posted by Ted S (Post 2150777)
By default this works on every post. You must have changed the options to single rating.

Here's a problem I've got.

When someone makes a helpful thread all is fine, if a post inside that thread is marked as unhelpful the entire thread is then hidden, is is possible to only hide the posts that are marked as unhelpful?

Cheers


All times are GMT. The time now is 02: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.02725 seconds
  • Memory Usage 1,867KB
  • 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
  • (4)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
  • (2)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