PDA

View Full Version : Thread Introductions


N!ck
05-05-2002, 10:00 PM
About
This little hack will allow you to have introductions at the top of your threads that only admins can edit. Screenshots follow in the next posts.

I was inspired by my ignorance, really. I was over at http://www.bikeforums.net/ to gawk at his contest thing at the top of each thread, and I didn't realize it was on EVERY thread - I thought he had created some kind of hack! scsa20 pointed out that it was merely a template edit.

I had already fallen in love with this idea, though. So here it is.

Notes:
1. If you install this, please click the "install" button or post the URL of a thread with an introduction in your forums in this thread so I can see this in action. :) I'd consider it a personal favor.
2. I was unable to get one screenshot working, but I can just tell you that the thread introduction editing page looks like the post editing page. If someone could post this screenshot, I'd appreciate it.

Latest Version: 1.1.5
The latest version integrates the "Thread Introduction" link INTO the admin options menu, adds an option to show the thread title when no intro is present, and allows you to update the introductions of ALL threads in EVERY forum at once (Thanks Boofo for the idea). If you are upgrading, read through install.txt, but the only necessary things to do are to change the "threadintro" template and to overwrite the old threadintro.php file with the new one!
Download: here (https://vborg.vbsupport.ru/attachment.php?s=&postid=252646)

Old Versions / Change Log
v1.1.0 - added formatting & introduction box
v1.0.0 - first release

N!ck
05-06-2002, 02:46 AM
Screenshot #1 - thread introduction

AnkisethGallant
05-06-2002, 02:47 AM
I'm just getting black pictures.

N!ck
05-06-2002, 02:53 AM
fixed - at least one :)

AnkisethGallant
05-06-2002, 03:57 AM
It works now. The only thing is, what's the main point of this? If you have a message, it goes on the thread. If a moderator has an annoucnment, it has it's own thread.

N!ck
05-06-2002, 04:02 AM
*shrug* I don't know. If you can't think of a use, don't install it. It's a lot of fun though. :D

for starters, i used it once to tell people not to SPAM for the sake of post counts on a thread where people were guessing who would get the most posts

in general, it would be good to, as the name implies, introduce the thread or to make a clarification, etc.

Velocd
05-06-2002, 04:29 AM
*shrugs*

Tungsten
05-06-2002, 11:34 AM
Originally posted by nicksaunders
*shrug* I don't know. If you can't think of a use, don't install it. It's a lot of fun though. :D

Don't sweat it. There's countless hacks here that I haven't installed because I personally don't see a use for them but each adds overall value to VBulletin and the VBulletin community. I'd hate to think what it would be like if the various hackers here were deterred from writing or releasing their addons because they thought no one else would benefit.

The more the merrier! ;)

John
05-06-2002, 01:36 PM
I get two instances of if (!$thread['visible']) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
exit;
}

John
05-06-2002, 01:50 PM
A few things - I found that the first bit of code (as mentioned above) has to be put under the second instance.

Secondly, I think you should point out that the "Thread Intro" thing is a link, literally underneath the admin menu - I thought by "under the menu" you meant it was an option in the menu.

Thirdly, does this require that the user does his/her own formatting? This is what I get (see attachment):

ZiRu$
05-06-2002, 08:11 PM
great hack I will install this later! :)

N!ck
05-06-2002, 10:03 PM
if you want to do formatting, you are welcome to go ahead and do this in your template :D

N!ck
05-06-2002, 10:22 PM
old version file - no formatting

edit: attachment removed

zachb
05-07-2002, 02:24 AM
yea, i like it. ti's a good way to keep people reminded of stuff that would be going on. before you would have to hope they looked in the announcement, with this hack you are guaranteed the members will see it if they go on your board. :)

Smoothie
05-07-2002, 07:59 PM
question. Is this always visible, or is there a way to turn it off?

N!ck
05-07-2002, 10:18 PM
it is only visible if there is a thread intro in the database for that particular thread. if not, the table disappears.

Smoothie
05-07-2002, 11:12 PM
So if the thread has been deleted, it will not show, correct?

Smoothie
05-07-2002, 11:15 PM
I'm somewhat confused as to how this works now that I've read this whole thread. Is it similar to the Bike forums, or something different?

Is it an actual link to a thread?

N!ck
05-08-2002, 12:22 AM
Look @ the screenshot - it's at the top of showthread.php in any threads that the administrator creates thread introductions for. If there is no thread introduction set, the table will disappear.

N!ck
05-14-2002, 01:23 AM
i get the feeling this isnt catching on

cessna140
05-16-2002, 05:55 PM
This looks interesting. Could this be used as a Forum Introduction?

