WordPress for Joomla: Author Archive SEF Link setup

September 7th, 2009

WordPress for Joomla

WordPress for Joomla


Recently I setup and tuned CorePHP WordPress for Joomla component for one of my clients site.
One task I had to resolve was to show all posts of the selected author if visitor click on the author name. I used WordPress the_author_posts_link() function to get the URL to the author archive page.
It returned
www.yoursite.com?authour=nnn
URL instead of search engine friendly (SEF) permalink. In order to change that I use the way I was found at
codex.wordpress.org.
In order to setup the author permalink instead of ?authour=nnn I placed this code to the end of functions.php file at WordPress default used theme folder:

Read the rest of this entry

Your own PHP error handler

September 6th, 2009

Your own php erorrs log

Your own php erorrs log


In case you are not able for some reasons to setup PHP error log through php.ini settings you can use this code to setup your own PHP error handler and thus write needed PHP errors/event into your own log file:

Read the rest of this entry

WordPress Security: Silence is golden. Part 2.

September 6th, 2009

display_errors OFF

display_errors OFF


Some shared hosting providers don’t turn off php error showing by default. If you don’t change this default PHP configuration settings too, your blog has vulnerability issue or even security problem. Why I talk about security problem? Be cause of this can lead to exposure of the absolute path to your WordPress blog installation. Let’s check together. Put this little script into your blog root folder, for example name it phpinfo.php:

< ?php
phpinfo();
?>

Call it from the browser as http://yourBlogURL/phpinfo.php
You will see standard ‘PHP Info’ page with values of different PHP configuration parameters. Check display_errors parameter value under ‘PHP Core section’ now.

Read the rest of this entry

Joomla – how to build logout text link

September 4th, 2009
Joomla Logout Redirect

Joomla Logout Redirect

If you search how to build the logout text link for the Joomla! then you are at the right place now. The answer is below

<a href="index.php?option=com_user&task=logout">Logout</a>

Do you need to redirect user to the needed URL after logout? Then you have to add the parameter return=[your-base64-encoded-return-URL]. For example

<a href="index.php?option=com_user&task=logout&return=<?php echo $returnURL; ?>">Logout</a>

where

$returnURL = base64_encode('URL to redirect');

Or if you need to redirect to the site root of your Joomla! installation after logout then you can use this link with preencoded return parameter value

<a href="index.php?option=com_user&task=logout&return=Lw">Logout</a>

You can read discussion on this issue at these topics
http://forum.joomla.org/viewtopic.php?f=466&t=325172
http://forum.joomla.org/viewtopic.php?f=428&t=334765
of the Joomla! discussion forum.

WordPress plugin development book

September 3rd, 2009

WordPress plugin development

WordPress plugin development


There are a large quant of information technologies related books which doesn’t contain really valuable information. One book just tells us about software user interface (I can see and investigate that interface myself on the monitor), another one just retell software product documentation (I can read that doc myself again).
“WordPress Plugin Development” book is made by another author and from another material. First of all it is fresh edition. Book is published in 2009. The author of this book Vladimir Prevolac (http://www.prelovac.com) shares with us its own rich WordPress plugins development experience and uses real plugins code as the examples to comment through which he lead a reader from the first page to the last one.
The author goes together with you from very simple basics to more complex things. He explains in details the programming technique and WordPress secrets. Do you wish more? JQuery and AJAX are covered in parts which used in the those plugins too.
It is recommended to read this “WordPress Plugin Development (Beginner’s Guide)” book for every person who decided to develop his own WordPress plugins. You may be sure – it is right place to start.

WordPress RSS feed error – instruction target matching is not allowed

August 31st, 2009

WordPress RSS feed error

WordPress RSS feed error


Yesterday I met this error when tried to burn my WordPress blog feed at the feedburner.google.com:
“The URL does not appear to reference a valid XML file. We encountered the following problem: Error on line 6: The processing instruction target matching “[xX][mM][IL]” is not allowed”.

After checking feed page source code I discovered that it really has 6 blank rows before the first valid XML tag. So the problem is found but what is the source of such blank lines at the very beginning of the feed page? Thanks to the curious guys, after 30 minutes of Google reseaching I found these very useful for me posts:

Read the rest of this entry

Is new installed WordPress plugin package clean?

August 29th, 2009

Security

Security


In this post I wish to talk about cleanness of WordPress plugin’s packages. I name package clean if it doesn’t contain any unnecessary files inside. Unnecessary files together with garbage issue can lead to the real security problem. Let’s take my last download as an example. It is a well known WordPress plugin WP-Forum produced by Fredrik Fahlstad. In case if somebody is new to this plugin, this is the simple discussion forum plugin for WordPress. You can download this plugin from Frederik site http://fahlstad.se/wordpress/plugins/wp-forum/.
I went to the plugin’s home page http://www.fahlstad.se/wp-plugins/wp-forum/ and downloaded a 2.4 version installation package.
Inside this package .zip file in addition to core plugin code files we can see:

Read the rest of this entry