New CSS based XHTML compliant themes - Page 3 New CSS based XHTML compliant themes - Page 3
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

New CSS based XHTML compliant themes

Started by Tarique Sani, June 28, 2004, 10:41:56 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Casper

Hi Tarique,

The updated theme.php I attached the other day cured the problem of the filmstrip gif, but I just realised I did not replace all instances of '2bornot2b' in the file, so other images are affected, such as the ratings.

Attached file has removed all reliance on the 2bornot2b theme being present.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tarique Sani

SANIsoft PHP applications for E Biz

avileta

This is a great theme but I had a problem with netscape and firefox when the image caption was lengthy.  The text failed to wrap causing the main body to shift under the right hand menu (using Reynold).  It appeared to be inheriting the white space attribute of the image above it.  IE did not do this.

I added "white-space: normal" to ".img_caption_table td" class which fixed the problem.

Thanks
Andy

Joachim Müller

Reynolds: Demo - Download
2bornot2b: Demo - Download

Hint: both themes don't have the language and theme selectors all cpg1.3.x themes are suppossed to have - please add them for future versions:<p align="center">
{LANGUAGE_SELECT_FLAGS}<br />
{LANGUAGE_SELECT_LIST}{THEME_SELECT_LIST}
</p>


GauGau

Casper

Quote from: Tarique Sani on June 28, 2004, 10:41:56 AM
P.S. These themes will not display the Theme and Lang picker drop-downs - this a part of deliberate design - if anyone wants to hack and add them - they are welcome to

I have added them on my shop demo, but they cause the themes to lose their css and xhtml compliance, which is why I did not add them to the downloads.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

please post the errors from the validator, so they can be fixed.

GauGau

Casper

You can see the reports as below;

2bornot2b, here

Reynolds, here
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

kevito

#47
Hello.  I'm new to coppermine, and am still configuring my gallery. Powerful piece of software.  I've been plowing through a lot of the code using one of Tarique Sani's xhtml css theme as a base to create my own super simple xhtml valid theme.  I just noticed however that a picture's Title does not display in Opera (7.51).  It doesn't display in the page title at the top of the browser, in the thumbnail view (even with the option set to display in the config section), or on the actual page of the picture.  This is irrelevant of which theme is used, as it even occurs with the default theme.  Thought I'd point it out, as I'm pretty clueless with php and I thought that there may be some bad code in there somewhere.

/edit..  The descriptions don't display either.  Everything works fine in Firefox and IE6 though.
actually, I just checked out this gallery http://www.newtek.com/products/lightwave/lw-gallery/thumbnails.php?album=17 and their titles display fine for me in opera.  I can't really tell what version they're using so I'm unsure if this is a problem with 1.3.2 or if it's just mine for some reason.

Joachim Müller

please post a link and what version of Opera you are running, so we are able to check.

GauGau

kevito

I can't post a link, as I'm running this locally for testing while I'm developing.  I can post my theme.php file if you'd like though.  Also kind of curious as to why with the 2bornot2b theme, a index.php file is included.  So far I haven't done anything with that as it seems to be an old version based on the comments at the top of the file.

Joachim Müller

without looking into it I guess it's just there to prevent people from browsing the folder it is in. Check the contents of the file - if it is blank, it's just there for this purpose.
Please post at least what version of Opera you are using.

GauGau

kevito

Opera 7.51.  It was in my first post..  The index.php file that's included in the 2bornot2b theme I downloaded from the sourceforge site is a full-on index file  (I thought maybe the theme's author meant for that to overwrite the index.php file in the main coppermine folder).  I didn't do that as this file starts with " Coppermine Photo Gallery 1.2.0" at the top.  It's a little confusing.  I'm new to cpg so I'm not sure whether or not I'm supposed to even mess with that file.  I assumed I could do all my tweaking with the style.css, theme.php, and template.html file.  Hopefully I'm right there.

Tarique Sani

