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?

[size=xx-large]Where is my variable?[/size]
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!


[size=xx-large]I CAN![/size]

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

389 user(s) are online (296 user(s) are browsing Support Forums)


Members: 0


Guests: 389


more...

Donat-O-Meter

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

Latest GitHub Commits