svn: /pear2/sandbox/ SimpleChannelFrontend/trunk/www/templates/Package.tpl.php pear2.php.net/trunk/templates/pear2/Package.tpl.php
| From: | Brett Bieber | Date: | Fri, 18 Dec 2009 14:45:02 +0000 |
| Subject: | svn: /pear2/sandbox/ SimpleChannelFrontend/trunk/www/templates/Package.tpl.php pear2.php.net/trunk/templates/pear2/Package.tpl.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9126@lists.php.net to get a copy of this message | ||
saltybeagle Fri, 18 Dec 2009 14:45:02 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=292289
Log:
Add PHP code highlighting within package descriptions, patch from Amir.
Changed paths:
U pear2/sandbox/SimpleChannelFrontend/trunk/www/templates/Package.tpl.php
U pear2/sandbox/pear2.php.net/trunk/templates/pear2/Package.tpl.php
Modified: pear2/sandbox/SimpleChannelFrontend/trunk/www/templates/Package.tpl.php
===================================================================
--- pear2/sandbox/SimpleChannelFrontend/trunk/www/templates/Package.tpl.php 2009-12-18 14:29:28 UTC
(rev 292288)
+++ pear2/sandbox/SimpleChannelFrontend/trunk/www/templates/Package.tpl.php 2009-12-18 14:45:02 UTC
(rev 292289)
@@ -8,7 +8,8 @@
<p><em><?php echo $context->summary; ?></em></p>
<p>
<?php
- echo nl2br(trim($context->description));
+ $description = preg_replace("|<\?php(.*)\?\>|Use",
"highlight_string('<?php\\1?>', true)",
trim($context->getRaw('description')));
+ echo nl2br($description);
?>
</p>
<?php echo $savant->render($context->channel . '/' . $context->name .
'-' . $context->version['release'], 'InstallInstructions.tpl.php');
?>
Modified: pear2/sandbox/pear2.php.net/trunk/templates/pear2/Package.tpl.php
===================================================================
--- pear2/sandbox/pear2.php.net/trunk/templates/pear2/Package.tpl.php 2009-12-18 14:29:28 UTC (rev
292288)
+++ pear2/sandbox/pear2.php.net/trunk/templates/pear2/Package.tpl.php 2009-12-18 14:45:02 UTC (rev
292289)
@@ -8,7 +8,8 @@
<p><em><?php echo $context->summary; ?></em></p>
<p>
<?php
- echo nl2br(trim($context->description));
+ $description = preg_replace("|<\?php(.*)\?\>|Use",
"highlight_string('<?php\\1?>', true)",
trim($context->getRaw('description')));
+ echo nl2br($description);
?>
</p>
<?php echo $savant->render($context->name . '-' .
$context->version['release'], 'InstallInstructions.tpl.php'); ?>