Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Joined: Nov 2003
Posts: 482
Simple modification that checks if a user has a Custom Title defined. If they do, then the Custom Title replaces the post based Title. (thanks to the pishmeister, who no one knows yet for this)
If they don't have a Custom Title, then the post based Title will be displayed.
Also does a small tweak to not include extra
when the Rating system is turned off or the user doesn't have a rating. Right now it slams in a
regardless. This saves some vertical space.
Ok.. here goes.
Open: /templates/default/post_side.tpl
Find:
{if $postrow[post].CustomTitle} {$postrow[post].CustomTitle} <br /> {/if} {$postrow[post].Title} <br /> {$postrow[post].Rating} <br /> Replace with:
{if $postrow[post].CustomTitle} {$postrow[post].CustomTitle} {else} {$postrow[post].Title} {/if} <br /> {if $postrow[post].Rating} {$postrow[post].Rating} <br /> {/if} done!
Open: /templates/default/post_top.tpl
Find:
<span class="small"> {if $postrow[post].CustomTitle} {$postrow[post].CustomTitle} <br /> {/if} {$postrow[post].Title} </span> Replace with:
<span class="small"> {if $postrow[post].CustomTitle} {$postrow[post].CustomTitle} {else} {$postrow[post].Title} {/if} </span> Done!
Open: /templates/default/post_comments.tpl
Find:
{if $postrow[post].CustomTitle} {$postrow[post].CustomTitle} <br /> {/if} {$postrow[post].Title} <br /> {$postrow[post].Rating} <br /> Replace with:
{if $postrow[post].CustomTitle} {$postrow[post].CustomTitle} {else} {$postrow[post].Title} {/if} <br /> {if $postrow[post].Rating} {$postrow[post].Rating} <br /> {/if} Done!
Upload your files!
Enjoy
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Joined: Nov 2003
Posts: 482
if you want to go further and also color the title or custom title according to the username's color, you can do the following.
open: /scripts/showflat.inc.php
find:
$postrow [ $i ][ 'Title' ] = $Title ; $postrow [ $i ][ 'CustomTitle' ] = $CustomTitle ; add above:
if ( $Color ) { $Title = "<span style="color: $Color ;"> $Title </span>" ; if ( $CustomTitle ) { $CustomTitle = "<span style="color: $Color ;"> $CustomTitle </span>" ; } } if (( $PostStatus == "Administrator" ) && (! $Color )) { $Title = "<span class="adminname"> $Title </span>" ; if ( $CustomTitle ) { $CustomTitle = "<span class="adminname"> $CustomTitle </span>" ; } } elseif (( $PostStatus == "Moderator" ) && (! $Color )) { $Title = "<span class="modname"> $Title </span>" ; if ( $CustomTitle ) { $CustomTitle = "<span class="modname"> $CustomTitle </span>" ; } } Done!
Upload this puppy
Enjoy
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Joined: Feb 2007
Posts: 329
Enjoy
Enjoyed!
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Joined: Feb 2007
Posts: 329
Pfff, just moved all custom titles we had in our post title fields that were imported over from 6.5.x. Removed the hacks that allowed me to edit the post title instead of the custom title.
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Joined: Nov 2003
Posts: 482
if 'Pfff' a good thing ?
i hope
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Joined: Feb 2007
Posts: 329
if 'Pfff' a good thing ?
Pfff is the best
That's from being tired from lots of work
But it saves in the long run having everything cleaned up again
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Joined: Feb 2007
Posts: 329
Enjoyed!
Enjoy it even more?
/scripts/online.inc.php
find:
if ($CustomTitle) { $Title = "$CustomTitle<br />$Title"; }replace with:
if ($CustomTitle) { $Title = $CustomTitle; }/scripts/showprofile.inc.php
find:
$smarty_data = array( "profileuser" => $profileuser, "Fakeemail" => $Fakeemail, "Picture" => $Picture, "width" => $width, "height" => $height, "User" => $User, "Title" => "$Title<br /> $CustomTitle",replace with:
if ($CustomTitle) { $title=$CustomTitle; }; $smarty_data = array( "profileuser" => $profileuser, "Fakeemail" => $Fakeemail, "Picture" => $Picture, "width" => $width, "height" => $height, "User" => $User, "Title" => $Title,this will take of who's online and the userprofile screen!
Last edited by blaaskaak; 08/24/2007 2:41 PM .
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Joined: Nov 2003
Posts: 482
hehe and just to be totally complete.. viewmessage too !
i just didn't post them here..
blaaskaak.. ty!!
if you haven't posted the viewmessage (both script + template) thingie, i will do it later on today..
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Joined: Feb 2007
Posts: 329
hehe and just to be totally complete.. viewmessage too !
That one already looks ok. It uses the post_side and post_top templates if I'm correct.
if you haven't posted the viewmessage (both script + template) thingie, i will do it later on today..
Don't worry, just concentrate on the naked chat suggestions I made
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Joined: Nov 2003
Posts: 482
hrm. you have a point.. i was stuck back in 7.0.2 days with the templates. good catch.. ok.. i will be working on the unclothed messaging system this weekend. i'll see what i get added.
Joined: Dec 2006
Posts: 17
Newbie
Newbie
Joined: Dec 2006
Posts: 17
Okay just want to say Thanks guys.
This mod by SirDude and blaaskaak works just fine on my site. I'm happy with it.
The issue appears to be that if you want BOTH Default and Custom titles to show then this mod won't work for you. For me I just want the one Default to show and it works great.
Currently the code in 7.2.2 is less than adequate for me and I had to keep manually updating the database each day to fix it.
Doing these fixes as shown by SirDude and blaaskaak will restore it back to they way it used to work in 6.x (at least as I recall it working)
Thanks again guys
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Modification Name: If Custom Title [beta]
Author(s): Allen Ayres
Description: If you have a custom title, this displays it instead of the member title.
Requirements: UBB.Threads 7.2.x (may work with other 7 series)
Demo : None yet
Notes : I may have missed some spots, but I think this covers most
Attachments
IfCustomTitle.txt (4.17 KB, 46 downloads) Instructions SHA1: 8d4905bd6afcb68b74d4f512c795fe27aaf0d85f
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Joined: Feb 2007
Posts: 329
Last edited by blaaskaak; 11/09/2007 3:39 AM .
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki OwnerTime Lord
UBBDev / UBBWiki OwnerTime Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Looks good allen, but I could have sworn someone else posted this before... BTW, this will likely throw out "undefined index" errors, you should read up on isset
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Joined: Nov 2003
Posts: 482
no, it won't
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki OwnerTime Lord
UBBDev / UBBWiki OwnerTime Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Looks good allen, but I could have sworn someone else posted this before... BTW, this will likely throw out "undefined index" errors, you should read up on isset
?
I'm calling variables already in place, shouldn't be any errors
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
btw, I had no idea it was done already, I coulda used this a month ago more than once.
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Modification Name: If Custom Title [beta]
Author(s): Allen Ayres
Description: If you have a custom title, this displays it instead of the member title.
Requirements: UBB.Threads 7.2.x (may work with other 7 series)
Demo : None yet
Notes : I may have missed some spots, but I think this covers most
Merged here... you might consider collecting the pieces in the topic and combining for a text file instruction, would help those trying to install it once
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Posts:
1,157
Joined: July 2001
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166Sep 15th, 2019
Currently Online
Topics Created
Posts Made
Users Online
Birthdays