Hey Everyone,
I'm wondering if it's possible to have a standard template for all FAQ. For instance when you create a new FAQ, it already has populated, some text that we would fill in.
Is that possible?
Thanks!
Standardized Templates
Moderator: Thorsten
Re: Standardized Templates
Hi,
yes, that's possible with TinyMCE templates, check http://www.tinymce.com/wiki.php/Plugin:template
bye
Thorsten
yes, that's possible with TinyMCE templates, check http://www.tinymce.com/wiki.php/Plugin:template
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Standardized Templates
Hey Thorsten,
I've followed the guide, and I'm pretty sure I'm doing something wrong
Do you, or does anyone else, have any examples that's working for them?
Thanks,
Josh
I've followed the guide, and I'm pretty sure I'm doing something wrong
Do you, or does anyone else, have any examples that's working for them?
Thanks,
Josh
Re: Standardized Templates
Hey Sorry for the double post, but I got it working. For anyone else that would like it, here's what I did.
Firstly find the footer.php file located in phpmyfaq/admin
Find the line:
theme_advanced_buttons3
And add template on the end. It should look like this:
Now scroll down a bit till you find the Template_replace_Values section, and comment it out.
And below it, we're going to add our template:
The title and the location can be changed, but that's were I'm using it. Now if you're going to use the same location find the folder PHPmyfaq/assets/js. Create the HTML file you listed in the src field. In my case its kbtemp.html.
In this file we're going to have a DIV class which holds all the data, and within that, you'll have just normal html code. For instance mine looks like this:
Save it, and start a new KB Article. You should now have the button for Templates, and you should see your template listed in the drop down.
Thanks!
Firstly find the footer.php file located in phpmyfaq/admin
Find the line:
theme_advanced_buttons3
And add template on the end. It should look like this:
Code: Select all
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,advhr,|,ltr,rtl,|,fullscreen,template",
Code: Select all
// template_replace_values : {
// username : "<?php print $user->userdata->get('display_name'); ?>",
// user_id : "<?php print $user->userdata->get('user_id'); ?>"
// }
Code: Select all
template_templates : [
{
title : "KB Template",
src : "../assets/js/kbtemp.html",
description : "Adds the default fields for a KB Article"
},
]
In this file we're going to have a DIV class which holds all the data, and within that, you'll have just normal html code. For instance mine looks like this:
Code: Select all
<div class="mceTmpl">
<h3>1. Description </h3><br>
<h3>2. Cause</h3><br>
<h3>3. Warnings</h3><br>
<h3>4. Instructions</h3><br>
<h3>5. This Article Applies to:</h3><br>
<h3>Additional Information if Available</h3><br>
</div>
Thanks!
Re: Standardized Templates
Hi,
cool!
bye
Thorsten
cool!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist