Ah, OK. I understand. So, coming back to my question: rotaing banners randomly should be build in to the BP template as there is no other option I guess that will work for sure....Don Chambers wrote:Bulletproof 1.1 is never going to be in spartacus... bulletproof is one of s9y's core templates. There will be 2 ways to get bp updates. First, if s9y is updated (ie, 1.2.x or 1.3), the latest bp will be in that release. Second, we are maintaining a download location for interim bp releases so we do not have to wait for s9y to be updated when we want to update bp. BP updates, including 1.1, can be downloaded here:
http://s9y-bulletproof.com/index.php?se ... ]=download
BP does use a banner ID of serendipity_banner, but I have not tried this plugin Garvin mentions so I cannot be sure if it will work or not... but I suspect it will.
category-header: individual header image for each category
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")
Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
Knowing Don, probably. But the plugin, now named "Template Header/Logo Image" in SPARTACUS, supports three different header types, and is easy to configure and test. Just install it, specify the path to your image directory, save the configuration, and try your blog. If nothing happens, reconfigure for one of the other header types.
If you get it to work, come back and tell us so others will know what to do. If you can't get it to work, let us know so we can update it for BulletProof.
If you get it to work, come back and tell us so others will know what to do. If you can't get it to work, let us know so we can update it for BulletProof.
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Jude - you seem to be the resident expert on banners & the media library.... perhaps that plugin could be updated to offer an option to load images from a particular folder in the media library??? Not sure if that is pandora's box though... specifying the wrong folder, or the entire media library could have some fairly nasty results!judebert wrote:Knowing Don, probably. But the plugin, now named "Template Header/Logo Image" in SPARTACUS, supports three different header types, and is easy to configure and test. Just install it, specify the path to your image directory, save the configuration, and try your blog. If nothing happens, reconfigure for one of the other header types.
If you get it to work, come back and tell us so others will know what to do. If you can't get it to work, let us know so we can update it for BulletProof.
=Don=
Bingo! I figured that I'd better leave it restricted it so people could verify their banner images were the correct size and format.
You could set it to a media library directory; you'd just have to type the right path. Then you could manage the banner images with the media library controls. But I didn't want to add a media selector, because that would just lead to trouble.
You could set it to a media library directory; you'd just have to type the right path. Then you could manage the banner images with the media library controls. But I didn't want to add a media selector, because that would just lead to trouble.
I have put all my headers in a Media Library directory as this is the way Bulletproof works: you can assign a header using the media library, so I figured I make a directory just for that....judebert wrote:Bingo! I figured that I'd better leave it restricted it so people could verify their banner images were the correct size and format.
You could set it to a media library directory; you'd just have to type the right path. Then you could manage the banner images with the media library controls. But I didn't want to add a media selector, because that would just lead to trouble.
btw: if anyone is interested I can share those headers for people to use... I think I have a few nice ones (if I say so myself)..
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")
Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
No haven't had the time yet will do so probably this Sunday...Don Chambers wrote:So did you install that plugin? Does it work with the images you uploaded?
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")
Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
Re: category-header: individual header image for each catego
Hej!
I tried the plug-in, though with no success (here). The DIV has the appropriate ID.
Now I would just choose a workaround by implementing a
to a simple PHP code snippet that would do the job (or better insert the code snippet directly into the index.tpl). Problem is to get that PHP snippet to work with the parser ... any hints?
Example for the php script, just for the show (it works fine if interpreted)
I tried the plug-in, though with no success (here). The DIV has the appropriate ID.
Now I would just choose a workaround by implementing a
Code: Select all
<!--#include virtual="randompicture.php" -->
Example for the php script, just for the show (it works fine if interpreted)
Code: Select all
<?php
// Randompic
srand ((double) microtime() * 1000000);
$random = rand(1,4);
if($random=="1")
{
echo "<div id=\"header\" style=\"background: url(headers/h_1.jpg) ;
\" />";
} etc.
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: category-header: individual header image for each catego
Hi!
You can edit your index.tpl file of the template (ideally you should create your own template). Then, inside your template directory you can edit/create a config.inc.php file:
then in your index.tpl you could call:
which would call said PHP function.
HTH,
Garvin
You can edit your index.tpl file of the template (ideally you should create your own template). Then, inside your template directory you can edit/create a config.inc.php file:
Code: Select all
<?php
function randomPicture() {
srand ((double) microtime() * 1000000);
$random = rand(1,4);
echo "<div id=\"header\" style=\"background: url(headers/h_" . $random . ".jpg) . "\" />";
}
$serendipity['smarty']->register_function('randomPicture', 'randomPicture');
Code: Select all
{randomPicture}
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: category-header: individual header image for each catego
GREAT! And again a big step (for me) to customizing templates, now with understanding the logic behind smarty, finally
Thanks a lot!
Thanks a lot!
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
Re: category-header: individual header image for each catego
S9y does include workarounds for this old Smarty2 syntax to not break with older Plugins
But for sure it is better to learn the new Smarty 3 syntax, since we don't know at when these helper compat functions will be removed, eg
http://www.smarty.net/docs/en/api.regis ... dp16782656
Code: Select all
$serendipity['smarty']->register_function('randomPicture', 'randomPicture');
Code: Select all
$smarty->registerPlugin("function",'randomPicture', 'fncRandomPicture'));
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian