PDA

View Full Version : Forum Display Enhancements - Thread Description


derekivey
05-22-2006, 10:00 PM
Thread Description
Developers: derekivey (https://vborg.vbsupport.ru/member.php?u=81169)
Version: 1.0.0
vBulletin Version: 3.5.4
File Edits: 0
Template Edits: 6
New Phrases: 1
Uses Plugins: Yes
Difficulty: Easy

Description: This hack adds the ability for users to add a description for their thread.

*** I Strongly Recommend That You Backup Before Installing/Upgrading This Hack! ***

Planned features for a later release:

Add AJAX Description Edit [ Flagged for a later release ]
Show Thread Description In Archive [ Flagged for a later release ]
Whatever is suggested.Features Added To 1.0.0

Changed Install and Uninstall Code
Show Thread Description In showthread
Show Thread Description In Search Results
Add Field To Edit Post For First Post
Add htmlspecialchars_uni to description updates to prevent HTMLI have added screen shots of this hack in action below.

Please click https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=116410) If you installed this hack.

If you would like to make a donation, you may send it to me through PayPal.
https://vborg.vbsupport.ru/external/2013/04/2.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=derek%40nbsdesignz%2ecom&item_name=vBulletin%20Hack%20Donation&no_shipping=1&cn=Optional%20Message&tax=0&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8)

Thanks!

akanevsky
05-22-2006, 10:36 PM
Nice hack, seems to be much better than the one already released. Nicely styled code and installer readme, too. Good job.

I haven't checked whether this actually works yet, but by reading the code I can't see why this is in beta stage.

Living in music
05-22-2006, 11:02 PM
Great work, I love you ! ;)

Kaleem
05-22-2006, 11:07 PM
lets check it out :) will click install after seeing whts goin on :)

derekivey
05-22-2006, 11:42 PM
Thanks guys. Glad you like it :).

Derek

derekivey
05-22-2006, 11:46 PM
I haven't checked whether this actually works yet, but by reading the code I can't see why this is in beta stage.

I decided to leave it in beta for a few days just to make sure there aren't any bugs. If there are I will fix them and take it out of beta.

Derek

DJ XtAzY
05-23-2006, 12:01 AM
awesome i think this version is better than the other version. This hack requries no file edits!!!!

derekivey
05-23-2006, 12:44 AM
Yup it just uses plugins :)

Boofo
05-23-2006, 12:49 AM
Does this work in the editpost too? ;)

Valter
05-23-2006, 01:41 AM
It works fine in the editpost.

-It doesn't show description in search results.
-It would be great if you can make that thread starter is shown in separate column in forumdisplay. With description title/starter field is much heighter.

Nice work.

shadowevil
05-23-2006, 03:25 AM
Nice hack ... great work >:D<

rmxs
05-23-2006, 06:55 AM
Nice hack and work GREATE....

Suggestion...Ajax EDIT ON description LIKE TITLES EDIT :)

projectego
05-23-2006, 09:05 AM
Awesome hack! Thanks very much for sharing. ;)

derekivey
05-23-2006, 09:57 AM
It works fine in the editpost.

-It doesn't show description in search results.
-It would be great if you can make that thread starter is shown in separate column in forumdisplay. With description title/starter field is much heighter.

Nice work.

I'll see if I can add it to the search as well but not making any guarantees because I have never worked with vB's search engine before so I'm not exactly sure how I would add it. I will take a look tonight to see if I can figure it out. Also for the thread author in a new column, you can do that in the templates manager if you want to, but I don't feel that it needs to be done for this because the max limit for the descriptions is 100 characters so it should only be one extra line per threadbit.

Nice hack and work GREATE....

Suggestion...Ajax EDIT ON description LIKE TITLES EDIT :)

I like that. I'll try adding it also.

Snake
05-23-2006, 11:01 AM
Thanks for your release but how about a screenshot? :p

akanevsky
05-23-2006, 11:32 AM
There's a screenshot inside the archive, although yeah - screens should be attached separately.

utw-Mephisto
05-23-2006, 02:25 PM
I am not using it, but there you go :

akanevsky
05-23-2006, 03:01 PM
I have installed and checked this hack, works perfectly.

Except for your install/uninstall code, which should be replaced by this:

$db->hide_errors();
$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "thread` ADD `description` VARCHAR( 100 ) NOT NULL");
$db->show_errors();

