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)

Ted S 08-23-2009 02:52 AM

Quote:

Originally Posted by sockwater (Post 1871984)
I'm not quite following you. Post #1054 shows how, with one query, you can pull all the information (what the vote was, the voter's username & userid) on each vote for each post being displayed in the thread, and puts it in an array that's indexed by postid. You can use that array to display all a given post's votes, showing what the vote was and linking the voter's username to their profile below the postbit when that post author is viewing the thread. I was only showing you how it can be done with one query per thread instead of one query for each post in the thread. No restructuring of the vote data needed. Hopefully I've explained this well.

sockwater,

Your example is very useful however the feature people have been asking for is a summary of a user's entire voting results (i.e. votes to all of their posts). So to do this I would still need to fetch all of their posts... hence the extra query. There are a few other requests where I think the code you provided would come in handy but the big one I've been working to address is the overall voting results.

I've already mapped out ways to do this without an extra query but with a few changes to the tables (creating an overall history for each user) and that's my next step.

Chief Corn 08-25-2009 04:27 AM

I read that it was fixed a few pages ago, but I'm having duplicate post issue. I don't remember this happening when I first installed this a few days ago. I remember the last changes I made were editing the template for digg style, and turning negative voting off. I went back turning negative vote on and removing the digg style but it's still double posting. Not sure what happened or if it was happening from the beginning.

Ted S 08-25-2009 03:13 PM

Quote:

Originally Posted by Chief Corn (Post 1873837)
I read that it was fixed a few pages ago, but I'm having duplicate post issue. I don't remember this happening when I first installed this a few days ago. I remember the last changes I made were editing the template for digg style, and turning negative voting off. I went back turning negative vote on and removing the digg style but it's still double posting. Not sure what happened or if it was happening from the beginning.

Have you imported any older data? What version are you running?

Chief Corn 08-25-2009 09:57 PM

Quote:

Originally Posted by Ted S (Post 1874127)
Have you imported any older data? What version are you running?

This is a new install of 1.9.5 on vBulletin 3.8.4. I have the manual template variable enabled. I cleared the votes and the double post is above the original voted post. The one that says 4294967294 members like this.

http://www.southbaybodywork.com/mass...look-like.html

Ted S 08-25-2009 10:28 PM

I'm not see any example in the url you posted?

Chief Corn 08-25-2009 10:45 PM

Quote:

Originally Posted by Ted S (Post 1874421)
I'm not see any example in the url you posted?

http://www.southbaybodywork.com/mass...ke.html#post11

Ted S 08-26-2009 02:23 AM

I see the text "4294967294 members like this"

It looks like you have modified things a bit. Can you explain?

Chief Corn 08-26-2009 07:07 AM

I remember first enabling manual template, and putting this in my postbit

Code:

<div id="helpfulanswers_box_$post[postid]" class="smallfont">
$helpful_answers</div>

I changed the guest vote URL to link directly to register.php.

Did the Digg style change, enabling hide vote on first post, disallowing negative responses, enabling self voting.

I enabled get top post for thread, and added this to my showthread to link to the highest rated thread.

Code:

<a href="$vboptions[bburl]/showthread.php?t=$threadid#post$thread[toppost]">
And changing the phrase $vbphrase[helpfulanswer_x_found] to {1} members like this.

I'm pretty sure there weren't any changes to the plugins. All reputation settings are disabled. I'm not sure where it's getting the number 4294967294.

Edit: I Googled the number and found this interesting:
Code:

2^32-1 = 4,294,967,295 

This is the value of an unsigned 32 bit integer: 0 to +4,294,967,295

In other words, there is a type bug someone in vBadvanced that is causing this in numerous places in vBa and vBulleting. We have the same problem when we delete a link by a user who has posted only one link. The post count of that user always goes to 4,294,967,295. Running cleanup scripts does not help.


Ted S 08-26-2009 02:57 PM

Got it. Thanks for all the history.

It appears you have a few duplicate tables out there. I will write a little script to fix these and hopefully get rid of the issue.

Ted S 08-28-2009 03:48 AM

Quote:

Originally Posted by Chief Corn (Post 1874595)
I remember first enabling manual template, and putting this in my postbit

Code:

<div id="helpfulanswers_box_$post[postid]" class="smallfont">
$helpful_answers</div>

I changed the guest vote URL to link directly to register.php.

Did the Digg style change, enabling hide vote on first post, disallowing negative responses, enabling self voting.

I enabled get top post for thread, and added this to my showthread to link to the highest rated thread.

Code:

<a href="$vboptions[bburl]/showthread.php?t=$threadid#post$thread[toppost]">
And changing the phrase $vbphrase[helpfulanswer_x_found] to {1} members like this.

I'm pretty sure there weren't any changes to the plugins. All reputation settings are disabled. I'm not sure where it's getting the number 4294967294.

Edit: I Googled the number and found this interesting:
Code:

2^32-1 = 4,294,967,295 
 
This is the value of an unsigned 32 bit integer: 0 to +4,294,967,295
 
In other words, there is a type bug someone in vBadvanced that is causing this in numerous places in vBa and vBulleting. We have the same problem when we delete a link by a user who has posted only one link. The post count of that user always goes to 4,294,967,295. Running cleanup scripts does not help.


Go ahead and run ha_revote.php from the first post of this thread. That will remove all of the duplicates.

If they return let me know.


All times are GMT. The time now is 07:14 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.06401 seconds
  • Memory Usage 1,758KB
  • 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_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)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