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 - [AJAX] vB Post Templates 1.5.0 (https://vborg.vbsupport.ru/showthread.php?t=199869)

Deceptor 12-26-2008 10:00 PM

[AJAX] vB Post Templates 1.5.0
 
1 Attachment(s)
vB Post Templates

vB4 Version: https://vborg.vbsupport.ru/showthread.php?t=242246

This modification adds an extension to your User CP, and posting interface. Both which allow you to pre-create "Post Templates". This is useful for repetitive posts, such as common replies to commonly answered questions.

A quick example would be here on vBulletin.org, all the moderators post nearly the same reply to users who are unlicensed, with this modification they would only need to insert a post template in their User CP, and then they could easily push that template into any post, quickly.

Ofcourse this could be used as an actual "Template", for users who make certain posts that are always constructed in some way or form, an example for that could be people who release modifications who like to structure their first post, and generally try to do universally.

Another use would be simply storing common responses or phrases, and you'd simply be able to push them into posts quickly without typing them :)


How does it work?

Very simple, in your User CP you can create two new things. One is categories for your post templates, and you'll need atleast one category before you can create a post template. Then secondly ofcourse, you can create post templates.

Once you have atleast one of each, when making new topics, or replies, or blogs, or anywhere with the full post editor, you'll see a new option integrated into the vBulletin WYSIWYG called 'Post Templates', clicking it will open a menu showing you your post templates categorised. Click any of the post templates, and AJAX will quickly request then spit the contents of that post template, into your post!



Features
  • Fully Integrates into vBulletin WYSIWYG editor
  • Unlimited amount of categories/templates allowed.
  • Fast template inclusion, through AJAX.


Translations
Spanish - Thanks to dvbusuario

FAQ
1) Does this work on lower vB versions?
A) I've not tested it, so feel free if you wish, but you may experience errors.


Change Log

- Version 1.5.1
Fixed bug with attachment bbcode manager in editor toolbar

- Version 1.5.0
Enhanced User CP Interface - More user friendly I hope!
Cleaned WYSIWYG Integration - Empty categories hidden, and PT hidden if no categories with templates are found
Usergroup Permissions - Ability to decide who can use PT, who can create items in PT, who can create "defined" items in PT, and who can use "defined" items in PT.
Defined Items - For those with permission to create defined items, they can create categories and templates and with the defined option make the category/template "Public" to all users who can use "defined" items.


If you have any questions, suggestions, or anything else then feel free to let me know :)

YsTyle 12-27-2008 12:40 AM

amazing idea! :)
mark as installed & nominated for MOTM

mac-warez 12-27-2008 02:03 AM

Great Work. But this is not for my forums.

dvbusuario 12-27-2008 02:57 AM

1 Attachment(s)
Can I move it to be so?

Or any help me to move bbcode a new line below the originals?

Thank You!

Deceptor 12-27-2008 03:02 AM

Sure, edit the template editor_toolbar_on:
Find:
Code:

                        <if condition="$vBeditTemplate['extrabuttons'] != '' ">
                                <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>       
                                $vBeditTemplate[extrabuttons]
                        </if>

Remove it, then find:
Code:

                                <td><div class="imagebutton" id="{$editorid}_cmd_redo"><img src="$stylevar[imgdir_editor]/redo.gif" width="21" height="20" alt="$vbphrase[redo]" /></div></td>
Below add:
Code:

                        <if condition="$vBeditTemplate['extrabuttons'] != '' ">
                                <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>       
                                $vBeditTemplate[extrabuttons]
                        </if>

Save, and it should work. Unfortunately there's no way to do it without editing the template manually.

Forum Lover 12-27-2008 03:14 AM

Great idea, is it usergroup permission enabled? Cause I don't want to let everybody use it and want to keep it to only my staffs. :) Tagged. :)

Deceptor 12-27-2008 03:15 AM

Usergroup was something I considered and left it out incase requested, but I'll add it in for yah :)

Lynne 12-27-2008 03:22 AM

Wow! This looks very cool. My mods would love me if I installed this. I'll be testing this out on my test site soon.

dvbusuario 12-27-2008 03:24 AM

Quote:

Originally Posted by Deceptor (Post 1694542)
Sure, edit the template editor_toolbar_on:
Find:
Code:

                        <if condition="$vBeditTemplate['extrabuttons'] != '' ">
                                <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>       
                                $vBeditTemplate[extrabuttons]
                        </if>

Remove it, then find:
Code:

                                <td><div class="imagebutton" id="{$editorid}_cmd_redo"><img src="$stylevar[imgdir_editor]/redo.gif" width="21" height="20" alt="$vbphrase[redo]" /></div></td>
Below add:
Code:

                        <if condition="$vBeditTemplate['extrabuttons'] != '' ">
                                <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>       
                                $vBeditTemplate[extrabuttons]
                        </if>

Save, and it should work. Unfortunately there's no way to do it without editing the template manually.



You can only move this BBCode and not all other additional?

Deceptor 12-27-2008 03:26 AM

- dvb - This mod hooks into the additional buttons template hook, I'm afraid the template doesn't have any other hooks to plug into.

- Lynne - Glad it'll be of use to you :)

Lionel 12-27-2008 04:22 AM

This works perfect. It's a good alternative to canned entries. I second the usergroup options, and perhaps you could also auto-insert a title?

Lionel 12-27-2008 04:32 AM

One more option could be "common templates" If a template is set as common, then it would be available for all authorized users. At template creation, you'd check a box to mark it as common.

dvbusuario 12-27-2008 04:53 AM

1 Attachment(s)
It's a wonderfull hack!!

Install!! & Nominated!!!

Attachment 91253

Attachment 91254

Translated in Spanish:up:

Attachment 91256

lolo? 12-27-2008 04:53 AM

Very good idea i think it's better to give group permission for use like moderator and admin
and one ption like make possibility to close a thread directly

Spank 12-27-2008 04:56 AM

Awesome, I like this. I would want usergroup controls though, and Lionel's idea is a good one.

Does this work anywhere the WYSIWYG editor is? Like Pms, Blog, etc

Magnumutz 12-27-2008 06:53 AM

Very nice idea dude, good job !

*Marks for later installation*

Lionel 12-27-2008 08:49 AM

This is very nice. I was thinking of doing something to auto add "sources" for the news. Last week my moderators requested it. So this came in very handy. I could not have done it better than that. I simply made it so it does not display in editor if the build is empty.

I can also confirm that it works fine in 3.74

Forum Lover 12-27-2008 09:49 AM

Quote:

Originally Posted by Lionel (Post 1694643)
I can also confirm that it works fine in 3.74

SWEET:) waiting most eagerly for usergroup thing now. :)

valdet 12-27-2008 10:13 AM

Great concept. I also would welcome usergroup permissions.

Installed and waiting for an update.

adhmwagde 12-27-2008 02:15 PM

Good Idea But Sorry i Have Problems http://localhost/vb0/profile.php?do=pt_addcategory error page ...!

Arcade Fire 12-27-2008 02:33 PM

Installed! Thanks to dvbusuario for the translation.

Lynne 12-27-2008 03:20 PM

Quote:

Originally Posted by adhmwagde (Post 1694777)
Good Idea But Sorry i Have Problems http://localhost/vb0/profile.php?do=pt_addcategory error page ...!

That url is not going to be available for us to see and help you out. You're gonna have to either post a valid url or post the actual text of the error message.

Deceptor 12-27-2008 03:55 PM

Spank - It'll work anywhere the Full Text editor is, like blogs, posts etc... :)

As for usergroup permissions, the update will be out very soon :)

adhmwagde 12-27-2008 04:00 PM

Quote:

Originally Posted by Lynne (Post 1694822)
That url is not going to be available for us to see and help you out. You're gonna have to either post a valid url or post the actual text of the error message.


thanks i fix it :)

ecihanuysal 12-27-2008 06:55 PM

How can we edit this mod's permission settings for only admins or moderators? This is for all groups' members?!?

Deceptor 12-27-2008 07:08 PM

Please read previous posts, UG perms are coming :)

Vitaly 12-27-2008 10:46 PM

Heh... seems you know the biggest headaches of large forums :) . Started testing with sending 50$ :)

Installed on my 3.7.4 dev board.

- works
- awesome
- a bit difficult configuration
- no UG restriction now (next version, ok)

Will move to production anyway.

The main suggestion is about sorting (typical use case):
  1. It would be nice to have option to define order of category and templates. Somerting like small pictures "move up" and "move down" (for categories and for templates)
  2. In UCP stuff is ordered by creation time. In WISYWIG - in other way, may be, by alfabet. Probably, should be the same if (1) done.
  3. If you have 20 templates, it's completely unclear in UCP, what is parent category of each. Probably, it would be nice to combine templates by category and add category name for each set.
Some minor suggestions:
  1. May be, hide field in WISYWIG panel, if no templates defined.
  2. May be, hide category in WISYWIG, if no child templates
  3. ? May be, option to hide category in WISYWIG from UCP. Not sure.
Thank you again for your product :) . I'll use it at production in nearest days even as is.

