1
Aianda
trouble with the $xoops_module_header
  • 2007/5/15 21:46

  • Aianda

  • Just popping in

  • Posts: 71

  • Since: 2004/2/12


Hello I was wondering how to utilise the $xoops_module_header statement properly in the main theme.html file.

I am using the news module and would like that module to display a simple piece of html (shown below) in the head of that module's pages, but rather than put that HTML in the main theme.html file and have it show up in all pages, I am seeking to utilise the header.php of that module.

So far what I've done is made that /modules/news/header.php like this:


include_once '../../mainfile.php';
echo ""; //this is the new line to be included at the top of each news module page


Yet when I turn the module's cache off, that HTML Javascript reference doesn't show up in the generated page code, and I am expecting it given the main theme.html template has the following code in it:


<{$xoops_module_header}>

What am I doing wrong? Does my news module need to be updated? I have tried to work this through but have not been able to so far, please help.

2
martyboy
Re: trouble with the $xoops_module_header
  • 2007/5/15 22:06

  • martyboy

  • Quite a regular

  • Posts: 256

  • Since: 2004/5/25


You can add code in the news modules template files, goto system>admin>templates and click on the news templates a list of the template files will show up, you probably need to add your code to the news index.html template.

You will have to clone the default template set first before you can edit the template files.
Michael Jackson = King Of Pop

Xoops = King Of CMS

3
Aianda
Re: trouble with the $xoops_module_header
  • 2007/5/15 22:39

  • Aianda

  • Just popping in

  • Posts: 71

  • Since: 2004/2/12


the issue there is being unable to access the part of the document

4
skenow
Re: trouble with the $xoops_module_header
  • 2007/5/15 22:42

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


You will need to find where the module header is defined in and modify it before it gets assigned to the template. Just do a search for $xoops_module_header in the files in the news module folder. You will probably find several occurances of something like this -
$module_header art_getModuleHeader($_template);
    
$xoopsTpl -> assign("xoops_module_header"$module_header);

5
Aianda
Re: trouble with the $xoops_module_header
  • 2007/5/16 2:25

  • Aianda

  • Just popping in

  • Posts: 71

  • Since: 2004/2/12


in modules/news/includes/functions.php

added:

$content .= '';

above:

$xoopsTpl->assign('xoops_module_header', $content);


thank you skenow.

that issue had been a plague for ages

6
skenow
Re: trouble with the $xoops_module_header
  • 2007/5/16 3:09

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


I've gotten lucky again! Even a blind squirrel can find a nut once in a while

Login

Who's Online

304 user(s) are online (228 user(s) are browsing Support Forums)


Members: 0


Guests: 304


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