This new version fixes the issue when an administrator replies to a comment directly from the administration console and the notification is not sent. Now should work correctly with the latest WP version.
This new fabulous feature of Header and Footer has been requested few times and I introduced it for a my personal need on a big blog I manage.
How does it work?
It is not easy to control all that in a scientific was, but we are not scientists, we need only to put an ad in the middle of a post.
So the natural rule were: add this piece of cool code just before the first <h2> you find but start searching for it after 700 characters from the start of the post. You know a post contains HTML tag so 700 characters and actually not 700 human readable characters, but still we are no scientists.
This rule is so clear that it toke to me few minutes to implement (of course using the code already written in that big blog in a custom plugin…).
Another interesting way to find an injection point is the <p> tag, or the closing </p> tag. For example you may want to add something just after the first post paragraph. The rule will be: add that just after the first </p>, of course starting to search from the top of the article.
Why to inject before or after an HTML tag? Rather simple, because you don’t want to break up your so carefully written article, right?
There are special case on may want to manage: what if the <h2>tag is not found on a specific article? Maybe we want to recycle that code and inject it at least on top or bottom of the article (you know, loose ad impressions is not good). The rule has an option for that as well.
Now it’s up to you: add your own rules and inject the ads in the most profitable position and… share with me your results!
This is a really important Header and Footer release since you will find a new interface, CodeMirror with syntax highlight, better mobile codes management. Hopefully without too many bugs even if it is a major release.
The most important new feature is the injection in the middle of the post, or better an engine that injects following you own rules. More on this topic will follow with a couple of articles.
Injection on bbPress forums, posts and replies should be more stable and easy to configure. There are even generic injections which search for some code in the generated page and replace them. More on that on next articles.
Few years ago I wrote FLV auto player, a plugin which was able to replace a link to an uploaded .flv file with a player. Exactly what recently has been introduced in WP for .mp4 and other video formats.
Since the support for flash is day by day disappearing, the plugin has no more sense and so there is no reason to support it for more time. It does a very good jobs on my blogs, now is time to retire!
Hyper Cache is a caching plugin for WordPress aimed to be lite and simple to use. Give it a try and anyway always use a caching plugin ’cause they make your blog more environment friendly.
Regularly I’m asked to give help with Newsletter plugin for very very odd issue. The last one is worth to be told.
A plugin user was setting the SMTP parameters to send the newsletter using an external SMTP provider. Nothing special, standard connection with standard values.
But every time he tried to send a test email the admin page redirect to a 404 error page. To be clear, errors could happens but usually they produce a 500 code, or a message or a blank page. There the 404 error page was the one of WordPress, the same page displayed when a non existent content is requested.
OMG, how was that possible?
I asked the guy to contact the hosting support to get at least a server error log. As most of the time happens with cheap hosting provider, no error logs were available (actually they were but we didn’t receive instruction on how to find them).
I even asked if there was a firewall, but they said no, all external connection are open.
So I asked for an administrative access to the blog owner, patched Newsletter to report step by step the process of sending the SMTP test message. The system broke on the “send” action inside the WP mailing library. No way to touch that file without an FTP, so I asked for an FTP account.
I got it. I create a test page with only the few lines of code required to send a test email with the mailing library. Argh, no way, always a 404 error page on “send” call.
I sent back the test page URL to him asking to forward the URL to the support so they can debug the problem, of course the problem was neither in Newsletter nor in WP.
The answer with few lines of an Apache access log showing the server responding 404 when the test page is accessed. Are you kidding us? We know that!
I really kicked off my head on the keyboard of my laptop (ok, sorry, I’m not that pretty girl in the picture…).
Debug of the WP mailing library was required. Since I’m old on those kinds of problems and almost sure it was a connection problem, I copied the WP library to add debug info without interfere with the blog.
That library has an error suppression (grrr) which I removed and a log started to appear. Of course the problem reported was “stream_socket_client(): unable to connect to host:25 (Operation now in progress)”. Remember we have initially excluded firewalls. Never trust an hosting provider, never.
I tried even to use the phpinfo() function to find out if there was something in PHP installation that could explain the problem (other than a firewall), but of course the phpinfo() function was disabled for “security reasons”.
Has the story an happy ending? Of course no, we’re still waiting for an answer from the support… which will be… (I’ll update the post as soon as I talk back again with the blog owner).
When your hosting provider says the plugin you installed (even with 200.000 installs over the World) is not working because badly written, feel free to ask me to help, but then change the provider! 🙂
Total time for this debug session was at least 3 hours in chatting, mailing, coding.
This is just one complicate issue, of course not related to Newsletter, I faced over the 4 years my plugin is used by bloggers. I saw database encoding set with exotic values inside the wp-config.php which was blocking the plugin to install, redirects to the blog home page when saving a newsletter in raw mode and with the <html> tag in its content, blank page on newsletter saving because it contained the “update” word.
Time ago, for a customer, I created a plugin that integrates the thumbnail generation system of WordPress. The needed was to “force” WordPress to generate always a thumbnail with the exact sizes, while it usually returns the best fitting thumbnail it can find within the already generated ones.
Yes a theme can register many thumbnail versions but if they change the new format are not generated for old images in the media gallery. More, the use of thumbnail via programmatic call to the thumbnail generation function, does not require to have them already stored in the upload folder (that consumes space as well!).
Such kind of thumbnails can be generated on the fly and cached in a cache folder, leaving the upload folder cleaner and the media database lighter. A separated cache folder is even important since you can avoid to back up it.
All that is done by Thumbnails, my plugin just released to the community.
Thumbnail is a very light plugin and does not change the contents or the behavior of you blog. If you deactivate it everything return as before the first installation (eventually just the cache folder could be deleted).
When firstly installed it has no options activated so you have time to play with the configuration panel before having it to start to generate the thumbs.
This new version of Header and Footer has an interesting new option: the ability to add any code you need just after the <body> tag.
This point of injection is not supported by themes, usually, so buffering is needed to inject in that precise page section. This lower a little bit the site performances, but if you use a decent cache system, you won’t notice it.
Injections after the <body> opening is required by Facebook for example, but even other advertising networks require to add some code in that point.
On next version probably a new injection will be provided: in the “middle” of posts and pages.
This new version of Satollo bbPress Extension contains a short code useful to create a list of reply of a topic in a post.
The main use is when a topic is created linked with a blog post and you want people to discuss in the forum and not with comments.