News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Title -- Need help

Started by souljaa, May 24, 2007, 03:49:29 PM

Previous topic - Next topic

souljaa

Hey guys! Anyways, I have my own forum (www.gfxpros.ej.am) and I was wondering if it was possible to make a username's Custom Title Bold or Italic or in Color?? Or if there's any MOD for that??
Thanks a lot!
Really appreciate the help!
Souljaa

PM me for more information about staff. NOW HIRING.

metallica48423

in Display.template.php:

Find:

// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
echo '
', $message['member']['title'], '<br />';


Make it:

// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
echo '
<b>', $message['member']['title'], '</b><br />';
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

metallica48423

replace <b> with <i> and </b> with </i> for italic

for colors, <span style="color: colorname;" where <b> is and </span> where </b> is
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

souljaa

Hey BlackMage! Thanks! But is it possible for just one specific user?

Thanks alot!
Souljaa

PM me for more information about staff. NOW HIRING.

codenaught

You can do something like this:

// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
if($message['member']['id'] == 1)
echo ' <b>', $message['member']['title'], '</b><br />';
else
echo '
', $message['member']['title'], '<br />';


Changing the 1 in that code with the member id you want to do this for.
Dev Consultant
Former SMF Doc Coordinator

souljaa

Quote from: akabugeyes on May 25, 2007, 05:54:33 PM
You can do something like this:

// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
if($message['member']['id'] == 1)
echo ' <b>', $message['member']['title'], '</b><br />';
else
echo '
', $message['member']['title'], '<br />';


Changing the 1 in that code with the member id you want to do this for.

In the display.template.php?

PM me for more information about staff. NOW HIRING.

codenaught

Yes, you would be replacing this original code in Display.template.php:


// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
echo '
', $message['member']['title'], '<br />';
Dev Consultant
Former SMF Doc Coordinator

souljaa

Sorry to bring this back up! But what if I want to do the same, but for a username? And each one is specific, and different for each member?
Thanks!
- Souljaa

PM me for more information about staff. NOW HIRING.

metallica48423

buggy's code is already user specific.

// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
if($message['member']['id'] == 1)
echo ' <b>', $message['member']['title'], '</b><br />';
else
echo '
', $message['member']['title'], '<br />';


see the:
if($message['member']['id'] == 1)?

To add more, just add another

if($message['member']['id'] == 1)
echo ' <b>', $message['member']['title'], '</b><br />';


above the else but after the other code.  example:


// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
if($message['member']['id'] == 1)
echo ' <b>', $message['member']['title'], '</b><br />';
        if($message['member']['id'] == 2)
echo ' <b>', $message['member']['title'], '</b><br />';
if($message['member']['id'] == 3)
echo ' <b>', $message['member']['title'], '</b><br />';
               
                else
echo '
', $message['member']['title'], '<br />';
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

souljaa

Thanks Metallica, but I was wondering if it was possible to put codes of colours? Like #FF00FF for more colours? I tried it, doesn't work, is there a way I could?

PM me for more information about staff. NOW HIRING.

RAdams

Quote from: souljaa on July 11, 2007, 11:42:50 AM
Thanks Metallica, but I was wondering if it was possible to put codes of colours? Like #FF00FF for more colours? I tried it, doesn't work, is there a way I could?

echo ' <b><font color="#FFFFFF">', $message['member']['title'], '</font></b><br />';

metallica48423

#11
you could do as said, but <font> is deprecated.  While it will work it will not validate if you run your site through an html validator.

Use <span style="color: #FFFFFF">', $message['member']['title'], '</span> instead.

where #FFFFFF is the hex code of that color (if you need help with hex codes, check google :)).
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

souljaa


PM me for more information about staff. NOW HIRING.

souljaa

Is there a way to make it possible to see the colour when we go check our profile?
Thanks!!
- Souljaa
PS: Sorry for all the trouble :P

PM me for more information about staff. NOW HIRING.

souljaa

Hey guys! Really sorry to bring this topic back, but I was just wondering, I wanted to use this again, for my new forum and I was wondering, I did exactly as said, but every time I put the code in, the Custom Title just dissapears completely. Is there any change I have to make? Doesn't seem to work. Tried it several times.
Thank you
Souljaa

PM me for more information about staff. NOW HIRING.

JimM

Are you still using 1.1.x?  The code posted may not work if you have upgraded to 2.0 or changed themes.  Also you may want to try different colors, in case you are changing it to the color of the background.
Jim "JimM" Moore
Former Support Specialist

Advertisement: