BLOG:CMS :: Support Forum

Support Forum for BLOG:CMS

You are not logged in.

#1 03.07.2007 17:31

statiq
BLOG:CMS Junior
From: Seattle, WA
Registered: 03.07.2007
Posts: 37
Website

Nesting Pre-Existing PHP Pages into Skins

I have created a skin that works great for the majority of my pages, however 2 of my pre-existing pages cannot load when using the skins, which I believe is because I am not sure what syntax to use and where the appropriate location/method would be to load in the center content panel.

Currently I have a photo gallery index page with the following, and I can't figure out where/when this should be called.
<?php require("loadgallery.php"); ?>

Then I am attempting to run this function in the Main Index skin section to render the actual photos.
<?php gallery(); ?>

I've tried <%phpcontent(index.php)%> to grab the require statement as well, but i think the require needs to be ran on the actual page load.
-------
I assume if I can get the above working that will help get me going on my other page which has a similar issue of getting this code to work in a skin, but just in case it requires a different method this is what I need to have loaded in a skin as well:

    <style type="text/css" media="screen">
        <!-- @import url("css/style.css"); -->
    </style>
<script type="text/javascript" language="JavaScript" src="js/load.js"></script>
  </head>
  <body onload="start()">
  <h1>Site Breakdown</h1>
        <?php
            include("render.php");
            $cwd = basename(getcwd());
            $filter=new filter();
            $filter->add_dir($cwd);
            $filter->add_dir_reg("/^\..*$/");
            $filter->add_extension("inc");
            $filter->add_file_reg("/^\..*$/");
            $filter->add_file_reg("/^.*~$/");
            $explorer = new render();
             $explorer->set_filter($filter);   
            $explorer->run("..");
?>


:: StatiQ is running BLOG:CMS 4.2.0 ::

Offline

 

#2 21.11.2007 17:56

statiq
BLOG:CMS Junior
From: Seattle, WA
Registered: 03.07.2007
Posts: 37
Website

Re: Nesting Pre-Existing PHP Pages into Skins

I haven't found a way to do this yet, but have done a workaround with IFRAME to embed the page.


:: StatiQ is running BLOG:CMS 4.2.0 ::

Offline

 

#3 26.12.2007 23:22

statiq
BLOG:CMS Junior
From: Seattle, WA
Registered: 03.07.2007
Posts: 37
Website

Re: Nesting Pre-Existing PHP Pages into Skins

If anyone comes up with a better idea, that would be fantastic. The IFrame works, but for any content that needs to be stretched farther than the parameters set, it looks like garbage.


:: StatiQ is running BLOG:CMS 4.2.0 ::

Offline

 

#4 02.01.2008 19:59

Radek Hulán
Site Admin
From: Prague, Czech Republic
Registered: 17.03.2004
Posts: 2509
Website

Re: Nesting Pre-Existing PHP Pages into Skins

You should use <%phpinclude()%> to include a file, <%phpcontent()%> will evaluate the code instead of including it.


--= BLOG:CMS developer =--

Offline

 

#5 03.01.2008 00:34

statiq
BLOG:CMS Junior
From: Seattle, WA
Registered: 03.07.2007
Posts: 37
Website

Re: Nesting Pre-Existing PHP Pages into Skins

I gave this a go, but having problems so far. Is the phpcontent only good for one line?

Would this fly? Or do I need to do a phpcontent for each line? and can i leave the include in there or do I need to call that separately?
<%phpcontent(
                include("maphp/maphp.php");
                $cwd = basename(getcwd());
                $filter=new filter();
                $filter->add_dir($cwd);
                $filter->add_dir_reg("/^..*$/");
                $filter->add_extension("inc");
                $filter->add_extension("db");
                $filter->add_file_reg("/^..*$/");
                $filter->add_file_reg("/^.*~$/");
                $user = $_SERVER['PHP_AUTH_USER'];
                $permlist = $perms[$user];
                foreach($permlist as $perm) {
                        $filter->add_dir_allowance($perm);
                }
                $explorer = new maphp();
                $explorer->set_filter($filter);
                $explorer->run("/videos");

)%>


:: StatiQ is running BLOG:CMS 4.2.0 ::

Offline

 

#6 03.01.2008 01:04

Radek Hulán
Site Admin
From: Prague, Czech Republic
Registered: 17.03.2004
Posts: 2509
Website

Re: Nesting Pre-Existing PHP Pages into Skins

phpcontent can handle multiple lines. Try calling include() with absolute paths, not relative ones.


--= BLOG:CMS developer =--

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

TOPlist