PDA

View Full Version : Deifferent for V/H


Sergio de la Torre
12-22-2005, 07:09 PM
How can i do a different template for vertical images and horizontal (i don't know if it's the correct word in english) images?

Maybe adding a conditional hack to code? I want to change only two atributes (height and width) Is it possible to do a dynamic stylesheet?

Thanks

blinking8s
12-22-2005, 08:05 PM
and a template that adjusts for the two isnt what you want? you want a totally different template when they switch?

Sergio de la Torre
12-22-2005, 08:25 PM
I cant do a valid template because i cant put <IMAGE_WIDTH> or <IMAGE_HEIGHT> in the stylesheet . I must know the dimmensions of the photo before load it.

Sergio

blinking8s
12-22-2005, 08:36 PM
why can you not put the width and height in? I am confused...

tinyblob
12-22-2005, 08:37 PM
i'm not a CSS guru so i wouldn't know how to do it purely in that way.
what i could do is replace my CSS link with a new tag, something like <DYN_CSS>, then write an addon that checks the width against height to see which is larger, then replaces <DYN_CSS> with whichever CSS file is relevant.

tinyblob
12-22-2005, 08:38 PM
why can you not put the width and height in? I am confused...
i think he wants to adjust the layout of his site depending on the orientation of the photo..
so a horizontal image might have the description below it, whereas a vertical photo might have the description on the right hand side.

Sergio de la Torre
12-22-2005, 08:48 PM
i think he wants to adjust the layout of his site depending on the orientation of the photo..
so a horizontal image might have the description below it, whereas a vertical photo might have the description on the right hand side.
No, now i have a system to prevent thefts. I have the image in the table background and a transparent gif over it (with the dimensions of the original image) I need to know after load the page. If i put the dimensions inside the html code wont be valid xhtml 1.1 (with pixelpost tags), but i cant put it in a external stylesheet because it wont be replaced for the meassures.

It isnt easy to understand

blinking8s
12-22-2005, 08:49 PM
are thefts so hardcore? i mean, if people want to steal that image, and know what to do...you cant stop it.

Sergio de la Torre
12-22-2005, 08:52 PM
I know, but lets do it more dificult

Joe[y]
12-22-2005, 09:12 PM
if you want to use <IMAGE_WIDTH> and all that as css jsut use the 'style' attribute n your html template.

eg:

<div style="width:<IMAGE_WIDTH>px;">

Sergio de la Torre
12-22-2005, 09:27 PM
I have a similar code now, but its not valid :(

I want to change the current template (tables) to a new xhtml 1.1 valid template (layers bassed)

http://www.sergiodelatorre.com/photoblog/ not valid (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sergiodelatorre.com%2Fp hotoblog%2F&charset=%28detect+automatically%29&doctype=XHTML+1.1)

http://www.sergiodelatorre.com/photoblog/index.php?x=templates valid (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sergiodelatorre.com%2Fp hotoblog%2Findex.php%3Fx%3Dtemplates&charset=%28detect+automatically%29&doctype=Inline)

Connie
12-23-2005, 05:44 AM
if you use Pixelpost-tags for CSS, be sure that you do not set this is an external CSS file, but in the very template itself, in the header-part

external CSS-stylesheets are not processed by PP

Sergio de la Torre
12-23-2005, 07:21 AM
Maybe doing a http://www.sergiodelatorre.com/photoblog/ index.php?x=style request??? (style_template.html)

Thanks

Connie
12-23-2005, 08:50 AM
no, I do not think so, that this makes sense

the CSS is part of the template and not part of some parameters for index.php
you can add your CSS-code in the header-section of your template and then you can use <IMAGE_WIDTH> there, because in the template the tags are interpreted

that is the easy way and we love easy ways!

Joe[y]
12-23-2005, 11:48 AM
you could just use a header.html - that would be included in all pages.

Sergio de la Torre
12-23-2005, 08:00 PM
I have it, but not with a external CSS. I want to investigate more :P

eyefloater
04-06-2006, 04:39 AM
Hey all,

I'm new to Pixelpost but from what I've seen so far it's absolutely great. Installation of the 1.5 beta took all of 5 minutes (so nice in comparison to the hassle involved with some other options out there).

Forgive me for resurrecting a thread that's been dead since 2005, but it deals with an issue I'm wondering about. I'd like to get some information on using different templates based on image dimensions. I plan on using a pixel-specific layout where the menu will be hug the bottom of the image. Depending on vertical/horizontal/square format (all of which will be standardized dimensions) I'd like design the menu to fit comfortably in the space designated.

With a new version of Pixelpost on the way, can anyone offer a suggestion that will work? I'm fine with coding xhtml and css, but the particulars of Pixelpost tags and PHP still have me confused (for now).

Thanks,

- eyefloater

PS. I don't expect a fully developed walkthrough answer. Please just mull it over for a minute and hopefully give me something promising to read tomorrow when I'm bleary-eyed and nursing a half-litre of tea. ;)

Joe[y]
04-06-2006, 08:40 AM
it seems your main concern is with the width of the images and including that in your elements. this is easily possible ... have a look at my lightwhite2 template on the template pages at pixelpost.org/v1/ - i used the pp tags <IMAGE_WIDTH> and could have used <IMAGE_HEIGHT> to specify widths of elements.

eyefloater
04-06-2006, 01:16 PM
Thanks for the info.

After re-reading my post from last night I realize I could have been a bit clearer. What I want for vert/hor/square images is to have a menu that hugs the bottom of each image and is exactly as wide as the image posted. The actual design of the menu would change based on these different aspect ratios (the menu might be 825x100, 685x100, 550x100 depending on the image posted) so that's why I want to have different templates in place vs. automatically rescaling the menu.

I'll take a look at your template tonight and see if I can learn a thing or two from it.

- eyefloater

pixestential
11-10-2006, 08:14 PM
Has anyone successfully used the image size to change the template (i.e. one template for vertical images and a different template for horizontal)?

(And forgive me if I missed some other useful post on this subject.)

Thanks,
jerry