having issues with class php function and lemonade function

59 views
Skip to first unread message

Russell Harrower

unread,
Sep 5, 2012, 7:45:51 PM9/5/12
to limo...@googlegroups.com
The issue I am having is I use a class function and then i use lemonade-php function as well and the two seem not to like each other.

on my index.php page I have the following

require_once("system/limonade.php");
require_once("system/core.php");

$redi = new syscore();
$redi->connect($siteDBUserName,$siteDBPass,$siteDBURL,$siteDBPort,$siteDB);

include("templates/{$siteTemp}/header.tpl");

 dispatch_get("/**", "main");
 function main(){
 

  if(is_dir("plugins".params(0)) && params(0) != "")
{
print "checking to see if plugin active";
}
else
{


set('post_url',  params(0));
require render("templates/main/fullwidth.tpl");
return render('fullwidth');


 }
 
 dispatch_get("/plugins/**", "plugin");
 function plugin(){
  $plugin = params(0);
print $plugin;
 }
run();

I know the core.php class function syscore is working cos in the header.tpl i call for the menu and it shows (you see no lemonade code there)

but when I require  

set('post_url',  params(0));
require render("templates/main/fullwidth.tpl");
return render('fullwidth');

it will send the post_url however I can seem to keep the $redi working, it says it can find the $redi->post() function which is in the core.php

the fullwidth.tpl file has the following

<?php
function fullwidth($vars){ extract($vars);
print h($post_url);
print_r($redi->post(h($post_url)));
}
?>


if someone could help solve this issue that would be helpful. I must be doing something wrong.

thanks
Russell Harrower 

Fabrice Luraine

unread,
Mar 11, 2013, 1:13:53 PM3/11/13
to limo...@googlegroups.com
 Hello Russel,

why are you trying to require the output of your template ?

    require render("templates/main/fullwidth.tpl");
Reply all
Reply to author
Forward
0 new messages