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)
-   -   End-User Options - Reputation Page Split (https://vborg.vbsupport.ru/showthread.php?t=224215)

paul41598 09-28-2009 10:00 PM

Reputation Page Split
 
1 Attachment(s)
Reputation Comments Page Split (Pagination) :)

Description:
- This mod allows you to be able to paginate your way through reputation comments! Default VB code only allows you to globally set a limit for all users. So if you chose 50 for example, only 50 comments would show...but not all of them. Booo!! Some people want to see ALL of their comments, just not the last 50 ;)

Features:
  • Reputation Page Splitting

Drawbacks
  • This will require 1 change to default code! (It Is The ONLY Way, Sorry!!)

Installation:
1.) Upload Product
2.) Perform File Edit
3.) Enjoy Release

Code Change:

Open usercp.php

Find:
PHP Code:

LIMIT 0" . $vbulletin->options['showuserrates'] 

Replace With:
PHP Code:

LIMIT " . ($limitlower - 1) . "$perpage 


UPDATES:
1.0.1
- Updated code base to include table prefix


Number of results per page is changeable in the admincp!

theforumist 09-30-2009 02:20 PM

Mind posting some screenshots of this?

paul41598 09-30-2009 02:46 PM

There you go ;)

jboyd 09-30-2009 04:50 PM

I like this Hack but it could be better written.

The SQL query done by this hack could take into account that most people have a Prefix on thier vb DB. After installing the hack as it comes i got a DB error because it is looking for a table reputation that does not exist in my DB. The use of Table_Prefix is clearly explained in the VBulletin 3 manual.

to fix read this link http://www.vbulletin.com/docs/html/c...ards_sql_query
or hard code your table names in the XML file so reputation would look like ??_reputation. with ?? being your table prefix.

I made some other minor changes but they where more because or style of writing code is different not because of errors in your code.

furst 10-01-2009 05:57 PM

Any ajax or does every new page require a page reload?

AcidX 10-03-2009 10:24 AM

Database error.

Quote:

Originally Posted by furst (Post 1893373)
Any ajax or does every new page require a page reload?

Good question.

infnity8x3 10-04-2009 06:12 AM

Edited the xml to include my tables prefix. Works

Thanks!

furst 10-05-2009 02:10 AM

which parts exactly do you edit? say my prefix is called x_y

Rean 10-05-2009 05:01 AM

Database error!

Edit the xml file:
Code:

$count = $db->query_first("
SELECT
count(postid) AS count
FROM vbulletin_reputation
WHERE vbulletin_reputation.userid = " . $vbulletin->userinfo['userid'] . "
");

change the red part with your forum's table prefix..
reinstall this product..

infnity8x3 10-05-2009 05:04 AM

Quote:

which parts exactly do you edit? say my prefix is called x_y
Open xml file in text editor find

PHP Code:

$count $db->query_first("
SELECT
count(postid) AS count
FROM reputation
WHERE reputation.userid = " 
$vbulletin->userinfo['userid'] . "
"
); 

change to

PHP Code:

$count $db->query_first("
SELECT
count(postid) AS count
FROM x_yreputation
WHERE x_yreputation.userid = " 
$vbulletin->userinfo['userid'] . "
"
); 

Basically add your prefix in front the 2 instances of reputation, after FROM and WHERE.

OOPS must of posted at the same time.


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