11
DonXoop
Re: Why isn

^^^^agreed

For safety you want as little dependence on the rest of the site in order to administer it. The admin area sorely needs some work and to be "smarter" but not "smarty'd"

Database admin is another function that shouldn't depend on a working core to function.

12
Mithrandir
Re: Why isn

The admin area WILL be smartyfied in 2.1 - however, we will also create an "AAARRRGGGGHhhhhh" page (probably called something different ) if everything goes belly-up, so you can at least enable debug settings and change the theme/template set to a working default.

13
Herko
Re: Why isn
  • 2004/11/29 12:49

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


I kinda like that name for the button: Aaarrggh! for experienced users, 'Panic!!' for newbies

Herko

14
dejadingo
Re:Why isn't smarty used in admin scripts
  • 2004/11/29 18:23

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


Interesting that what Mithrandir recommended is exactly what I tried, but the template never displayed. I still don't understand what is missing.

I have
include '../../../include/cp_header.php';

function 
eventAdmin($status=0)
{
    
$xoopsDB =& Database::getInstance();
    
$myts =& MyTextSanitizer::getInstance();
    
xoops_cp_header();
        if (!isset(
$xoopsTpl)) {
          
$xoopsTpl = new XoopsTpl();
        }
    
$xoopsOption['template_main'] = 'smarty_AdminListForm.html';

    
$xoopsTpl->assign('lang_title'_MI_DJE_ADMINTITLE);
        ...
blah-blah-blah...
        
xoops_cp_footer();
}

and no content appears inside the addmin theme wrapper.

Should I just give up on this until XOOPS 2.1?

15
Dave_L
Re:Why isn't smarty used in admin scripts
  • 2004/11/29 18:50

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The admin side doesn't automatically display templates, so after assigning your template variables, you need:

$xoopsTpl->display("db:{$xoopsOption['template_main']}");


You need to make sure that the template has been loaded into the database via your xoops_version.php file.

I would also temporarily add at the beginning of your code:

error_reporting(E_ALL); #*#DEBUG#

16
dejadingo
Re:Why isn't smarty used in admin scripts
  • 2004/11/29 18:56

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


The magic bullet!
Thanks a million ...

Login

Who's Online

186 user(s) are online (137 user(s) are browsing Support Forums)


Members: 0


Guests: 186


more...

Donat-O-Meter

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

Latest GitHub Commits