I think we caught a bug...

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
fwaggle
Regular
Posts: 8
Joined: Thu Jul 19, 2007 12:55 am

I think we caught a bug...

Post by fwaggle »

.. cuz porting themes is infectious.

The first two my wife did today, with some help:

Image
Download "Shades of Gray"

Image
Download "Pink Sunset"

This last one took me a pretty long time, what I'd like comments on is if there's an easier way to link the tabs to static pages. It took me a while to figure this out, and it only works if the link text is exactly the same as the "old style" filename of the static page. :/ I might even look into making it configurable, so that maybe one could link the tabs to categories too... I dunno yet.

Image
Download "RubyX"

As before, comments are appreciated, and note that these are all ports (I can take no credit for any of the design work).

I think next up I might my hand try rolling some S9y themes from scratch, and see what other plugin tricks I can figure out. :D
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: I think we caught a bug...

Post by garvinhicking »

Hi!

Phew, about those staticpages...I believe YellowLED and Don Chambers and d_cee have figured out a way how to do this quite nicely for their bulletproof variant: http://board.s9y.org/viewtopic.php?t=8579

Maybe they can help out with your question?

Very ncie themes, much appreciated! I just committed RubyX to our repository, I'd have to check out the others in a larger variant, do you maybe have a blog where we can see those working live? For things like that, a s9y blog with the plugin "Template chooser" is very helpful :)

Regards,
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/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: I think we caught a bug...

Post by yellowled »

garvinhicking wrote:Phew, about those staticpages...I believe YellowLED and Don Chambers and d_cee have figured out a way how to do this quite nicely for their bulletproof variant: http://board.s9y.org/viewtopic.php?t=8579
Garvin, are you insane? You don't want to make the poor guy read that whole thread, right? :)
garvinhicking wrote:Maybe they can help out with your question?
Hohum. I recall looking into the staticpage .tpl files this morning, but I can't for the life of me recall something like that.
fwaggle wrote:It took me a while to figure this out, and it only works if the link text is exactly the same as the "old style" filename of the static page.
The only thing we have (which comes to my mind, and my mind is fried at the moment :lol:) in bulletproof is Garvin's code for the configurable navbar - is that what you were thinking, Garvin?

YL
fwaggle
Regular
Posts: 8
Joined: Thu Jul 19, 2007 12:55 am

Re: I think we caught a bug...

Post by fwaggle »

garvinhicking wrote:Hi!

Phew, about those staticpages...I believe YellowLED and Don Chambers and d_cee have figured out a way how to do this quite nicely for their bulletproof variant: http://board.s9y.org/viewtopic.php?t=8579

Maybe they can help out with your question?
here's hoping, i'll read through the thread after i wake up properly. :)

it does work at the moment, it's just not very nice. i'm not sure if the "old filename" field for a static page is used for any other purposes (hell, maybe it's deprecated and going to be removed, then it really won't work). i guess i could compare the URLs, but even that mightn't work all the time - plus it'd be nice to be able to bind the tabs to categories and stuff too, without messing up the template too much.

anyway, i'll try figure something out.
Very ncie themes, much appreciated! I just committed RubyX to our repository, I'd have to check out the others in a larger variant, do you maybe have a blog where we can see those working live? For things like that, a s9y blog with the plugin "Template chooser" is very helpful :)
yup actually i didn't want to test the themes we are working on on a live website, so i setup one just for the purpose of theme testing, and we only started using the template chooser so my wife and i could work on two different themes at once.

http://s9ytest.hungryhacker.com

there's bound to be at least one broken theme on there, but all the themes i posted earlier should be there and working fine.

edit: oh, one last thing - what happens if i find a bug in one of the themes? do i post here with a link to the entire archive again, or do you want a diff patch, or something else? :)
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: I think we caught a bug...

Post by yellowled »

fwaggle wrote:it does work at the moment, it's just not very nice. i'm not sure if the "old filename" field for a static page is used for any other purposes (hell, maybe it's deprecated and going to be removed, then it really won't work). i guess i could compare the URLs, but even that mightn't work all the time - plus it'd be nice to be able to bind the tabs to categories and stuff too, without messing up the template too much.
"old filename" - that's "URL shorthand name (Backwards compatibility)", right?

Also, could you maybe post the code you're using right now to generate that navbar?

YL
fwaggle
Regular
Posts: 8
Joined: Thu Jul 19, 2007 12:55 am

Re: I think we caught a bug...

Post by fwaggle »

yellowled wrote:"old filename" - that's "URL shorthand name (Backwards compatibility)", right?
i believe so, it's still "early" for me here. :)
Also, could you maybe post the code you're using right now to generate that navbar?
sure:

