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.
So I don't use the second code you gave me at all? I just add this after what I already have there, right? And do the rest of it like you said? The first code and the template edits? I just want to be sure.
Quote:
Originally posted by Slynderdale add after that
PHP Code:
if ($isfirst and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$DB_site->query("UPDATE thread SET description='".addslashes(htmlspecialchars($description))."' WHERE threadid=$threadinfo[threadid]");
}
yea, im using 2.2.3 and im slowly converting every thing over to 2.2.6, skip the second part and add that after it, it should work, it checks to see if its the first post and the edit post time isnt up and updates the description
if you want the admin to always edit it change it to this
PHP Code:
if ($isfirst and ($postinfo[dateline]+$editthreadtitlelimit*60>time() or $bbuserinfo[usergroupid]==6)) {
$DB_site->query("UPDATE thread SET description='".addslashes(htmlspecialchars($description))."' WHERE threadid=$threadinfo[threadid]");
}
If you want the description box to not show when the edit time is up but only show for an admin, change this:
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];
}
to this:
PHP Code:
$description="";
$descriptionbit="";
if ($getpost[postid]==$postid) {
$isfirst=1;
if ($postinfo[dateline]+$editthreadtitlelimit*60>time() or $bbuserinfo[usergroupid]==6) {
$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];
}
Thank you very much. You were about 2 steps ahead of me on all of this. I was about to ask you each time for what you put in the next message before I finished the last message. That's what I call reading someone's mind. Thanks again for all of the help with this. It works great!
Originally posted by Boofo Thank you very much. You were about 2 steps ahead of me on all of this. I was about to ask you each time for what you put in the next message before I finished the last message. That's what I call reading someone's mind. Thanks again for all of the help with this. It works great!
Originally posted by X-Fan Couple of quick questions:
Is it possible to have the description come up under the title of a thread on the thread's first page?
Also, how would it be possible to have the descriptions show up on a vbPortals front page?
in showthread just add:
$thread[description]
where ever you want the thread description to be showed, hmm, i dont have vbportal but if they use like $thread[title] and stuff, just add $thread[description] where you want it and see if that works, if it doesnt, pm me and ill help you out