Deceptor 12-27-2008 10:53 PM

Thanks for the donation Vitaly :)

I'll certainly look into those suggestions, I'll admit asthetics isn't my strong point as shown by the UCP interface, but I did try :)

Enjoy!

TheLastSuperman 12-28-2008 12:11 AM

Quote:

Originally Posted by Deceptor (Post 1695140)
Thanks for the donation Vitaly :)

I'll certainly look into those suggestions, I'll admit asthetics isn't my strong point as shown by the UCP interface, but I did try :)

Enjoy!

Deceptor, yet another good mod I see... boy I tell ya... you have not been here long but your doing GREAT work IMO!!! :D

Waiting on next release for usergroups etc and then I'll test for 3.6.8 - 3.6.x etc.

S-MAN

djr 12-28-2008 12:11 PM

I would love to see admin defined templates instead of user defined templates. This way the admin decides (in AdminCP) who gets to post what (in combination with the usergroup permissions).

Stifmeister2 12-28-2008 01:58 PM

Quote:

Originally Posted by djr (Post 1695487)
I would love to see admin defined templates instead of user defined templates. This way the admin decides (in AdminCP) who gets to post what (in combination with the usergroup permissions).

Yes that would be better imo. :)

TheLastSuperman 12-28-2008 02:01 PM

Quote:

Originally Posted by Stifmeister2 (Post 1695530)
Yes that would be better imo. :)

Ohhhhhh Deceptor lol???

Eh? What do you think?

Vitaly 12-28-2008 02:44 PM

Quote:

Originally Posted by djr (Post 1695487)
I would love to see admin defined templates instead of user defined templates. This way the admin decides (in AdminCP) who gets to post what (in combination with the usergroup permissions).

I don't agree. That overcomplicates mod/management without significant benefits.

May be, just function to bulk append (copy) templates from one profile to another one. Not more. But seems to be used in rare cases. The simple solution is just to publish all templates for stuff in restricted section of forum, and everyone will select those he really needs.

Lynne 12-28-2008 02:55 PM

Quote:

Originally Posted by Vitaly (Post 1695551)
The simple solution is just to publish all templates for stuff in restricted section of forum, and everyone will select those he really needs.

Exactly what I was thinking. I was gonna write a bunch of 'templates' in our Staff forum and just have the Staff pick the ones that they need to add to their own set of templates. I have about four 'main' areas that need moderators to reply in all the time. Each of those forums require different pre-defined statements to be made.

djr 12-28-2008 04:12 PM

Vitaly and Lynne: For our forum (and I guess many other forums) it's really important that the admin and all mods all speak in the same 'tone of voice'. If you delegate this power to the staff by leaving them the option who gets to post/select what and in what way, you'll essentially lose that control. If you look at vB.com (the canned replies on which this mod is based), you'll notice they all post the same responses over and over.

Another point which I'd like to make from an administrator point of view: if you appoint new moderators you'll have to instruct them individually which templates they have to generate in their UserCP and point them to the admin predefined templates they have to copy and paste in their own templates. It would be far more easier if the admin (with help of the staff) defines up the templates/canned replies, store them in the AdminCP and selects which usergroup may use what template.

Lynne 12-28-2008 04:27 PM

Actually, djr, there is only one canned reply here - it is regarding the licensing issue. All other mod replies are our own - although I know I'm not the only mod that has a text sheet of 'cheats' to copy/paste when appropriate.

djr 12-28-2008 04:33 PM

Quote:

Originally Posted by Lynne (Post 1695598)
Actually, djr, there is only one canned reply here - it is regarding the licensing issue. All other mod replies are our own - although I know I'm not the only mod that has a text sheet of 'cheats' to copy/paste when appropriate.

I wrote vB.com, not vB.org ;)

Deceptor 12-28-2008 04:36 PM

I suppose best of both worlds would be needed really. Either way I'm setting up permissions to work both ways, either:

- Users can create their own templates
- Users can create their own and have preset ones (defined by admins)
- Users can only use predefined ones

So which way works best for your forum and you will be available :)

djr 12-28-2008 04:38 PM

If you manage to do this I will match Vitaly's donation :D

Lynne 12-28-2008 04:48 PM

Quote:

Originally Posted by djr (Post 1695604)
I wrote vB.com, not vB.org ;)

Whoops, I missed that. But, I could have sworn that I saw a discussion about this on vb.com and they also do what we do - each have their own text file that they copy/paste from.


All times are GMT. The time now is 06:27 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.01681 seconds
  • Memory Usage 1,840KB
  • 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
  • (6)bbcode_code_printable
  • (11)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