[wikka-community] Background Images
Kevin Timmons
KTimmons
Thu May 13 15:00:58 GMT 2010
That worked perfectly Mahefa, thanks a million.
Thanks to you too Dario.
Kevin
________________________________
From: community-bounces at wikkawiki.org
[mailto:community-bounces at wikkawiki.org] On Behalf Of mahefa randimbisoa
Sent: 12 May 2010 14:11
To: A list open for contributors to discuss Wikka development
Subject: Re: [wikka-community] Background Images
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/20100513/b4799567/attachment.html>
More information about the community
mailing list