[pmwiki-users] Links and "rel"

Petko Yotov 5ko at 5ko.fr
Mon Oct 3 06:40:13 CDT 2011

On Monday 03 October 2011 10:03:23, Brian Tibbels wrote :
> I am trying to insert a "rel" into a link tag using the following syntax
> %rel="prettyPhoto[iframes]"%[[
> http://www.google.com?iframe=true&width=100%&height=100%|google]]
> It doesn't seem to like the square brackets

You can allow the [] characters in WikiStyle definitions. This can be done 
with such a line in config.php:

  $WikiStylePattern = '%%|%[A-Za-z][-,=:#\\w\\s\'"()\\[\\].]*%';

This was not extensively tested, it might break a page rendering in rare 
unexpected cases. 

Another way is to allow the prettyPhoto script to work with this type of rel 

  rel=prettyPhoto_set1   in addition to    rel="prettyPhoto[set1]"

To do this, get the uncompressed current version 3.1.3 and in the file 
jquery.prettyPhoto.js add a line 148:

  isSet = (galleryRegExp.exec(theRel)) ? true : false; // AFTER THIS LINE 147
  isSet = theRel.substring(11).length;                 // ADD THIS LINE

("11" in substring(11) is the length of the common "prettyPhoto" prefix.)

Obviously, if you want to upgrade to newer prettyPhoto versions, you'll have 
to review them and insert your change.


More information about the pmwiki-users mailing list