vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   looking for a hack to allow mods and admins to change username color... (https://vborg.vbsupport.ru/showthread.php?t=40782)

michealo 07-07-2002 02:54 PM

looking for a hack to allow mods and admins to change username color...
 
or do i even need a hack for this?
i searched this forum, but didnt find anything that would do just this

i looked thru CP and didnt see anything to do this either

any help would be appreciated
thanks

Xenon 07-07-2002 03:03 PM

there are some hacks out there, most of them works with custom profilefields...

do another search and you'll find em

michealo 07-07-2002 03:50 PM

i found this one, Username Font Color Hack(in postbit)

which looks nice, BUT its for all members, and i only want mods and admins to ahve this ability

Xenon 07-07-2002 04:31 PM

just add an if-clause
PHP Code:

if(post[usergoupid]!=2) {....original code of the hack here ..... } 


michealo 07-08-2002 08:02 PM

thanks for yer help, but i coldnt get that too work

actually to make things easier, i just want to only allow this option once a certain post count it hit

would the command be?

if(post[postcount]!>=500) {....original code of the hack here ..... }

Xenon 07-09-2002 12:03 AM

my code should work, perhaps there is a problem with your integration...

also for posts counts:
if(post[posts]>=500) {....original code of the hack here ..... }

michealo 07-09-2002 01:59 AM

it should go in the postbit right?

before this line

<smallfont><font color="$post[field5]">$post[usertitle]</font>

i put it there and it just displays it just like another line

perhaps im putting it in wrong place, cause i dont want the members to even see the option in thier control panel is they have less than a certain number of posts

Xenon 07-09-2002 10:21 AM

php-code you can just add in php-files

you have to edit functions.php

you have done so when you installed Username Font Color Hack.

so there add the code, not in the templates..

michealo 07-09-2002 05:09 PM

i understand what yer saying now, but i didnt use functions.php to allow coloring of titles, i used this. a custom profile field

Quote:

make a custom profile field which can only be 7 character long for the input...

Call it Custom Title Color

In that field they can type the hex of the color they want the title to be...

then find out what profile field it is (can't remember how to do it but its not har)

then in ure postbit template find this bit:

$post[usertitle]

then change that to:

<font color="$post[fieldx]">$post[usertitle]</font>

instead of the "x" in "fieldx" insert the number of the profile field..
so basically, i want the custom profile field to not even show up for a member if he hasnt reached a certain post count

thanks for all yer help so far

Xenon 07-09-2002 05:27 PM

ok, i see :)
open member.php
find:
PHP Code:

eval("\$customfields .= \"".gettemplate("register_customfields")."\";"); 

replace with:
PHP Code:

if($profilefieldname!=|| $bbuserinfo[posts]>yy) eval("\$customfields .= \"".gettemplate("register_customfields")."\";"); 

replace x with your profile id ;)
yy with the postaamount needed to use that field


All times are GMT. The time now is 08:30 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.01097 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_php_printable
  • (1)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