![]() Clan Member Joined Feb 14 2009 Posts: 803 ![]() ![]() | Creating your own custom pages 2010-04-21, 12:24 Did you find this helpful? You must be logged in to vote!First off, you should start a text editor, such as notepad. I strongly recommend you to download Notepad++, as it will make it a lot easier for you. Now you need to create a new file. You can name it whatever you like, but it must end with .php and it's recommended that you only use the letters a-z and numbers 0-9. Next thing is very important. Copy and paste these lines to the top of your document. <?php session_start(); include $_SERVER['DOCUMENT_ROOT']."/connect.php"; include $_SERVER['DOCUMENT_ROOT']."/functions.php"; include $_SERVER['DOCUMENT_ROOT']."/Templates/$tpDir/html.php"; include $_SERVER['DOCUMENT_ROOT']."/login.php"; So what does this do? First, it starts a new session, which is needed to handle the login system and so on. Then it includes necessary files that are needed for different reasons. Okey, so let's go to the next step. Now we need to add the standard html, which takes care of everything that is the same on each page, such as menus, logo, footer, login window and so on.. If you have programming experience, you will see that this is really simple, and if not, you can just copy and paste it. $html = new Html(); $html->title = "Your pagetitle"; $html->sidemenu = 1; $html->start(); ?> Here you can write all your normal XHTML or a bunch of text <? $html->end(); Here you can set your own pagetitle, which is the text that is displayed at the very top of your web browser. You can set which sidemenu you are gonna use, and if you don't want any sidemenu, you can just delete that line, or set it to 0. Click here for more information on sidemenus. Now, you can edit anything you want between ?> and <?. You can write any HTML you want there. When you've done this, save the file where you want it, then, if you want, you can add it to your sidemenu. If you don't how to do, you can follow this guide. Conclusion: <?php session_start(); include $_SERVER['DOCUMENT_ROOT']."/connect.php"; include $_SERVER['DOCUMENT_ROOT']."/functions.php"; include $_SERVER['DOCUMENT_ROOT']."/Templates/$tpDir/html.php"; include $_SERVER['DOCUMENT_ROOT']."/login.php"; $html = new Html(); $html->title = "My page title"; $html->sidemenu = 1; $html->start(); ?> All your text and xHTML goes here. <? $html->end(); Last edited by Eric, 2010-05-24, 18:17. |
![]() Clan Member Joined Feb 14 2009 Posts: 803 ![]() ![]() | A simple page 2010-04-21, 12:25 This is an example of how a custom page can look like.Let's say that we want to make a page where we have all our awards. We can call it awards.php and put it under our root directory. <?php session_start(); include $_SERVER['DOCUMENT_ROOT']."/connect.php"; include $_SERVER['DOCUMENT_ROOT']."/functions.php"; include $_SERVER['DOCUMENT_ROOT']."/Templates/$tpDir/html.php"; include $_SERVER['DOCUMENT_ROOT']."/login.php"; $html = new Html(); $html->title = "Awards"; $html->sidemenu = 1; $html->start(); ?> <h1>E-dom awards</h1> <table class='awards'> <tr> <td><img src='http://www.eurodomination.net/images/medals/tournament1.png' alt='' /></td> <td>Modern Warfare 2, Road to Victory Tournament, Winners, CTF Original Mode, Season 7</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/tournament1.png' alt='' /></td> <td>Modern Warfare 2, Road to Victory Tournament, Winners, S&D Original Mode, Season 7</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/league1.png' alt='' /></td> <td>Call of Duty 4, Royal Green Jackets, Winners, Search and Destroy, Season 15</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/tournament1.png' alt='' /></td> <td>Call of Duty 4, Road to Victory Tournament, Winners, DOM Group 1, Season 1</td> </tr> <tr> <td style='width: 60px;'><img src='http://www.eurodomination.net/images/medals/friendliness2.png' alt='Friendliness' /></td> <td>Good conduct: 100% Friendliness.</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/punctuality3.png' alt='Punctuality' /></td> <td>Good conduct: 100% Puncutality</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/league1.png' alt='' /></td> <td>Call of Duty 2, Division Winners, Capture the Flag, Season 3</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/league1.png' alt='' /></td> <td>Call of Duty 2, Winners: 85th Custer Division, Capture the Flag, Season 5</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/league1.png' alt='' /></td> <td>Call of Duty 2, Crossover Champions, Season 5</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/tournament2.png' alt='' /></td> <td>Call of Duty 4, Road to Victory Tournament, Runners up, S&D Hardcore Mode, Season 7</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/tournament2.png' alt='' /></td> <td>Call of Duty 4, Road to Victory Tournament, Runners up, S&D Hardcore Mode, Season 6</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/league2.png' alt='' /></td> <td>Call of Duty 4, Runners-up: Parachute Regiment, SAB/DOM/KOTH/TDM, Season 11</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/league2.png' alt='' /></td> <td>Call of Duty 2, Division Runners Up, Capture The Flag, Season 4</td> </tr> <tr> <td><img src='http://www.eurodomination.net/images/medals/supporter3.png' alt='' /></td> <td>Euro Domination Supporter</td> </tr> </table> <? $html->end(); You can see how it looks like right here. Last edited by Eric, 2010-04-25, 14:27. |
![]() Clan Member Joined Feb 14 2009 Posts: 803 ![]() ![]() | 2010-07-27, 12:30 Hi Violator79.Have you downloaded FRUWAR? It can be found at http://clanfru.ath.cx/fruwar/, where you will also find a FAQ, screenshots and additional packets. The background image of a page is handled by the template you are using. If you want to change the background image, you can change your template CSS file (found at /Templates/name/style.css), or you can create your own template (this requires some php and css knowledge). |
![]() Joined Jul 24 2010 Posts: 6 ![]() ![]() | 2010-07-28, 17:01 ok thx muxh for fast reply.....in moment im getting php, html and java knowledge ^^...... me and some mates are starting project about BC2 |
![]() Clan Member Joined Feb 14 2009 Posts: 1576 ![]() ![]() | 2010-07-30, 17:35 He's not that great tbh... and he smells funny |





