[wikka-community] Background Images

mahefa randimbisoa dotmg
Wed May 12 13:10:37 GMT 2010


I apologize, if you copy/paste the code I posted, I wrote media="print"
which should have been media="all" or media="screen"


--
Work hard at whatever you do! (Ecc. 9. 10a, CEV)
Mahefa




On Wed, May 12, 2010 at 4:02 PM, Dario Taraborelli <dartar at wikkawiki.org>wrote:

> Mahefa, yes that's a much more clever (and modular) way to do it.
>
> Just one minor point, custom actions such should be saved in the
> /plugins/actions tree (not under /actions) otherwise they will be lost
> during an upgrade!
>
> Dario
>
> On 12 May 2010, at 13:56, mahefa randimbisoa wrote:
>
> I'm talking as for the future version 1.3 to come, but you have to test
> with the version you're using.
>
> Wikka has a method called AddCustomHeader(), so, Actions could also do the
> trick. lets call it custombg.php, which you put on
> actions/custombg/custombg.php
>
> <?php
> $url = $vars['url']; // call your action with {{custombg url="xxx.jpg"}}
> //sanitization
> $url = str_replace(array('<', '>', '"', "'"), '', $url);
> $custom_header = "<style type='text/css' media='print'> body { background:
> url('$url'); }</style>";
> $this->AddCustomHeader($custom_header);
>
>
> In any page, you could then write {{custombg url="mybg.jpg"}} to customize
> its background. (if what you need is personnalized background for every
> specific page)
>
> --
> Work hard at whatever you do! (Ecc. 9. 10a, CEV)
> Mahefa
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.wikkawiki.org/pipermail/community_wikkawiki.org/attachments/20100512/95c656a8/attachment.html>



More information about the community mailing list