Quote from: kevito on August 25, 2004, 10:11:23 AM
I downloaded from the sourceforge site is a full-on index file  (I thought maybe the theme's author meant for that to overwrite the index.php file in the main coppermine folder).
There should not be an index.php in that download - if it is please disregard. Also the Reynolds theme is a more complete theme than 2borno2b
SANIsoft PHP applications for E Biz

kevito

Thanks, I checked out your reynolds theme.  Nice too and I'll see which to base mine off.  I want it to be xhtml valid, so these are the only two I see really digging into.  I'd use them stock, but of course I've got to customize and customize to my heart's content.  I redownloaded the 2bornot2b.tar.gz theme, and there is an index.php file and a file called DEADJOE with no extension.  You may want to update it so as not to confuse :-\\  Thanks for the hard work though, your gallery looks really nice.

/edit.. please disregard my comments about opera's handling of the titles.  I have no idea what was going on yesterday, but today when I fired up my computer and server, it all looks fine.

Joachim Müller

Quote from: Tarique Sani on June 28, 2004, 10:41:56 AM
P.S. These themes will not display the Theme and Lang picker drop-downs - this a part of deliberate design - if anyone wants to hack and add them - they are welcome to
Tarique, the language and theme selectors can/should be switched on/off in coppermine config. For the sake of standards compliance and less questions asked on the support board I suggest putting them in - won't hurt you, as you have the selectors disabled in your config afaik.

Quote from: Casper on August 22, 2004, 03:52:02 PMI have added them on my shop demo, but they cause the themes to lose their css and xhtml compliance, which is why I did not add them to the downloads.
erm, the selectors cause 2 of the 110 errors reported by the validator. That's rather nothing imo. Anyway, I have updated the devel branch to get rid of some of the most trivial errors from the validator. I won't look into the stable branch to do a similar thing - it's just to much work, not worth the effort (hopefully cpg1.3.2 has been the last release based on the current stable branch code). Could you check out and test with your cpg1.4 install - should be significantly less.

If we want real standards compliance, we will have to get rid of the ampersand in the urls. As most servers don't come with support for ";" instead of "&" as delimiter in urls, we'll have to code a routine similar to the one I just paste for reference from an older yabbse version:<?php
if (strlen($QUERY_STRING) > 0)
{
        
$str = (substr($QUERY_STRING05) == 'url=/' $HTTP_SERVER_VARS["REDIRECT_QUERY_STRING"] : $QUERY_STRING);
        
$query_strings split('[;&]'URLdecode($str));
        foreach (
$query_strings as $tmp)
                if (
preg_match("/^([^=]+)[=](.*)/"$tmp$parts))
                        
$GLOBALS[$parts[1]] = htmlspecialchars($parts[2]);
}

if (!empty(
$_SERVER['HTTP_CLIENT_IP']))
{
        
$ip_expl explode('.'$_SERVER['HTTP_CLIENT_IP']);
        
$referer explode('.'$REMOTE_ADDR);
        if(
$referer[0] != $ip_expl[0])
        {
                
$ip array_reverse($ip_expl);
                
$REMOTE_ADDR implode('.'$ip);
        }
        else
                
$REMOTE_ADDR $_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty(
$_SERVER['HTTP_X_FORWARDED_FOR']))
{
        if(
strstr($_SERVER['HTTP_X_FORWARDED_FOR'], ','))
        {
                
$ip_expl explode(','$_SERVER['HTTP_X_FORWARDED_FOR']);
                
$REMOTE_ADDR end($ip_expl);
        }
        else
                
$REMOTE_ADDR $_SERVER['HTTP_X_FORWARDED_FOR'];
}
?>


Joachim

Tarique Sani

@Gaugau - I want the *theme* to be XHTML compliant not just my site - I will work on how to get the Lang and Theme selectors to play properly, actually non inclusion of those was the precise reason I had not added the themes to the downloads at SF

@kevito - thanks for the heads up will update my tarball. Am very keen on seeing what you come up with - the future of coppermine themes has to be standards based :)
SANIsoft PHP applications for E Biz

Joachim Müller

@Tarique: what do you think about the code snippet I posted - something along this should go into init.inc.php and we should be fine.

Joachim

Tarique Sani

replacing all the & with &amp; in the URLs is fine for XHTML 1.1 transitional, we need not use ;
SANIsoft PHP applications for E Biz

Joachim Müller

Using ; as delimiter in URLs is recommended by the W3C, but I have hardly come across any server that is configured to use it - most webservers are still configured to use & instead. For more XHTML compliance (as a goal), we should definitely go for ";" instead of "&".
Maybe I didn't make myself clear, or I'm missing something: The code snippet I posted has been taken from YaBB SE and exists in SMF as well. That's why an url like http://forum.coppermine-gallery.net/index.php?topic=9304.40 works on this server, but http://coppermine.sourceforge.net/demo/displayimage.php?album=1;pos=0 doesn't - it has to be http://coppermine.sourceforge.net/demo/displayimage.php?album=1&pos=0
Fumbling in the code with &amp; instead of & (see http://www.w3.org/TR/xhtml1/#C_12 )  makes the code messy and more difficult to understand for users, and it won't solve the initial issue: the delimiter has to be ";" afaik.

Joachim

Tarique Sani

http://www.w3.org/TR/xhtml1/#C_12 says use &amp;
Quote
For example, when the href attribute of the a element refers to a CGI script that takes parameters, it must be expressed as http://my.site.dom/cgi-bin/myscript.pl?class=guest&amp;name=user rather than as http://my.site.dom/cgi-bin/myscript.pl?class=guest&name=user

IMHO messing with every query string once while programming is simpler than messing with it in every execution of code

I am surely missing something here....

SANIsoft PHP applications for E Biz