01-05-2008, 10:03 PM
You will need to know PHP to make your own but you should be able to follow the example if you don't. This example will show you how you can make a tag that will allow HTML.
Open /includes/classes/template.php and go to the bottom (if you haven't changed this script it is line 835), and right before the part that says "// change the url tags", put this code
This will allow you to allow html between the tags [html][/html], of course if you want to make your own tag then you can modify this bit or add it again, to whatever you want to have (if you know PHP)
Now save that.
Open /admin/add_own_tutorials.php and go to line 181 if you haven't edited it. If you have edited it, then I am showing the 4 lines that are already there, so add the lines I have marked. Also open /admin/edit_own_tutorials but instead of line 181, it is line 193, do the same thing.
Now go to line 253 (if you have added the part above), and add the marked line.
Also go to line 271, in /admin/edit_own_tutorials.php, and do the same thing.
Note: remove the spaces in javascript, I had to do that so this would post.
Now it will have a text link to add the [html] tag and it will show as HTML in your custom tutorial.
Open /includes/classes/template.php and go to the bottom (if you haven't changed this script it is line 835), and right before the part that says "// change the url tags", put this code
Code:
// allow HTML
preg_match_all('/\[html](.*)\[\/html\]/sU', $code, $html_values);
$number_html = count($html_values[1]);
$i = 0;
while($i < $number_html) {
$full_html = html_entity_decode($html_values[1][$i]);
$code = str_replace('[html]'.$html_values[1][$i].'[/html]', $full_html, $code);
$i++;
}This will allow you to allow html between the tags [html][/html], of course if you want to make your own tag then you can modify this bit or add it again, to whatever you want to have (if you know PHP)
Now save that.
Open /admin/add_own_tutorials.php and go to line 181 if you haven't edited it. If you have edited it, then I am showing the 4 lines that are already there, so add the lines I have marked. Also open /admin/edit_own_tutorials but instead of line 181, it is line 193, do the same thing.
Code:
tags[24] = '[size=]';
tags[25] = '[/size]';
tags[26] = false;
tags[27] = '[page /]';
// ADD THESE LINES BELOW
tags[28] = '[html]';
tags[29] = '[/html]';
tags[30] = false;
// ADD THESE LINES ABOVENow go to line 253 (if you have added the part above), and add the marked line.
Also go to line 271, in /admin/edit_own_tutorials.php, and do the same thing.
Code:
<a href="java script:OnTagButtonClick(9)"><img style="border: 1px solid #b5ddff;" border="0" src="images/buttons/image.jpg" /></a>
<a href="java script:OnTagButtonClick(15)"><img style="border: 1px solid #b5ddff;" border="0" src="images/buttons/code.jpg" /></a>
// ADD THIS LINE BELOW
<a href="java script:OnTagButtonClick(28)">HTML</a>
// ADD THIS LINE ABOVENow it will have a text link to add the [html] tag and it will show as HTML in your custom tutorial.
![[Image: underline.gif]](http://tuthut.net/tutorials/admin/images/buttons/underline.gif)
![[Image: youtube.jpg]](http://tuthut.net/tutorials/admin/images/buttons/youtube.jpg)