Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Pig's configurable rep gems Details »»
Pig's configurable rep gems
Version: 1.00, by boozehound boozehound is offline
Developer Last Online: Sep 2007 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-11-2006 Last Update: Never Installs: 18
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

A port to 3.5.x of this hack.

Description
  • Change the amount of reputation needed to acquire each reputation image (gem) as displayed in the postbit among other places
  • Change the type of image displayed for each level
  • Optionally insert a line break (or other markup) before one or more of the images

Installing this extension adds:
  • One database table.
  • Two plugins.
  • Two templates.
  • 18 phrases.
  • One php file.
  • One xml file.
at a cost of:
  • One (small) query per page involving display of reputation (showthread, showpost, memberlist, member).

Installation
  • Download product.zip and unpack it.
  • Upload the files in the upload directory:
    • admincp/repgems.php
    • includes/xml/cpnav_pig_rep_gems.xml
  • Install the product by importing the product-pig_rep_gems.xml file into the product manager in Admin CP
Additionally, you can upload the images in 'additional images.zip' to the images/reputation directory (read 'usage' below).

Usage

(Refer to the screenshots)

After installation reputations will appear as normal. Refresh your Admin CP and you'll find a new link in the 'User Reputations' section of the navigation frame labelled 'Manage Reputation Images'.

(see screen1.png)

Use the upper form to change the settings for each reputation image and the lower form to add new images.
  • 'Minimum reputation' specifies the minimum amount of reputation a user must have to acquire the image. For negative reputations, the values are (-1 * the minimum).
  • The value of 'Image suffix' determines which type of image is shown for each level. A blank value corresponds to the standard dark green or dark red reputation images. A value of 'high' corresponds to the brighter coloured reputation images. These files are named reputation_highpos.gif and reputation_highneg.gif for positive and negative reputations respectively, whereas the 'blank' images are named reputation_pos.gif and reputation_highpos.gif respectively.
  • If one wanted to add a new type of image, for example reputation_maxpos.gif and reputation_maxneg.gif as found in 'additional images.zip' then they should be uploaded to images/reputation and the value of 'max' should be used in the 'Image suffix' field.
  • If you wish to insert a line break before a particular reputation image, change the 'insert break' setting to 'yes'. By default, this will result in the contents of the template 'postbit_pig_reputation_break' being inserted before the reputation image. This template by default contains simply:
    HTML Code:
    <br/>

Screenshots
  • screen1.png show the Admin CP settings page after a new installation of the product.
  • screen2.png shows the settings page after two levels have been added, the types of image altered and a break inserted before image 8.
  • screen3.png shows the effect of the settings shown in screen2.png
  • screen4.png shows the settings page using two line breaks and a custom image type ('max').
  • screen5.png shows the effect of the settings shown in screen4.png.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-12-2006, 09:48 PM
WNxWakko's Avatar
WNxWakko WNxWakko is offline
 
Join Date: Apr 2003
Location: Paradise, Texas
Posts: 309
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is frustrating. Cant figure out why your mod does this.
Reply With Quote
  #13  
Old 01-12-2006, 09:55 PM
boozehound's Avatar
boozehound boozehound is offline
 
Join Date: Feb 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WNxWakko
This is frustrating. Cant figure out why your mod does this.
Neither can I, it doesn't have anything to do with posting. Can you try disabling the mod's plugins one by one to determine which one the problem lies with?
Reply With Quote
  #14  
Old 01-12-2006, 10:01 PM
WNxWakko's Avatar
WNxWakko WNxWakko is offline
 
Join Date: Apr 2003
Location: Paradise, Texas
Posts: 309
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well if I turn off Reputation gem levels - fetch_reputation_image() then i can quick reply. If I turn off the other one, I get all kinds of crazy errors. Not sure if this helps.
Reply With Quote
  #15  
Old 01-12-2006, 10:41 PM
WNxWakko's Avatar
WNxWakko WNxWakko is offline
 
Join Date: Apr 2003
Location: Paradise, Texas
Posts: 309
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, I figured out how to fix this.

Change this
Quote:
if(in_array(THIS_SCRIPT, array('showthread','showpost','memberlist','member ','private')))
to this
Quote:
if(in_array(THIS_SCRIPT, array('showthread','showpost','memberlist','member ','private','newreply')))
Reply With Quote
  #16  
Old 01-12-2006, 10:45 PM
boozehound's Avatar
boozehound boozehound is offline
 
Join Date: Feb 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WNxWakko
Alright, I figured out how to fix this.

Change this


to this
Aha, schoolboy error on my part. Thanks. Product updated.
Reply With Quote
  #17  
Old 01-13-2006, 01:54 AM
WNxWakko's Avatar
WNxWakko WNxWakko is offline
 
Join Date: Apr 2003
Location: Paradise, Texas
Posts: 309
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Few more things. I noticed when you edit a post using the ajax editing, when you save all the rep images disappear. So you need to add editpost in your array also.

Quote:
if(in_array(THIS_SCRIPT, array('showthread','showpost','memberlist','member ','private','newreply',editpost)))
Also as a suggestion, I would recommend rather than an array, a comparison as its faster. I have a large board so optimization is important.

If you change what I posted right above with this it will be faster,

Quote:
if ((THIS_SCRIPT == 'showthread') OR (THIS_SCRIPT == 'showpost') OR (THIS_SCRIPT == 'memberlist') OR (THIS_SCRIPT == 'member') OR (THIS_SCRIPT == 'ajax') OR (THIS_SCRIPT == 'private') OR (THIS_SCRIPT == 'newreply') OR (THIS_SCRIPT == 'editpost'))
Reply With Quote
  #18  
Old 01-13-2006, 02:56 PM
boozehound's Avatar
boozehound boozehound is offline
 
Join Date: Feb 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WNxWakko
Few more things. I noticed when you edit a post using the ajax editing, when you save all the rep images disappear. So you need to add editpost in your array also.



Also as a suggestion, I would recommend rather than an array, a comparison as its faster. I have a large board so optimization is important.

If you change what I posted right above with this it will be faster,
Nice one.
Reply With Quote
  #19  
Old 01-13-2006, 09:43 PM
WNxWakko's Avatar
WNxWakko WNxWakko is offline
 
Join Date: Apr 2003
Location: Paradise, Texas
Posts: 309
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hate to burst your bubble again, lol error message on annoucements,

Need to add one more,

Quote:
(THIS_SCRIPT == 'announcement')
Reply With Quote
  #20  
Old 01-13-2006, 11:12 PM
boozehound's Avatar
boozehound boozehound is offline
 
Join Date: Feb 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WNxWakko
Hate to burst your bubble again, lol error message on annoucements,

Need to add one more,
Cheers, updated.
Reply With Quote
  #21  
Old 01-25-2006, 01:08 AM
OAndrea OAndrea is offline
 
Join Date: Dec 2005
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can I use this hack with the extended reputation hack?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14507 seconds
  • Memory Usage 2,316KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete