PCS Game Hosting
 
  Forum Index    Search    Usergroups    Edit your profile    Members    Arcade    Ranks

 Reputation    Medals    Staff    Statistics    Board Rules    Forum FAQ    Private MessagesLogin, Check Messages    Log in 

Search for at
Soldier Of Fortune 2 Advanced Search



Post new topicReply to topicprinter-friendly viewThank Post
   Soldier Of Fortune 2 Forum Index » Content management system » PHP Nuke - evolution Xtreme » Tutorial: How to create nuke blocks and modules
 View previous topic :: View next topic  
Author Message
Teo
Owner
Owner
Administrator
Administrator


In Game: Teo

Joined: Sep 21, 2009
Last Visit: Oct 22, 2018
Age: 37
Posts: 1167
Location: Milan
Italy.png 
Reputation: 5069
votes: 7
Medals: 6 (View more...)
Modder (Amount: 1)

Status: Offline
PostPosted: Sat Feb 25, 2012 11:16 pm
PostPost subject: No icon Tutorial: How to create nuke blocks and modules
Reply with quote

Hello everyone in this topic will explain how to create modules and blocks for nuke.

for the modules:

PHP:
    if ( !defined('MODULE_FILE') )
    {
       die(
"You can't access this file directly...");
    }

    require_once(
"mainfile.php");
    
$module_name basename(dirname(__FILE__));
    
get_lang($module_name);
    include 
"header.php";
    
OpenTable();

    echo 
"Here all types of content!";

    
CloseTable();
    include 
"footer.php"
 


Save this file as index.php in a folder modules / name you want

Depending on your experience you will know implement codes and functions in your module, interezioni in the database etc...

Here is an example of a static module:

PHP:
if ( !defined('MODULE_FILE') )
{
   die(
"You can't access this file directly...");
}

define('INDEX_FILE'true);
require_once(
"mainfile.php");
$module_name basename(dirname(__FILE__));
get_lang($module_name);
include 
"header.php";
OpenTable();

echo 
"
Bla
bla
<center><img src='test.jpg'></center>"
;

CloseTable();
include 
"footer.php"
 


You can see how I put the html in php with the echo function.

Now on to the blocks.

Create a file called block-nomeyouwant.php,
insert this code:


PHP:
    if ( !defined('BLOCK_FILE') ) {
        
Header("Location: ../index.php");
        die();
    }

    
$content="
    Here all types of content!
    "
 


If you can not adapt to a block/module your HTML content you can use this adapter: HERE


https://www.proclanservers.com  Pissed Off  Rent your SoF2 Server   Die!   Rock
Back to top
View user's profile Send private message Send e-mail Visit poster's website Visit member's Facebook: http://www.facebook.com/ricordalo
Sponsor
Smiley face
Display posts from previous:
Post new topicReply to topic printer-friendly viewThank Post
Soldier Of Fortune 2 Forum Index » Content management system »  PHP Nuke - evolution Xtreme
 
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Sticky: Sof2 Modding Tutorial (by Viper) 2 Teo 3570 Wed Sep 05, 2012 3:03 pm
Aris View latest post
No new posts Mod tutorial 10 VenOm 7384 Sun Dec 30, 2012 9:01 pm
Teo View latest post
No new posts SoF2 Mapping Tutorial 0 Teo 1503 Sat Nov 10, 2012 4:04 pm
Teo View latest post
No new posts Sound Tutorial 1 Teo 2066 Wed Oct 24, 2012 7:23 pm
valabador View latest post
No new posts Ventrilo Server Tutorial 0 Teo 2559 Sun Feb 19, 2012 12:49 pm
Teo View latest post
 




Back to Top

SOF2.ORG Multiplayer Community © 2019 All times are UTC + 2 Hours [DST enabled]
 

Copyright ©