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)

Scott MacVicar 05-21-2002 10:00 PM

Description of thread hack
 
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

ForKmaN 05-22-2002 01:23 PM

Thanks :D

How do I make it work?
What do I do with this file? I'm used to txt version with instalation instructions...

ForKmaN 05-22-2002 01:41 PM

Ok I installed it, and it said it installed perfectly and all..but its not showing up on my forums ...

That could be a problem ..

Any Ideas?

Scott MacVicar 05-22-2002 01:47 PM

Did you apply it to all template sets?
You'll need to apply it to all of them or make sure it made all the changes.

and a text file

ForKmaN 05-22-2002 02:17 PM

I get this:

http://www.gb-mod.net/forkman/error001.jpg

now I know that cant be right...

ExcErr 05-22-2002 02:25 PM

some screenshots?

FleaBag 05-22-2002 03:29 PM

For some reason vBhacker couldn't make the two template changes for me [I only use 1 style - the default one], even though the HTML was exactly as it required, but apart from that it all went smoothly. Running on 2.2.5, looking great! :) Thanks PPN, I always loved this feature on Ikonboard!

Scott MacVicar 05-22-2002 04:13 PM

ForKMan did you put in a description other than test?

Bald Bouncer 05-22-2002 04:17 PM

works well mate good job, was going to do this myself but you beat me too it :D

would be nicer with it in the edit post too ;)

FleaBag 05-22-2002 04:27 PM

That would mean you'd have to amend every existing thread's MySql table wouldn't it?

Admin 05-22-2002 04:31 PM

I could've sworn this was done before... :dead:

Dean C 05-22-2002 05:39 PM

still its a great hack...

Velocd 05-22-2002 08:12 PM

Quote:

Originally posted by FireFly
I could've sworn this was done before... :dead:
This has been done before, a similar version where when your mouse is over the topic name it gives a short description of the first post in the ALT area. I find this one alittle bit more useful though ^_^

ForKmaN 05-22-2002 09:25 PM

Quote:

Originally posted by PPN
ForKMan did you put in a description other than test?
ah-huh!

But it comes up like that screenshot .. and the link to the posters user id thing is gone ...

Dade 05-22-2002 10:54 PM

This is also a built in feature of phpBB or something like that. OpenBB maybe.

Scott MacVicar 05-22-2002 11:48 PM

Check your forumdisplaybit template something has went wrong there.

ForKmaN 05-23-2002 12:26 AM

Ikonboard ...

But Its still not working for me :(

Neo 05-23-2002 12:51 AM

This is useful. Is there a option to turn it off in the admin cp?

ZiRu$ 05-23-2002 01:02 AM

sounds great but i dont have/want vbhacker.....can you generate a txt file and post it?

Velocd 05-23-2002 04:22 AM

Quote:

Originally posted by Hot Dogg
sounds great but i dont have/want vbhacker.....can you generate a txt file and post it?
Hot Dogg check post #4 for PPN's txt version.

------------

I just installed it and I must say this is awesome! Its completely different from what I initially thought it would be, which is a hack that takes the first few words from the first post and sticks it under the thread title. This though, which I didn't note before, lets you create a description! sweeeeeeett :D You have my install on this one!

Here are some pictures:

http://www.diffusion4.com/forums/images/ex1.gif
http://www.diffusion4.com/forums/images/ex2.gif (j/k on the beer :p)

Scott MacVicar 05-23-2002 10:38 AM

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?

ForKmaN 05-23-2002 11:20 AM

I still cant get it to work ...

When i hack the files, some of the stuff that should be there isnt :o

Could this be from other hacks? Also alot of spacing is generated in teh text file ..as in spacing that I dont think should be there, that might cause a problem right?

Scott MacVicar 05-23-2002 11:59 AM

Are you running 2.2.5?
I done this in 2.2.6 but there was no really drastic changes between the two versions. You need to try simply uninstalling this hack and doing it manually from the text file in post 4.
The only thing you wont need to do is run the database query.

ForKmaN 05-23-2002 12:02 PM

Ok I did it ...

But one thing, when you edit it, the box for the subject aint showing, whicn meand only moderators and admins can edit the subject...which aint that bad but yeah, does work for me now.

It took alot of playing around to get it working but it works now and I'm never using vbhacker again :p

It kinda stuffed things up.

BTW Velocd, what font are you using for your forums?

Scott MacVicar 05-23-2002 12:06 PM

Well users can't edit thread title so they shouldn't be able to edit thread description.

Before anyone says they can edit the thread title, it is only within a certain amount of time that they can do this after they haved posted the thread.

ForKmaN 05-23-2002 12:09 PM

ok :)

do you know what font hes using? it looks nice and soft edged. I want it!

Velocd 05-23-2002 04:15 PM

Its a very rare, highly sophisticated, and technologically advance font known asÂ…arial.

TECK 05-23-2002 09:13 PM

Quote:

Originally posted by FireFly
I could've sworn this was done before... :dead:
it was done in a different way. it shows the first 100chars of the first post, as a preview. i implement it on my board as a text description, not preview.

PET 05-24-2002 10:40 PM

I ++++ed by forum !

Warning: SAFE MODE Restriction in effect. The script whose uid is 48 is not allowed to access ./global.php owned by uid 546 in /home/virtual/site26/fst/var/www/html/forum/forumdisplay.php on line 28

Know why ? Please...i am dispered !

CeleronXL 05-24-2002 11:22 PM

What's the URL to your site? Just upload the backed up version of forumdisplay.php.... You did tell it to make backups, right?

PET 05-24-2002 11:31 PM

I tried this with the bak created by vbhacker. But....i fount a old forundisplay.php on Recycly Bin. :)

N!ck 05-25-2002 12:23 AM

this is a cool idea, but, unfortunately, like parker clack's thread preview hack, it uses lots of space :p

johnr 05-25-2002 05:56 PM

Working fine here :D - My users will love you for this ;)

Scott MacVicar 05-25-2002 11:58 PM

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.

Boofo 06-06-2002 07:12 AM

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?


Slynderdale 06-12-2002 09:43 PM

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.

Boofo 06-12-2002 09:48 PM

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.

Slynderdale 06-12-2002 10:46 PM

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

Boofo 06-12-2002 11:23 PM

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


Slynderdale 06-12-2002 11:30 PM

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



All times are GMT. The time now is 10:36 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.01712 seconds
  • Memory Usage 1,886KB
  • 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
  • (1)bbcode_code_printable
  • (15)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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