Welcome to Fogfighters Hungary!
 
  Login or Register
.week  
Time
 
 
 
Languages
Select Interface Language:

 
Google Translation
Translation
 
Traffic Report
 
Where are you from?
 
Map Random
Objective
Berlin
View Berlin
^1Berlin**1945, Germany.**The Allies must secure this Berlin street in house-to-house combat!**Each building in turn must be secured before the Allies can advance to the next, and Axis are fighting to the last man!
Hits: 6
Total Maps: 85
 
Modules
· Home
· About Easter
· Büntetés kalkulátor
· Bible
· Biorythm
· Birds
· Black Gallery
· Cats
· Coppermine
· Dogs
· eCards
· ET Game manual
· ET Handbuch
· ET játékleírás
· ET Maps
· Fórumok
· FIFA World Cup 2006
· Fish
· Google Guide
· Googlemaps
· Hírküldés
· Help Desk
· Internet_TV
· Keresés
· Letöltések
· Members List
· Member_Map
· News
· Online Radios
· PHP-Nuke_HOWTO
· PHP-Nuke_Tools
· Private Messages
· Punkbuster
· Saját beállításaid
· Shout Box
· Statisztikák
· Szavazások
· Szerencsejáték
· Tagfelvétel
· Viccek
· Videó kollekció
· Web címek
· Web Development
 
MS-Analysis
Top-Ten Countries visiting Fogfighters Hungary

1 United States United States
2 China China
3 Viet nam Viet nam
4 Russian Federation Russian Federation
5 France France
6 Hungary Hungary
7 Canada Canada
8 Ukraine Ukraine
9 United Kingdom United Kingdom
10 Netherlands Netherlands
11 Germany Germany
12 Poland Poland
13 Italy Italy
14 Taiwan, Province of China Taiwan, Province of China
15 Seychelles Seychelles
16 Romania Romania
17 Indonesia Indonesia
18 Australia Australia
19 Thailand Thailand
20 Sweden Sweden
21 Brazil Brazil
22 India India
23 Japan Japan
24 South Africa South Africa
25 Lithuania Lithuania
26 Argentina Argentina
27 Spain Spain
28 Chile Chile
29 Luxembourg Luxembourg
30 Turkey Turkey
31 Moldova, Republic of Moldova, Republic of
32 Korea, Republic of Korea, Republic of
33 Venezuela Venezuela
34 Malaysia Malaysia
35 unknown unknown
36 Switzerland Switzerland
37 Singapore Singapore
38 Colombia Colombia
39 Hong Kong Hong Kong
40 Mexico Mexico
41 Belize Belize
42 Greece Greece
43 Mongolia Mongolia
44 Honduras Honduras
45 Estonia Estonia
46 Czech Republic Czech Republic
47 Latvia Latvia
48 Bangladesh Bangladesh
49 Bulgaria Bulgaria
50 Pakistan Pakistan

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




World Sandwich Day


 
Képes Naptár
There is a problem right now with this block.
 
CPG Random Picture

Ha függőleges irányban mozogna, talán nem lenne ilyen furcsa

 
Latest Videos


Last added videos

Orvosnál

Orvosnál

Last added videos

Funny

Funny Mortar

Last added videos

Shy

Shy Rose - I Cry For You
 
How to make a dynamic CSS

25.7. How to make a dynamic CSS

A lot of people think that PHP can only be used to deliver dynamic HTML pages. This is by no means the whole story! Did you know, for example, that with PHP you can deliver dynamic CSS files? Forget all those multiple CSS for different browsers! You can maitain one CSS file, with PHP code in it - and PHP will interpret that code and deliver the right CSS to the right browser.

Again, the .htaccess file (see Section 25.4) plays a central role here: add this line to the .htaccess file in your PHP-Nuke root directory:

AddType application/x-httpd-php .css

This will instruct the Apache web server to parse .css files for PHP commands. Then add this line to the top of your CSS file:

<?php Header ("Content-type: text/css");?>

This makes sure that the .css file looks like a regular CSS file to anyone that asks. If you don't return a text/css header, Mozilla will refuse to include the file if the calling page has an XHTML or strict HTML doctype.

With these two changes in place, you can now use PHP everywhere in your CSS file. Conditional operations, function calls, and generally the whole PHP functionality is at your disposal!

You could for example have a link to 'printer-friendly.php' which would set a cookie (for say 10/20secs) and redirect back to the refering page. Your CSS file would then check the "printer" cookie and, if set, would produce a stylesheet that is more printer friendly:

<?php
if(isset($_COOKIE['printer'])) {
?> 
/* print styles here, turn off logos,
do in black and white or whatever */
<?php
} else {
?>
/* regular styles */
<?php
}
?>
Note Your browser does not notice!
 

Whether you use a dynamic CSS with PHP, or a static one, your browser will never notice - just as will never notice with other HTML files anyway! Why? Because all the "dynamics" take place on the server. As soon as PHP finishes its work with parsing the CSS file on the server, the browser gets served a CSS file that looks just about any other CSS file would do. The only difference is that this CSS is constructed on-the-fly, taking into account whatever dynamic parameters you told it to (cookies, user preferences, browser type etc.). Your browser will never notice and will cache it like any other CSS.

The above is of course just an example, since CSS already caters for alternative 'print-friendly' styles using the "media" attribute:

<LINK rel="stylesheet" type="text/css" href="/style.css">
<LINK rel="stylesheet" type="text/css" href="/print.css" media="print">

which, on the other hand, does not seem to be completely supported by all browsers for the moment.

Another interesting application of the dynamic CSS idea, is the construction of "theme variants": different colour combinations for the same theme. Following the previous lines, you could set links somewhere in your pages, that would set a cookie and redirect back to the refering page. Your CSS file would then check the "style" cookie and, would produce the appropriate colours (see Server Side Scripting in CSS Files):

<?php
switch($_COOKIE['style']) {
  case "high_contrast":
  $bg="black";
  $fg="white";
  break;
case "silly":
  $bg="pink";
  $fg="red";
  break;
default:
  $bg="white";
  $fg="black";
  break;
}
?>
body {
background-color: <?php =$bg;?>;
color: <?php =$fg;?>;
}

The CSS file that you should modify for such actions, is the style.css file in the styles folder of your theme (see Section 14.1).

Send all questions and comments to:
Webmaster
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest Fogfighters Hungary © 2007 - 2022

You can syndicate our news using the file backend.php or ultramode.txt

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.22 Seconds

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::