This thread to update the work about the return of w3images gallery plugin for wordpress.
w3images will return much more customizable than before, perfect to fit your needs as no one else do.
- Thickbox VS Shadowbox for w3images 1.0.5: w3images 1.0.5 will use Shadowbox
- removed the deprecated php
ereg()
function used to clean some input - html and php code rewrite from scratch to separate contents, presentation and pure php code.
- all others changes answered to this same post. Please add here if you like any other feature added to this new version.
Hardworking to w3images 1.0.5 that will fix really thousand of errors.
Hope on Monday of this new week will be installed here at axew3.com as example and working utility and so will be released as new version w3images 1.0.5.
The new w3images 1.0.5 will be available soon. Really happy to release as GPL and with many, really many, improvements. It is now secure, fast, useful at 100%.
Forgive my “as ever” delay: this night the w3images will be available with the how to page reloaded to give easy way to use it for everyone.
I’m preparing the w3images 1.0.5 pack to finally release the new version.

Thinking on to how generate something that can let add images, as the
w3images_random_thumbs()function can do on any template parts where you like to display thumbnail.
To display single images into posts or pages, can be of course the simple
<img> tag:
in this case we go to display a single image here, but if in the page contain more <a> tags with rel="shadowbox[w3images]" attribute, than images are loaded as gallery slide!
All about tips and tricks to display images using the w3images gallery plugin for wordpress will be available in the updated (time by time improved also with your help as w3images has been released as GPL 3), w3images: how to use.
About images that can be added to any post and page by using the <img> tag, (you can add also the simple w3images random thumbnails function on posts and pages installing a plugin like php exec that allow to execute php code directly inside posts and pages) there is a problem with the attribute rel adopted on w3images to open full images view on shadowbox, that is also used in WordPress as explained with also many criticism at this wordpress link Nofollow page.
Practically, the rel=”nofollow” attribute is added to any <a> tag (links) on comments or posts.
Why this? The reason is: discourage spam.
In fact Google had time ago add this policy: any link that is containing the nofollow attribute will not influence the site ranking.
Unfortunately, not only jquery but also others library routines like to use the attribute rel for various scope, and in wordpress this is a limit in this case. If the rel attribute is used for nofollow, can’t be used for another scope in the same element (the markup validator will notice about duplicate attribute rel error checking the document.
Adding a single image to a post and display it by using the rel=”shadowbox[w3images]“ to open and see the full image with Shadowbox will work, but as just above sayd, wordpress add also another attribute rel after the rel=”shadowbox[w3images]“, and the xhtml validator will return duplicate attribute for the <a> tag and the page will return invalid markup validation for this (if there aren’t more xhtml markup errors of course!) in case we try to validate as xhtml the page. There are wordpress plugins to disallow/allow the rel attribute mentioned in the wordpress page linked above, but i don’t have try out any of these.
I think, it is needed and is best to have an option that leave to an administrator or editors and so on while are writing, the possibility to choose if it need to be enabled or not on contest.
Hope next releases of wordpress will contemplate this possibility.
… … …
i will continue here with wordpress and rel=”nofollow” considerations,
just returned to home and i gave water to my plants.
this is a test of an <a> tag with rel attribute value = shadowbox[w3images] that should display full image onclick event:
shadowbox[w3images] test:
as reported above, wordpress add rel=”nofollow” to links while save/update and this is the returned code in this case:
so nice! Two different attribute rel, the last one with value nofollow.
Possibles solutions at this time:
the attribute rel=”nofollow” is added by wordpress after all other attributes if there are in the <a> element, so the Shadowbox ajax effect will work because the parser will take as valid the last one rel attribute founded on the way: as browsers (for what i remember and hope it is correct info) parse documents from down to up (on the contrary), the rel=”shadowbox[w3images]“ will be the last one parsed.
related the modification of the file formatting.php and avoid wordpress to add the rel=”nofollow” attribute i think there is a good solution: i just try out it now, and i think it will work so well!

In minutes the how to will be updated in this same comment … some minute more …
this is a test: the modification very simple done on two functions in the file formatting.php of wordpress, should avoid rel=”nofollow” additions to <a> tags in case the author is an administrator or just any other group or even single users who you’ll like to exclude from this wordpress behavior.
Test this image link, it should return after insertion without rel=”nofollow” as formatting.php has been hacked now here at axew3.com:
well it work very well! the test has returned the correct code untouched. I think a Page for this modification argument should be added to help anybody like to hack his wordress for this . In short by the way, this is the tricky i have think to solve this issue about rel nofollow on wordpress, and without add a plugin, but with all possibles needed about who should or not be affected by this wordpress behavior ( addition of rel=”nofollow” on a tags ).
How to hack formatting.php on WordPress to avoid nofollow additions on <a> tags
in this example we go to avoid the rel=”nofollow” additions on <a> tags only for administrators when they add contents to blog.
OPEN the file wp-includes/formatting.php file with a text editor and search for these following two lines of code as indicated and add the code (the mentioned lines of code are related the two functions involved on wordpress rel=”nofollow addition and are sequentially).
Search the following line of code:
function wp_rel_nofollow( $text ) {immediately after this line ADD the following code:
// START hack to avoid admin rel="nofollow"global $current_user;
if($current_user->user_level > 9){
return $text;
}
// END hack to avoid admin rel="nofollow"
Search the following line of code:
function wp_rel_nofollow_callback( $matches ) {immediately after this line ADD the following code:
// START hack to avoid administrators rel="nofollow"global $current_user;
if($current_user->user_level > 9){
return $text;
}
// END hack to avoid admin rel="nofollow"
Save the file and upload overwriting the default formatting.php. Now when an user with administrative power go to post contents, WordPress will not add the rel=”nofollow” attribute.
Consideration: maybe it is not necessary to call this function because declaring as global $current_user is sufficient at this wp loop point?
added a page for this hack to nofollow, the topic here was really not appropriated but the idea has come out and i have try it and report here.
The page for the rel nofollow on wordpress solution and tips about has been created and you can contribute to to improve it of course, comments are open in this related page:
http://www.axew3.com/b10g/avoid-rel-nofollow-on-wordpress-how-to/
the w3images gallery images plugin for wordpress has been released.
Check it here http://www.axew3.com/b10g/wp-w3downloads.php
At one point in the little presentation of w3images 1.0.5 i have give for sure one important point, that i think is a valuable argument to be discussed also in a different, well explained thread: the w3images is a secure plugin.
Someone skilled can find out any possible problem that i have not consider while coding w3images images plugin for wordpress? I think by the way, it is not possible from my point of view.
Finally the code is here available for everybody and maybe the time can answer much better than any other consideration: axew3.com wordpress can be accessed through w3images plugin in some way? I say no because:
This is the pattern:
"/[^a-zA-Z0-9_-]/"; // strong patternonly letters, numbers, hyphens and underscores. Should be used in the “public code” a variable that isn’t checked by this pattern to bypass this simple but effective security measure.
Any suggestion, help, discussion, answer, question or whatever you like about here is very appreciate.