|
How to create costume pages (V7)
|
| Domi |
Posted on 12/21/08 13:10
|

Venue Admin

Posts: 147
Joined: 24/08/05
|
Useing our gamepage as an example.
Make a new file called gamepage.php
paste this content and place the file in your php-fusion root, add a link to it and you have a Gamepage like here on Venue ;)
This can easily be remade to any costume page, just change name of the file and of the content you include(see the code for right / center panel inclusions).
Code<?php
require_once "maincore.php";
require_once INCLUDES."output_handling_include.php";
require_once INCLUDES."header_includes.php";
require_once THEME."theme.php";
add_to_title(" - Games"); //Just for the fun of it !
//Ok here ill do a manual include of header.
if ($settings['maintenance'] == "1" && !iADMIN) { redirect(BASEDIR."maintenance.php"); }
if (iMEMBER) { $result = dbquery("UPDATE ".DB_USERS." SET user_lastvisit='".time()."', user_ip='".USER_IP."' WHERE user_id='".$userdata['user_id']."'"); }
echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n";
echo "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='".$locale['xml_lang']."' lang='".$locale['xml_lang']."'>\n";
echo "<head>\n<title>".$settings['sitename']."</title>\n";
echo "<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."' />\n";
echo "<meta name='description' content='".$settings['description']."' />\n";
echo "<meta name='keywords' content='".$settings['keywords']."' />\n";
echo "<link rel='stylesheet' href='".THEME."styles.css' type='text/css' media='screen' />\n";
if (file_exists(IMAGES."favicon.ico")) { echo "<link rel='shortcut icon' href='".IMAGES."favicon.ico' type='image/x-icon' />\n"; }
if (function_exists("get_head_tags")) { echo get_head_tags(); }
echo "<script type='text/javascript' src='".INCLUDES."jscript.js'></script>\n";
echo "<script type='text/javascript' src='".INCLUDES."jquery.js'></script>\n";
echo "</head>\n<body>\n";
//require_once THEMES."templates/panels.php"; // this is the one we want to costumize.
ob_start();
// Calculate current true url
$script_url = explode("/", $_SERVER['PHP_SELF'].(FUSION_QUERY ? "?".FUSION_QUERY : ""));
$url_count = count($script_url);
$base_url_count = substr_count(BASEDIR, "/") + 1;
$start_page = "";
while ($base_url_count != 0) {
$current = $url_count - $base_url_count;
$start_page .= "/".$script_url[$current];
$base_url_count--;
}
define("START_PAGE", substr(preg_replace("#(&|\?)(s_action=edit&shout_id=)([0-9]+)#s", "", $start_page), 1));
// Side & center panels
ob_start();
$plc = 0;
//Lets leave left panels as they are, if we wish to render them manualy simply remove the content down to define("LEFT", ob_get_contents());
// Render left panels
if (check_panel_status("left")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='1' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res)) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
$plc++;
}
}
}
}
define("LEFT", ob_get_contents());
ob_end_clean();
// Render right panels , just add what panels you want included manualy
$prc = 0;
ob_start();
//Right side content.
include INFUSIONS."varcade_best_panel/varcade_best_panel.php";
include INFUSIONS."varcade_events_panel/varcade_events_panel.php";
define("RIGHT", ob_get_contents());
ob_end_clean();
// Set the require div-width class
if(defined("ADMIN_PANEL")){
$main_style = "side-left";
}elseif ($plc && $prc) {
$main_style = "side-both";
} elseif ($plc && !$prc) {
$main_style = "side-left";
} elseif (!$plc && $prc) {
$main_style = "side-right";
} elseif (!$plc && !$prc) {
$main_style = "";
}
// Render upper center panels
ob_start();
if(!defined("ADMIN_PANEL")){
echo "<a id='content' name='content'></a>\n";
if (iADMIN && $settings['maintenance']) {
echo "<div class='admin-message'>".$locale['global_190']."</div>";
}
if (iSUPERADMIN && file_exists(BASEDIR."setup.php")) {
echo "<div class='admin-message'>".$locale['global_198']."</div>";
}
if (iADMIN && !$userdata['user_admin_password']) {
echo "<div class='admin-message'>".$locale['global_199']."</div>";
}
if (check_panel_status("upper")) {
$p_res = dbquery("SELECT * FROM ".DB_PANELS." WHERE panel_side='2' AND panel_status='1' ORDER BY panel_order");
if (dbrows($p_res)) {
while ($p_data = dbarray($p_res)) {
if (checkgroup($p_data['panel_access'])) {
if ($p_data['panel_display'] == 1 || $settings['opening_page'] == START_PAGE) {
if ($p_data['panel_type'] == "file") {
$panel_name = $p_data['panel_filename'];
include INFUSIONS.$panel_name."/".$panel_name.".php";
} else {
eval(stripslashes($p_data['panel_content']));
}
}
}
}
}
}
}
define("U_CENTER", ob_get_contents());
ob_end_clean();
// Render lower center panels just add what panels you want included manualy
ob_start();
include INFUSIONS."varcade_center_panel/varcade_center_panel.php";
define("L_CENTER", ob_get_contents());
ob_end_clean();
require_once THEMES."templates/footer.php";
?>
Edited by Domi on 01/03/09 09:43
|
| |
|
|
| Ads |
Posted on 05/23/13 04:08
|
Bot Agent
Posts: n^x
Joined: Always
|
|
| IP: localhost |
|
|
| sathishIPL |
Posted on 12/24/08 04:59
|