If I understand correctly, this could be used as a "Welcome to xxx forum" that would be displayed at the top of any particular forum?

This would be better(?) than posting a "Welcome..." thread or Announcement:, where visitors might or might not view it. This would be automaticallly displayed & viewed by all that visited the forum where it was posted. Correct?

I assume the admin has the option to post it in any forum?

Thanks...

N!ck
05-16-2002, 11:07 PM
No, these introductions are in THREADS...see the screenshot.

cessna140
05-16-2002, 11:10 PM
Originally posted by nicksaunders
No, these introductions are in THREADS...see the screenshot.

Oh well, I was hoping this could have been used for Forum intro's. Thanks anyway.

N!ck
05-17-2002, 12:17 AM
i might get to that sometime ;)

Boofo
05-17-2002, 03:24 AM
Is this the same thing that Firefly is using here in the big letters? And how do you get it to automatically do it in the big letters whenever a new thread is started? I tried to run the install php but got errors from the global.php on all 4 line twice. Did I miss something?

Boofo
05-17-2002, 04:07 AM
Another great hack, Nick! Is there a way that we can have it automatically add the threadintro to the db whenever a new thread is started so we don't have to do it manually for each thread? The editor is a great idea, but can it be made to edit the threadintro in the navbar too? It's best to have them match, if possible. :)

N!ck
05-17-2002, 01:03 PM
Well, one COULD, but it would take extensive modifications to the showthread_adminoptions template. I'll take a look and post the new contents of that template here if I get it working. ;)

N!ck
05-17-2002, 01:04 PM
And BTW, the automatic thread intro thing can be done, but would use lots of space...

N!ck
05-17-2002, 02:03 PM
Okay, to link to the thread introduction changer actually IN the admin options menu, first back up your showthread_adminoptions template in case this doesn't work, then replace it with the following:


<table cellpadding="0" cellspacing="0" border="0">
<form action="postings.php" method="get"><tr><td>
<smallfont>
<input type="hidden" name="s" value="$session[dbsessionhash]">
<input type="hidden" name="threadid" value="$threadid">
<b>Admin Options:</b><br>
<select name="action"
onchange="window.location=('this.options[this.selectedIndex].value+'&s=$session[dbsessionhash]&threadid=$threadid')">
<option value="postings.php?action=editthread" selected>-- Thread Options --</option>
<option value="postings.php?action=openclosethread">Open / Close Thread</option>
<option value="postings.php?action=movecopythread">Move / Copy Thread</option>
<option value="postings.php?action=editthread">Edit Thread</option>
<option value="postings.php?action=deletethread">Delete Thread / Posts</option>
<option value="postings.php?action=merge">Merge Threads</option>
<option value="postings.php?action=split">Split Thread</option>
<option value="postings.php?action=stick">Stick / Unstick Thread</option>
<option value="threadintro.php?">Thread Introduction</option>
</select>$gobutton
</smallfont>
</td></tr></form>
</table>

N!ck
05-18-2002, 01:38 AM
did you get that, boofo?

Boofo
05-18-2002, 01:50 AM
The above doesn't work. Did I get what? :)

BTW: Is there anyway that your hack can edit the threadintro if there is one and if there isn't one, just edit the default one ($thread[title]) and make that one into a threadintro. That way there will always be a intro at the top of the page whether it is edited or not? Do you understand what I mean? Like they have here on the thread headers where it is different form the original one. Can you do it? :)

N!ck
05-18-2002, 05:35 AM
all they do is use multiple instances of $forum[title]

can you please be more specific as to any error messages you are getting, etc.?

Boofo
05-18-2002, 05:55 AM
I see what you are saying about multiple instances now. I wonder why I didn't think of that. :)

The errors I got on the Admin Options box after I applied your code was that it would say the page was done loading and be a blank screen. It kept pulling up the postings.php when it tried to run.

While I have you here, I am tring to do a forum header like it did the thraed header but I am running into problems with the table messing it up. Do you know a way around that? I tried to do it just like the thread intro but the table is completely different in the forum header.

N!ck
05-18-2002, 06:07 AM
okay, please post the url that appears in the browser window after choosing an option

as for the header, you shouldn't need to do any more tables, just to <p><font size="SIZE YOU WANT">$thread[title]</font><p> somewhere up there

N!ck
05-18-2002, 06:10 AM
try this:


