vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   New Posting Features - Thread Stencil (https://vborg.vbsupport.ru/showthread.php?t=130162)

sebbe 10-27-2006 10:00 PM

Thread Stencil
 
1 Attachment(s)
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

Quote:

Originally Posted by AMG021
:) Reserved!

Uhm, why exactly did you reserve that post?

snakes1100 10-28-2006 01:04 AM

Quote:

Originally Posted by sebbe
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

Quote:

Originally Posted by snakes1100
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

Quote:

Originally Posted by voteforbird
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
Code:

<script language="Javascript">
 <!--

 function doClear(theText)
{
    if (theText.value == theText.defaultValue)
 {
        theText.value = ""
    }
 }
 //-->
 </script>

Open newthread template find
Code:

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

Code:

<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

Quote:

Originally Posted by voteforbird
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

Code:

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

Code:

       
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

Quote:

Originally Posted by Gaspanic
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

Quote:

Originally Posted by hornstar1337
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

Quote:

Originally Posted by SeQual
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 :)

Code:

       
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....62&postcount=8 and https://vborg.vbsupport.ru/showpost....0&postcount=10

voteforbird 10-28-2006 06:11 PM

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

Quote:

Originally Posted by voteforbird
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

Quote:

Originally Posted by Ntfu2
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

Quote:

Originally Posted by voteforbird
Oh, my bad. Also, when I upgraded to 1.2 that stopped working.

Yepp, it's because this variable does no longer exist
PHP Code:

$vboptions[stenciltitle

Instead you should use this line if you want it to work like before
Code:

<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

Quote:

Originally Posted by djwins
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

Quote:

Originally Posted by bada_bing
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

Quote:

Originally Posted by Irisfire (Post 1172367)
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

Quote:

Originally Posted by Irisfire
is that feature default now?

could you at least answer my question :D

sebbe 02-01-2007 09:21 PM

Quote:

Originally Posted by Irisfire (Post 1172481)
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".


All times are GMT. The time now is 04:13 AM.

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.01519 seconds
  • Memory Usage 1,837KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_php_printable
  • (17)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