$db->hide_errors();
$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "thread` DROP `description`");
$db->show_errors();

Note:
1. No semicolon at the end of query. That sometimes causes errors.
2. query replaced with query_write
3. No reason to create an array for only one query.
4. hide_errors and show_errors to avoid unnecessary error display.

After that, "Beta Stage" marker can be safely removed! :)

Couple of suggestions:

1. Show threaddescription is showthread and archive.
2. Show threaddescription in search results, for both thread mode and post mode.
3. Add ajax description edit in threadbit.
4. Add the field to editpost when editing first post in advanced mode.
5. "description of" is a grammatical error in the context. Should be "description for".

Cheers!

Allan
05-23-2006, 03:12 PM
Screens please ^^

akanevsky
05-23-2006, 03:14 PM
There are screens in the post above mine.

TCB
05-23-2006, 07:40 PM
Thanks, it looks nice.... but I agree with one of the earlier posters, that it looks a bit messy with 3 rows (title/subtitle/poster) in various fonts. I prefer the Invisionboard style (adding an extra column with the topicstarter)

derekivey
05-23-2006, 07:44 PM
Sorry about that. I forgot to upload them. They have now been attached.

Derek

derekivey
05-23-2006, 07:46 PM
I have installed and checked this hack, works perfectly.

Except for your install/uninstall code, which should be replaced by this:

$db->hide_errors();
$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "thread` ADD `description` VARCHAR( 100 ) NOT NULL");
$db->show_errors();

$db->hide_errors();
$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "thread` DROP `description`");
$db->show_errors();

Note:
1. No semicolon at the end of query. That sometimes causes errors.
2. query replaced with query_write
3. No reason to create an array for only one query.
4. hide_errors and show_errors to avoid unnecessary error display.

After that, "Beta Stage" marker can be safely removed! :)

Couple of suggestions:

1. Show threaddescription is showthread and archive.
2. Show threaddescription in search results, for both thread mode and post mode.
3. Add ajax description edit in threadbit.
4. Add the field to editpost when editing first post in advanced mode.
5. "description of" is a grammatical error in the context. Should be "description for".

Cheers!
Thanks for the suggestions. I will try to do those tonight if I can and release a new version and take it out of beta :).

Derek

derekivey
05-23-2006, 08:08 PM
I'm not sure how to add the Ajax thing because vB has it so when you click twice anywhere in the threadbit it automatically edits the title. Any suggestions?

derekivey
05-23-2006, 09:28 PM
From the looks of it, it looks like I would have to add a file edit for the description to show in the search results because right after the hook call is $thread_select_logic = array();. I somehow would need to add $thread_select_logic[] = "thread.description"; Any ideas on how to add this when the array() is called after the hook call?

Thanks,
Derek

derekivey
05-23-2006, 10:09 PM
Nevermind I got it. It's coming along nicely now :).

Derek

FreshFroot
05-23-2006, 11:45 PM
Nice work Derek :) I can't wait too see the newest updated hack. Again nice work mate. :)

jaks
05-24-2006, 03:09 AM
I think this should have been in VB default install already. Awesome!!! Can't wait til it's done.

:D
Jaks

rmxs
05-24-2006, 06:49 AM
I'm not sure how to add the Ajax thing because vB has it so when you click twice anywhere in the threadbit it automatically edits the title. Any suggestions?
Yes everywere if you click the title can be edited..
you cannot split this row?half part klik edit tiltes and the other half the description..

fly
05-24-2006, 01:33 PM
This is awesome. I'll be trying this tonite.

Hemanth
05-24-2006, 03:37 PM
Thanks a lot. It's working fine. Just installed :)

Snake
05-24-2006, 03:58 PM
Thank you for the fix, I shall install this right away! :)

derekivey
05-24-2006, 07:13 PM
Thanks a lot. It's working fine. Just installed :)

Please click install. Thanks! :)

Snake
05-24-2006, 08:09 PM
derek, here's a silly question. How do I remove the italic effect for all thread descriptions?

derekivey
05-24-2006, 08:27 PM
In threadbit, find:

<em>$thread[description]</em>

Replace with:

$thread[description]

Derek

FreshFroot
05-24-2006, 08:29 PM
the updated version is posted? looks the same one from before.........

