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)

juzz86 02-26-2014 07:30 AM

Quote:

Originally Posted by systutorials (Post 2288448)
All good found it under postbit_legacy. Using the {vb:raw post.goodrank} variable works well. Thanks again

Quote:

Originally Posted by systutorials (Post 2288502)
found it, I used {vb:raw post.hagoodrank}
sorry for all the posts :)

Quote:

Originally Posted by Ted S (Post 2317871)
post.totalrank is a post variable so it's not strange that it only shows what that post got :D

If you scroll back to the first page of the mod there's a list of accessible variables with brief descriptions. I don't recall them all off hand but if I had any common sense when making this version it would have been post.hatotalrank

Ted, hi from Australia.

Mate I have been using your plugin for a while now, with great results. I scoured the thread time and time again going over the posts of those who've tried to do this before me, as I'm having the same trouble.

I am attempting to add a 'good' tally to the postbit. Getting it into place and stuff is fine, but I cannot for the life of me seem to find the correct variable to put here.

Here's the postbit:

https://vborg.vbsupport.ru/external/2014/02/6.png

And here's the template source (I have this stacked under the 'thanks' hack postbit template):

Code:

<vb:if condition="$post['userid']">
    <vb:if condition="$post['post_thanks_thanked_times'] == 1">
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};">{vb:rawphrase post_thanks_time_post}</dd>
    <vb:elseif condition="$post['post_thanks_thanked_posts'] == 1" />
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};">{vb:rawphrase post_thanks_times_post, {vb:raw post.post_thanks_thanked_times_formatted}}</dd>
    <vb:else />
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};">{vb:rawphrase post_thanks_times_posts, {vb:raw post.post_thanks_thanked_times_formatted}}</dd><br>
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};">Helped {vb:raw post.hagoodrank} Times</dd>
    </vb:if>
</vb:if>

Doesn't seem to matter which variable I use, 'hagoodrank', 'hatotalrank', 'totalrank', 'goodrank', you name it - I just can't seem to find the user's global tally of 'good' votes.

I didn't really want to trouble you with it, especially as it's technically an unsupported mod, but mate I am just about out of options. I quoted the bloke above who got it working with post.hagoodrank - that isn't working for me.

Any help greatly appreciated!

Justin

Ted S 02-26-2014 09:04 PM

1 Attachment(s)
Quote:

Originally Posted by juzz86 (Post 2483792)
Mate I have been using your plugin for a while now, with great results. I scoured the thread time and time again going over the posts of those who've tried to do this before me, as I'm having the same trouble.

I am attempting to add a 'good' tally to the postbit. Getting it into place and stuff is fine, but I cannot for the life of me seem to find the correct variable to put here.

You just had to go there and open Pandora's box... :D

So it looks like the variables were setup right (post.hagoodrank & post.hatotalrank), but the routine for updating votes was completed bugged up... results were always 0 because results were never properly saved.

I've fixed that, updating upload/helpfulanswers.php

Also found another bug in switching back & forth in voting types and templates, fixed that in the xml file.

And finally added a resync routine to get all the old votes from members updated, so you don't have zeros on people with vote history, also the xml file.

Note: This is a lightly tried update from my working-version code with whatever else I've done since 2.4.2 so please proceed with caution.

juzz86 02-26-2014 10:11 PM

Quote:

Originally Posted by Ted S (Post 2483943)
You just had to go there and open Pandora's box... :D

So it looks like the variables were setup right (post.hagoodrank & post.hatotalrank), but the routine for updating votes was completed bugged up... results were always 0 because results were never properly saved.

I've fixed that, updating upload/helpfulanswers.php

Also found another bug in switching back & forth in voting types and templates, fixed that in the xml file.

And finally added a resync routine to get all the old votes from members updated, so you don't have zeros on people with vote history, also the xml file.

Note: This is a lightly tried update from my working-version code with whatever else I've done since 2.4.2 so please proceed with caution.

You Sir, are a champion. If you could see the parallels with 'opening Pandora's box' and my life yesterday, you would be laughing about as much as I am now :up:

Truly appreciative of your efforts and quick fix mate - thankyou. I will have a go at this tonight after work and report back my findings. Many thanks again for all your efforts :) If you ever find yourself in my neck of the woods, your first beers are on me :up:

Ted S 02-27-2014 01:05 AM

Now that's a damn good offer. Should I ever make it to yourside of the world, expect a PM...

Let me know how the update goes.

juzz86 03-01-2014 05:51 AM

Quote:

Originally Posted by Ted S (Post 2483974)
Now that's a damn good offer. Should I ever make it to yourside of the world, expect a PM...

Let me know how the update goes.

You're on!

Just reporting back mate, 2.5.0 takes care of that and sorts it beautifully. Tally now reflects the helpfulanswers.php page, and is updating on refresh.

Thanks again mate.

Ted S 03-01-2014 11:06 PM

Quote:

Originally Posted by juzz86 (Post 2484392)
You're on!

Just reporting back mate, 2.5.0 takes care of that and sorts it beautifully. Tally now reflects the helpfulanswers.php page, and is updating on refresh.

Thanks again mate.

Fantastic!

yukirina 06-15-2014 10:01 AM

This mod is absolutely fantastic, but is there still no way to undo a vote that you've done on a post?

Ted S 06-15-2014 07:05 PM

Quote:

Originally Posted by yukirina (Post 2502029)
This mod is absolutely fantastic, but is there still no way to undo a vote that you've done on a post?

Nope.

m7sen 06-29-2014 10:15 AM

hello
any upgrade ?

we are in 2014 !

Randhal007 06-29-2014 05:47 PM

Quote:

Originally Posted by m7sen (Post 2504421)
hello
any upgrade ?

we are in 2014 !

i will wait for that too :)


All times are GMT. The time now is 10:17 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.02292 seconds
  • Memory Usage 1,755KB
  • 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
  • (1)bbcode_code_printable
  • (9)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