vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Description of thread hack (https://vborg.vbsupport.ru/showthread.php?t=38916)

Boofo 06-12-2002 11:35 PM

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]");
  } 



Slynderdale 06-12-2002 11:38 PM

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

Boofo 06-12-2002 11:53 PM

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. :)

Slynderdale 06-12-2002 11:58 PM

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]");
  } 


Slynderdale 06-13-2002 12:06 AM

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];
  } 


Boofo 06-13-2002 02:42 AM

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! :)

Slynderdale 06-13-2002 03:29 AM

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 :)

X-Fan 06-18-2002 07:09 AM

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!

X-Fan 06-18-2002 07:48 AM

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?

Slynderdale 06-18-2002 05:25 PM

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


All times are GMT. The time now is 09:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01197 seconds
  • Memory Usage 1,761KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete