vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Reputation comment in post - karma for 3.5 (https://vborg.vbsupport.ru/showthread.php?t=103046)

l3vi 12-16-2005 05:55 AM

Quote:

Originally Posted by rb290
Invalid SQL:

SELECT user.username, reputation.reputation, reputation.reason
FROM reputation AS reputation
LEFT JOIN user AS user ON(user.userid = reputation.whoadded)
WHERE postid = 4096
ORDER BY reputation.dateline LIMIT;

Its missing the end of the query after LIMIT should have a number.


replace: in manage plugins > edit plugin

$post_reputations_bit = $this->registry->db->query_read("
SELECT user.username, reputation.reputation, reputation.reason
FROM " . TABLE_PREFIX . "reputation AS reputation
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = reputation.whoadded)
WHERE postid = ".$post['postid']."
ORDER BY reputation.dateline LIMIT ".$this->registry->options['maxrepgv']
);

with:

$post_reputations_bit = $this->registry->db->query_read("
SELECT user.username, reputation.reputation, reputation.reason
FROM " . TABLE_PREFIX . "reputation AS reputation
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = reputation.whoadded)
WHERE postid = ".$post['postid']."
ORDER BY reputation.dateline"
);

As this is my first mod for vbull I would have to find someone with more exp to be able to tell us why your board is not getting $this->registry->options['maxrepgv']

Unless its not set in admin under reputation options.

l3vi 12-16-2005 06:03 AM

Quote:

Originally Posted by Reeve of shinra
How is it with queries? I found that the 3.0 one ran way too many extra queries so I had to remove it.


It will run a query on each post, with one join. I have not noticed any big or small dif on my boards.

rb290 12-16-2005 07:12 AM

what do the queries do ?
make it run slower or ???

Paul M 12-16-2005 08:06 AM

Quote:

Originally Posted by l3vi
As this is my first mod for vbull I would have to find someone with more exp to be able to tell us why your board is not getting $this->registry->options['maxrepgv']

The answer to that is quite simple - 'maxrepgv' does not exist in default vbulletin.

It is a setting added by my "Display Reputation Given" hack which you obviously must have installed.

Enthonia Tech 12-16-2005 10:43 AM

Thanks A Lot! :)

l3vi 12-16-2005 03:03 PM

hehe thanks Paul,

I have updated the script so that it has no limit, should run in a standard board now. ;p

Skitzzo 12-16-2005 03:41 PM

I wish I had seen this earlier... I just paid a guy for porting over a different version of this... oh well... nice hack anyway.

YOimYO 12-27-2005 10:52 PM

awesome !!!! :D

zylstra 01-02-2006 03:42 AM

Can you add the functionality to turn the system on/off per forum?

Thanks.

On second thought forget my ridiculous comment, I don't know why I suggested it. I like the mod!

lazytown 02-03-2006 01:52 AM

Can this be made anonymous (unless the user chooses to write their handle in the comment)?

-vissa


All times are GMT. The time now is 01:51 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.02591 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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