HTML Templates

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

17 responses to “HTML Templates”

27 01 2008
Kiefer (22:12:13) :

I don’t think this works with wordpress 2.3.2

18 04 2008
leogermani (15:57:56) :

Hi all,

I have just released a new version of this plugin and its now works (maybe only) with wordpress 2.5

cheers

Leo,,

19 04 2008
mscott (01:17:32) :

Works in WP 2.5 but scrambles up the template fields.

22 04 2008
leogermani (10:39:05) :

hi mscott,

Can you give me some more information on that? I would apreciate.. You can send to leogermani (at) gmail (dot) com

cheers

Leo,,

24 04 2008
Kjetil (18:17:51) :

Hi
i’m sorry to say that the HTML templates plugin (v0.5) won’t work in my WP 2.5 installation. When activating it I get the error message below - and when deactivating it an error even longer while the rest of the plugin panel blanks out. Maybe a plugin conflict; please e-mail me if you could use a plugin list or other info.
Thanks - hope you can make some magic - it would be very useful,
Kjetil

Warning: main(/usr/local/psa/home/vhosts/dolcevita.no/httpdocs/wp/wp-content/plugins/html-templates/plugin/tinymce.php): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/dolcevita.no/httpdocs/wp/wp-content/plugins/html-templates/htmlTemplates.php on line 175

Warning: main(): Failed opening ‘/usr/local/psa/home/vhosts/dolcevita.no/httpdocs/wp/wp-content/plugins/html-templates/plugin/tinymce.php’ for inclusion (include_path=’.:/usr/local/psa/apache/share/pear’) in /usr/local/psa/home/vhosts/dolcevita.no/httpdocs/wp/wp-content/plugins/html-templates/htmlTemplates.php on line 175

24 04 2008
Shana (18:53:11) :

Hi… I also am getting warnings… mine say:


Warning: main(/PATH/public_html/wp-content/plugins/html-templates/plugin/tinymce.php) [function.main]: failed to open stream: No such file or directory in /home/shana/public_html/wp-content/plugins/html-templates/htmlTemplates.php on line 175

Warning: main() [function.include]: Failed opening '/PATH/public_html/wp-content/plugins/html-templates/plugin/tinymce.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/shana/public_html/wp-content/plugins/html-templates/htmlTemplates.php on line 175

I hope you can help us! I really want to use this plugin. Thanks!

25 04 2008
leogermani (12:07:54) :

Hi guys,

It seems to me that this can be easily fixed by changing the folder name from “html-templates” to “htmltemplates”.

Please let me know it it works.

The package comes with the folder with a “-”?? If so I should fix it

Leo,,

25 04 2008
Kjetil (19:14:01) :

Too bad - no luck. Same problem as before.
Could there be a plugin conflict - or would fixing the plugin be the only way?
I’m building a quite complex site and I can’t see that any other plugin can do this simple(?) trick, so if you can find a solution it would really be appreciated.
Thanks

28 04 2008
Patricia (12:52:29) :

I received the same error as Sjana and Kjetil - it appears to be related to the download content from the WordPress plugin repository. The only files included in that zip are:

- htmlTemplates.php
- readme.txt

After downloading it from this site activation went OK. Haven’t done anything with it yet, but it looks like it’s running at least on a 2.5.1 install.

Thanks for this plugin!

29 04 2008
leogermani (12:32:47) :

Hi all,

the release on the wordpress plugin database was wrong! sorry about that. Ive just fixed it and it will take some minutes to update.

meanwhile you can download it here on this page.

This is already a new version, with a new functionality. Now the templates accpet three template tags: #post-id#, #post-title# and #post-permalink#. This can be very useful!

cheers

Leo,,

7 05 2008
PreisJaeger.at (10:40:24) :

i want to make a template to include adsense. So i have just pasted this adsensecode:

with no dynamic fields… But now it not possible to paste it into the editor with “send to editor” (Button has no effect, no Errormessage)! Is that a known problem? What is the solution?

7 05 2008
PreisJaeger.at (10:41:35) :

…ok adsensecode is not visible in your commentarea

20 05 2008
Roy (15:19:07) :

I am trying to use on a 2.5.1 install and it all seems to work but I do not see the T button on the WYSIWYG. Does it need to be fixed? Am I missing something?

20 05 2008
Roy (15:25:24) :

I found the problem was that I uploaded the directory contents directory into the plugin folder rather than uploading the directory itself.

9 06 2008
John (02:57:10) :

Could you provide some instruction on how to set up a table with this plugin?

9 06 2008
Roy (17:42:26) :

When the template is inserted word press is wrapping tags all over the HTMl causing my template to be junk.

29 11 2008
Kjetil (13:13:53) :

Howdy!
Will this HTML Templates work with WP 2.6 ?
(Or is the functionality somehow included there)
Thanks,
Kjetil
- still on 2.5.1…

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>