View Full Version : need help completing this code in functions.php
michealo
22 Sep 2002, 01:51
xenon helped me a while back (thank you!) to add a line that would allow users to edit thier username and usertitle color IF they met a certain postcount minimum
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
is the code that allowed this to work
im trying to add another criteria where users can add glow to thier name using the same code. ive tried it several ways, and this is how i thought would make it work, but it just gives me a parse error
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
any help would be appreciated, thanks
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
michealo
22 Sep 2002, 02:42
thanks, that code works
BUT it makes every user's name glow red, who has the required number of posts
i need it so the name doesnt glow if no color is specified in the profile field.
also, it only works if a hex color is entered.
thanks
also, it only works if a hex color is entered.
Hex colors are the only way to go, you don't actually input "blue", "red", etc. do you..??
/me shrieks in horror
Actually it doesn't really matter, and I guess for members who know nothing about HTML that would be easier..
Use this code to make it so that if no color is inputted, the thing doesn't glow.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
That wont check though if the inputted value in fieldX is something other than a hex code.
If you want it to work with color names, just put this right below the IF statement, inside:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
And just replicate that code changing the values for each different color you want to add.
Hope any of this helps ;)
michealo
23 Sep 2002, 22:57
worked great, thanks!
it added a blank line beneath the name and above the usertitle, tho
but otherwise, looks good
Check this part out:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
See those <table> tags..I personally don't recall the username being inbetween the <table> tags, so it's probably not needed.
Try replacing the <table> and </table> with a <td> and </td> tag, then with some tweaking around you should be able to remove the space maybe..
michealo
24 Sep 2002, 16:36
that worked great
this is the code i use for all three items: username color, usertitle color, and username glow color
i think it gets confused when setting the username colors and glow colors, cause the names only seem to glow red no matter what hex code it entered
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
i changed the ".$post[field9]." to #FFFFFF and everyone's name glowed white, so the code works. is there a way to combine the two if statements (username color and username glow color)?
vBulletin® v3.6.12, Copyright ©2000-2013, Jelsoft Enterprises Ltd.