Version: 1.00, by Scott MacVicar
Developer Last Online: Mar 2016
Version: 2.2.x
Rating:
Released: 05-21-2002
Last Update: Never
Installs: 43
No support by the author.
This was requested today and I already had something like this implemented so i done a quick vbhacker file, it was done on 2.2.6 but you don't need to worry about that
It works with 2.2.0 and above.
Scott
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
A hack like this won't use alot of space, mysql compression is exceptionally high and at most its another 100 characters it might even be blank.
If your worried about an extra few kb of space used then you've got a problem.
Is there a way to add this to the editpost.php so when you are editing the thread message that you can also edit it in there? I know it is in the admin options, but it might be good to have it there too.
Quote:
Originally posted by PPN Also when you select edit thread from the admin options at the bottom of the thread you can edit the description.
Turning it on and off?
Are you talking a board wide basis or per forum?
nice hack, i installed it and it works fine, i also edit editpost so if its the first post of the thread they can edit the description if the edit post time limit lets them, if it isnt the first post of the thread, the description box wont show up.
Could you share what you did? That sounds like a good idea.
Quote:
Originally posted by Slynderdale nice hack, i installed it and it works fine, i also edit editpost so if its the first post of the thread they can edit the description if the edit post time limit lets them, if it isnt the first post of the thread, the description box wont show up.
if ($getpost[postid]==$postid) {
$isfirst=1;
} else {
$isfirst=0;
}
if ($isfirst and $postinfo[title]=="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$postinfo[title]=$threadinfo[title];
}
Replace it with:
PHP Code:
$description="";
$descriptionbit="";
if ($getpost[postid]==$postid) {
$isfirst=1;
$description=$threadinfo[description];
eval("\$descriptionbit = "".gettemplate("editpost_description")."";");
} else {
$isfirst=0;
}
if ($isfirst and $postinfo[title]=="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$postinfo[title]=$threadinfo[title];
}
Find:
PHP Code:
if ($isfirst and $title!="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
//$title="";
}
Replace it with:
PHP Code:
if ($isfirst and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$DB_site->query("UPDATE thread SET description='".addslashes(htmlspecialchars($description))."' WHERE threadid=$threadinfo[threadid]");
if ($title!="") {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
//$title="";
}
}
Save and close
Open the template: editpost
Find:
(Note: there are spaces in { secondaltcolor })
This is what I have for the second code set in editpost.php. What do I need to do to make it work with what you have for the second code?
Code:
if ($isfirst and $title!="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
$lastpost=$DB_site->query_first("SELECT * FROM forum WHERE forumid=$threadinfo[forumid]");
if($lastpost["lastpost"]==$threadinfo["dateline"]) {
$DB_site->query("UPDATE forum SET lasttitle='".addslashes(htmlspecialchars($title))."' WHERE forumid=$threadinfo[forumid]");
}
//$title="";
}
Quote:
Originally posted by Slynderdale First make a backup of editpost.php before you continue
Created a template called: editpost_description
Add this to it:
(Note: remove the spaces in { secondaltcolor })
if ($getpost[postid]==$postid) {
$isfirst=1;
} else {
$isfirst=0;
}
if ($isfirst and $postinfo[title]=="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$postinfo[title]=$threadinfo[title];
}
Replace it with:
PHP Code:
$description="";
$descriptionbit="";
if ($getpost[postid]==$postid) {
$isfirst=1;
$description=$threadinfo[description];
eval("\$descriptionbit = "".gettemplate("editpost_description")."";");
} else {
$isfirst=0;
}
if ($isfirst and $postinfo[title]=="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$postinfo[title]=$threadinfo[title];
}
Find:
PHP Code:
if ($isfirst and $title!="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
//$title="";
}
Replace it with:
PHP Code:
if ($isfirst and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$DB_site->query("UPDATE thread SET description='".addslashes(htmlspecialchars($description))."' WHERE threadid=$threadinfo[threadid]");
if ($title!="") {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
//$title="";
}
}
Save and close
Open the template: editpost
Find:
(Note: there are spaces in { secondaltcolor })
if ($isfirst and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$DB_site->query("UPDATE thread SET description='".addslashes(htmlspecialchars($description))."' WHERE threadid=$threadinfo[threadid]");
}