View Single Post
Old 08-09-2007, 09:56 AM  
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,384
Quote:
Originally Posted by Romeo GaySearch4Sex View Post
Here is one suggestion....

because of 2257 I remove all the images in my feeds, and focus it on SEO purposes.

I noticed that only the images are linked to the galleries.... I suggest adding a text link to the gallery and the site as well in case someone like me doesnt want to show images, or if there are problems displaying them.

just my two cents ;)
Is that a problem? I don't think you will need such a feature provided by sponsor feeds. Here is a small and simple WordPress plugin which solves all your problems:

Code:
<?php
/*
Plugin Name: Remove Tags
Author: CyberXXX (ICQ: 166-924-423)
Author URI: http://www.morphingfeeds.com/
Plugin URI: http://www.thesponsorfeeds.com/
Description: Strips all the tags (e.g. <img>..</img>) excepting the specified ones (note below) from your blog posts.
*/

// Specify all the ALLOWED html here:
define ('ALLOWED_TAGS', "<a><br><p><b><strong><table><td><tr><ul><li>");

function remove_targs($content) {
	return strip_tags($content, ALLOWED_TAGS);
}

add_filter('the_content', 'remove_targs', 20002);
?>
Copy the code above. Save it as "removetags.php", upload into your /plugins FTP folder and activate it from the WordPress control panel (yourblog.com//wp-admin/plugins.php). That's it!

Now ALL the posts on your blog will be displayed without images. Isn't that the easiest possible solution?

P.S. It's not just removes all the images from your blog posts, but also unifies them because it removes various <class>, <font> etc tags thank could make the posts look weird on various blog templates. However, you can add those tags into define line to make them allowed.
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote