Working with eBay Feeds
May 11, 2009
For our next major release we are planning an eBay auction plugin module that will allow you to access all details for an eBay auction but for now it still is possible to work with the basic information of an eBay feed. The feeds that eBay publishes are a bit non-standard so they do require a few extra steps to get them to work. Here is a quick tutorial on how to do this.
1. Create a Feed
The first step is to create an RSS feed for the keywords you are searching for. To do this, go to http://search.ebay.com/ws/search/AdvSearch?sofindtype=1 and enter the details you wish to filter on. Notice that near the bottom of the page is an option to enter affiliate tracking tracking information so that you can earn commissions from referrals.
Click on Search to get the results and look for the orange RSS icon on your browser’s address bar. Click on that icon to go to the RSS feed URL. This is the URL you will enter into AutoBlogged.
When you configure your feed in AutoBlogged, you will want to edit the default post template. Near the bottom of the feed settings screen is a post template box. Since the eBay feeds don’t provide a description, you may want to make your post template simply the title and show a thumbnail by entering this as your post template:
%thumbnail%<br />
%title%
2. Update Your Modules.php File
If you are using AutoBlogged 2.4.22 (the current release as of this writing) or earlier, you need to download the Modules.php file attached at the bottom of this article and upload it to your autoblogged directory. This file contains the namespace to access the special eBay fields.
3. Create Custom Fields
At this point you can use any of the following variables in your post template:
- %rx:CurrentPrice%
- %rx:EndTime%
- %rx:BidCount%
- %rx:AuctionType%
- %rx:ItemCharacteristic%
Although you can use these directly in your post template, you will find that the data in the CurrentPrice and EndTime fields aren’t properly formatted for display. For example, the CurrentPrice will not display decimal places so a value of $14.99 will appear as 1499. Furthermore, the End
Time appears as a number timestamp, not a formatted date. For that reason, the best solution is to save each field as a custom field on the post that we can access later.
To do this, at the bottom of the feed page in AutoBlogged, fill out the Custom Fields section as shown below:
Note that the Custom Fields section only provides two new entry boxes at a time so you will need to save the feed to get two more. Also note that if you don’t plan on using any of the above fields in your post, you may leave those out.
At this point AutoBlogged will not display any of this extra information but it will save the values to each post as custom fields. If you run AutoBlogged now and edit one of the posts, you will see these values as custom fields. To display this information on your site you will need to modify your WordPress theme.
4. Modify Your Theme
To view the eBay custom fields, you need to modify one or more files in your theme, depending on where you want these values displayed. For example, if you want them shown on your home page, you will need to modify index.php, or whatever file your theme uses for the main loop. If you want to modify single posts, edit the file single.php. Note that not all themes are the same, but these instructions will work for most themes.
When you edit the file, you can usually find the place where posts are displayed by searching for the_title(). Once you determine where to place the information, you can access the post’s custom fields with this code:
Current price:
<?PHP echo number_format((get_post_meta(get_the_ID(), ‘CurrentPrice’, true)/100), 2, ‘.’, ‘,’); ?>
End Time:
<?PHP echo date(‘M j g:i a’, doubleval( substr(get_post_meta(get_the_ID(), ‘EndTime’, true), 0, -3))); ?>
Bid Count:
<?PHP echo get_post_meta(get_the_ID(), ‘BidCount’, true); ?>
Auction Type:
<?PHP echo get_post_meta(get_the_ID(), ‘AuctionType’, true); ?>
Item Characteristic:
<?PHP echo get_post_meta(get_the_ID(), ‘ItemCharacteristic’, true); ?>
To see an example of this in action, we have attached to this post a modified index.php from the Default WordPress theme. Below is a an example of how this would appear:
Of course not all themes will be this simple so it may help to know HTML and/or PHP to tweak this how you need it.
…
Category: RSS Feeds
Tags: auction-plugin ebay ebay-feeds namespace products variables
Adding Twitter Feeds
May 11, 2009
If you are a Twitter user and want to add posts to your blog for each of your tweets, AutoBlogged can help you out. Twitter provides an API that returns RSS feeds that you can enter into AutoBlogged.
There are several Twitter RSS feeds available, depending on what you want to show. These feeds are as follows:
Public Timeline
Description: Returns the 20 most recent status updates from non-protected users who have set a custom user icon.
Friends Timeline
Description: Returns the 20 most recent status updates posted by yourself and that your friends. Note that this feed requires authentication by replacing <username> and <password> with your own username and password in the URLs below.
http://<username>:<password>@twitter.com/statuses/friends_timeline.rss
Optional Parameters:
- since. Optional. Narrows the returned results to just those status updates created after the specified HTTP-formatted date, up to 24 hours old. The same behavior is available by setting an If-Modified-Since header in your HTTP request. Example: http://<username>:<password>twitter.com/statuses/friends_timeline.rss?since=Tue%2C+27+Mar+2007+22%3A55%3A48+GMT
- since_id. Optional. Returns only statuses with an ID greater than (that is, more recent than) the specified ID. Example: http://<username>:<password>twitter.com/statuses/friends_timeline.rss?since_id=12345
- count. Optional. Specifies the number of statuses to retrieve. May not be greater than 200. Example: http://<username>:<password>twitter.com/statuses/friends_timeline.rss?count=5
- page. Optional. Example: http://<username>:<password>twitter.com/statuses/friends_timeline.rss?page=3
User Timeline
Description: Returns your 20 most recent status updates or the updates from the user specified by the ID. Note that this feed requires authentication by replacing <username> and <password> with your own username and password in the URL below.
The RSS feed for your own posts is as follows:
http://<username>:<password>@twitter.com/statuses/user_timeline.rss
To get the feed for another users’ post, use either their user number or user name like this:
http://<username>:<password>twitter.com/statuses/user_timeline/21336467.rss or http://twitter.com/statuses/user_timeline/autoblogged.rss
Note that the username and password are not required if you are pulling the timeline of another user that is not configured as protected.
Optional Parameters:
- count. Optional. Specifies the number of statuses to retrieve. May not be greater than 200. Example: http://<username>:<password>twitter.com/statuses/user_timeline.rss?count=5
- since. Optional. Narrows the returned results to just those statuses created after the specified HTTP-formatted date, up to 24 hours old. The same behavior is available by setting an If-Modified-Since header in your HTTP request. Example: http://<username>:<password>twitter.com/statuses/user_timeline.rss?since=Tue%2C+27+Mar+2007+22%3A55%3A48+GMT
- since_id. Optional. Returns only statuses with an ID greater than (that is, more recent than) the specified ID. Example: http://<username>:<password>twitter.com/statuses/user_timeline.rss?since_id=12345
- page. Optional. Example: http://<username>:<password>twitter.com/statuses/user_timeline.rss?page=3
Note that you can view the full Twitter API documentation here: http://apiwiki.twitter.com/REST-API-Documentation
Post Templates
Since a Twitter update is just a single line of text, the content in the feed is the same as the title. For that reason, you might want to leave the post template empty for Twitter feeds. However, if you do want to use a post template, here are some variables that might be useful:
%link% – This is the URL that points to the individual tweet on the web.
%source_url% – This is the URL that points to the archive you are pulling from.
%icon% – The twitter icon.
Here is an example post template that might work well for Twitter:
<p><img src=”%icon%” alt=”Twitter” /><a href=”%link%”>Twitter update</a>: %description%</p>
<p>More here: <a href=”%source_url%”>%source_url%</a></p>
Note that beginning with AutoBlogged v2.4.23, you will be able to change the title of a post by using the Custom Fields feature. To do this, edit the feed, scroll down to the Custom Fields setting, and enter title in the Custom Field box then something like “Twitter Update” in the Custom Field Value box.
How Many Feeds can AutoBlogged Handle?
May 11, 2009
One question we are sometimes asked is how many RSS feeds can AutoBlogged handle?
The answer is that there is no quick answer to this question. The only real limitation is how long the server will allow scripts to run before it times out. The timeout issue is determined by the web server software and the PHP settings. By default, many servers will timeout after thirty seconds.
Therefore, the number of feeds you can add depends on how many entries the feeds have, how often it is updates, how powerful the server is, and how you configure autoblogged. On a shared host we wouldn’t recommend running more than 5 feeds at a time. But with feeds that aren’t updated much you can add quite a few more, because most of the work isn’t checking the feeds for new articles, but when it has to actually process those new items.
One thing to consider is that WordPress already has quite a bit of overhead, especially on a blog that gets a lot of hits. Because the work required to retrieve feeds, process the xml, create tags, and add posts is significant, you should always be careful with adding too many feeds. A busy WordPress site is already a big load on the server, so you need to consider the extra load required to import the RSS feeds into WordPress.
If you want to set up more than 5-10 feeds, we recommend offloading part of the processing using an external application such as Yahoo Pipes, mysyndicaat, or feedrinse to aggregate the feeds and do any necessary filtering there. These tools will output a single aggregated, sorted, and filtered RSS feed that you can use with AutoBlogged.
That isn’t to say AutoBlogged can’t handle more feeds. We have seen a number of installations with 30-50 feeds that worked perfectly. As we said before, it really depends on the feeds you use. A feed with dozens of posts a day will always require more processing that a feed with only a few posts a week.
Workarounds for Poor Quality Feeds
Sep 14, 2009
Will AutoBlogged work with my RSS feed?
Oct 1, 2009
AutoBlogged should work with just about any valid RSS or Atom feed and often still works with the many malformed feeds out there.
If there is a particular feed you want to use with AutoBlogged, you can use the following resources to check the feed:
- Our feed viewer is the best indication that AutoBlogged will be able to parse the feed.
- Check FeedValidator.org to confirm that your RSS or Atom feed is properly formatted.
For more issues with troubleshooting feeds, see http://autoblogged.com/kb/rss-feeds/troubleshooting-feeds/
For information on how to access custom RSS fields in feeds, see http://autoblogged.com/kb/post-templates/custom-namespaces/
Using RSS Custom Namespaces in Post Templates
Oct 1, 2009
One of the things that makes AutoBlogged stand out from other autoblog tools is the powerful Post Templates feature. The Post Template determines how AutoBlogged formats the post it imports into WordPress. Although most users leave the Post Templates at the default settings, many of you have experimented with minor changes to the Post Template to customize your autoblog.
Post Templates support a number of advanced functions that let you customize how AutoBlogged handles a post. There are a number of variables that let you decide what feed items you want to appear in the post. In addition to the basic feed items, AutoBlogged also allows you to access custom namespace elements in an RSS or Atom feed.
Custom namespaces allow feed publishers to add additional feed elements that do not exist in the basic RSS or Atom specifications. Many sites have created custom namespaces to add additional information about the items in their feeds. For example, YouTube adds a namespace that allows them to include additional data such as the user ratings of a video. In a YouTube feed, they first define the namespace at the top of the feed like this:
<feed xmlns:gd=’http://schemas.google.com/g/2005′ >
Then, they refer to the namespace within the feed like this:
<gd:rating average=’4.9114695′ max=’5′ min=’1′ numRaters=’17734′ rel=’http://schemas.google.com/g/2005#overall’/>
We don’t want to go too much into the implementation details in this article, just introduce what custom namespaces are. If you want to learn more about namespaces go here or here.
It is important to note that many publishers simply add new XML elements to an RSS feed without actually declaring namespaces. This is not valid and AutoBlogged will not be able to parse them. If you run into a feed like this, we suggest pointing the publisher to the two links mentioned in the previous paragraph.
Accessing Namespaces
If you have a feed with custom namespaces, you can use them in your post template using the format %namespace:element@attribute% where namespace is the namespace URL or abbreviation, element is the element name, and attribute is an optional attribute of the element. In the YouTube rating example shown earlier, gd is the namespace, rating is the element, and average, max, min, numRaters, and rel are the attributes. Using that example, if you want to show the average rating in your Post Template, use the variable %gd:rating@average%.
If you are feeling a bit confused, below are a number of examples that may better illustrate how to use custom namespaces.
Examples
For our first example, we will take a simplified excerpt from a Yahoo Videofeed:
<item>
<title>Using Custom Namespaces</title>
<description>Using custom namespaces in AutoBlogged Post Templates.</description>
<link>http://video.yahoo.com/watch/……</link>
<pubDate>Sun, 28 Jan 2007 03:00:00 -0800</pubDate>
<media:keywords>autoblogged, autoblog, wordpress</media:keywords>
<media:thumbnail url=”http://l.yimg.com/a/i/us/sch/cn/v/v0/…..jpg />
<media:content type=”application/x-shockwave-flash” medium=”video” lang=”">
<media:player url=”http://d.yimg.com/ht/…” height=”512″ width=”322″ />
</media:content>
</item>
In the above feed, to show the keywords for the video, use the variable %media:keywords%. To include the thumbnail, use %media:thumbnail@url%
Now consider an example from a YouTube feed:
<media:group>
<media:category label=’Music’ scheme=’http://gdata.youtube.com/schemas/2007/categories.cat’>Music</media:category>
<media:content url=’http://www.youtube.com/……’ type=’application/x-shockwave-flash’ medium=’video’ isDefault=’true’ expression=’full’ duration=’334′ yt:format=’5′/>
<media:description type=’plain’>Using custom namespaces in AutoBlogged Post Templates.</media:keywords>
<media:player url=’http://www.youtube.com/watch?v=……’/>
<media:thumbnail url=’http://i.ytimg.com/vi/……/2.jpg’ height=’90′ width=’120′ time=’00:02:47′/>
<media:thumbnail url=’http://i.ytimg.com/vi/……/1.jpg’ height=’90′ width=’120′ time=’00:01:23.500′/>
<media:title type=’plain’>Using AutoBlogged</media:title>
<yt:duration seconds=’334′/>
</media:group>
<gd:rating average=’4.9114695′ max=’5′ min=’1′ numRaters=’17734′ rel=’http://schemas.google.com/g/2005#overall’/>
<yt:statistics favoriteCount=’34363′ viewCount=’4928462′/>
This feed is a bit different because it uses nested elements. In other words, media:content is nested inside the media:group element. Due to a limitation in SimplePie, which we use to process RSS feeds, you must refer to these variables using the full hierarchy with a slash (“/”) between elements. So if you wish to show the media description you would use the variable %media:group/media:description%. If you want to show the duration of the video, you would use the variable %media:group/media:content@duration%.
Note that AutoBlogged currently does not support custom namespaces for attributes, so you would not be able to access the yt:format attribute in the media:content element above. Note also that when there are multiple custom fields with the same name, AutoBlogged will only return the first element it finds.
In addition to custom namespaces, you can specifically refer to certain RSS or Atom elements in a feed using the RSS and Atom namespaces. Consider the following RSS feed excerpt:
<item>
<title>Using Post Templates</title>
<link>http://www.autoblogged.com…….</link>
<guid>http://www.autoblogged.com…….</guid>
<pubDate>Mon, 28 Jul 2008 08:18:51 -0700</pubDate>
</item>
In this feed, you can refer to the guid as %rss:guid% and the pubDate as %rss:pubDate%. With an atom feed you can do the same:
<entry>
<id>http://gdata.youtube.com/feeds/api/videos/……</id>
<published>2005-12-28T03:15:32.000Z</published>
<updated>2009-05-26T12:55:23.000Z</updated>
</entry>
With this feed you can refer to the published date as %atom:published%.
Uncommon Namespaces
Note that in order for AutoBlogged to use a custom namespace abbreviation, it needs to be defined in the modules.php file. If you open the file, you can see that we have already defined most common namespace modules. If you want to use a custom namespace that isn’t listed in that file, you have two options:
1. Edit modules.php to include your custom namespace, following the same format as the other definitions.
2. Always use the full namespace URL when referring to the namespace in your Post Template.
For example, consider this feed excerpt:
<rss version=”2.0″ xmlns:product=”http://www.example.com/schemas/product”>
<channel>
<title>Products Feed</title>
<item>
<title>New Product Announcement</title>
<pubDate>Mon, 28 Jul 2008 08:18:51 -0700</pubDate>
<product:type>Tools</product:type>
<product:price>9.99</product:price>
</item>
</channel>
</rss>
In this example, if you want to use product:type in your Post Template, you can either add the line “product” => “http://www.example.com/schemas/product”, at the end of the list in modules.php and use %product:type% in your Post Template or you can simply use %http://www.example.com/schemas/product:type% in your Post Template without having to modify modules.php.
As you can see, referring to custom namespace elements is a bit of an advanced feature and it does require you to view the raw XML of your feed to find most variable names. However, it is a very powerful feature that can really make your blog stand out from the rest.
Troubleshooting RSS Feed Problems
Sep 14, 2009
Issue
AutoBlogged is having problems processing one particular RSS feed you are using or is unable to open the feed in the feed viewer.
Solutions
- Try opening the feed URL directly in your web browser to make sure you have the correct URL.
- Check FeedValidator.org to confirm that your RSS or Atom feed is properly formatted.
- Try opening the feed in different browsers to make sure it isn’t a browser issue.
- Try viewing your feed using the SimplePie demo to make sure it isn’t an issue with SimplePie.
- Check the SimplePie FAQ to make sure it isn’t a known problematic feed.
More Information
FeedBurner Issues:
- http://feedburnerstatus.blogspot.com/
- http://feedburnerstatus.blogspot.com/2009/01/older-known-issues-workarounds.html
- http://feedburnerstatus.blogspot.com/2009/01/http-502-error-code-received-on-some.html
- http://feedburnerstatus.blogspot.com/2009/01/older-known-issues-workarounds.html
Blogger.com/Blogspot.com Issues:
Also see Workarounds for Poor Quality Feeds
Getting a Blank Page While Manually Processing Feeds
May 11, 2009
If you try to manually process or preview your AutoBlogged feeds and get a blank screen or it seems to hang indefinitely, that means that some error occurred but the server is configured to suppress error messages.
This occurs with hosting companies (such as Earthlink) that do not allow error messages to be shown but we also often see it with dedicated server configurations that are by default configured to a hardened state. It is definitely a good practice to suppress PHP error messages on a production server because they can reveal sensitive information about your server configuration. However, during development, testing, and deployment those error messages are necessary to identify problems. Before we can troubleshoot the issue you are having, we first need to be able to see what error message the server is reporting.
First Steps
The first thing you should do if you see this problem is to check your web root directory and the autoblogged directory for an error_log file. Some hosts are configured to suppress output errors but they will still log them to a file which you can review. However, some hosting companies also turn off error logging because these files can sometimes grow quite large (we once had a 6gb error_log file on a test server).
If you don’t have an error_log file, you might also check your hosting control panel. Some hosting companies only allow you to view the error logs through your some viewer on the hosting control panel. Finally, we occasionally–although rare–see hosting companies that output error messages as comments in the html, so it doesn’t hurt to view the source of the page where it is hanging.
PHP.INI File
If none of the above gets you anywhere, there are several ways you can enable error messages on your server. The best way is to edit the php.ini file if you have access to that. In the php.ini file there are a number of error-related configuration options (see http://www.php.net/manual/en/errorfunc.configuration.php) but these are the most important options:
- display_errors – This determines if errors are sent to the browser or not. This is the most convenient way to view error messages but this really should not be enabled on a production server.
- log_errors – This option enables or disables logging error messages to a file.
- error_log – This option determines the location and name of your error log files.
You can view the values of any of these settings in WordPress by going to the AutoBlogged support page and clicking on Show PHPInfo…
Here is a sample php.ini configuration that works well for debugging purposes:
display_errors = ‘on’
log_errors = ‘on’
error_log = ‘error_log’
The .htaccess File
If you are using a shared host or do not have access to the php.ini file, you may be able to enable error reporting through the .htaccess file. Here is a sample .htaccess configuration that will enable error reporting:
php_flag display_errors on
php_flag log_errors on
php_value error_log error_log
Note that if your server runs PHP in CGI mode rather than as an Apache module you will not be able to change these settings via the .htaccess file and you will get an Internal Server Error message. Furthermore, some shared hosting environments are configured to not allow users to set these values via the .htaccess file.
Here is a good article on controlling error handling via the .htaccess file: http://perishablepress.com/press/2008/01/14/advanced-php-error-hand…
Other Solutions
If you don’t have access to the PHP.ini file and your hosting company does not allow you to enable error messages via .htaccess, you might also want to check your hosting control panel to see if there is an option to enable error logging from there. If you still don’t have error messages at this point we actually recommend moving to a different hosting company. Our software works great with most hosting companies but if there is an error on yours and this company won’t let you see that error, we definitely suggest moving your site elsewhere.
Having said that, all hope is not lost. In WordPress on the AutoBlogged support page you can enable the options Enable logging to file when processing feeds and Show verbose debug info. This will create a file named _debug.log in the autoblogged directory that might provide clues as to what is causing the error or at least where in the process the error is occuring.
You can also open the wp_config.php file in the WordPress root directory and uncomment (remove the // at the beginning) or create this line:
define(‘WP_DEBUG’,true);
This will try to enable error messages via PHP, but may also produce a large of error messages and warnings that you can probably ignore. If you still are having problems, send us a support ticket to see if we can help. In extreme situations we may need to provide you with a unique autoblogged build where we add specific code to troubleshoot your problem.
Remember that the goal here is to find the error message or some other clue that will tell us what is causing AutoBlogged to halt feed processing. There are an infinite number of server configurations, platforms, software versions, and environment settings that can affect AutoBlogged but we can’t help much until we know where the process fails.
And finally, don’t forget to turn error messages off again (at least those displayed on the browser) when you are finished. You don’t want to be handing out information that might help someone break into your web site.
Edit Feeds
May 16, 2008
The Feed Settings page allows you to individually configure and customize each source feed. From this page you can configure settings such as the category, tagging, filtering, and post templates.
General Settings
- Enabled – Determines whether the feed is included in each script run. Use this to temporarily disable a feed for testing or during feed configuration.
- Feed Type – This setting allows you to use one of the built-in handlers for various search engines. These handlers allow you to quickly configure a search without having to figure out the feed URL for the particular search engine.
- Search Keywords or RSS Feed URL – When using an RSS feed use this box to enter the full path to the feed. If using one of the built-in search handlers use this box to enter keywords or tags for your search. Note that if you do not have the exact feed URL you can often enter the web site’s main page and AutoBlogged will attempt to discover the actual feed URL.
- Title – The title is there for your own use to label the feed. This title will only show on the Feeds management page. IF you do not enter a title, the Feeds page will create a title for you.Default Status – When adding new posts from a feed, you can choose to have them automatically published, saved as a draft, saved as a private post, or with a status of pending.
Categories and Tags
- Assign posts to this category – All posts created from a feed must be assigned to at least one category. This setting determines the category for all posts in this feed.
- If other blog categories appear in the post - When processing a feed, AutoBlogged will check to see if any of the existing blog categories appear in the post. If they do, you can choose to 1) assign those categories to the post and 2) add those categories as tags for the post. This feature is particularly useful if your blog has categories with subcategories. You can assign the feed to the main category and let AutoBlogged automatically add the subcategories if found. For example, you may have a blog category titled Windows with subcategories XP and Vista. You can assign the category Windows to the feed and allow it to automatically assign the categories XP or Vista if those words appear in the post. This feature can add true value to your blog by intelligently gathering and categorizing content found on the web.
- Additional Tags – With an autoblog that does nothing more than show excerpts and point to other sites your site offers little value for users and little uniqueness for search engines. The Additional Tags feature allows you to create a list of keywords, phrases, or search terms that will randomly be added as tags to each post. Not only does this improve your search engine results, it helps users to find relevant content based on the additional keywords you provide.
Include Posts that Contain
This section allows you to perform additional keyword filtering on your feed when the source does not provide such a feature. For example, you may be using an affiliate feed and only want to display those posts that contain the keyword coupon.
Note that any extra processing you perform will affect the load, overhead, and speed of the script. If possible try to use any filtering capabilities of the source feed before using the feed-level filtering.
All of these searches are performed on each field extracted from the feed, it does not do any filtering based on the content of the original page.
Enter lists of words separated by spaces or commas. To enter a phrase that includes spaces or commas, enclose that phrase in quotes.
- All these words - All words in this box must appear in the feed in order for the post to pass filtering checks.
- Any of these words - If any of the listed words appear, the post will pass filtering checks.
- The exact phrase - If the exact phrase appears in the post, it will pass filtering checks. Note that if you would like to enter multiple phrases in this box, each phrase must be enclosed in quotes.
- None of these words - If any of these words appear in the post it will not pass the filter checks.
Custom Fields
Custom Fields are a power feature that allow you to override field values, supply values for empty fields, or create new fields that you can use as variables in templates. For example, you may have a feed where all authors show as Admin, which is fairly common with blogs. If you know the author’s real name, you can create a custom field named author and enter the name of the author you wish to use.
All custom fields will also override extracted values or will be added as additional fields to the WordPress post so you can modify your WordPress theme to display these values.
Note that Custom Fields are processed before Post Templates and therefore the fields you create can be referred to from within your templates.
- Custom Field – This is the name of the field you wish to set.
- Custom Field Value – This is the value you wish to assign to the field. This can be a static value or you can use the post template syntax to create more complex scenarios.
Post Templates
Post Templates are the key to customizing your blog and giving it a fresh and natural appearance. Post Templates have a flexible syntax that allows for random selections, conditional content, variable insertion, and loops. For more information on Post Templates, see Post Template Reference
Search and Replace
The Search and Replace feature allows you to modify the content of a feed based on Regular Expression searches. With this feature you can do things such as rewrite words, enforce naming standards, insert affiliate ID’s, correct non-standard feeds, create unique content, or just about anything else you can imagine. Search and Replace uses the PCRE syntax.
- Search for – The search term or regular expression to find.
- Replace with – The expression to use for replacing the search term.
Note that the Search and Replace feature uses Regular Expressions so you must escaoe any special characters in your search pattern with a slash (\) character. The special characters that need escaping are \^.$|()[].
For example, if you want to seach for autoblogged.com and replace it with www.autoblogged.com, you would use these values:
Search for: autoblogged\.com
Replace with: www.autoblogged.com
If you want to turn all instances of wikipedia.com into a hyperlink, use these values:
Search for: wikipedia\.com
Replace with: <a href=”wikipedia.com”>wikipedia.com</a>
Note that if your search expression contains multiple grouped matches, the Replace operation will only be performed on the primary match. For more precise control over replacement, you can use backreferences in your replace expression.
- Comments Off
- Read Entire Post
Troubleshooting Image Problems
May 11, 2009
If you are having problems with images or thumbnails, here are a few steps you can take to troubleshoot the problem. The first thing we need to get out of the way is to make sure you have the boxes checked to copy images locally or create thumbnails and that your post template contains the %image% or %thumbnail% variables. These are the default settings but sometimes those do get changed. Also make sure you have the latest version. Versions 2.3.381 and earlier had problems with image processing on some hosts.
1. Does your theme display images or thumbnails? Some themes only show text excerpts on the index page. A quick theme change can tell you if that is the case.
2. Are there images or thumbnails in your /wp-content/uploads directory? If there aren’t any image files in the directory for the current month, something might be preventing the image files or thumbnails from being saved.
3. Does the post show the image or thumbnail field? If you edit one of the posts that AutoBlogged added, in the custom fields section there should be an Image and/or thumbnail field that contains the URL of the image or thumbnail.
4. Did an error occur? If an error occured during the retrieval of an image, the post might have a custom field named Error that contains the error message received. If you have debug logging enabled, that too might contain additional error information. Your web directory might also contain an error_log file with additional information.
5. Is the feed valid? A surprising number of feeds simply aren’t valid or use non-standard namespaces. You can test your feed at feedvalidator.org. Another good test is to try out several other feeds to see if it is the feed itself that is causing the problem or if the problem occurs with all feeds.
6. Does the feed contain thumbnails? Some feeds may not have attached images although they do show up in the content field. Use the feed in the feed viewer to make sure it even contains images. You may want to try the %content% variable in your post template to get the full encoded content.



Blog Posts