Advertisement:

Custom titles.

Aloittaja pariahdog, huhtikuu 16, 2004, 11:03:03 AP

« edellinen - seuraava »

Tristan Perry

Lainaus käyttäjältä: Oldiesmann - huhtikuu 20, 2004, 03:01:44 IP
That helps a lot. Here's your problem right here...

</tr><tr>
<td><b>', $txt[87], ': </b></td>
<td>', $context['member']['group'], '</td>


That should be
</tr><tr>
<td><b>', $txt[87], ': </b></td>
<td>', $context['member']['group'], '</td>
</tr>';



Thanks but....
LainaaParse error: parse error in /home/yxdvfheq/public_html/forums/Themes/default/Profile.template.php on line 525
In profile

And line 525 is:

if ($context['user']['is_owner'] &amp;amp;amp;amp;&amp;amp;amp;amp; $context['require_password'])

:-[ Sorry about all this

[Unknown]

Your editor is screwing with the file.  I recommend you try something simpler like Notepad and start from a clean file.

-[Unknown]

Tristan Perry

I tried it with notepad, no parse errors but nothing happened, custom title didn't show over the member groups and UBBC code didn't work.....

Oldiesmann

Try it with a fresh copy of profile.template.php. It should work just fine.
Michael Eshom
Christian Metal Fans

Tristan Perry

Lainaus käyttäjältä: Oldiesmann - huhtikuu 21, 2004, 12:07:19 IP
Try it with a fresh copy of profile.template.php. It should work just fine.

Just tried it as you said, no parse errors shown but nothing happened. I still got:

Craftworld Shas'O     (Custom Title)
Shas'ui                   (Member Group)


:-[   All I want is the Custom title to show (If a member has a custom title!)

Oldiesmann

Hmmm... Send me a PM with your FTP stuff and let me try it.
Michael Eshom
Christian Metal Fans

Tristan Perry

Lainaus käyttäjältä: Oldiesmann - huhtikuu 21, 2004, 12:36:44 IP
Hmmm... Send me a PM with your FTP stuff and let me try it.

Okay I'll do that now.

Oh yeah, I have restored the old Display.template and Profile.template files and so none of the changes I made are there!

Oldiesmann

Michael Eshom
Christian Metal Fans

pariahdog

Right, I think he and I were looking for the same thing. I wanted the custom title to replace a user's Member group so that it would not show the title AND membergroup. However; I still wanted to be able to see all of the other poster's member group info... Maybe I'm not making any sense.

Tristan Perry

Lainaus käyttäjältä: pariahdog - toukokuu 04, 2004, 10:32:58 IP
Right, I think he and I were looking for the same thing. I wanted the custom title to replace a user's Member group so that it would not show the title AND membergroup. However; I still wanted to be able to see all of the other poster's member group info... Maybe I'm not making any sense.

I'm not sure about the last bit, but this is what Olidesmann did, and it's working fine:

In Display.index.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 />';

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

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
echo '
', $message['member']['post_group'], '<br />
', $message['member']['group_stars'], '<br />';


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



// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
if(!$message['member']['title'])
{
echo '
', $message['member']['post_group'], '<br />
', $message['member']['group_stars'], '<br />';
}





In Profile.template.php:

Find

echo '
<tr>
<td><b>', $txt['title1'], ': </b></td>
<td>', $context['member']['title'], '</td>
</tr>';


Replace

echo '
<tr>
<td><b>', $txt['title1'], ': </b></td>
<td>', doUBBC($context['member']['title']), '</td>
</tr>';



trenchteam

I want to add this to the PM's because the BBC coding show up in there? How can I do this? everything else is GREAT! ;D

Stuart

Lainaus käyttäjältä: Oldiesmann - huhtikuu 16, 2004, 12:56:29 IP
Yes, you could do both.
To add UBBC functionality to the custom title:

In Themes/default/Display.template.php

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


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


In Themes/default/Profile.template.php

Search for
if (!empty($modSettings['titlesEnable']) && $context['member']['title'] != '')
{
echo '
<tr>
<td><b>', $txt['title1'], ': </b></td>
<td>', $context['member']['title'], '</td>
</tr>';
}


Replace with
if (!empty($modSettings['titlesEnable']) && $context['member']['title'] != '')
{
echo '
<tr>
<td><b>', $txt['title1'], ': </b></td>
<td>', doUBBC($context['member']['title']), '</td>
</tr>';
}

I must be doing something wrong as I can change the colour now and it appears correct in the profile but I cannot see it next to the posts. It gives me Custum Title XXX[/ color]  ???[/ color]

Stuart

#32
Oooops, I'm so sorry! I just realised I have to change Display.template.php in my current theme  :-[

Nevertheless, how do I change this so it appears correctly in my Instant Messages too?
 

Altair

Lainaus käyttäjältä: Stuart - maaliskuu 24, 2007, 04:59:21 IP

Nevertheless, how do I change this so it appears correctly in my Instant Messages too?
 

I didn't want to start a new thread so I figured I would use this one. Hope that is OK. I wish to know the same thing...

Advertisement: