1
fatman
admin blocks ? anyone tried
  • 2003/12/19 5:04

  • fatman

  • Friend of XOOPS

  • Posts: 176

  • Since: 2003/12/13


I had this idea while reading through the forums looking for a way to get Smarty functionality available in the control panel. Doesn't look like it can be done.

Has anyone just built admin functions as module blocks with block templates? I thought I could build all my admin functions as blocks, load them with my various modules. Then I could have another 'admin' module to provide access to specific blocks using the control panel.

Anyone see fault in this approach or know anything about the roadmap for the control panel?

I really want to avoid mixing layout and php. Alternatively if anyone knows of a way to hack smarty functionality into the control panel area. I'd like to know.

I tried the following with no luck. Just a blank page but with the cp header and footer.

/module/mymod/admin/test.php
PHP
include('admin_header.php');
include(
XOOPS_ROOT_PATH.'/class/smarty/Smarty.class.php');

// create object
$smarty = new Smarty;

// assign some content.
$smarty->assign('name''george smith');
$smarty->assign('address''45th & Harris');

// display it
xoops_cp_header();
$smarty->display('test.tpl');
xoops_cp_footer();
?>

test.tpl

<{$name}>
<{$address}>


Login

Who's Online

969 user(s) are online (230 user(s) are browsing Support Forums)


Members: 0


Guests: 969


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits