View Full Version : Complete Thread Description Hack 1.7
sblum
08-11-2004, 10:00 PM
Complete Thread Description
Version: 1.7
vBulletin Version: 3.0.3
Updated and Adapted by: Steven Blum
Install difficulty: Pretty easy
Updates:
Updates in 1.7:
All known issues fixed. If a post error message is encountered in making a new thread, the threaddesc will reappear in the form along with the title and the message.
Updates in 1.6.2:
Adjustments in instructions to clarify and make a couple steps much easier. Also, fixed a problem that would cause threads with both descriptions and ratings to display on 3 lines instead of 2.
Updates in 1.6.1:
soft-deleted threads will now display properly
Updates in 1.6:
Fixed an error that would come up if you tried to edit a thread description and add an apostrophe.
Fixed an error that would make it so announcements didn't span the whole table width.
Description:
This is basically a massively updated and modified version of eXtremeTim's thread description hack located here: https://vborg.vbsupport.ru/showthread.php?t=60697
This hack emulates thread descriptions as seen in IPB, displaying them right below the thread title. Also, an optional step puts thread creator in its own column, basically making it look like most other forums.
Features:
Users are allowed to leave thread descriptions upon initial posting of a thread
Users with permission are allowed to edit thread description within the same time limit allowed to edit a thread
Thread description shows up in Searches as well as Forumdisplay
Thread description also shows up on the first post of a thread, right next to title
Added: Forumdisplay like most other forums making thread creator display in a new column - this step is optional and included in another txt file, but strongly recommended (it looks pretty retarded the other way)
Nobody was doing updates or answering questions, so I took matters into my own hands! This is my first officially released vB hack. Everything works perfectly on my forums, but if you have any problems with this let me know.
Note: I've discovered that if you have it set so that people can not edit the thread title after a certain amount of time, they will be unable to edit thread description, which is as intended. However, admins will also not be able to edit the thread title, which is not intended. On my forums I do not use such restrictions so it's not a problem, and I don't have any plans to update this hack accordingly, sorry.
Demo
<removed>
Sorry, no screenshots are available right now, I'm currently at work and have no image manipulating program other than mspaint. You can see it in action at my forum. If you receive any errors or there are any bugs, please let me know and I'll try to get it fixed.
And always, if you like this hack, please click install. Thank you!
Edit: Added the threadstarterinowncolum (like i have on my boards and IPB has) text file... You want to do this before you add thread description. It's pretty easy to do it after, the search just won't work 100% due to an extra line involving threaddesc. I have tested these modifications, and it works 100% fine for me, but back up your templates anyways and report any errors here.
turbidblue
08-12-2004, 08:27 PM
thank you so much! installed flawlessly without any problems!! I have been waiting for a solid release of this hack for sometime now!!
thank you so much!
* turbidblue clicks install
p.s. I was wondering how you got your forum to have the thread starter in its own box on the forum display? mine is right below the thread title, well now thread description!
thanks again!
;)
sblum
08-12-2004, 08:28 PM
Good to hear, thanks for the positive response.
P.S. That's just a simple template edit you can find at www.vbulletintemplates.com - under the thread title "Forumdisplay like IPB" or something to that effect.
turbidblue
08-12-2004, 08:29 PM
thanks so much! i have had this installed for no more than 5 minutes and my members are going nuts with it!!
you rock ;)
sblum
08-12-2004, 08:34 PM
I just realized that if you haven't edited the thread starter to display in a different column, you'd have to edit the thread description to appear in the threadbit a different way as to not create 3 lines for each thread... I'll add the instructions to the txt file.
turbidblue
08-12-2004, 09:49 PM
thank you for that, i tryed the edits found on vbtemplates, but for some reason it kept throwing my display out of whack, so instead i just added the thread desc. right after the title :)
xoxo
sblum
08-12-2004, 09:52 PM
I noticed some problems with the vbtemplates modification, too, that I ended up changing manually. I forgot about that. Maybe I should include info on how to do that template mod in the file, too..............
turbidblue
08-12-2004, 09:57 PM
i would be even more fond of you if you could ;)
xoxo
sblum
08-12-2004, 11:04 PM
Well, there you go. You should do the thread starter in own column first, because if you don't the find+replace won't be exact because of the extra line for the threaddescription hack in threadbit, but any reasonably intelligent person should be able to figure it out. I tested it and I'm 99% sure it should work fine.
turbidblue
08-12-2004, 11:17 PM
thanks! i will give it a go and see how it turns out :)
turbidblue
08-12-2004, 11:33 PM
worked like a charm! thanks alot! i really appreciate it! :)
FleaBag
08-13-2004, 12:07 AM
Oustanding, this is just what I was looking for. :)
wrongful
08-13-2004, 03:55 AM
I could be wrong here, I don't know much about PHP but in the following edit in search.php
######
#Find#
######
SELECT $previewfield
thread.threadid, thread.threadid AS postid, thread.title AS threadtitle, thread.iconid AS threadiconid,
thread.replycount, IF(thread.views=0, thread.replycount+1, thread.views) as views, thread.sticky,
thread.pollid, thread.open, thread.lastpost AS postdateline,
thread.lastpost, thread.lastposter, thread.attach, thread.postusername, thread.forumid,
#################
#Add right after#
#################
thread.threaddesc
shouldn't
thread.threaddesc be thread.threaddesc,
wrongful
08-13-2004, 04:24 AM
Also for some reason when I edit the threads, and change the thread description, it isn't updating. I have checked all of my edits. :(
sblum
08-13-2004, 05:06 AM
Does anyone else have the same problem that wrongful is having? It works 100% for me
turbidblue
08-13-2004, 11:15 PM
works 100% here too :)
wrongful
08-14-2004, 08:42 PM
Ok after some testing I came to the following conclusion:
It is only not letting me edit the thread desciptions of threads that are older than 10 minutes, which is the time limit to edit the thread title set in the admincp options. Since I am an admin, this rule shouldn't apply to me. I think that's what the problem is. :)
sblum
08-16-2004, 06:59 AM
I'll check it out wrongful, but that means that there's other conditionals set somewhere while editing a post to check if you're an admin that I don't know about. I'll check it out tomorrow and try to figure it out.
wrongful
08-20-2004, 02:56 PM
I have a huge problem. Whenever someone edits a post, and uses and apostrophie, you get a database error:
Database error in vBulletin 3.0.3:
Invalid SQL:
UPDATE thread
SET title = 'gfdsgds', threaddesc = 'gdfgs'', iconid = 0
WHERE threadid = 4110
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''gdfgs'', iconid = 0
WHERE threadid = 4110' at line 2
mysql error number: 1064
Date: Friday 20th of August 2004 11:56:02 AM
Script: http://www.wrongfuldistribution.com/forums/editpost.php
Referer: http://www.wrongfuldistribution.com/forums/editpost.php?do=editpost&p=34096
Username: Terry Norris
IP Address: 69.1.28.89
sblum
08-20-2004, 04:45 PM
Sorry abou that, can't believe I overlooked it. If you've instaleld this hack prior to 8/20, open up editpost.php
Find: $threadupdate[] = "title = '" . addslashes(htmlspecialchars_uni($edit['title'])) . "', threaddesc = '$edit[threaddesc]', iconid = $edit[iconid]";
and replace it with: $threadupdate[] = "title = '" . addslashes(htmlspecialchars_uni($edit['title'])) . "', threaddesc = '" . addslashes(htmlspecialchars_uni($edit['threaddesc'])) . "', iconid = $edit[iconid]";
wrongful
08-20-2004, 06:47 PM
Awesome, thanks!
turbidblue
08-20-2004, 10:34 PM
thank you, i was just about to post that error too!
your fix, fixed it ;)
xoxoox
sblum
08-21-2004, 02:01 AM
Thanks for bearing with me, guys. First hack I've released, but seems to work well.
ambrosious
08-21-2004, 03:29 PM
HELP?!
Did everthing right, near as I can tell, and got this:
ambrosious
08-21-2004, 07:21 PM
Anyone?
ambrosious
08-21-2004, 07:52 PM
I've narrowed it down to this part of forumdisplay template:
<td class="thead" width="80%">
<if condition="$show['threadratings']"><span style="float:$stylevar[right]"><a href="$sorturl&order=desc&sort=voteavg">$vbphrase[rating]</a> $sortarrow[voteavg]</span></if>
<a href="$sorturl&order=asc&sort=title">$vbphrase[thread]</a> $sortarrow[title]
</td>
<td class="thead" width="20%" align="center" background="clear.gif"><a href="$sorturl&order=asc&sort=postusername">$vbphrase[thread_starter]</a></td>
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&order=desc&sort=replycount">$vbphrase[replies]</a> $sortarrow[replycount]</span></td>
<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&order=desc&sort=views">$vbphrase[views]</a> $sortarrow[views]</span></td> <td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&order=desc&sort=lastpost">$vbphrase[last_post]</a> $sortarrow[lastpost]</span></td>
</tr>
Does that look right?
Everything has worked fine for me, other than after installing this, whenever I post an announcement I get the following problem (it should be noted that I installed both hacks:
http://www.somethingboring.com/junk/problem.gif
ambrosious
08-21-2004, 10:09 PM
Nevermind, it was in threadbit, a missing <. Works wonderfully.
sblum
08-23-2004, 07:37 AM
Was the missing < in my instructions?
I didn't include the announcement changes in the txt file? Thought I did, going back to revise...
sblum
08-23-2004, 07:39 AM
Open the "forumdisplay_announcement" template, find
<td class="alt2" colspan="<if condition="$show['threadicons']">5<else />4</if>">
replace with
<td class="alt2" colspan="<if condition="$show['threadicons']">6<else />5</if>">
It's that easy!
Text file now updated with these changes!
sblum
08-23-2004, 05:51 PM
Any time, there's lots of weird unexpected things that can happen when adding a hack that effect other parts of the board without realizing it. This was one of them, especially because I don't use announcements very often :). If any other issues come up, please let me know and I'll try to correct them ASAP.
thangluoi
08-25-2004, 11:16 AM
It works perfect when I open a new thread with a description, but when I edit a title and a description at a same time, it only works for the title, and the description still stay the same like when open the new thread.
lordofgun
08-25-2004, 04:02 PM
Hi!
This works great! I just have one small problem. Any help would be MUCH appreciated. Am I doing something wrong?
When I click on the NEW THREADS link or do a search, I get the following on search.php:
lordofgun
08-25-2004, 04:20 PM
Hi!
This works great! I just have one small problem. Any help would be MUCH appreciated. Am I doing something wrong?
When I click on the NEW THREADS link or do a search, I get the following on search.php:
I figured it out. Here's what I did:
in search_results template
Replace:
<tr>
<td class="thead" colspan="2"> </td>
<td class="thead" width="75%">$vbphrase[thread] / $vbphrase[thread_starter]</td>
<td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[last_post]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[replies]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[views]</td>
<td class="thead" width="25%">$vbphrase[forum]</td>
</tr>
With:
<tr>
<td class="thead" colspan="2"> </td>
<td class="thead" width="75%">$vbphrase[thread]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[thread_starter]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[replies]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[views]</td>
<td class="thead" width="25%">$vbphrase[forum]</td>
<td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[last_post]</td>
</tr>
sblum
08-25-2004, 06:40 PM
*sigh*, another bit of the instructions I did but forgot to add to the txt file. Adding it in. Thanks
lordofgun
08-26-2004, 03:41 AM
*sigh*, another bit of the instructions I did but forgot to add to the txt file. Adding it in. Thanks
One other thing...
When a thread is "soft deleted," it leaves a big empty space under the LAST POST column on forumdisplay. Not a big deal since only admins will see it, but I thought I'd let you know..
sblum
08-26-2004, 07:57 AM
Something I didn't consider because I very rarely delete threads.
in threadbit_deleted, find:
<if condition="$show['guestuser']">
$thread[postusername]
<else />
<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>
</if>
</div>
</td>
and replace with:
<if condition="$thread['threaddesc']"><span class="smallfont">$thread[threaddesc]</span></if>
</div>
</td>
<td class="alt2">
<if condition="$show['guestuser']">
$thread[postusername]
<else />
<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>
</if>
</td>
sblum
09-12-2004, 10:31 PM
Version 1.6.2 released.
sblum
09-20-2004, 10:35 PM
Updates in 1.7 (sept. 20, '04):
All known issues fixed. If a post error message is encountered in making a new thread, the threaddesc will reappear in the form along with the title and the message.
Hades-1
11-05-2004, 08:37 PM
whenever i edit a post it does not enter the info into the database, i also get no errors, it just dosent work
It works great when i post a new thread tho
sblum
11-15-2004, 08:54 PM
That has to do with the time limit you've set on editing a post title, if I recal correctly.
lancepoint
11-20-2004, 05:29 AM
how do i fix it??? i tried dropping the threaddesc and all my forums crashed.. i so i added it back for now..people can reply to threads but posting them gets this error.
Thanks Pre Hand
Invalid SQL:
INSERT INTO vbulletin_thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,
iconid, visible, attach, similar, threaddesc)
VALUES
('THREAD TEST ETEST', 1100856269, 32,
1, 0, 'DesignerBeat', 1,
'DesignerBeat', 1100856269, 0, 1,
0, '', '', 0)
mysql error: Column count doesn't match value count at row 1
mysql error number: 1136
Odd...the thread description deosn't change when a member uses editpost.php
All of the edits have been done.
eXtremeTim
12-27-2004, 03:42 AM
Just wondering
When was I asked for permission for this to be worked on and released? I dont really care but a pm would have been nice.
kikosho
12-30-2004, 05:48 AM
Odd...the thread description deosn't change when a member uses editpost.php
All of the edits have been done.
Yeah, I am still getting that problem as well and I have the editing timetable disabled. Still no luck even if I attempt to edit a thread immediately. Very frustrating...someone please help! :)
eXtremeTim
12-31-2004, 03:07 AM
Here is my fix that I used on my site.
in editpost.php
If you have the hack installed find the following:
if ($getpost['postid'] == $postid AND $edit['title'] != '' AND ($postinfo['dateline'] + $vboptions['editthreadtitlelimit'] * 60) > TIMENOW)
{
// need to update thread title iconid, and thread description
$threadupdate[] = "title = '" . addslashes(htmlspecialchars_uni($edit['title'])) . "', threaddesc = '" . addslashes(htmlspecialchars_uni($edit['threaddesc'])) . "', iconid = $edit[iconid]";
// do we need to update the forum counters?
$forumupdate = iif($foruminfo['lastthreadid'] == $threadinfo['threadid'], true, false);
Replace with:
if ($getpost['postid'] == $postid AND $edit['title'] != '' AND ($postinfo['dateline'] + $vboptions['editthreadtitlelimit'] * 60) > TIMENOW)
{
// need to update thread title iconid, and thread description
$threadupdate[] = "title = '" . addslashes(htmlspecialchars_uni($edit['title'])) . "', threaddesc = '" . addslashes(htmlspecialchars_uni($edit['threaddesc'])) . "', iconid = $edit[iconid]";
// do we need to update the forum counters?
$forumupdate = iif($foruminfo['lastthreadid'] == $threadinfo['threadid'], true, false);
} else {
$threadupdate[] = "threaddesc = '" . addslashes(htmlspecialchars_uni($edit['threaddesc'])) . "'";
}
If still getting ready to install that hack find:
if ($getpost['postid'] == $postid AND $edit['title'] != '' AND ($postinfo['dateline'] + $vboptions['editthreadtitlelimit'] * 60) > TIMENOW)
{
// need to update thread title iconid, and thread description
$threadupdate[] = "title = '" . addslashes(htmlspecialchars_uni($edit['title'])) . "', iconid = $edit[iconid]";
// do we need to update the forum counters?
$forumupdate = iif($foruminfo['lastthreadid'] == $threadinfo['threadid'], true, false);
Replace with:
if ($getpost['postid'] == $postid AND $edit['title'] != '' AND ($postinfo['dateline'] + $vboptions['editthreadtitlelimit'] * 60) > TIMENOW)
{
// need to update thread title iconid, and thread description
$threadupdate[] = "title = '" . addslashes(htmlspecialchars_uni($edit['title'])) . "', threaddesc = '" . addslashes(htmlspecialchars_uni($edit['threaddesc'])) . "', iconid = $edit[iconid]";
// do we need to update the forum counters?
$forumupdate = iif($foruminfo['lastthreadid'] == $threadinfo['threadid'], true, false);
} else {
$threadupdate[] = "threaddesc = '" . addslashes(htmlspecialchars_uni($edit['threaddesc'])) . "'";
}
acrimony
01-04-2005, 07:38 AM
For some reason I cant find the function_newpost file...... ????
charlesk
01-10-2005, 05:54 PM
Install clicked. Thanks.
eXtreme Tim: one strange thing. So far I am finding that editing does work with the stock hack code, without your modifications. That is, I am able to edit in editpost.php as the hack was originally provided. Not complaining but I wonder now why that would be?
Charles
charlesk
01-10-2005, 07:17 PM
Never mind, I just figured out how to make that bug appear.
Thanks for the fix. Note that there's an extra "}" in your replacement text, however.
apfparadise
01-18-2005, 04:45 AM
Love the hack, installed it and clicked install, but have one small problem, probably something I did.
When someone enters the description it shows up twice, once next to the title, and once right below it.
It looks like this:
I would like some critique - HP - just random shots with 2 diferent cameras.
just random shots with 2 diferent cameras.
Here is the link:
http://aquatic-photography.com/forum/forumdisplay.php?f=22
apfparadise
01-19-2005, 11:59 PM
anyone? please? :)
apfparadise
01-26-2005, 03:41 AM
Wow it's been a week and no replies, what's up everyone, can't someone help me with this. I already pm'ed and emailed the author and nothing. :(
Andreas
01-26-2005, 03:51 AM
Check the template modifications you made.
As I don't know this hack, I can only assume that there must be smth. wrong in template threadbit.
apfparadise
01-26-2005, 04:46 AM
Thanks, Kirby, it's amazing, you pointed out the right template and all of a sudden I found it. It was the optional step, I read the directions wrong and kept both statements instead of choosing one. :)
Luciolle
04-22-2005, 02:54 PM
It's work great but I have one little problem, when I try to edit, everything it's nice, but when I hit save change, He don't take the change, he show me the old entry not the new ?
I check all templates et file but he still not working.
Somme body help me on this thing ?
My vb version is: 3.0.7
Thanks in advanced
Luciolle
04-25-2005, 10:39 AM
Just to put on top of list again after more 24 hours ;) !
No body know about my little problem ?
I still have same problem the editing post don't take the change and I don't find why, if any body know how thanks to help me ;) !
Luciolle
04-28-2005, 04:56 PM
How to make option on admincp to show the new box on X forum and not on Y forum ?
Because now the box show on all forum, if it'S possible and you have little bit of time to help me or tell me how do that ;) !
Thanks for your futur help
Luciolle
04-29-2005, 02:04 PM
Try another time to put up the message to have a little answer or help for the permission via cpadmin to show or not the box by forum !
Thanks
JohnBee
04-30-2005, 02:00 AM
I found a small typo:
######
#Find#
######
SELECT $previewfield
thread.threadid, thread.threadid AS postid, thread.title AS threadtitle, thread.iconid AS threadiconid,
thread.replycount, IF(thread.views=0, thread.replycount+1, thread.views) as views, thread.sticky,
thread.pollid, thread.open, thread.lastpost AS postdateline,
thread.lastpost, thread.lastposter, thread.attach, thread.postusername, thread.forumid,
#################
#Add right after#
#################
thread.threaddesc
Insated of: thread.threaddesc
it should be thread.threaddesc,
Otherwise you'll get db errors.
Luciolle
04-30-2005, 10:12 AM
Yes that ok I correct right away when I install the hack ;) !
Now I need to know how to put permission via cpadmin to show or not the box on each forum ?
If anybody know how & like to help your welcome :P !
Thanks
playboy
05-01-2005, 04:57 PM
I Keep Getting This Whenever I Make A New Thread:
There seems to have been a slight problem with the Mysite.Com database.
Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience.
Database error in vBulletin 3.0.7:
Invalid SQL:
INSERT INTO thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,
iconid, visible, attach, similar, threaddesc
VALUES
('TestaSD', 1114967453, 3,
1, 0, 'Name', 1,
'Name', 1114967453, 0, 1,
0, '', 'TestDD'
mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VALUES
('TestaSD', 1114967453, 3,
1, 0, 'Name', 1,
mysql error number: 1064
Date: Sunday 01st of May 2005 01:10:53 PM
Script: http://mysite.com/newthread.php
Referer: http://mysite.com/newthread.php?do=newthread&f=3
Username: [NAME]
IP Address: 4.229.6.201
:( :( :(
playboy
05-01-2005, 07:37 PM
I also just noticed that the thread starter's name is still below the thread name, and also in the thread starter column. :-S
playboy
05-09-2005, 04:12 PM
bump......................///
paul41598
07-01-2005, 05:04 PM
anyway so i can have this hack show in specific forums!?? I need that
Fallback
07-15-2005, 10:18 AM
how many querys does this hack add?
Q-v-n-s-Q
08-13-2005, 03:37 AM
some buggy - Views support to be 40 and Replies support to be 9 , but it show replies = 40 and view = 9 lol, and when u click on topic, it doesnt count up even if you reply
Edit: nvm i fix it:D just replace view to replies and replies to views XDD
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.