Skip to content
Browse files

Initial concept

  • Loading branch information...
1 parent db2ca34 commit e854bf6877e05251ab445f56be734b22852f52e0 @betweenbrain committed Oct 21, 2012
Showing with 59 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +36 −0 striplist.php
  3. +22 −0 striplist.xml
View
1 .gitignore
@@ -0,0 +1 @@
+.idea
View
36 striplist.php
@@ -0,0 +1,36 @@
+<?php defined('_JEXEC') or die;
+
+/**
+ * File striplist.php
+ * Created 10/21/12 3:57 PM
+ * Author Matt Thomas matt@betweenbrain.com
+ * Copyright Copyright (C) 2012 betweenbrain llc.
+ */
+
+jimport('joomla.plugin.plugin');
+
+class plgContentStriplist extends JPlugin
+{
+
+ function onAfterRender()
+ {
+
+ $app = JFactory::getApplication();
+ $buffer = JResponse::getBody();
+ $classes = htmlspecialchars($this->params->get('classes'));
+ $classes = explode(',', str_replace(' ', '', $classes));
+
+ if ($app->isAdmin()) {
+ return;
+ }
+
+ foreach ($classes as $class) {
+
+ $buffer = preg_replace('/<li class=\"(.*)' . $class . '\">(.*)<\/li>/', '', $buffer);
+ }
+
+ JResponse::setBody($buffer);
+
+ return TRUE;
+ }
+}
View
22 striplist.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<install version="2.5" type="plugin" group="system" method="upgrade">
+ <name>System - Strip List</name>
+ <author>Matt Thomas</author>
+ <creationDate>October, 21st 2012</creationDate>
+ <copyright>(C) 2012 Matt Thomas. All rights reserved.</copyright>
+ <license>GNU/GPL</license>
+ <authorEmail>matt@betweenbrain.com</authorEmail>
+ <authorUrl>www.betweenbrain.com</authorUrl>
+ <version>0.1</version>
+ <description></description>
+ <files>
+ <filename plugin="striplist">striplist.php</filename>
+ </files>
+ <params>
+ <param name="classes"
+ type="text"
+ default=""
+ label="List Item Classes"
+ description="The list item classes to remove from the page buffer."/>
+ </params>
+</install>

0 comments on commit e854bf6

Please sign in to comment.
Something went wrong with that request. Please try again.