1
LazyBadger
Where MY variable???

2.0.13.2 under deep view is BIG DISASTER

Some time ago I added into header.php new smarty-variable definition

$xoopsTpl->assign('xoops_modulename',$xoopsModule->getVar('name'));

this string still exist in file, but no variable can be found
What is this hell???

How anybody can use such unreliable scrap of code?

Where is my variable?
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition

2
frankblack
Re: Where MY variable???
  • 2005/11/24 13:42

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Oh boy! Daisy Fletcher gets boring to me (others as well?).

Look up header.php for this code:

if (isset($xoopsModule) && is_object($xoopsModule)) {
        
// set page title
        
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->getVar('name'));
        
$xoopsTpl->assign('xoops_dirname'$xoopsModule->getVar('dirname'));
        
$moduleid $xoopsModule->getVar('mid');
        if (
preg_match("/index.php$/i"xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname')) {
            
$toppage true;
        }
}


Insert your code there!

if (isset($xoopsModule) && is_object($xoopsModule)) {
        
// set page title
        
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->getVar('name'));
        
$xoopsTpl->assign('xoops_dirname'$xoopsModule->getVar('dirname'));
        [
color=ff0000][b]$xoopsTpl->assign('xoops_modulename',$xoopsModule->getVar('name'));[/b][/color]
        
$moduleid $xoopsModule->getVar('mid');
        if (
preg_match("/index.php$/i"xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname')) {
            
$toppage true;
        }
    }


Do you know how to call smarty-variables in themes or templates? Guess not!

This is the correct code for themes and templates:

<{$xoops_modulename}>


My courtesy does not allow me to tell what I am thinking of you and your behaviour...

3
LazyBadger
Re: Where MY variable???

#OOPS#ed hell
1. I know, what and where must be added
2. It was done some versions ago (exactly the same change)
3. I can't see this smarty-var in smarty-debug window!
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition

4
frankblack
Re: Where MY variable???
  • 2005/11/24 14:37

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Quote:
I can't see this smarty-var in smarty-debug window!


I CAN!

Poor sod! I guess you are victim of a conspiracy between XOOPS-Mithrandir and XOOPS-Herko trying to sabotage your sites. LOL

No, honestly! I am puzzled. Try to echo the module-name. If this gives you no luck $xoopsModule is not set, but I assume you will get around this?!?

Login

Who's Online

252 user(s) are online (173 user(s) are browsing Support Forums)


Members: 0


Guests: 252


more...

Donat-O-Meter

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

Latest GitHub Commits