vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Modify the reputation mod! (https://vborg.vbsupport.ru/showthread.php?t=176813)

CampinCarl 04-21-2008 10:28 PM

Modify the reputation mod!
 
This should be a relatively simple modification. I need it so instead of showing an image as reputation, it says Karma: "reputation description", and if the reputation description requires a reputation of negative, the rep description turns red, if it requires a reputation of zero, it turns black, and if it requires a rep of more then 1, it turns green. Also I need to change all "reputation" to "Karma"

thanks a bunch

Dismounted 04-22-2008 06:28 AM

This can be done by changing the phrases. To change the images to text, you can look through the postbit template and change them.

CampinCarl 04-23-2008 09:28 PM

ummm

how do I do that?

im not good with php :/

Dismounted 04-24-2008 05:45 AM

Phrase Manager > Search in Phrases

CampinCarl 04-25-2008 02:37 AM

whats the postbit template?

Dismounted 04-25-2008 05:38 AM

Styles & Templates > Style Name > Edit Templates > postbit

CampinCarl 04-25-2008 12:04 PM

Ah excellant! I now have it displaying almost what i want! All that I need to do now is make it so if you have negative karma, the text displayed is red, if you have posotive karma, the text is green, and if you have Zero, the text doesnt change :D

Dismounted 04-25-2008 01:25 PM

You can use conditionals in templates like so:
Code:

<if condition="$foo == 0">
Value is zero
<else />
        <if condition="$foo > 0">
        Value is bigger than zero
        <else />
        Value is smaller than zero
        </if>
</if>


CampinCarl 04-26-2008 02:56 AM

would you mind writing exactly what I need to put in? im not so good with this lol
Code:

<if condition="$show['minimumreputation'] == 0">Karma: <b>$post[level]</b>
<else />
        <if condition="$show['minimumreputation'] > 0">Karma: <font color="green"><b>$post[level]</b></font>
        <else />Karma: <font color="red"><b>$post[level]</b></font>
        </if>
</if>

wats wrong with that

Dismounted 04-26-2008 03:56 AM

$show['minimumreputation'] is boolean value, not the actual reputation level.


All times are GMT. The time now is 04:05 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.01665 seconds
  • Memory Usage 1,724KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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