Code: Select all

					<li{if $staticpage_pagetitle == ""} id="active"{/if}><a href="{$serendipityBaseURL}" title="Home">Home<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink1text} id="active"{/if}><a href="{$template_option.navlink1url}" title="{$template_option.navlink1text}">{$template_option.navlink1text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink2text} id="active"{/if}><a href="{$template_option.navlink2url}" title="{$template_option.navlink2text}">{$template_option.navlink2text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink3text} id="active"{/if}><a href="{$template_option.navlink3url}" title="{$template_option.navlink3text}">{$template_option.navlink3text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink4text} id="active"{/if}><a href="{$template_option.navlink4url}" title="{$template_option.navlink4text}">{$template_option.navlink4text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
					<li{if $staticpage_pagetitle == $template_option.navlink5text} id="active"{/if}><a href="{$template_option.navlink5url}" title="{$template_option.navlink5text}">{$template_option.navlink5text}<span class="tab-l"></span><span class="tab-r"></span></a></li>
that's what i'm using at the moment. it works, i'd just like to tidy it up and make it a bit more robust. if the name of the static page is empty, the "home" (or could be called "blog" i guess) tab is white, otherwise if a static page matches one of the tabs, the matching tab is white.

i was wondering if i put another option in the theme configuration for each tab, if it would be evaluated, so for example someone could put in something like "$staticpage_pagetitle" or something else to match by. i guess one could edit index.tpl themselves, but i dunno. maybe it's not even a problem, but it's been bugging me since i did the theme port. i guess i'm thinking maybe it'd be nice to be able to match a plugin name or something, so you could have a "photos" tab, and it's active when someone's looking at your photo gallery and stuff.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: I think we caught a bug...

Post by yellowled »

fwaggle wrote:i was wondering if i put another option in the theme configuration for each tab, if it would be evaluated, so for example someone could put in something like "$staticpage_pagetitle" or something else to match by.
Hm. I don't know about evaluating, maybe Garvin can say something on that matter.

Here's what we're using for bulletproof: a (user-)configurable navbar, i.e. users can customize a) the number of links in the navbar, b) link text for each link and c) URL for each link. As far as I know, it doesn't evaluate s9y variables (frankly, I've never tried; but I don't think it would work), but nontheless it's much easier for users than hacking the index.tpl.

The easiest way would be if you simply got a bulletproof zipfile (beware, it's still in development!) and tried to figure it out yourself, but feel free to email me if you have any further questions :)
fwaggle wrote:i guess i'm thinking maybe it'd be nice to be able to match a plugin name or something, so you could have a "photos" tab, and it's active when someone's looking at your photo gallery and stuff.
I'm not sure whether that approach wouldn't be a tad too simple. Imagine the number of different s9y installations out there.

YL
fwaggle
Regular
Posts: 8
Joined: Thu Jul 19, 2007 12:55 am

Post by fwaggle »

ahh i see, you guys are comparing the URLs. i was thinking about trying that, but my wife's complaining that the second and subsequent pages of each section aren't showing up in the tabs, so i thought maybe i could make use of the custom fields for entries plugin - if there's custom fields for static pages this'd be the best way to let people split up the tabs.

otherwise, i'll just match on the url. the bulletproof theme makes a great reference, but i have a headache so i'll play with it tomorrow :)
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Post by yellowled »

fwaggle wrote:my wife's complaining that the second and subsequent pages of each section aren't showing up in the tabs
Are we talking child pages here? Because I think it would be a little over the top to have those in a navbar, unless you combine it with some sort of dropdown navigation, and even that might be hard to pull off.
fwaggle wrote:the bulletproof theme makes a great reference, but i have a headache so i'll play with it tomorrow :)
Take your time. It's not even finished, but as we keep saying: we're almost there, at about 99% at the moment (we've been saying that for 3 months now, I think :wink:). Also, feel free to report any issues or quirks you come across to the bp thread.

YL
fwaggle
Regular
Posts: 8
Joined: Thu Jul 19, 2007 12:55 am

Post by fwaggle »

yellowled wrote:
fwaggle wrote:my wife's complaining that the second and subsequent pages of each section aren't showing up in the tabs
Are we talking child pages here? Because I think it would be a little over the top to have those in a navbar, unless you combine it with some sort of dropdown navigation, and even that might be hard to pull off.
well, i dunno how to explain it except by example. my wife has a tab for "wallpapers", which links to /something/wallpaper1.html. after a slew of images, she links at the bottom to wallpaper2.html, and so on ad nauseum. it's these subsequent pages that don't show up with a highlighted tab, and she'd like them to.

i'm inclined to think you can't satisfy everyone without configuring the blog specifically for the theme, which seems like a bad idea. i will most likely modify the theme just to match urls as you guys do though - it seems like the best compromise that doesn't involve configuring the blog for a particular theme. thanks for the input :D
Post Reply