Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Description of thread hack Details »»
Description of thread hack
Version: 1.00, by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

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.

Comments
  #42  
Old 06-12-2002, 11:35 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]");
  } 
Reply With Quote
  #43  
Old 06-12-2002, 11:38 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #44  
Old 06-12-2002, 11:53 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will the description box ALWAYS show up for the Admin then? Because I saw it on the first post of a message that is over a week old.
Reply With Quote
  #45  
Old 06-12-2002, 11:58 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]");
  } 
Reply With Quote
  #46  
Old 06-13-2002, 12:06 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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];
  } 
Reply With Quote
  #47  
Old 06-13-2002, 02:42 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #48  
Old 06-13-2002, 03:29 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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!
No problem
Reply With Quote
  #49  
Old 06-18-2002, 07:09 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very handy for a news-centric site like mine. Now I can go through and add descriptions to past news articles as well as current ones!

Thanks for a great hack, and to slynderdale for the terrific editpost addition!

Works like an absolute charm!

http://x-mencomics.com/xfan/forums/f...p?s=&forumid=2

Thanks all!
Reply With Quote
  #50  
Old 06-18-2002, 07:48 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #51  
Old 06-18-2002, 05:25 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:22 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07592 seconds
  • Memory Usage 2,327KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete