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
bremen_final
View bremen_final
Description
The Allies are attempting to steal an important.. thing... from the Axis. <br />Its invisible and already on the back of the truck, or maybe its the truck itself. <br />Whatever. I'm sick o
Hits: 12
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 unknown unknown
8 Ukraine Ukraine
9 Canada Canada
10 United Kingdom United Kingdom
11 Germany Germany
12 Netherlands Netherlands
13 Poland Poland
14 Italy Italy
15 Taiwan, Province of China Taiwan, Province of China
16 Seychelles Seychelles
17 Australia Australia
18 Romania Romania
19 Indonesia Indonesia
20 India India
21 Thailand Thailand
22 Sweden Sweden
23 Brazil Brazil
24 Japan Japan
25 South Africa South Africa
26 Lithuania Lithuania
27 Argentina Argentina
28 Spain Spain
29 Iran, Islamic Republic of Iran, Islamic Republic of
30 Chile Chile
31 Luxembourg Luxembourg
32 Turkey Turkey
33 Moldova, Republic of Moldova, Republic of
34 Korea, Republic of Korea, Republic of
35 Belarus Belarus
36 Malaysia Malaysia
37 Venezuela Venezuela
38 Switzerland Switzerland
39 Singapore Singapore
40 Colombia Colombia
41 Hong Kong Hong Kong
42 Mexico Mexico
43 Mongolia Mongolia
44 Czech Republic Czech Republic
45 Belize Belize
46 Greece Greece
47 Honduras Honduras
48 Estonia Estonia
49 Latvia Latvia
50 Bulgaria Bulgaria

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




July


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

A lift az alsó szintre visz

 
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 include a HTML file in a PHP-Nuke module

21.5. How to include a HTML file in a PHP-Nuke module

From what we have said about the structure of a PHP-Nuke module (see Section 21.1), it is easy to include a HTML file in a module - all we have to do is use the PHP include command, to include it between the calls to OpenTable() and CloseTable() functions:

  • Create a folder under the modules directory. Call it whatever you like, but take care to replace blanks with underscores in the name.

  • Using a decent text editor (see Chapter 11), create a text file called index.php in that newly created directory.

  • Copy the following code in index.php:

    <?php
    /************************************************************************/
    /* PHP-NUKE: Web Portal System                                          */
    /* ===========================                                          */
    /*                                                                      */
    /* PHP-Nuke-HOWTO module for <application>PHP-Nuke</application>                                   */
    /*                                                                      */
    /* Copyright (c) 2003 index.php                                         */
    /* by Chris Karakas                                                     */
    /* http://www.karakas-online.de                                         */
    /*                                                                      */
    /* See licence.html for the Licence of the other files                  */
    /* distributed together with this index.php file.                       */
    /*                                                                      */
    /* This program is free software. You can redistribute it and/or modify */
    /* it under the terms of the <acronym>GNU</acronym> General Public License as published by */
    /* the Free Software Foundation; either version 2 of the License.       */
    /************************************************************************/
    if (!eregi("modules.php", $PHP_SELF)) {
      die ("You can't access this file directly...");
    }
    $index = 0;   // 0 : do not show right blocks - 1:show right blocks 
    require_once("mainfile.php");
    $module_name = basename(dirname(__FILE__));
    include("header.php");
    OpenTable();
    include("path/to/the/html/file"); // <-- CHANGE THIS!
    CloseTable();
    include("footer.php");
    ?>
    
  • Change the licence to reflect your decisions. Of course, I urge you to use the GNU General Public License whenever possible, to help the cause of free software - PHP-Nuke is itself set under the GPL, after all, so why would you want a different licence for your module?.

  • Then just enter the right path to the HTML file you want to include, replacing the "path/to/the/html/file" string. This can be either a full filesystem path, or a relative one - relative to the PHP-Nuke root directory, which is always the same directory where config.php is located. But it may also very well be a URL to a HTML file of another site. Examples:

    include("/usr/local/httpd/htdocs/myfile.html"); // absolute filesystem path
    include("modules/PHP-Nuke_HOWTO/cookies.html"); // relative filesstem path
    include("http://www.yoursite.com/filexx.html"); // full URL 
    
  • Finally, activate the module from the modules administration (see Section 9.3).

Tip Javascript in modules
 

There is nothing that prevents you from including a file that contains Javascript code in a module. As long as the Javascript functions defined in the included file are not also present in the includes/javascript.php file (see Section 21.9.1), and the HTML page created with the Javascript does not break the table layout of your theme, there should be no problem. In this way you could create a PHP-Nuke Guestbook module, for example, if you already had the Javascript code for a guestbook (see Javascript in themes).

If you want to include two files in the module, so that they appear side-by-side, rather than one after the other, you can use the usual HTML table trick to show the files in two separate cells of the same table row (see Using "include" for HTML pages):

OpenTable();
echo "<table><tr><td>";
include ("page.html");
echo "</td><td>";
include ("page2.html");
echo "</td></tr></table";
CloseTable();

An alternative way to include a HTML file in the module, is to terminate PHP interpretation of the file with a closing ?>, include the HTML code verbatim and then reopen the PHP context with a new <?php line:

<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$index = 0;   // 0 : do not show right blocks - 1:show right blocks 
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
OpenTable();
?>
PUT YOUR HTML CODE HERE, WHATEVER COMES BETWEEN THE <html> AND </html>
TAGS OF YOUR HTML FILE
<?php
CloseTable();
include("footer.php");
?>

Note that we have inserted a closing ?> after the call to OpenTable() and an opening <?php before the call to CloseTable(). Whatever comes in between, should be plain HTML code, not PHP. This method is suitable for small HTML texts, for larger texts the include method is recommended.

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.23 Seconds

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