derekivey
05-24-2006, 08:32 PM
No not yet, it just says Updated because I attached the ScreenShots. The new version will be out in a few hours, but I'm not sure if I'll have the AJAX Quick Edit in the new version, it might take some time to code.

Derek

derekivey
05-24-2006, 09:20 PM
Where in showthread do you guys think I should put the thread description? I can't put it in the navbits because it would require a file edit and I don't want that. Where would be a good spot for it?

Thanks,
Derek

akanevsky
05-24-2006, 09:26 PM
Where in showthread do you guys think I should put the thread description? I can't put it in the navbits because it would require a file edit and I don't want that. Where would be a good spot for it?

Thanks,
Derek

Put it under forum description as you can see it a in default vB. In other words, just above the first post :)

derekivey
05-24-2006, 09:32 PM
Ok thanks, I'll put it there.

Derek

derekivey
05-24-2006, 10:15 PM
Psionic Vision, you mean like this?

akanevsky
05-24-2006, 10:17 PM
Somewhat, except you should replace "Description" with "Thread Description" :)

derekivey
05-24-2006, 10:25 PM
Ok lol

FreshFroot
05-24-2006, 11:16 PM
looking good so far :D

derekivey
05-25-2006, 01:17 AM
Ok, Version 1.0.0 has been released! :). Please see the first post for what has changed, and there are install and upgrade instructions in the readme file.

Derek

Living in music
05-25-2006, 02:46 AM
Very cool, i'll update now! Thanks to derekivey :D

rmxs
05-25-2006, 06:53 AM
I just update ITS FANTASTIC...and if tou make it with ajax......SUPER FANTASTIC :) lol

Thanks

derekivey
05-25-2006, 09:51 AM
I just update ITS FANTASTIC...and if tou make it with ajax......SUPER FANTASTIC :) lol

Thanks

Yup, I am shooting for that for the next release.

Derek

Valter
05-25-2006, 01:19 PM
Nice updates in 1.0, thanks!

Snake
05-25-2006, 09:28 PM
Thanks for the update.

liwo
05-31-2006, 07:18 PM
You get a database error if you have a table prefix for your Board (or at least we got one):
Invalid SQL:
UPDATE thread SET description = '' WHERE threadid = '9';

MySQL-Fehler : Table 'xxx.thread' doesn't exist

I fixed this by changing the line in the product xml file
$db->query_write("UPDATE thread SET description = '" . $db->escape_string(htmlspecialchars_uni($edit['description'])) . "' WHERE threadid = '" . $db->escape_string($threadinfo['threadid']) . "'");

to

$db->query_write("UPDATE " . TABLE_PREFIX . "thread SET description = '" . $db->escape_string(htmlspecialchars_uni($edit['description'])) . "' WHERE threadid = '" . $db->escape_string($threadinfo['threadid']) . "'");

Thanks for that great hack!

derekivey
05-31-2006, 07:58 PM
Thanks for reporting that. I will update the zip file to include the fix. I guess I must have forgot to add TABLE_PREFIX to that one. Thanks again!

Derek

CP,
06-09-2006, 11:22 PM
Hi how can i make the thread description, in non italic please? thanks!

derekivey
06-10-2006, 12:32 AM
Hello CP,

Please see this post (https://vborg.vbsupport.ru/showpost.php?p=987299&postcount=35)

Thanks,
Derek

Snake
06-10-2006, 01:39 PM
derekivey, I am trying to display the thread description right next to the thread title in postbit? Can you help?

derekivey
06-10-2006, 04:09 PM
Where? Can you upload a screenshot please of where you want it?

Thanks!

Snake
06-12-2006, 07:05 AM
Nevermind. I have figured it out already. Thanks anyway...

derekivey
06-12-2006, 03:32 PM
Ok, mind posting it here so that anyone else who wants to do it can do it to their forum?

Derek

Terminatoronly
07-26-2006, 12:46 PM
thanks alot it works with me and it also work with vb3.6 rc2 i have tried it there thanks alot

I||usi0nz
07-31-2006, 03:04 PM
this is what I neededd, thankss :)

derekivey
07-31-2006, 06:15 PM
thanks alot it works with me and it also work with vb3.6 rc2 i have tried it there thanks alot
Thanks for confirming that it works on RC 2 :).

this is what I neededd, thankss :)
No Problem :).

Just to let everyone know, as soon as I get some time I am going to be adding the ajax edit description feature, like vB's edit thread title feature. I just haven't had time to do it. I should hopefully get some time later this week.

