Good suggestion. I tried doing it this way instead:
changed
$defaultAttr = BOLTconfig('BOLTlinkExtAttr', "
rel='nofollow'");
to
if ($attr == '') $defaultAttr = BOLTconfig('BOLTlinkExtAttr', "
rel='nofollow'");
Did the same for the BOLTlinkIntAttr two lines above. Not sure which
is better. But this way the default attributes are overwritten if ANY
custom attributes are added, regardless of type.
Pro's and con's of both, but I'd rather put more control in the
editors hands in this case. And we never know what the default attrs
might be. Will be in next release--unless someone has a compelling
argument for following Phoenix's original suggestion.
Cheers,
Dan
On Sat, Mar 13, 2010 at 9:47 PM, Phoenix Wu <[email protected]> wrote:
> Hi everybody~ I tried to make the "lightbox" script working in
> BoltWire v3.4
> http://www.huddletogether.com/projects/lightbox2/
>
> And I just followed the instructions to add an rel attribue on the
> link, for example:
> [[http://www.huddletogether.com/projects/lightbox2/images/image-1.jpg|
> test1|rel='lightbox']]
>
> But nothing happened...the lightbox script didn't work.
> then I check the source of the rendered page:
> <a href="http://www.huddletogether.com/projects/lightbox2/images/
> image-1.jpg" rel='nofollow' rel="lightbox" >test1</a>
>
> I think maybe it's the "rel=nofollow" thing ruined the script, so I
> modified the markups.php a little bit:
> markups.php
> function BOLTMlinks($x) {
> ...
> else {
> $defaultAttr = BOLTconfig('BOLTlinkExtAttr', "
> rel='nofollow'");
> if ($label == '+' || $label == $link) $label =
> BOLTescape($link);
> }
> change to:
> else {
> if (strpos($attr, 'rel') == false)
> /////////////////////////////
> $defaultAttr = BOLTconfig('BOLTlinkExtAttr', "
> rel='nofollow'");
> else ////////////////
> $defaultAttr = BOLTconfig('BOLTlinkExtAttr',
> ""); //////////////////
> if ($label == '+' || $label == $link) $label =
> BOLTescape($link);
> }
>
> The lightbox script works fine now, but maybe there is a better
> solution.
>
> --
> You received this message because you are subscribed to the Google Groups
> "BoltWire" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/boltwire?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en.