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
ET_village
View ET_village
Allied forces are attempting to retrieve and escape with gold stolen from the Axis-occupied village.
Hits: 5
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 Sweden Sweden
19 Thailand Thailand
20 Brazil Brazil
21 Japan Japan
22 South Africa South Africa
23 Lithuania Lithuania
24 India India
25 Spain Spain
26 Luxembourg Luxembourg
27 Chile Chile
28 Turkey Turkey
29 Moldova, Republic of Moldova, Republic of
30 Korea, Republic of Korea, Republic of
31 Venezuela Venezuela
32 Malaysia Malaysia
33 unknown unknown
34 Australia Australia
35 Switzerland Switzerland
36 Singapore Singapore
37 Colombia Colombia
38 Hong Kong Hong Kong
39 Mexico Mexico
40 Argentina Argentina
41 Belize Belize
42 Greece Greece
43 Honduras Honduras
44 Estonia Estonia
45 Czech Republic Czech Republic
46 Latvia Latvia
47 Bangladesh Bangladesh
48 Bulgaria Bulgaria
49 Pakistan Pakistan
50 Albania Albania

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




August


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

Innen az üt csak fölfelé vezet

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

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