Jump to content

monkeypaw201

Members
  • Posts

    70
  • Joined

  • Last visited

Posts posted by monkeypaw201

  1. Does anyone one know how to bypass the skin wrapping? I know by default you call a template with

    $this->render('template.tpl');

    Is there another function or param to pass to disable the skin wrapping?

  2. Alrighty!

    I've got it, was actually easier than I thought:

    In /core/codeon.config.php add the following to the top (inside the PHP tags):

    session_start();
    
    if(isset($_GET['template']) && $_GET['template'] != ''){
    $_SESSION['template'] = $_GET['template'];
    define('CURRENT_SKIN',$_GET['template']);
    }
    
    if(isset($_SESSION['template']) && $_SESSION['template'] != '')
    {
    define('CURRENT_SKIN',$_SESSION['template']);
    }
    

    Now, the only thing YOU have to do is add a dropdown or links to change the skin. To change the skin, just link it to something like this:

    Any page, just append ?template=TEMPLATEFOLDERNAME and it will set the skin.

    Note however that if someone tries to become a smartypants, and put in a skin that doesn't exist, they'll get a blank page.

    • Like 3
  3. Haha, I am most willing to share, The system I used doesn't work 100% because any core redirects reset the template, but I'll go ahead and share anyways;

    My Way:

    In /core/codon.config.php

    I added to the top (before anything, but within the PHP tags):

    if(isset($_GET['template']) && $_GET['template'] != '')
    {
    define('CURRENT_SKIN',$_GET['template']);
    }
    

    The Ideal Way:

    The Ideal way to do this for pilots would be to tweak that code to read a cookie that would have to be set elsewhere, but if you set it (Excellent Tutorial: http://www.w3schools.com/php/func_http_setcookie.asp) you could then call it with:

    $_COOKIE['template']

    instead of

    $_GET['template']

    If you guys want, I can try and play around with this and see if I can get an easy way to get this to work.. problem is when you update it'll get overwritten.

  4. Alright, fix is as follows:

    In layout.tpl replace:

    <link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/style.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/blue.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/ddsmoothmenu.css" />
    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/ie6.css" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/ie7.css" /><![endif]-->
       <?php echo $page_htmlhead; ?>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/surrealv1/js/pikachoose.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/surrealv1/js/ddsmoothmenu.js">
    
    /***********************************************
    * Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    
    <script type="text/javascript">
    	<!--
    
    	ddsmoothmenu.init({
    		mainmenuid: "navigation", //menu DIV id
    		orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
    		classname: 'menu', //class added to menu's outer DIV
    		//customtheme: ["#1c5a80", "#18374a"],
    		contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
    	})
    
    	$(document).ready(function(){
    		$("#pikame").PikaChoose();
    	});
    
    	-->
    </script>
    
    

    with:

    <link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/style.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/blue.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/ddsmoothmenu.css" />
    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/ie6.css" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="<?php echo SITE_URL?>/lib/skins/surrealv1/css/ie7.css" /><![endif]-->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/surrealv1/js/pikachoose.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/surrealv1/js/ddsmoothmenu.js">
    
    /***********************************************
    * Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    
    <script type="text/javascript">
    	<!--
    
    	ddsmoothmenu.init({
    		mainmenuid: "navigation", //menu DIV id
    		orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
    		classname: 'menu', //class added to menu's outer DIV
    		//customtheme: ["#1c5a80", "#18374a"],
    		contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
    	})
    
    	$(document).ready(function(){
    		$("#pikame").PikaChoose();
    	});
    
    	-->
    </script>
       <?php echo $page_htmlhead; ?>
    

×
×
  • Create New...