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


All times are GMT. The time now is 12:20 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.01345 seconds
  • Memory Usage 1,751KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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