<table cellpadding="0" cellspacing="0" border="0">
<form action="postings.php" method="get"><tr><td>
<smallfont>
<input type="hidden" name="s" value="$session[dbsessionhash]">
<input type="hidden" name="threadid" value="$threadid">
<b>Admin Options:</b><br>
<select name="action"
onchange="window.location=this.options[this.selectedIndex].value">
<option value="postings.php?action=editthread" selected>-- Thread Options --</option>
<option value="postings.php?action=openclosethread">Open / Close Thread</option>
<option value="postings.php?action=movecopythread">Move / Copy Thread</option>
<option value="postings.php?action=editthread">Edit Thread</option>
<option value="postings.php?action=deletethread">Delete Thread / Posts</option>
<option value="postings.php?action=merge">Merge Threads</option>
<option value="postings.php?action=split">Split Thread</option>
<option value="postings.php?action=stick">Stick / Unstick Thread</option>
<option value="threadintro.php">Thread Introduction</option>
</select>$gobutton
</smallfont>
</td></tr></form>
</table>

Boofo
05-18-2002, 06:11 AM
I tried that but they have a table that goes up and down on the left side in the thread header area so when I put that code it, it never centers. :)

N!ck
05-18-2002, 06:14 AM
honestly i dont know then...i've never tried that

Boofo
05-18-2002, 06:17 AM
Here's the error I get when I pick anything but thread intro:

No thread specified. If you followed a valid link, please notify the Webmaster

When I pick thread intro it kicks me back to the main forum page.

Could it have something to do with the form action at the top of the code? :)

N!ck
05-18-2002, 06:20 AM
try:


<table cellpadding="0" cellspacing="0" border="0">
<form><tr><td>
<smallfont>
<b>Admin Options:</b><br>
<select name="action"
onchange="window.location=(this.options[this.selectedIndex].value+'&s=$session[dbsessionhash]&threadid=$thread[threadid]')">
<option value="postings.php?action=editthread" selected>-- Thread Options --</option>
<option value="postings.php?action=openclosethread">Open / Close Thread</option>
<option value="postings.php?action=movecopythread">Move / Copy Thread</option>
<option value="postings.php?action=editthread">Edit Thread</option>
<option value="postings.php?action=deletethread">Delete Thread / Posts</option>
<option value="postings.php?action=merge">Merge Threads</option>
<option value="postings.php?action=split">Split Thread</option>
<option value="postings.php?action=stick">Stick / Unstick Thread</option>
<option value="threadintro.php?">Thread Introduction</option>
</select>$gobutton
</smallfont>
</td></tr></form>
</table>

Boofo
05-18-2002, 06:24 AM
Sorry, same results... I guess your guinnea pig is letting you down. :)

N!ck
05-18-2002, 06:33 AM
no, i'll just stick to my guns on the link UNDERNEATH the menu :)

N!ck
05-18-2002, 06:33 AM
can i see this in action? :D

Boofo
05-18-2002, 06:40 AM
What do you mean? You lost me there.

N!ck
05-18-2002, 05:15 PM
could i get the url of one of your threads with an introduction?

N!ck
05-18-2002, 11:49 PM
okay i fixed the problem with the blank page on my attempt at further integrating the link to the thread introduction editor (it was only on the move/copy option, btw)...i've tested the javascript and it works fine...see post#1 for the new template to use

Boofo
05-19-2002, 12:17 AM
I see you took the "post = action" thing out at the top. I figured it had something to do with that. Just a hunch. :) Now, how about my idea of being able to have either the thread[title] or thread intro be different and be allowed to use either one? :)

N!ck
05-19-2002, 12:35 AM
this is not difficult. find in showthread.php:


} else {
$threadintro = "";
}


and replace with (make sure you take the spaces out of < normalfont > and < /normalfont >:


} else {
$threadintro = "<p><center>< normalfont ><font size=\"+5\">" . $thread[title] . "</font>< /normalfont ></center><p>";
}

N!ck
05-19-2002, 12:35 AM
so can i get your URL to view this? :D

Boofo
05-19-2002, 02:14 AM
Sure, here you go.

My Thread Intro (http://www.bearfacts2.com/forum/showthread.php?s=&threadid=8)

But I ran into a problem. When I chnage the thread intro title now, it alos changes the thread title. Any ideas?

Boofo
05-19-2002, 03:03 AM
Forget the last message. Problem solved and it works great! Now, all you have to do is have it maybe show the current title on the left of the edit box (or somewhere, just not inside it) incase we make a mistake editing it and don't want to have to start over from the beginning. Maybe even have a change and delete button, too. Just a couple of suggestions, that's all. Otherwise, it works great! Now I don't have to use muliple instances of thread title tags. I can be just like the big boys at vb.org! :) Great job, Nick!

N!ck
05-19-2002, 03:57 AM
:D

Boofo
05-19-2002, 04:39 AM
What did you think of the sight? I was working on something and it was messed up for a few minutes but all is well now. What about my idea? :) Also, I have updated the instructions for use the way I have it, if you are interested. :)

