Understanding the Additional Tags Plugin

I'm not finding any documentation for this plugin.... it says it is so simple you can add elements at will .... huh? If I'm not a php rock star how do I use this?

  • Andrew

    Hiya,

    The plugin just keeps tags from being stripped from posts.

    it says it is so simple you can add elements at will .... huh? If I'm not a php rock star how do I use this?

    We don't expect you to be a "php rock star" :wink:

    However, anyone running a WPMU site should be able to make some mild plugin edits. To add additional tags just extend to the array like so:

    $add_tags = array(
    		'iframe' => array(
    			'width' => array(), 'height' => array(),
    			'frameborder' => array(), 'src' => array(),
    			'scrolling' => array(), 'style' => array()
    			),
    		'object' => array(
    			'width' => array(), 'height' => array()
    			),
    		'param' => array(
    			'name' => array(), 'value' => array()
    			),
    		'embed' => array(
    			'src' => array(), 'type' => array(),
    			'wmode' => array(), 'width' => array(),
    			'height' => array(), 'name' => array(),
    			'bgcolor' => array(), 'flashVars' => array(),
    			'allowFullScreen' => array(), 'allowScriptAccess' => array(),
    			'seamlesstabbing' => array(), 'swLiveConnect' => array(),
    			'pluginspage' => array()
    			),
    		'script' => array(
    			'type' => array(), 'src' => array(),
    			'charset' => array()
    			),
    		'div' => array(
    			'class' => array(), 'id' => array(),
    			'style' => array()
    			),
    		'style' => array(
    			'type' => array()
    			),
    		'a' => array(
    			'href' => array()
    			)
    	);

    I used a simple link tag so it would be easy to see what goes where.

    Thanks,
    Andrew

  • Tracy

    I understand the purpose of the plugin ... it is key for us as we import standalone blogs into MU and posts break because style and other tags are stripped out... it was one of the reasons we signed up yesterday.. http://mu.wordpress.org/forums/topic.php?id=5931

    If you can extend arrays, that qualifies as a PHP rock star to me, perhaps most would disagree though.... I'm thinking I would have built this thing myself if I knew how to work with arrays. :slight_smile:

    Don't laugh too hard, but I was expecting an admin option with something along the lines of having checkboxes next to tags / attributes that were going to be allowed.... want to allow divs, check.... want to allow css id's, check... not much I can do with this...

    How about this, if I want MU to mirror single WP installs in terms of what tags are allowed, how do we do this?

  • Andrew

    Hiya,

    Don't laugh too hard, but I was expecting an admin option with something along the lines of having checkboxes next to tags / attributes that were going to be allowed.... want to allow divs, check.... want to allow css id's, check... not much I can do with this...

    I'm afraid that most likely won't be happening for this plugin. It really doesn't take much to edit the array.

    How about this, if I want MU to mirror single WP installs in terms of what tags are allowed, how do we do this?

    You could try using the WP kses.php on your WPMU install. I'm not sure if it will work with WPMU 2.7 but it might.

    Thanks,
    Andrew

  • Tracy

    Andrew,

    Gotcha. If you notice the link in my previous post was discussing the issues people were having with trying to get kses.php .... I wasn't able to get it to work...

    You keep saying it doesn't take much, but that's like me telling my customers they can just upload via FTP ... their response... "What's ftp?" ... it's all relative. :slight_smile:

    What does it take to enable classes and divs?

  • Andrew

    Hiya,

    You keep saying it doesn't take much, but that's like me telling my customers they can just upload via FTP ... their response... "What's ftp?" ... it's all relative. :slight_smile:

    It's a bit different :wink:

    WPMU is a tick more complicated than WP and many other scripts. There's a sticky over in the mu forums about what to be prepared for when running it:
    http://mu.wordpress.org/forums/topic.php?id=4624

    We'd never ask you to do any heavy modifications to one of our plugins to get it working but editing an array is a very easy task and I provided an example of how to add to it above.

    What does it take to enable classes and divs?

    'class' within div tags should already be enabled. It's one of the tags in the array found in the plugin. If it's not working for you then just provide me with content your entering into the editor and I'll see what's up.

    Thanks,
    Andrew

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.