Derek

DPSR
08-12-2006, 09:24 AM
Working fine on v3.6.0 :)

Thanks for the hack derekivey

*installed

wtricks
08-24-2006, 04:41 PM
It should be the default in any VB install.

Installed ... nice :D

derekivey
08-24-2006, 06:00 PM
Thanks :).

Megareus Rex
08-26-2006, 12:11 AM
Question: Is there a way to upgrade from the other thread description hack to this one? In other words, to keep the existing description tables and such so that all the current descriptions remain, and they won't need to be redone?

If this is already the case, then that's fine, but if not, any way you could provide such an option?

PS: Also, does this display in search.php? I saw earlier users wondered, but I didn't see if it was taken care of when skimming the thread for info on switching to this description hack from the other one.

derekivey
08-26-2006, 01:07 PM
Question: Is there a way to upgrade from the other thread description hack to this one? In other words, to keep the existing description tables and such so that all the current descriptions remain, and they won't need to be redone?

If this is already the case, then that's fine, but if not, any way you could provide such an option?

PS: Also, does this display in search.php? I saw earlier users wondered, but I didn't see if it was taken care of when skimming the thread for info on switching to this description hack from the other one.
I'll have to see how the other hack stores them in the database, I might be able to make a converter for it, I'll have to see, and get back to you.

Yes, the descriptions are also shown on the search results :).

Derek

derekivey
08-26-2006, 01:59 PM
Ok, attached is a converter I made. Just upload it to the admincp folder and go to http://www.yourdomain.com/path_to_forums/admincp/thread_description_converter.php, and run it. Once it has finished, delete that file from your site. Let me know if you have any problems with it.

Thanks,
Derek

Megareus Rex
08-29-2006, 09:30 AM
Ok, attached is a converter I made. Just upload it to the admincp folder and go to http://www.yourdomain.com/path_to_forums/admincp/thread_description_converter.php, and run it. Once it has finished, delete that file from your site. Let me know if you have any problems with it.

Thanks,
Derek
Just to be sure, do I run the converter before or after installing the description hack?

derekivey
08-29-2006, 11:27 AM
After.

Derek

Megareus Rex
08-30-2006, 01:56 AM
And then I uninstall the other description hack, I'm assuming? (After installing your desc. hack, and running the converter).

Sorry for the questions, I just dont wanna mess anything up. I'll have a backup to revert to if something goes wrong, but its still a pain in the neck to do so.

derekivey
08-30-2006, 09:29 AM
Make sure my converter imported the old descriptions first, and then uninstall the other hack when your sure it converted them ok.

Megareus Rex
08-30-2006, 11:29 PM
It worked perfectly. You are so awesome for that :D

You should add that file in as part of the hack for those of us already dug in with the older version, if you weren't planning on that already.

derekivey
08-31-2006, 01:04 AM
Great :).

Yes, I plan on including it with the next version.

Derek

Danny Diamond
08-31-2006, 11:19 PM
Installed.

Good times

Snake
12-22-2006, 11:06 PM
Will this work on 3.6.4?

derekivey
12-23-2006, 02:27 PM
It should...

rnmcd
12-25-2006, 03:34 PM
Will this work on 3.6.4?

Try it...I dare you to be the guinea pig :knockedout:

tmwillett
01-29-2007, 05:31 AM
it works wonderfully on 3.6.4 :) I installed it tonight :) My members love it :) great hack!

rnmcd
01-29-2007, 05:40 AM
Your members told you they loved it the same night you installed it?

I'd like to see a link to anyone that has this installed on vb 3.6.4.

Snake
01-29-2007, 08:15 AM
Here ya go. As you can see, I've it installed on my forums. :D

http://www.finalfantasyforums.net

derekivey
01-29-2007, 09:51 AM
Yup, it should work fine on 3.6, as there weren't many changes (just new features basically).

RvG2
08-07-2007, 03:05 AM
works in 3.6.7 pl1 :)

optrex
08-18-2007, 04:25 PM
I've got this working on vb 3.6.7pl1 too, but does anyone know how to make it work in vb advanced?

fly
08-24-2007, 12:48 AM
It works as long as you don't preview the thread. The description gets lost then.

sonixax
10-08-2010, 06:26 PM
Is it compatible With 4.0.7 ?