N!ck
05-19-2002, 04:49 AM
i think you should go ahead and attach those instructions and i will include them in the archive :)

your forums have some nice modifications...only, i personally would get rid of that mod column and move the drop down box underneath the description.

i wasn't actually able to look at that thread, as apparently only admins/mods/?? can view it...if you could do a quick introduction on another one i can take a look, but it's not necessary. :)

Boofo
05-19-2002, 05:03 AM
The instructions are attached below. I guess I don't understand about moving the drop down box under the description. What desciption and where do i move it? :)

Try this URL:

Thread Intro Test for Nick (http://www.bearfacts2.com/forum/showthread.php?s=&threadid=22)

N!ck
05-19-2002, 05:36 AM
what i mean is eliminating that column, and moving that code to underneath $forum[description] in the forumhome_level2_post

Boofo
05-19-2002, 06:04 AM
You mean putting the mod box UNDER the forum description? Wouldn't that look really wierd?

BTW: How is the file I attached? You like?

Boofo
05-19-2002, 06:06 AM
Ok, I see what you are saying. Any idea how to do it?

N!ck
05-19-2002, 06:35 AM
search the templates forum for how to remove the moderator column, then in forumhome_level2_post insert <br>$forum[moderators] after $forum[description]

and yes, i linked to your file in post #1 as an alternate if people are after what you wanted

Boofo
05-19-2002, 08:10 AM
I figured that out about the forum moderators just after I asked you about it. :) Check it out now. The moderator column is gone and the moderators are over where they should be. I have a few touch ups to do, but I'll get it.

If you want, I can send you the file to include in your program. Let me know. (Or, I suppose you can view it and copy it yourself if you wanted it. DOH!!!! on me). :)

Are you going to consider my idea of moving the intro info to the side or a box? Because if someone has a thread header that they already like and want to put it in the intro, it would be nice to have it there in front of them to copy or whatever, in case they didn't remember the exact name before they went into the intro editor. Does any of that make any sense to you? :) Unless you can pull out the default thread header into the editor if there isn't an intro in the thread already.

Boofo
05-19-2002, 08:15 AM
Nick,

Maybe you can answer this question. Either no one else seems to know or they just aren't willing to part with the info. What is the postbit_ignore and what does it do, or what is it used for?

N!ck
05-19-2002, 03:57 PM
postbit_ignore is what shows in place of the post if the poster is on the user's ignore list

your forumhome looks great now...:)...only one suggestion. in forumhome_level1_nopost, put <img src="https://vborg.vbsupport.ru/images/space.gif" width="150" height="1"><br> above "Last Post", so that the widths of that column in all your tables match.

Boofo
05-19-2002, 07:42 PM
I just tried doing that and it made no difference in the width. Exactly where and how should I put it, maybe I missed something. I have wanted to do that all along but haven't been abler to find a way to make it work.

N!ck
05-19-2002, 07:47 PM
widen it to like 225 then :)

Boofo
05-19-2002, 07:49 PM
All within the same td statemant as last post or just before it?

N!ck
05-19-2002, 07:50 PM
within it

Boofo
05-19-2002, 08:02 PM
You are my hero! I have been looking for a way to do that forever now. Thank you very much, sir! Is that the only file I need to change it in? And, any other suggestions? (I'd apprecaiete hearing any you have).

N!ck
05-19-2002, 08:05 PM
i don't think there's anywhere else you'll need to do that... :)

i have no other suggestions; nice job!

Boofo
05-19-2002, 08:14 PM
Thanks! Do you use messenger?

N!ck
05-19-2002, 08:57 PM
yahoo: phobe62
aol im: icknay06
icq: 36738980

Boofo
05-19-2002, 08:59 PM
Come on, Nick, all I have is MSN Messeneger. (Trillian actaully) :) Can't you get an account there, BUDDY??? (Is any of this working? :))

N!ck
05-19-2002, 09:04 PM
sorry; i have a thing against Microsoft :)

Boofo
05-19-2002, 09:50 PM
Mne and you both, That's why I use trillian. I could use your help with the quote box at the bottom of the moan page (it has a double kine under it). You really should get an account there though just to use Trillian if nothing else. :)

N!ck
05-19-2002, 09:59 PM
okay

N!ck
05-19-2002, 10:03 PM
phobe62@yahoo.com on msn

N!ck
05-19-2002, 10:58 PM
New version 1.1.5.

Now you can update ALL threads' introductions at once.

Almax
05-16-2003, 07:27 PM
Very nice hack just what i was after
are you still supporting this hack n!ck ?

I'd like to add time automatically and let mods add to the thread also
plus i'd like to get rid of the "change all" code

thanx if you can help ;)