Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-06-02 10:00:07

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: TextileRestricted

no

Offline

#14 2008-06-02 12:43:44

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: TextileRestricted

Hehe well for future reference then:

Index: /Users/jm/Sites/projects/txp/site/textpattern/include/txp_plugin.php
===================================================================
--- a/textpattern/include/txp_plugin.php	Sun Jun 01 11:43:05 2008 -0600
+++ b/textpattern/include/txp_plugin.php	Mon Jun 02 06:23:54 2008 -0600
@@ -239,15 +239,13 @@
 			{
 				if(is_array($plugin)){
 					extract($plugin);
-					$source = '';
 					if (isset($help_raw) && empty($plugin['allow_html_help'])) {
 						include_once txpath.'/lib/classTextile.php';
 						$textile = new Textile();
-						$help_source = $textile->TextileRestricted($help_raw, 0, 0);
-					} else {
-						$help_source= highlight_string($help, true);
+						$help = $textile->TextileThis($help_raw, false, false, true);
 					}
-					$source.= highlight_string('<?php'.$plugin['code'].'?>', true);
+					$help_source= highlight_string($help, true);
+					$source = highlight_string('<?php'.$plugin['code'].'?>', true);
 					$sub = fInput('submit','',gTxt('install'),'publish');

 					pagetop(gTxt('edit_plugins'));
@@ -302,7 +300,7 @@
 							// default: help is in Textile format
 							include_once txpath.'/lib/classTextile.php';
 							$textile = new Textile();
-							$help = $textile->TextileRestricted($help_raw, 0, 0);
+							$help = $textile->TextileThis($help_raw, false, false, true);
 					}

 					if ($exists) {

The conditional isn’t needed, and $source doesn’t need to be initialized with an empty string.

Last edited by jm (2008-06-02 15:55:17)

Offline

Board footer

Powered by FluxBB