Venue Search
Login
Username

Password



Not a member yet?
Register here

If you have Facebook
Login with Facebook

Forgotten your password?
Request a new one here.
Affiliates
Your button here?
Contact
Spampoison
View Thread
Venue » General » Tutorials
Who is here? 1 guest(s)
 Print Thread
How to create costume pages (V7)
Domi
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).

Download source  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("#(&amp;|\?)(s_action=edit&amp;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
 
http://www.venue.nu
Ads
Posted on 05/23/13 04:08
Bot Agent

Posts: n^x
Joined: Always

IP: localhost  
sathishIPL
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
 
www.imageclix.com
Domi
at /home/theiplac/public_html/videos.php
Has nothing to do with kroax, atleast not our version Wink
Anyway you cant include non panel files right in to this one.
Edited by Domi on 12/24/08 06:16
 
http://www.venue.nu
sathishIPL
domi,

okay let put my question in that way ,

I tried to set the page like in venue.nu/humourpage.php
 
www.imageclix.com
fetloser
are you including files more than one time?
 
Domi
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.
 
http://www.venue.nu
sathishIPL
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.....
 
www.imageclix.com
Domi
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
 
http://www.venue.nu
sathishIPL
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
 
www.imageclix.com
Domi
Ah there we go :)
open the_kroax/functions.php

find
Download source  Code
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");





Remove it.

 
http://www.venue.nu
sathishIPL
hi domi,
I cant find this one in functions.php
 
www.imageclix.com
Domi
opps, meant center panel! Wink
 
http://www.venue.nu
sathishIPL
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"Wink; // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"Wink; // Date in the past
header("Content-type: text/html; charset=ISO-8859-9"Wink;



I have also another question , whats the meaning for Korax in English ? Just i am curoius to know the meaning
 
www.imageclix.com
Domi
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 !
 
http://www.venue.nu
sathishIPL
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
 
www.imageclix.com
koenie12
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
hi koenie12345,

First
happy new year all....

can u bit explain more ?

 
www.imageclix.com
koenie12
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
yea i noticed , wiki is down ....
 
www.imageclix.com
sathishIPL
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
 
www.imageclix.com
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Member Pages Official releases [Infusions] 25 01/21/13 15:18
poblem med Member Pages Official releases [Infusions] 2 07/29/12 04:46
How to create costume pages Tutorials 17 02/06/09 11:55
How to create a V7 custom multipage Tutorials 1 08/10/08 20:30
Venue uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue