xoops forums

phred

Just popping in
Posted on: 2004/7/23 12:09
phred
phred (Show more)
Just popping in
Posts: 3
Since: 2004/7/23
#1

xoops_module_header

I would like to try some custom php code in my theme header (theme.html)

I see the placeholder <{$xoops_module_header}> but cannot find where to put my code. Is $xoops_module_header a special module or defined somehwere else?

Thank you!

Herko

XOOPS is my life!
Posted on: 2004/7/23 12:25
Herko
Herko (Show more)
XOOPS is my life!
Posts: 4238
Since: 2002/2/4 1
#2

Re: xoops_module_header

It's where modules can add their specific info to a theme file, thus providing, for instance, menu code or display variables.

Herko

phred

Just popping in
Posted on: 2004/7/23 12:32
phred
phred (Show more)
Just popping in
Posts: 3
Since: 2004/7/23
#3

Re: xoops_module_header

Thank you for the fast reply Herko.

Yes, I wish to experiment with PHP Layers Menu system.

Do I need a particular module to introduce the header code?

Thanks!

-fred

Dave_L

XOOPS is my life!
Posted on: 2004/7/23 12:39
Dave_L
Dave_L (Show more)
XOOPS is my life!
Posts: 2277
Since: 2003/11/7
#4

Re: xoops_module_header

Here's an example of using it. This would be located in the same place that you assign your other template variables.

$xoopsTpl->assign('xoops_module_header''
   <link rel="stylesheet" type="text/css" media="screen" href="' 
.XOOPS_URL'/modules/chess/include/style.css" />
   <script type="text/javascript" language="javascript" src="' 
.XOOPS_URL'/modules/chess/include/chess.js"></script>
'
);

phred

Just popping in
Posted on: 2004/7/23 12:47
phred
phred (Show more)
Just popping in
Posts: 3
Since: 2004/7/23
#5

Re: xoops_module_header

Thank you.

I will try to figure out where I assign other template variables.

-fred

M4d3L

Just popping in
Posted on: 2004/8/17 13:12
M4d3L
M4d3L (Show more)
Just popping in
Posts: 60
Since: 2002/11/18
#6

Re: xoops_module_header

Hi

I have try to add this

...
global 
$xoopsTpl;
$xoopsTpl->assign('xoops_module_header''<link rel="stylesheet" type="text/css" href="carriere.css"/>');
...




But thats not work... why?

Dave_L

XOOPS is my life!
Posted on: 2004/8/17 13:25
Dave_L
Dave_L (Show more)
XOOPS is my life!
Posts: 2277
Since: 2003/11/7
#7

Re: xoops_module_header

You might need a full path in the "href" attribute. See my example above.

Does the "link rel" show up in the HTML source for the generated page?

If you turn on Smarty debug, does xoops_module_header have the right value?

Does the theme you're using have xoops_module_header in its theme.html file?

M4d3L

Just popping in
Posted on: 2004/8/17 13:31
M4d3L
M4d3L (Show more)
Just popping in
Posts: 60
Since: 2002/11/18
#8

Re: xoops_module_header

Yes xoops_module_header is in the theme.

in smarty debug, xoops_module_header dont exist!!!

Dave_L

XOOPS is my life!
Posted on: 2004/8/17 15:05
Dave_L
Dave_L (Show more)
XOOPS is my life!
Posts: 2277
Since: 2003/11/7
#9

Re: xoops_module_header

You didn't answer my first question.

Try adding some debug text in theme.html, and see if the text is displayed:

[color=ff0000]before xoops_module_header[/color]
<{
$xoops_module_header}>
[
color=ff0000]after xoops_module_header[/color]

hervet

Friend of XOOPS
Posted on: 2004/8/17 17:10
hervet
hervet (Show more)
Friend of XOOPS
Posts: 2267
Since: 2003/11/4
#10

Re: xoops_module_header

Yoyo,

Why are you posting here and on XOOPS France ???
And above all, you had the same question !