ntrast
Forum Replies Created
-
The error is still there. Just installed a fresh WP with WP-Invoice only and got “Fatal error: Call-time pass-by-reference has been removed in /var/www/development/htdocs/wp-content/plugins/wp-invoice/core/wpi_invoice.php on line 243” while activating.
This is a LAMP system with PHP 5.4.11. Please fix your code.
Forum: Plugins
In reply to: [Personal Fundraiser] Further development planned?with WP 3.5.1 and PHP 5.4.11 I get the following error while trying to activate the plugin:
Fatal error: Call-time pass-by-reference has been removed in /var/www/development/htdocs/wp-content/plugins/personal-fundraiser/includes/paypalfunctions.php on line 62
@fergbrain: yes it works in the admin page but not in the frontend. It did well in the past. I updated wordpress and it stopped. I already uninstalled it and reinstalled to no avail. If i look into the source code of the page i cant see the counter javascript in the footer. However i can see other js in the footer and wp_footer() is called.
@fergbrain: thx for your fast reply. I have updated to 3.0.2 but the javascript counter still is not working. The script is not visible in the footer while others are.
Forum: Fixing WordPress
In reply to: imported RSS feed editingI am not sure whether you can strip content from a feed while importing it. However you can filter the output. Some time ago i wrote a small plugin for my own use (quick and dirty) to get rid of font and class definitions because they would break the layout of a blog.
<?php /* Plugin Name: FWP+: Modify syndicated content Plugin URI: Description: enable FeedWordPress to modify content in syndicated posts Version: 2010.0208 Author: Michael Weichselgartner Author URI: https://www.ntrast.de/ License: GPL */ add_action( /*hook=*/ 'the_content', /*function=*/ array('FWPRegex', 'my_fwp_regex'), /*priority=*/ 10002, /*arguments=*/ 1 ); class FWPRegex { function my_fwp_regex($content) { $regex = array ( '/<\/?font[^>]*>/i' => '', '/<\/?strong[^>]*>/i' => '', '/<\/?em[^>]*>/i' => '', '/class=\".[^\"]*\"/i' => '' ); if (is_syndicated()) { foreach ($regex as $key => $value){ $content = preg_replace($key, $value, $content); } } return $content; } } ?>
The array $regex is used to build the “search” and “replace” pairs. In the example above the first array element will serach for html font tags (
<font [incl. any attributes like color]></font>
) and replace them with nothing (”). The second element does the same with html<strong></strong>
tags and the third does is with<em></em>
tags. The last element strips out any class definition from the content.You can add as many elements to the array as you want to build your custom regex. I just use it to delete tags but you even can replace things with it by entering something in the “replace” part (the second parameter) of a pair (this is the one currently empty in my example).
Now to strip ads you need to write your own regex. Because this might become a more complex code (not everything can be matched in a single line) you might want to use preg_replace_callback and throw in a custom function.
To make the example work just save the code into a php file (e.g. fwpregex.php) and put it in a directory (e.g. fwpregex) within your plugins directory from WordPress. Now go to your plugin administartion page and activate the nwely installed regex plugin. From that moment on all syndicated posts from FeedWordPress will be filtered acording to your custom regex rules.
CAUTION!
This plugin has not been written for public use and therefore i dont guarantee for anything. You are responsible yourself for writting appropriate regex rules. This plugin filters all posts from all feeds. It is not desined to apply different regex to different feeds.I hope i could give you an idea what is possible. Much luck.