vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - [AJAX] Helpful Answers - Post Rating System (plus many sub-features) (https://vborg.vbsupport.ru/showthread.php?t=204117)

Simon Lloyd 10-12-2011 05:55 AM

Ted don't you already provide 3 of those in the userprofile stats? isn't possible to already use that query? currently you show:
Quote:

Helpful Postings
Simon Lloyd has Rated xx posts
Simon Lloyd's Posts have been rated good xxx out of xxx times
Would it not be possible to use that in the postbit (split the variables out of the last statement to give the 3 seperate lines, Helpful Answers xx, Positive Votes xx, Negative Votes xx), i remember i asked for just the one (number of answers marked helpful in postbit) here https://vborg.vbsupport.ru/showpost....postcount=1681 :)

But if the load on server is going to outweigh the usefulness of that then forget it, we can live without it!

Ted S 10-12-2011 03:31 PM

Quote:

Originally Posted by Simon Lloyd (Post 2256168)
Ted don't you already provide 3 of those in the userprofile stats? isn't possible to already use that query? currently you show:
Would it not be possible to use that in the postbit (split the variables out of the last statement to give the 3 seperate lines, Helpful Answers xx, Positive Votes xx, Negative Votes xx), i remember i asked for just the one (number of answers marked helpful in postbit) here https://vborg.vbsupport.ru/showpost....postcount=1681 :)

But if the load on server is going to outweigh the usefulness of that then forget it, we can live without it!

Simon you remember my mods better than I do. Whoops! :eek:

There are two fields that you can call [which isn't all 4 but hey it's a start]

hagoodrank
hatotalrank

These deal with what the user does and not with what's done to their posts. You can call them up from the postbit template if you like and format them in their own box, under the post count, etc.

As for adding others, the issue is subqueries. I [apparently] added these two in all 3 versions of the mod on demand but they calculate as votes come in so there is literally a field within user's profile table for each. If you for example wanted to figure out the number of votes they had left in a certain forum you would need to run a query... 10 posts per page and you get 10 queries... very very ineffective, thus avoided.

jl255 10-12-2011 05:24 PM

think i tried those 2 before... doesn't work on postbit. if i'm not mistaken, i asked you abt them before and you said they only work on profile page.

$hagoodrank
$hatotalrank

Simon Lloyd 10-12-2011 07:04 PM

Hi Ted, i can confirm this, i tried using the variable a few different ways, have you an idea of how to call it for the postbit?

Ted S 10-12-2011 07:05 PM

Quote:

Originally Posted by jl255 (Post 2256386)
think i tried those 2 before... doesn't work on postbit. if i'm not mistaken, i asked you abt them before and you said they only work on profile page.

$hagoodrank
$hatotalrank

In the postbit the variables are called up per post using the array $post[] so $post[hagoodrank] or such. $hagoodrank on it's own would be blank as it's not defined...

This is explained in the 2nd post of the mod: https://vborg.vbsupport.ru/showpost....65&postcount=2

Simon Lloyd 10-12-2011 07:17 PM

Yes i remember :), however using $post[hagoodrank] will only show if that post has been ranked not your overall helpfulanswers, using this post[$hatotalrank] just shows []

Simon Lloyd 10-12-2011 07:21 PM

All your posted variables in that post show like this in postbit
Quote:

- The total number of ratings
- The number of good ratings
0 - The number of bad ratings
0 - True if the post is positive overall (more good than bad ratings)
- True if the user can rate the post (false if they are banned or have rated it).
- True if the user has already rated the post.
0 - The number of good votes the user's posts have
0 - The total rank the user's posts have
0 - The number of bad votes the user's posts have
- The total ratings of a member's ppsts
- The total good ratings of a member's posts
- The total bad ratings of a member's posts

Trust me i don't have zero votes :)

Ted S 10-12-2011 09:10 PM

Quote:

Originally Posted by Simon Lloyd (Post 2256434)
Yes i remember :), however using $post[hagoodrank] will only show if that post has been ranked not your overall helpfulanswers, using this post[$hatotalrank] just shows []

$post[hatotalrank] or $post['hatotalrank']... refers to the variable hatotalrank from the $post[] array where as $post[$hatotalrank] tries to call an element $hatotalrank in an array that doesn't exist.

I don't have a 3.8 server up anymore, so debugging has become a bit harder but if you look at the postbit template and don't see a lot of calls $post then I'm remembering the wrong array name. It should be exactly the same context as the variable for posts or joindate.

Simon Lloyd 10-12-2011 10:44 PM

Ted, you still have access to my test site, if you've forgotten i'll pm you details.

I just added all your variables as a test like this
Quote:

$post[totalrank] - The total number of ratings <br />
$post[goodrank] - The number of good ratings<br />
$post[badrank] - The number of bad ratings <br />
$post[helpfulgood] - True if the post is positive overall (more good than bad ratings)<br />
$show[rate_helpfulanswer] - True if the user can rate the post (false if they are banned or have rated it).<br />
$post[rate_helpfulanswer] - True if the user can rate the post (false if they are banned or have rated it).<br />
$post[helpfulanswerid] - True if the user has already rated the post.<br />
$post[hagoodrank] - The number of good votes the user's posts have<br />
$post[hatotalrank] - The total rank the user's posts have<br />
$post[habadrank] - The number of bad votes the user's posts have<br />
$helpfulposts[totalranks] - The total ratings of a member's ppsts<br />
$helpfulposts[goodranks] - The total good ratings of a member's posts<br />
$helpfulposts[badranks] - The total bad ratings of a member's posts<br />
$post[totalranks]<br />
$post[goodranks]<br />
$post[badranks]

Simon Lloyd 10-12-2011 10:50 PM

Ah, incommunicado eh? right then, email me at simonDOTlloydATthecodecageDOTcom and i'll send you the details :)


All times are GMT. The time now is 10:11 PM.

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.02714 seconds
  • Memory Usage 1,751KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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