PHP Gallery

This is a discussion on "PHP Gallery" within the PHP Forum section. This forum, and the thread "PHP Gallery are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 14th, 2005, 21:41
New Member
Join Date: Sep 2005
Location: ENG, Bath
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Confused about styling php

Hi,

in need of stylesheet guidance for php file.

Last edited by WillisTi; Dec 4th, 2005 at 22:14.
Reply With Quote

  #2 (permalink)  
Old Nov 17th, 2005, 19:29
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Confused about styling php

Quote:
Can I just add
<link href="style.css" rel="stylesheet" type="text/css" />
to the php file and the appropriate divs?
Im getting a bit confused so if someone can help me out that would be great.
Thanks
The answer is YES, provided that you do so in the appropriate place within the HTML sections - in other words, provided that you don't add it between the <?php and ?> tags (If you want to add it there, you can but you need to use a PHP print or echo).
Interestingly, I've been doing some PHP work with styles over the last couple of weeks. In order to meet the requirements of the UK Disability Discrimination Act, as a "supplier" we have to make all reasonable efforts to ensure that our site is as accessible as possible to people with disabilities and that includes offering a variety of font and colour options. We're doing it through style sheets, with the styles generated by PHP and it's working a treat.
Here's the start our our .css file ...
Code: Select all
<?php
header("content-type: text/css");
$mencolour = "#ffffcc";
$texcolour = "#000000";
$bfsize = 10;
if ($_REQUEST[fsize] == 4) $bfsize = 8;
if ($_REQUEST[fsize] == 2) $bfsize = 12;
if ($_REQUEST[fsize] == 1) $bfsize = 16;
?>
body {
font: normal <?= $bfsize ?>px verdana;
color: <?= $texcolour ?>;
}
.body {         /* Body spans */
font: normal <?= $bfsize ?>px verdana;
color: <?= $texcolour ?>;
text-align: left;
text-indent: 0pt;
width: 454px;
}
Reply With Quote
  #3 (permalink)  
Old Nov 18th, 2005, 01:11
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 25
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tim356
Re: Confused about styling php

umm, that's your .css file?
Reply With Quote
  #4 (permalink)  
Old Nov 18th, 2005, 03:37
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Confused about styling php

Quote:
Originally Posted by Tim356
umm, that's your .css file?
Yes ... or rather it's the start of my style sheet file. If the extension is to be .css, then you need to configure the web server to parse .css files through PHP, or use mod_rewrite to point the .css file request to a .php script. Much easier to use a .php extension, at least in testing / if you don't mind the nosey source viewer noticing what you're doing.

My .css coding is NOT clean, by the way; a case of the shoemaker's children having bare feet. For historic reasons, we have a style called "body" and the three if statements in my code all on the same variable could be much neater. I also need to look at adding some cache and store header for the sake of efficiency.
Reply With Quote
  #5 (permalink)  
Old Nov 19th, 2005, 05:10
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 25
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tim356
Re: Confused about styling php

Quote:
Yes ... or rather it's the start of my style sheet file. If the extension is to be .css, then you need to configure the web server to parse .css files through PHP, or use mod_rewrite to point the .css file request to a .php script.
Oh cool, I never knew you could do that.
Reply With Quote
  #6 (permalink)  
Old Dec 2nd, 2005, 21:42
New Member
Join Date: Dec 2005
Age: 53
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: PHP Gallery

This image gallering(image hosting) tutorial might help you a bit.
Reply With Quote
Reply

Tags
php, gallery

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Gallery Help McG Web Page Design 1 Apr 18th, 2008 01:29
Created Flash Photo Gallery in PhotoShop. How can I put this Gallery INSIDE a page?? BlackReef Flash & Multimedia Forum 3 Dec 13th, 2007 18:30
Gallery Help RZX Developer Flash & Multimedia Forum 4 Dec 10th, 2007 15:38
CMS Gallery Tino Flash & Multimedia Forum 6 Sep 28th, 2007 16:03
PHP image gallery Maverick25r PHP Forum 2 Oct 12th, 2006 01:16


All times are GMT. The time now is 18:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43