This question about Developing extensions (plugins skins etc.): Task filed
SOCIALBOOKMARKS include uses wrong web "System" instead of current web.
The
SocialBookmarkingAddOn provides code for a macro to be used on pages throughout the site, but the suggested code does not use the correct web.
This is because INCLUDE uses the web where the code is defined and not the web where the macro is expanded.
WORKAROUND is to redefine the macro to avoid using includes.
WAS:
* Set SOCIALBOOKMARKS = %INCLUDE{"System.SocialBookmarkingAddOn" section="delicious" }% %INCLUDE{"System.SocialBookmarkingAddOn" section="digg" }% %INCLUDE{"System.SocialBookmarkingAddOn" section="reddit" }% %INCLUDE{"System.SocialBookmarkingAddOn" section="facebook" }% %INCLUDE{"System.SocialBookmarkingAddOn" section="stumbleupon" }%
WORKAROUND:
* Set SOCIALBOOKMARKS = <a href="http://del.icio.us/post?url=%TOPICURL%&title=%BASETOPIC%"><img src="%PUBURLPATH/System/SocialBookmarkingAddOn/delicious.gif" title="Post to Delicious" /></a> <a href="http://digg.com/submit?url=%TOPICURL%&title=%BASETOPIC%"><img src="%PUBURLPATH/System/SocialBookmarkingAddOn/digg.gif" title="Post to Digg" /></a> <a href="http://reddit.com/submit?url=%TOPICURL%&title=%BASETOPIC%"><img src="%PUBURLPATH/System/SocialBookmarkingAddOn/reddit.gif" title="Post to Reddit" /></a> <a href="http://www.facebook.com/sharer.php?u=%TOPICURL%"><img src="%PUBURLPATH/System/SocialBookmarkingAddOn/facebook.gif" title="Post to Facebook" /></a> <a href="http://www.stumbleupon.com/submit?url=%TOPICURL%&title=%BASETOPIC%"><img src="%PUBURLPATH/System/SocialBookmarkingAddOn/stumbleupon.gif" title="Post to !StumbleUpon" /></a>
I would love to know another way to do this so the INCLUDE expansion uses the context of the evaluation instead of the definition without enduring "Include Inflation" and needing to say INCLUDINGTOPIC, etc.
Hi Raymond,
Thanks for spotting this. I had a quick look and im wondering if its a bug in the
%TOPICURL%
macro not working out the web correctly in includes. The same is happening at
PressReleaseFoswiki01x00x04.
Unfortunately I don't have the time to investigate further at the moment but hopefully I will get a chance at the weekend.
--
AndrewJones - 16 Jun 2009
I have confirmed it is a bug with the
%TOPICURL%
macro and have submitted a bug report at
Task.Item1741. When this bug gets fixed and released the
SocialBookmarkingAddOn will work correctly.
I will update the plugin page tomorrow to describe the issue.
--
AndrewJones - 16 Jun 2009