You are not logged in.

#1 2005-10-29 13:46:57

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

e107 and PRIMAL

I am trying to integrate primal into the CMS I use.  I have discovered that basically any custom page can be created using the following template

<?php
require_once("class2.php");
require_once(HEADERF);

$caption = "caption text";
$text = "body text";
$aj = new textparse;
$caption = $aj -> tpa($caption, "on");
$text = $aj -> tpa($text, "on","admin");
$ns -> tablerender($caption, $text);

require_once(FOOTERF);
?>

I was wondering how I could wrap that around the print $content; command in index.php and action.php?  From there I know it is just a matter of template tweaking, which is the easy bit.

PRIMAL source is here http://hermes.cactuswax.net/scm/viewcvs … mal/trunk/

Offline

#2 2005-10-30 13:05:42

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: e107 and PRIMAL

OK, I did some tweaking and came up with this:

require_once("../class2.php");
require_once(HEADERF);
$caption = "caption text";
$text = file_get_contents('tpl/index.tpl');
$aj = new textparse;
$caption = $aj -> tpa($caption, "on");
$text = $aj -> tpa($text, "on","admin");
$ns -> tablerender($caption, $text);

require_once(FOOTERF);

i.e. completey ignoring the $content var.  It now displays correctly withing the CMS but all of the info that should be read from teh config files suddenly gets f'ed up.  I'm sure someone can fix this easily smile

Offline

Board footer

Powered by FluxBB