Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
I hate manually having to copy/paste message id's for the merge function in ubb.threads. So I've made a little copy/paste thingy.

As soon as you edit a post, the current message id is written to a cookie. If you go into the move/merge screen, that id is put into the Merge topic with Post# field.

Let's go to work!

open /scripts/editpost.inc.php

find
Code
	// ---------------------------------------------------------------------------
// For security purposes we need to verify that this is user made this post or
// if they are an admin or a moderator for this board.

Just above it add:

Code
	// -------------------------------------------
// Writes a cookie with the current message id

$html->ubbt_setcookie("lasteditnumber",$Number);

Open /scripts/movethread.inc.php

Find:
Code
	extract($in, EXTR_OVERWRITE | EXTR_REFS); // quick and dirty fix - extract hash values as vars

Just below it add:
Code
	$lasteditnumber = get_input("lasteditnumber","cookie");

Find:
Code
		"days" => $days,

Add below:
Code
		"lasteditnumber" => $lasteditnumber,

open /templates/default/movethread.inc.php

Find:
Code
<label for="type-2">{$lang.MERGE_TOPIC}</label> <input type="text" name="number" size="10" class="form-input" />

replace with:
Code
<label for="type-2">{$lang.MERGE_TOPIC}</label> <input type="text" name="merge" size="10" class="form-input" value="{$lasteditnumber}" />

----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------

open /templates/default/inline_move.tpl

find:
Code
<label for="type-2">{$lang.MERGE_TOPIC}</label> <input type="text" name="number" size="10" class="form-input" />

replace with:
Code
<label for="type-2">{$lang.MERGE_TOPIC}</label> <input type="text" name="number" size="10" class="form-input" value="{$lasteditnumber}" />

open /scripts/inline_moderation.inc.php
find:
Code
function _inline_move() {
global $config, $dbh, $ubbt_lang, $html, $in, $userob;

Just below add:
Code
	$lasteditnumber = get_input("lasteditnumber","cookie");

find:
Code
		'totalposts' => $total_posts,
'is_gallery' => $is_gallery,
);

$cfrm = make_ubb_url("ubb=cfrm", "", false);
return array(
"header" => array (
"title" => $ubbt_lang['CONFIRM_MOVE'],
"refresh" => 0,
"javascript" => array(),
"bypass" => "",
"onload" => "",
"breadcrumb" => <<<BREADCRUMB
<a href="{$cfrm}">{$ubbt_lang['FORUM_TEXT']}</a> » {$ubbt_lang['CONFIRM_MOVE']}
BREADCRUMB

Add before:
Code

"lasteditnumber" => $lasteditnumber,

Anything under the big line in this post you can skip if you don't want the feature enabled in inline moderation!


[Linked Image from siemons.org]
Sponsored Links
Entire Thread
Subject Posted By Posted
[7.3] Copy/Paste message id for easy merging blaaskaak 05/21/2008 3:21 PM
Re: [7.3] Copy/Paste message id for easy merging AllenAyres 05/23/2008 9:46 PM
Re: [7.3] Copy/Paste message id for easy merging sirdude 05/24/2008 12:27 AM

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:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1443
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 7
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
isaac 2
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-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)