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
  #32  
Old 05-24-2002, 11:31 PM
PET's Avatar
PET PET is offline
 
Join Date: Jan 2002
Location: Timisoara/Romania
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried this with the bak created by vbhacker. But....i fount a old forundisplay.php on Recycly Bin.
Reply With Quote
  #33  
Old 05-25-2002, 12:23 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is a cool idea, but, unfortunately, like parker clack's thread preview hack, it uses lots of space
Reply With Quote
  #34  
Old 05-25-2002, 05:56 PM
johnr johnr is offline
 
Join Date: Nov 2001
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working fine here - My users will love you for this
Reply With Quote
  #35  
Old 05-25-2002, 11:58 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A hack like this won't use alot of space, mysql compression is exceptionally high and at most its another 100 characters it might even be blank.
If your worried about an extra few kb of space used then you've got a problem.
Reply With Quote
  #36  
Old 06-06-2002, 07:12 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Scott,

Is there a way to add this to the editpost.php so when you are editing the thread message that you can also edit it in there? I know it is in the admin options, but it might be good to have it there too.

Quote:
Originally posted by PPN
Also when you select edit thread from the admin options at the bottom of the thread you can edit the description.

Turning it on and off?
Are you talking a board wide basis or per forum?
Reply With Quote
  #37  
Old 06-12-2002, 09:43 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack, i installed it and it works fine, i also edit editpost so if its the first post of the thread they can edit the description if the edit post time limit lets them, if it isnt the first post of the thread, the description box wont show up.
Reply With Quote
  #38  
Old 06-12-2002, 09:48 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you share what you did? That sounds like a good idea.

Quote:
Originally posted by Slynderdale
nice hack, i installed it and it works fine, i also edit editpost so if its the first post of the thread they can edit the description if the edit post time limit lets them, if it isnt the first post of the thread, the description box wont show up.
Reply With Quote
  #39  
Old 06-12-2002, 10:46 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First make a backup of editpost.php before you continue

Created a template called: editpost_description
Add this to it:
(Note: remove the spaces in { secondaltcolor })
PHP Code:
<tr bgcolor="{ secondaltcolor }">
    <
td bgcolor="{ secondaltcolor }"><normalfont><b>Description:</b></normalfont></td>
    <
td bgcolor="{ secondaltcolor }"><normalfont><input type="text" class="bginput" name="description" value="$descriptionsize="40" maxlength="85" tabindex="1"></normalfont></td>
</
tr
Save editpost_description.

Open editpost.php

Find:
PHP Code:
  if ($getpost[postid]==$postid) {
    
$isfirst=1;
  } else {
    
$isfirst=0;
  }
  if (
$isfirst and $postinfo[title]=="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
    
$postinfo[title]=$threadinfo[title];
  } 
Replace it with:
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];
  } 
Find:
PHP Code:
  if ($isfirst and $title!="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
      
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
      
//$title="";
  

Replace it with:
PHP Code:
  if ($isfirst and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {

    
$DB_site->query("UPDATE thread SET description='".addslashes(htmlspecialchars($description))."' WHERE threadid=$threadinfo[threadid]");

    if (
$title!="") {
      
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
      
//$title="";
    
}

  } 
Save and close

Open the template: editpost

Find:
(Note: there are spaces in { secondaltcolor })
PHP Code:
<tr>
    <
td bgcolor="{ secondaltcolor }" nowrap><normalfont><b>Subject:</b></normalfont></td>
    <
td bgcolor="{ secondaltcolor }"><normalfont><input type="text" class="bginput" name="title" value="$postinfo[title]size="40" maxlength="85" tabindex="1"></normalfont></td>
</
tr
Under it add:
PHP Code:
$descriptionbit 
Save the template and upload editpost.php

When your done it should like the attachment below, enjoy
Reply With Quote
  #40  
Old 06-12-2002, 11:23 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I have for the second code set in editpost.php. What do I need to do to make it work with what you have for the second code?

Code:
if ($isfirst and $title!="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
    $DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
    $lastpost=$DB_site->query_first("SELECT * FROM forum WHERE forumid=$threadinfo[forumid]");
    if($lastpost["lastpost"]==$threadinfo["dateline"]) {
      $DB_site->query("UPDATE forum SET lasttitle='".addslashes(htmlspecialchars($title))."' WHERE forumid=$threadinfo[forumid]");
    }
    //$title="";
  }
Quote:
Originally posted by Slynderdale
First make a backup of editpost.php before you continue

Created a template called: editpost_description
Add this to it:
(Note: remove the spaces in { secondaltcolor })
PHP Code:
<tr bgcolor="{ secondaltcolor }">
    <
td bgcolor="{ secondaltcolor }"><normalfont><b>Description:</b></normalfont></td>
    <
td bgcolor="{ secondaltcolor }"><normalfont><input type="text" class="bginput" name="description" value="$descriptionsize="40" maxlength="85" tabindex="1"></normalfont></td>
</
tr
Save editpost_description.

Open editpost.php

Find:
PHP Code:
  if ($getpost[postid]==$postid) {
    
$isfirst=1;
  } else {
    
$isfirst=0;
  }
  if (
$isfirst and $postinfo[title]=="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
    
$postinfo[title]=$threadinfo[title];
  } 
Replace it with:
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];
  } 
Find:
PHP Code:
  if ($isfirst and $title!="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
      
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
      
//$title="";
  

Replace it with:
PHP Code:
  if ($isfirst and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {

    
$DB_site->query("UPDATE thread SET description='".addslashes(htmlspecialchars($description))."' WHERE threadid=$threadinfo[threadid]");

    if (
$title!="") {
      
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."' WHERE threadid=$threadinfo[threadid]");
      
//$title="";
    
}

  } 
Save and close

Open the template: editpost

Find:
(Note: there are spaces in { secondaltcolor })
PHP Code:
<tr>
    <
td bgcolor="{ secondaltcolor }" nowrap><normalfont><b>Subject:</b></normalfont></td>
    <
td bgcolor="{ secondaltcolor }"><normalfont><input type="text" class="bginput" name="title" value="$postinfo[title]size="40" maxlength="85" tabindex="1"></normalfont></td>
</
tr
Under it add:
PHP Code:
$descriptionbit 
Save the template and upload editpost.php

When your done it should like the attachment below, enjoy
Reply With Quote
  #41  
Old 06-12-2002, 11:30 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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 04:54 AM.


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.07492 seconds
  • Memory Usage 2,385KB
  • 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
  • (1)bbcode_code
  • (15)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