View Full Version : New Posting Features - Thread Stencil
sebbe
10-27-2006, 10:00 PM
Thread Stencil v. 1.3
First off I want to say this is my first vB hack ever, well actually the 2nd but the first one is not released. Please be kind, constructive criticism is welcome! :)
I hope this hack does not already exist, I searched but couldn't find anything similiar.
This hack was requested by rasun here https://vborg.vbsupport.ru/showthread.php?t=130137
Enough with the bs, what does this hack do?
This hack will let you predefine a Title and Message that will show up when a user creates a new thread. It will just fill the boxes so the users can edit them. In the Forum Manager you can edit each forums own stencil.
It can be used for making interviews, application forms etc. See screenshots for example of an interview.
Misc
Tested on vB 3.5.4 & vB 3.6.0
Version Updates
Version 1.2
* Set custom stencils in the forums of your choice.
* Enable / Disable stencils in each forum.
OBS! - This new version makes changes to the database, you might want to make a backup just to be safe.
Version 1.3
* New tags added for output of username & date, [username] & [date]. See screenshots for more info.
Installation instructions
Import the product .xml. Go into Forum Manager and choose "Edit Forum" where you want to apply a new stencil. Scroll to the bottom and you can find the settings there.
Upgrade instructions
Uninstall the old product from Product Manager. Install the new product .xml.
Please click install if you're using this hack! :)
AMG021
10-28-2006, 12:48 AM
:) Reserved!
sebbe
10-28-2006, 12:58 AM
:) Reserved!
Uhm, why exactly did you reserve that post?
snakes1100
10-28-2006, 01:04 AM
Uhm, why exactly did you reserve that post?
For future use.
Thanx AMG, i like the concept, i think i will have a use for this. :cool:
zappsan
10-28-2006, 01:22 AM
For future use.
Thanx AMG, i like the concept, i think i will have a use for this. :cool:
AMG wasn't the one who released this hack, look above...
Anyway, I like the idea and will try it out when I have time :)
Kirk Y
10-28-2006, 01:57 AM
Great idea. This'd definitely come in handy on forums that use threads to create order forms or requests. Excellent idea, very useful.
One suggestion for a future update: create a stencil for each forum using forum permissions. ;)
voteforbird
10-28-2006, 02:02 AM
Neat product. Suggestion: Have an option to make the stencil text gray and then clear onclick. This would work much better for my (and others'?) purposes.
Ntfu2
10-28-2006, 03:29 AM
Neat product. Suggestion: Have an option to make the stencil text gray and then clear onclick. This would work much better for my (and others'?) purposes.
Edit headinclude - at very end
<script language="Javascript">
<!--
function doClear(theText)
{
if (theText.value == theText.defaultValue)
{
theText.value = ""
}
}
//-->
</script>
Open newthread template find
<td><input type="text" class="bginput" name="subject" value="$subject" size="40" maxlength="$vboptions[titlemaxchars]" tabindex="1" /></td>
And change to (if using this hack)
<td><input type="text" class="bginput" name="subject" value="$vboptions[stenciltitle]" size="40" maxlength="$vboptions[titlemaxchars]" tabindex="1" onFocus="doClear(this)"/></td>
demo http://top-vb.com
voteforbird
10-28-2006, 04:28 AM
Thanks. How would I do this for the body as well as the title? Also, can it appear gray when the template is there only?
Ntfu2
10-28-2006, 06:10 AM
Thanks. How would I do this for the body as well as the title? Also, can it appear gray when the template is there only?
Replace the newthread with this instead edit the CCC and 000000
<td><input type="text" class="bginput" style="color: #ccc;" name="subject" value="$vboptions[stenciltitle]" size="40" maxlength="$vboptions[titlemaxchars]" tabindex="1" onclick="doClear(this)" element onFocus="this.style.color = '#000000';"/></td>
Cant help ya with the message area right now. But that will do it for the subject box
RMS-Chef
10-28-2006, 06:37 AM
A nice alteration would be to instead have this a per forum option in the Edit Forum section so you could have different options for each forum.
Thanks for the mod.
Hornstar
10-28-2006, 06:44 AM
cool. however I have a request :)
I want to have a feature to insert their username into the thread.
eg. I would set up a thread title like this [username]'s mod application
and then it would come out like: Hornstar6969's mod applicaiton
This would be really good then :)
rasun
10-28-2006, 08:03 AM
Also here, thank you for fulfilling my request. :)
This addon is awsome, really needed something like that!
:banana:
EDIT: Like some other people here already mentioned....it would be great if you could create different stencils for different forums, instead of a "global" one...but anyway nice addon, will use it.
sebbe
10-28-2006, 08:32 AM
I'm glad you like it. I'm going to meet your requests about having it on a forum per forum basis. I'll add it maybe today, if I have the time! :)
Gaspanic
10-28-2006, 08:37 AM
Would it be possible to have the possibility of having a poll added too? I have a review section in my site and as such there's a poll that goes with it, so the option to post the poll at the same time would be excellent too.
sebbe
10-28-2006, 11:03 AM
Version updated - 1.2
SeQual
10-28-2006, 11:03 AM
Very nice hack, suggestions.
Per forum basis (as already been suggested ;) ) and the ability to set per forum to have the predefined text stay on click or not.
Would be useful if you want to give extra information in the message field of how and what is allowed to post. When you click in the message field the text is gone and you can write your message.
Same what voteforbird suggested I believe :)
Neat product. Suggestion: Have an option to make the stencil text gray and then clear onclick. This would work much better for my (and others'?) purposes.
Great hack, very nice feature
sebbe
10-28-2006, 11:04 AM
Would it be possible to have the possibility of having a poll added too? I have a review section in my site and as such there's a poll that goes with it, so the option to post the poll at the same time would be excellent too.
Ehm, polls are created on another page. I will see if I can do something about it, might be a good feature for a new version.
MentaL
10-28-2006, 11:06 AM
this is way useful ;)
sebbe
10-28-2006, 11:06 AM
cool. however I have a request :)
I want to have a feature to insert their username into the thread.
eg. I would set up a thread title like this [username]'s mod application
and then it would come out like: Hornstar6969's mod applicaiton
This would be really good then :)
Will come in next version.
rasun
10-28-2006, 12:57 PM
Allready done with the new version? You are very fast^^:)
Yes, now it?s perfect for my needs, big thanks again!
:up:
Ntfu2
10-28-2006, 01:44 PM
Very nice hack, suggestions.
Per forum basis (as already been suggested ;) ) and the ability to set per forum to have the predefined text stay on click or not.
Would be useful if you want to give extra information in the message field of how and what is allowed to post. When you click in the message field the text is gone and you can write your message.
Same what voteforbird suggested I believe :)
Neat product. Suggestion: Have an option to make the stencil text gray and then clear onclick. This would work much better for my (and others'?) purposes.
Great hack, very nice feature
Read this post: https://vborg.vbsupport.ru/showpost.php?p=1105962&postcount=8 and https://vborg.vbsupport.ru/showpost.php?p=1105980&postcount=10
voteforbird
10-28-2006, 06:11 PM
Read this post: https://vborg.vbsupport.ru/showpost.php?p=1105962&postcount=8 and https://vborg.vbsupport.ru/showpost.php?p=1105980&postcount=10
We don't mean graying the field altogether, but rather just the stencil text. When real text is added, it would be black. Also, it's be neat if the stencil would come up again if no text is added to the field.
Ntfu2
10-28-2006, 06:33 PM
We don't mean graying the field altogether, but rather just the stencil text. When real text is added, it would be black.
Thats what the second edit does. Gray stencil text. When you click, the text clears, and any text typed turns to black. Hopefully the mod author adds it so no template edits are required
voteforbird
10-28-2006, 07:00 PM
Thats what the second edit does. Gray stencil text. When you click, the text clears, and any text typed turns to black. Hopefully the mod author adds it so no template edits are required
Oh, my bad. Also, when I upgraded to 1.2 that stopped working.
sebbe
10-28-2006, 07:07 PM
Thing about the text coloring stuff, I have never written a line of javascript before. It seems that Ntfu2's piece of code worked there, I may try to implement.
sebbe
10-28-2006, 07:12 PM
Oh, my bad. Also, when I upgraded to 1.2 that stopped working.
Yepp, it's because this variable does no longer exist
$vboptions[stenciltitle]
Instead you should use this line if you want it to work like before
<td><input type="text" class="bginput" style="color: #ccc;" name="subject" value="$foruminfo[stenciltitle]" size="40" maxlength="$vboptions[titlemaxchars]" tabindex="1" onclick="doClear(this)" element onFocus="this.style.color = '#000000';"/></td>
sebbe
10-28-2006, 11:07 PM
Version updated - 1.3
djwins
10-29-2006, 02:02 AM
has anyone tried this with 3.5x?
sebbe
10-29-2006, 02:15 AM
has anyone tried this with 3.5x?
As it says in the first post, works on both 3.5 & 3.6.
Hornstar
10-29-2006, 04:42 AM
Thanks for the update. :)
This is actually really really good and would be a benefit to vbulletin as standard code, but none the less, I'm glad I will now have it installed on my site.
Thanks.
bada_bing
10-30-2006, 11:54 PM
Will this work on vb 3.5.3 ?
sebbe
10-30-2006, 11:56 PM
Will this work on vb 3.5.3 ?
EDIT: It should work, better try.
stomph
01-19-2007, 11:40 PM
Hi there, this is really nice! :)
Would it be possible to add stencils to new events? I have the eventforums hack installed and adding a new thread in a linked forum shows no stencil.
TheBlackPoet
01-24-2007, 11:44 AM
i absolutely appreciate this hack... i will be adding the extras you put in too... one of my friends has a aimoo board and she literally types her questions for each interview... while this is great and custom for each poet, ----the kid has no time to do that... this hack answered my need.. and while i wont be copying my friend's interview program, this is highly useful for my new members who will be asked a series of questions to break the ice...
so.... thanks a whole bunch!!
Reeve of shinra
01-28-2007, 12:19 AM
This has a lot of potential... good stuff.
Staxed
02-01-2007, 06:17 PM
i noticed you updated the hack after a few people were talking about making the text grayed out and then disappear when someone clicks in the box...
is that feature default now?...if so I don't want to install this. If it's an option (which it should be :))...that would be great.
My plans for this involve two forums...one would require the poster just to edit the info that's already there, while the other could use the 'disappear on click' form...
is there a setting in the forum ACP to pick which you want?...if not, could you add that please?
sebbe
02-01-2007, 08:16 PM
i noticed you updated the hack after a few people were talking about making the text grayed out and then disappear when someone clicks in the box...
is that feature default now?...if so I don't want to install this. If it's an option (which it should be :))...that would be great.
My plans for this involve two forums...one would require the poster just to edit the info that's already there, while the other could use the 'disappear on click' form...
is there a setting in the forum ACP to pick which you want?...if not, could you add that please?
I have no plans of updating this hack at the moment, sorry.
Staxed
02-01-2007, 08:51 PM
is that feature default now?
could you at least answer my question :D
sebbe
02-01-2007, 09:21 PM
could you at least answer my question :D
No it isn't. And I thought you already figured since you had marked this mod as "Install".
Staxed
02-03-2007, 09:36 AM
No it isn't. And I thought you already figured since you had marked this mod as "Install".
Thanks :)
(and I always mark something as installed if I plan on installing it...and remove the install if I decide not to :))
Dave-ahfb
02-03-2007, 08:24 PM
Does it work on 3.6.4?
sebbe
02-03-2007, 10:03 PM
Does it work on 3.6.4?
I haven't personally tested but it should work. The guy above installed it on version 3.6.4 and hasn't complained yet. ;)
akanevsky
02-03-2007, 10:24 PM
Not bad at all for a "first hack". :)
Jetrome
02-04-2007, 08:57 AM
Awesome hack. very useful for me.
fyi, using this on 3.6.4 and workign flawlessly
paidtoshop
02-04-2007, 04:11 PM
Is there anyway this can be used to create thread automaticaly daily at a set time?
sebbe
02-04-2007, 04:27 PM
Is there anyway this can be used to create thread automaticaly daily at a set time?
Not this particular mod. But if you know how to, you can point a Scheduled Task to a small php script that creates the thread(s).
Hawk7173
02-17-2007, 10:44 PM
Just for clarity, can this be used in two of the forums and not in the rest? Thanks
Antivirus
02-17-2007, 11:28 PM
nice work, and cool idea!
Hawk7173
02-18-2007, 05:52 PM
Cleared up and installed:up:
MeMySelfNi
04-05-2007, 08:30 AM
*installed*
gbox master
01-20-2008, 05:07 PM
*installed*
nice work and thnx :up:
Elenna
01-28-2008, 02:21 PM
Hi there, this is really nice! :)
Would it be possible to add stencils to new events? I have the eventforums hack installed and adding a new thread in a linked forum shows no stencil.
I am also using eventforums (with RSVP) and am curious if anyone has gotten this to work with that?
kartik786
01-28-2008, 03:44 PM
any luck with the clear gray text in new thread BODY area..
also, it'd be great if there can similar options for quick reply box of each forum.
vwdforum
02-05-2008, 09:21 PM
working on my 3.7 beta 3
Tim_GPN
02-06-2008, 11:30 PM
Awsum mod!!! Installed!
VBUsers
03-21-2008, 12:35 AM
works great and thanks
apiasto
03-21-2008, 03:17 PM
nice hack thnx,is it possible to redirect that person to this thread so he know that he is being interviewed,or if i wanna use this for a new user and inform him about this,thnx
tuankm123
03-21-2008, 10:42 PM
I did install this mod. It's very nice. However, I have to set it for a specific forum. Is there any way to apply for all sub forums if I set it for their parent forum?
Thanks
valdet
04-21-2008, 12:26 AM
This is a great mod. It perfectly works on vB 3.6.8.
Thanks
Goodman_2020
04-21-2008, 12:46 AM
works perfect on 3.6.9! exactly what i was looking for, thx!
Peterpan002
08-23-2008, 02:36 PM
Can a stencil be made which includes setting the post background colour?
kud0gfx
09-01-2008, 01:40 AM
works on 3.7.2, but doing what says #55
Bram H
11-03-2008, 04:32 PM
/me marks install, works perfect with vB3.7.3 too!! Thanks a lot
dvbusuario
12-28-2008, 09:50 PM
Install in vBulletin 3.7.4 Level 1!!!
Very Good!!! :up:
Thank You :)
Translate in Spanish :D
gbox master
04-13-2009, 02:45 PM
i hope it still works in 3.8.xx
this mod is one of the mods that should be build in vB
its a real good mod when you want to have youre members answer some questions when they post a new thread
:up:
KevinGupta
04-22-2009, 05:56 AM
Does it work with 3.8.x?
I may not download this doesnt work with 3.8.x and any problems so far?
adivor
04-28-2009, 04:17 PM
HELLO TO ALL,
great mod (work with vbull 3.8) but i have a question:
how is possible insert this in fast reply box?
how is possible delete all stencil message with mouse click?
I see this mod in one forum and i would like insert :o
Itchy Nips
07-16-2009, 02:03 PM
works great on vB 3.8.3!
installed an voted.
Marek58
09-21-2009, 12:50 PM
Polish version
http://img225.imageshack.us/img225/6166/stempelg.jpg
kalvin
12-18-2009, 08:21 AM
Hi,
adding to the response:
Plugin & Products System -> Add New Plugin:
Product: Thread Stencil
Hook Loioncat: newreply_form_start
Title: Thread Stencil
Execution Order: 5
Plugin PHP Code:
//check if forums is supposed to have stencil or not
if ($foruminfo['stencilon'])
{
// Write stencil
// Replace [username]
$foruminfo['stenciltitle'] = str_replace("[username]",$vbulletin->userinfo['username'],$foruminfo['stenciltitle']);
$foruminfo['stencilmsg'] = str_replace("[username]",$vbulletin->userinfo['username'],$foruminfo['stencilmsg']);
// Replace [date]
$foruminfo['stenciltitle'] = str_replace("[date]",date("dS F Y"),$foruminfo['stenciltitle']);
$foruminfo['stencilmsg'] = str_replace("[date]",date("dS F Y"),$foruminfo['stencilmsg']);
$newpost['title'] = $foruminfo['stenciltitle'];
$newpost['message'] = $foruminfo['stencilmsg'];
}
Antyrael
12-29-2009, 06:05 PM
Nice, this works on vBulletin 4.0 Gold without a glitch, good job Sebbe :)
lastpoet
05-24-2010, 10:02 AM
Works perfectly on Vbulletin 4.0.3
Very nice work.
jfreeze
06-18-2010, 05:54 PM
This mod looks very interesting but if I understand correctly this populates the message with pre-canned text. I would like to dynamically supply the text through a URL argument (ie. something like this:
http://www.mydomain.com/forums?jfile=newthread.php&f=59&msg=pre_canned_text_goes_here
Is that possible? This would allow me to use a link to send the visitor to a newly created forum topic where they can discuss the article they were previously viewing (and automatically include a link BACK to the article they came from).
James
mytweakerart
03-03-2011, 08:22 PM
This is awesome!
How do i get more tags like [field1] [field2] etc to populate from my User Profile Fields?
i have custom user profile fields, i would like to auto fill the message box with these.... ?
thanks
mytweakerart
03-03-2011, 08:39 PM
nevermind i figured out how to add custom fields
// Replace [field1]
$foruminfo['stenciltitle'] = str_replace("[field1]",$vbulletin->userinfo['field1'],$foruminfo['stenciltitle']);
$foruminfo['stencilmsg'] = str_replace("[field1]",$vbulletin->userinfo['field1'],$foruminfo['stencilmsg']);
mytweakerart
03-04-2011, 08:32 PM
This mod is great!
HOW can i make it work in the Private Message page?
ProFifaLeagues
11-25-2011, 07:58 PM
Is there a way to get this to work for every post and reply in certain forums???
Works well on 4.1.3 but could do with the option for it to work on all posts and reply s if it is possible
deverill2010
06-24-2012, 12:05 PM
Is this working on 4.2? It's exactly what i need!
ProFifaLeagues
06-25-2012, 08:09 PM
Yes works Fine on 4.2 deverill2010
I use a mod myself based around this and its pretty much the same code wise as well and we have had no issues at all.
deverill2010
06-25-2012, 08:10 PM
I've installed it already and am using it :D Brilliant!
vijayninel
03-12-2013, 04:31 AM
Not working with PHP 5.4
GameOverViper
07-04-2013, 01:39 PM
This works with vb 4.2.0 :D
DannyITR
08-27-2014, 01:08 PM
Worked for me on 4.2!
So happy!
darksidemon2
10-20-2015, 05:35 PM
Worked fine on 4.2.3
WindVoice
01-18-2017, 06:18 PM
Works nice, is it possible to make it work with posts and not only new threads? Anyone has any idea how to make it work with posts or if there is another addon that would auto new posts in specific forum?
SLY LS1
08-04-2019, 01:55 AM
Any chance this could be updated to work with 5.5.3?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.