vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Pig's configurable rep gems (https://vborg.vbsupport.ru/showthread.php?t=105156)

boozehound 01-11-2006 10:00 PM

Pig's configurable rep gems
 
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.

ThePimp 01-12-2006 05:23 PM

Interesting

nexialys 01-12-2006 05:51 PM

very...

/me look at the install button...

to minimalise the change of 1 query, wouldn't it be good to store the data in the cache??

The Chief 01-12-2006 05:57 PM

Quote:

Originally Posted by ThePimp
Interesting

I agree...

boozehound 01-12-2006 06:03 PM

Quote:

Originally Posted by nexialys
very...

[high]* nexialys look at the install button...
[/high]

to minimalise the change of 1 query, wouldn't it be good to store the data in the cache??

I don't know how to do that yet.

WNxWakko 01-12-2006 07:40 PM

Very nice, Installed and works perfect.

WNxWakko 01-12-2006 08:48 PM

Ok, when I read a PM, I get this error at the top of my page,

Quote:

Warning: Invalid argument supplied for foreach() in /includes/functions_reputation.php(140) : eval()'d code on line 14

boozehound 01-12-2006 09:00 PM

Quote:

Originally Posted by WNxWakko
Ok, when I read a PM, I get this error at the top of my page,

Update your product with this XML file (also updated in first post zip).

I omitted to include 'private' as one of the scripts that this hack applies to.

WNxWakko 01-12-2006 09:06 PM

Ok there seems to be another problem with this mod. Very strange one at that.

When I use quick reply on any post, I now get the transistion page saying,

Quote:

This post is a duplicate of a post that you have posted in the last five minutes. You will be redirected to that thread.

Click here if your browser does not automatically redirect you.
However the reply is there.

I know its your mod because when I uninstall your mod, that problem goes away, reinstall mod, problem comes back.

Not on full Reply, Only on Quick reply.

boozehound 01-12-2006 09:13 PM

Quote:

Originally Posted by WNxWakko
Ok there seems to be another problem with this mod. Very strange one at that.

When I use quick reply on any post, I now get the transistion page saying,



However the reply is there.

I know its your mod because when I uninstall your mod, that problem goes away, reinstall mod, problem comes back.

Not on full Reply, Only on Quick reply.

I can't reproduce this problem on my system. Does anyone else get this?


All times are GMT. The time now is 10:33 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.01346 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_html_printable
  • (6)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