Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
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:
Code
{if $postrow[post].CustomTitle}
{$postrow[post].CustomTitle}
<br />
{/if}
{$postrow[post].Title}
<br />
{$postrow[post].Rating}
<br />
Replace with:
Code
{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:
Code
<span class="small">
{if $postrow[post].CustomTitle}
{$postrow[post].CustomTitle}
<br />
{/if}
{$postrow[post].Title}
</span>
Replace with:
Code
<span class="small">
{if $postrow[post].CustomTitle}
{$postrow[post].CustomTitle}
{else}
{$postrow[post].Title}
{/if}
</span>
Done!

Open: /templates/default/post_comments.tpl

Find:
Code
{if $postrow[post].CustomTitle}
{$postrow[post].CustomTitle}
<br />
{/if}
{$postrow[post].Title}
<br />
{$postrow[post].Rating}
<br />
Replace with:
Code
{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 wink

Sponsored Links
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
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:
PHP Code
	 $postrow[$i]['Title']	= $Title;
$postrow[$i]['CustomTitle'] = $CustomTitle;
add above:
PHP Code
	 // SD - Mod (color, based upon user color or admin/mod color
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 wink

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by sirdude
Enjoy wink

Enjoyed! cool

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
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
Offline
Joined: Nov 2003
Posts: 482
if 'Pfff' a good thing ? smile

i hope laugh

Sponsored Links
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by sirdude
if 'Pfff' a good thing ? smile

Pfff is the best smile That's from being tired from lots of work smile

But it saves in the long run having everything cleaned up again smile

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by blaaskaak
Enjoyed! cool

Enjoy it even more?

/scripts/online.inc.php

find:

Code

if ($CustomTitle) {
$Title = "$CustomTitle<br />$Title";
}

replace with:

Code

if ($CustomTitle) {
$Title = $CustomTitle;
}

/scripts/showprofile.inc.php

find:

Code

$smarty_data = array(
"profileuser" => $profileuser,
"Fakeemail" => $Fakeemail,
"Picture" => $Picture,
"width" => $width,
"height" => $height,
"User" => $User,
"Title" => "$Title<br />  $CustomTitle",

replace with:

Code

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
Offline
Joined: Nov 2003
Posts: 482
hehe and just to be totally complete.. viewmessage too ! laugh

i just didn't post them here..

blaaskaak.. ty!! smile

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™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by sirdude
hehe and just to be totally complete.. viewmessage too ! laugh

That one already looks ok. It uses the post_side and post_top templates if I'm correct.

Quote
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 smile

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
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.

Sponsored Links
Joined: Dec 2006
Posts: 17
Newbie
Newbie
Offline
Joined: Dec 2006
Posts: 17
Please see this post. I would like it to operate a bit differently myself.

http://www.ubbcentral.com/forums/ubbthreads.php/ubb/showflat/Number/195926

Joined: Dec 2006
Posts: 17
Newbie
Newbie
Offline
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 rockon

#316279 11/09/2007 2:09 AM
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 smile
Attachments
IfCustomTitle.txt (4.17 KB, 46 downloads)
Instructions
SHA1: 8d4905bd6afcb68b74d4f512c795fe27aaf0d85f


- Allen wavey
- What Drives You?
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
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 Owner
Time Lord
UBBDev / UBBWiki Owner
Time 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


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
no, it won't wink

[Linked Image]

Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
wink mmmhmmm wink

[Linked Image]


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Originally Posted by Gizmo
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 tipsy


- Allen wavey
- What Drives You?
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. tipsy


- Allen wavey
- What Drives You?
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Originally Posted by AllenAyres
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 smile


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 wink


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)