HTML Templates

junho 5th, 2007

Allows you to create small HTML templates to use inside your posts on pages. The templates can contain dynamic fields, wich you set the value when writing a post or page. The plugin adds a button to you TinyMCE Editor for you to choose the template you want to add.

Its perfect if you have a post or page layout you, or yours site user, post frequently. You can, for instance, create a template for all download links in your site and, when you press the button to add this template to your post, the plugin asks you whats the name and link of the file. Its very useful for creating tables as well.

== Installation ==

. Download the package
. Extract it to the “plugins” folder of your wordpress
. In the Admin Panes go to “Plugins” and activate it

== Usage ==

1. Go to Manage > HTML Templates
2. Enter the name of your template
3. Enter the dynamic fields you want you template to have. (eg name,link)
4. Enter the HTML code for your template, with the dynamic fields between “#”. For instance:
a xhref='#link#' > #name# /a
5. Save it.
6. Create or edit a page or post using the rich text editor
7. Click the new button that appeared on your editor “T” (Templates)
8. Select the template you want to use
9. Fill in the values for the dynamic fields
10. Click on Send to Editor

== TO DO ==

. Allow users to Edit a template after it was created
. javascript validation on the editor
. Improve the appearence of the plugin

13 Responses to “HTML Templates”

  1. Nick Dubravac disse:

    C9y6ES thanks for you.. nice good document!,

  2. terry moore disse:

    Hey! I just searched for and I found your site!,

  3. Cora Laauser disse:

    cool, i will bookmark it,

  4. benjo disse:

    Messaggio: Previsto oggetto
    Linea: 20
    Carattere: 5
    Codice: 0
    URI: http://www.myurl.com/wp-content/plugins/html-templates/plugin/editor_plugin.js?ver=20081129

  5. benjo disse:

    ops.. sorry for double post,
    but this plugin works very well with pages of wp … but if i have a editor on a plugin with tinymce .. button “T” appaers .. i see it.. but it don’t works .. and give me the error on line: 20 character: 5
    that is this:

    ed.addCommand(’mcehtmlTemplates’, function() {
    htmlTemplate_buttonscript();
    });

    why ?!? how i can fix it ?

  6. sputnick disse:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected $end in /home/zhengyu/webroot/rockstarbmx/wp-content/plugins/html-templates/htmlTemplates.php on line 368

    I got this error code. I am using wordpress 2.8.4

    Please help cuz I can really use this plugin! :)

  7. lawvol disse:

    Love the simplicity of the plugin and really plan on using it a lot.

    One suggestion / request. Is there any way to make the HTML Template button appear on the WP QuickPress / PressThis editor interface. If you could make that work, you’d be my hero!

    Again thanks for the developing the plugin, sincerely appreciated.

  8. mj disse:

    This is excellent, Thank you very much!

  9. brix disse:

    hi it seems it does not work with wp 2.9 …
    is it true?

  10. Dennis disse:

    To make this plugin work with WordPress 2.9+, just go to “Plugins”, “Installed”, press “Edit” on the plugins description, scroll in the editor down to the “function ht_admin()” line and replace it with

    function ht_admin() {
    add_options_page(’Manage HTML Templates’, ‘HTML Templates’, 8, basename(__FILE__), ‘htmlTemplates_admin_page’);
    }

    now you have a “Manage HTML Templates” option under “Settings”.
    Regards,
    Dennis

  11. Armand Morin disse:

    I have tried this fix for wordpress 2.9 but still no luck. I keep getting the FATAL ERROR does anyone know how to fix this?

Leave a Reply