Junior Member

Posts: 17
Joined: 11/11/08
|
that was a nice tutorial...
thanks
when i used that as korax ....i am getting this warning message
Warning: Cannot modify header information - headers already sent by (output started at /home/theiplac/public_html/videos.php:1) in /home/theiplac/public_html/infusions/the_kroax_center_panel/the_kroax_center_panel.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /home/theiplac/public_html/videos.php:1) in /home/theiplac/public_html/infusions/the_kroax_center_panel/the_kroax_center_panel.php on line 3
Warning: Cannot modify header information - headers already sent by (output started at /home/theiplac/public_html/videos.php:1) in /home/theiplac/public_html/infusions/the_kroax_center_panel/the_kroax_center_panel.php on line 4 |
| |
|
|
| Domi |
Posted on 12/24/08 06:15
|

Venue Admin

Posts: 147
Joined: 24/08/05
|
at /home/theiplac/public_html/videos.php
Has nothing to do with kroax, atleast not our version
Anyway you cant include non panel files right in to this one.
Edited by Domi on 12/24/08 06:16
|
| |
|
|
| sathishIPL |
Posted on 12/24/08 06:35
|

Junior Member

Posts: 17
Joined: 11/11/08
|
domi,
okay let put my question in that way ,
I tried to set the page like in venue.nu/humourpage.php |
| |
|
|
| fetloser |
Posted on 12/24/08 06:37
|

Newbie

Posts: 9
Joined: 23/10/05
|
are you including files more than one time? |
| |
|
|
| Domi |
Posted on 12/24/08 06:52
|

Venue Admin

Posts: 147
Joined: 24/08/05
|
I belive that videos.php is not a panel.
And with this you need to include panel type of files only, if they are not you need to make em such.
|
| |
|
|
| sathishIPL |
Posted on 12/24/08 06:56
|

Junior Member

Posts: 17
Joined: 11/11/08
|
no its not a panel....
As u said in tutorial , Instead of Varcade center panel , i placed Korax center panel and i remove the panel in right side..... |
| |
|
|
| Domi |
Posted on 12/24/08 07:14
|

Venue Admin

Posts: 147
Joined: 24/08/05
|
Yes i understand that far, but you are still doging the original question mark "videos.php" , it dosent come from us, so where is it from and what is it.
It seems that is the file that causes the issue and if you only include the kroax center panel it definatly shouldent be there..
Edited by Domi on 12/24/08 07:15
|
| |
|
|
| sathishIPL |
Posted on 12/24/08 08:09
|

Junior Member

Posts: 17
Joined: 11/11/08
|
ohh ..
u said in tutorial that make a gamepage.php and copied the content ..instead of naming gamepage.php i named it as a videos.php
But the tutorial for gamepage.php is working without the error ....
this is my gamepage.php
http://www.theiplaction.com/onlinegames.html
Hope u understood ..
Edited by sathishIPL on 12/24/08 08:14
|
| |
|
|
| Domi |
Posted on 12/24/08 08:41
|

Venue Admin

Posts: 147
Joined: 24/08/05
|
Ah there we go :)
open the_kroax/functions.php
find
Codeheader("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Content-type: text/html; charset=ISO-8859-9");
Remove it.
|
| |
|
|
| sathishIPL |
Posted on 12/24/08 08:56
|

Junior Member

Posts: 17
Joined: 11/11/08
|
hi domi,
I cant find this one in functions.php |
| |
|
|
| Domi |
Posted on 12/24/08 09:10
|

Venue Admin

Posts: 147
Joined: 24/08/05
|
opps, meant center panel! 
|
| |
|
|
| sathishIPL |
Posted on 12/24/08 09:26
|

Junior Member

Posts: 17
Joined: 11/11/08
|
hmmm,
there was no error .....thanks mate ...fine
can u tell me what for this code above
i mean the function
header("Cache-Control: no-cache, must-revalidate"  ; // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"  ; // Date in the past
header("Content-type: text/html; charset=ISO-8859-9"  ;
I have also another question , whats the meaning for Korax in English ? Just i am curoius to know the meaning |
| |
|
|
| Domi |
Posted on 12/25/08 07:05
|

Venue Admin

Posts: 147
Joined: 24/08/05
|
Its just a non cache setting with expire date to make sure, then a charset definition, its some leftovers from the playnow thingy.
Kroax really means nothing, the user who requested the original version called him self kroax ... so with the great imagination we have... kroax it was !
|
| |
|
|
| sathishIPL |
Posted on 12/30/08 13:27
|

Junior Member

Posts: 17
Joined: 11/11/08
|
hi domi ,
By using costume pages, we can add set of particular keyword and description for particular costume pages ..
Am i right ?
If yes then
this will Apparently increase the pagerank and google search results.
Edited by sathishIPL on 12/30/08 13:29
|
| |
|
|
| koenie12 |
Posted on 12/30/08 16:15
|

Junior Member

Posts: 17
Joined: 26/09/07
|
sathishIPL wrote:
hi domi ,
By using costume pages, we can add set of particular keyword and description for particular costume pages ..
Am i right ?
If yes then
this will Apparently increase the pagerank and google search results.
Yes, you can use the output handling include to set them. After you have included the header.php file you can use the following:
add_to_meta() //Add to meta tags
set_meta() // Set metatags
set_title() // Set Title
add_to_title() //Add to title
I believe thats most of them, i cant really tell, because the PHP-Fusion Wiki site is dead
Edited by koenie12 on 12/30/08 16:16
|
| |
|
|
| sathishIPL |
Posted on 01/01/09 02:34
|

Junior Member

Posts: 17
Joined: 11/11/08
|
hi koenie12345,
First
happy new year all....
can u bit explain more ?
|
| |
|
|
| koenie12 |
Posted on 01/01/09 09:09
|

Junior Member

Posts: 17
Joined: 26/09/07
|
sathishIPL wrote:
hi koenie12345,
First
happy new year all....
can u bit explain more ?
i cannot really, you will have to wait for the official wiki to get back up. |
| |
|
|
| sathishIPL |
Posted on 01/01/09 13:36
|

Junior Member

Posts: 17
Joined: 11/11/08
|
yea i noticed , wiki is down .... |
| |
|
|
| sathishIPL |
Posted on 01/08/09 05:31
|

Junior Member

Posts: 17
Joined: 11/11/08
|
Domi ,
Here comes a problem Again for me , I cant add the any panels in right side ..
I used the above code without changing anything..
I never noticed that before ,now i try to add tag cloud |
| |
|