Previous Thread
Next Thread
Print Thread
Rate Thread
#315692 09/15/2007 6:44 PM
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
When you merge 2 threads together you end up with a thread that has more then 1 topictitle. Confusing, because the last-reply subject put on the main forum index.

Also when you move a post with it's reply's to a new topic, you often want to rename the topic. And sometimes, well, you want want to rename a topic. Get a spell error out, and get that spell error also out of the subjects in the reply.

This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.

Enjoy! Or not smile Whatever makes you happy smile
Attachments
renamethreads.zip (2.11 KB, 14 downloads)
SHA1: 67aa890002f80b340d85bdd26ec66c4774fe27bb
renametopic73.zip (2.05 KB, 1 downloads)
Update for 7.3
SHA1: 54b1b874c25b363d5d094fc8f2712764ad58d69c

Last edited by blaaskaak; 05/18/2008 8:43 PM. Reason: 7.3 update
Sponsored Links
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 great, thanks blaaskaak!


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: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
I had trouble with the attached zip. Anyone else?

And although I've yet to try it out, I'd love to see something like this integrated into the main product! smile

Myke #315696 09/15/2007 10:34 PM
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
Just tested the zip; fails in both winrar and the built in zip option in WXP


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: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Just reuploaded it. It was compressed with winzip, used the WinXP build in zip now.

Sponsored Links
Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
Thanks blaaskaak, the zip file is fine now and I've successfully integrated your mod! Me likes! smile

I have a couple of considerations for future revisions:

1. It would be nice to be given an opportunity, via js popup or form, to enter a "new" name for the topic. This saves you from having to manually edit the first post, which lazy admins like me would really appreciate! wink

2. When moving/merging threads, have the option of renaming as well. This would be really useful for when you're moving sub-threads that have gone off topic.

Myke #315727 09/17/2007 11:18 AM
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
I am also lazy, so I like to leave stuff that's already in ubb to ubb.

Not having my own box to edit a topictitle saves me the code to make sure the current subject is correct smile

Originally Posted by Myke
1. It would be nice to be given an opportunity, via js popup or form, to enter a "new" name for the topic. This saves you from having to manually edit the first post, which lazy admins like me would really appreciate! wink

Alternative (less work and safer to code) would be to have a checkbox when you edit the first post of a topic with "Rename the rest also".

Heck, for our board a checkbox would not even be needed. We can force it always.

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by blaaskaak
Heck, for our board a checkbox would not even be needed. We can force it always.

For those interested,

if you modify
/scripts/modifypost.inc.php
by finding
Code

if ($post_is_topic == true) {
and adding this below
Code
		// Rename entire topic if first post is editted.
$newSubject="Re: ".$Subject;

$query = "
UPDATE {$config['TABLE_PREFIX']}POSTS
SET POST_SUBJECT = ?
WHERE TOPIC_ID = ?
AND POST_IS_TOPIC = 0
";
$dbh -> do_placeholder_query($query,array($newSubject,$topic_id),__LINE__,__FILE__);

You rename an entire topic simply by editing the first post. This also works if a user renames the subject.

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
Ohhhh, I like that latest addition... Edit the first post and all carries over... definately handy as I've had to rename quite the many topics hehe


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: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Me too, I just put it on our liveboard smile

Nothing like installing a hack just before bedtime and seeing what you'll wake up to in the morning laugh

I've always disliked how threads handled subjects. We were used to classic, where topicstarter sets the topic, and that's it. It's so stupid to see topic subject X on the main forum page, and you can't find that same topic subject on the overview of that specific forum.

Topics have subjects, not individual posts smile

Sponsored Links
Joined: Oct 2007
Posts: 11
Newbie
Newbie
Offline
Joined: Oct 2007
Posts: 11
Originally Posted by blaaskaak
When you merge 2 threads together you end up with a thread that has more then 1 topictitle. Confusing, because the last-reply subject put on the main forum index.

Also when you move a post with it's reply's to a new topic, you often want to rename the topic. And sometimes, well, you want want to rename a topic. Get a spell error out, and get that spell error also out of the subjects in the reply.

This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.

Enjoy! Or not smile Whatever makes you happy smile

Hi,
When I click on 'rename this topic', it says 'the selected action has been completed' grin That's all, no oppertunity to insert a new name for the topic..
Did I do something wrong? I followed the instructions step by step smirk

Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
You've done nothing wrong, this is how the mod works. smile Read the original post a little more carefully:

Quote
This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.
So whatever the subject of the first post is, all replies inherit that subject with a "Re: " prefixed.

Joined: Oct 2007
Posts: 11
Newbie
Newbie
Offline
Joined: Oct 2007
Posts: 11
oops, sorry, overlooked that one smirk

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
I so vote for this and reply & close topic to be included in the next stock release :x...


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: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by Gizmo
I so vote for this and reply & close topic to be included in the next stock release :x...


Since this didn't make it into stock 7.3, I attached an update to the first post.

If you had this hack implemented, please replace the /scripts/dorenamethreads.inc.php also.

The hack I posted in this topic to just rename the entire thread if you edit a the first post still works in 7.3.


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
Posts: 70
Joined: January 2007
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
Morgan 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)