1
RicoCali
How do I do this without hacking the core?
  • 2003/12/3 19:41

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


I am working on horizontal menu system in the form of a template tag. The template tag will be "<{xoops_hmenu}>" This tag can be placed in your theme.html it will dynamically generate a horizontal menu with pulldowns just like the "main menu" but going horizontal. The only problem is I would have to hack the "header.php" file to do this. I don't want to touch the "header.php" file. Does anyone have a clean way to do this without code hacking the "header.php" file?

2
wtravel
Re: How do I do this without hacking the core?

Hi,

I built in a few things in a new file. If you include the file into one of the files that are always included you can manage it. The only thing you need to remember is to adjust that file again upon possible upgrade

Regards,

Martijn

3
RicoCali
Re: How do I do this without hacking the core?
  • 2003/12/3 21:00

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


Thats exactly what I'm doing right now and thats exactly what I want to avoid.

Thank you...

4
Mithrandir
Re: How do I do this without hacking the core?

Can't see how you can include something one every page on the site without adding it to one of the files included in the core.

As long as you just have that extra file, you include in header.php it should be easy enough to update when XOOPS is updated.

5
RicoCali
Re: How do I do this without hacking the core?
  • 2003/12/3 21:25

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


Yes I agree but 1 turns into 2 and 2 turns into 4 and 4 turns into 8 and so on. As simple as it may sound, it gets complicated to remember all this when you recieve an update. As simple as it is to do anything, I just hate to kludge. PHPNuke is nothing but that...a kludge. If the developers would add something in the header.php file such as:

include "extra.php";

...we can have extra flexibility to add template variables to the the theme without mucking with the original file

6
zaax
Re: How do I do this without hacking the core?
  • 2003/12/3 21:36

  • zaax

  • Just popping in

  • Posts: 21

  • Since: 2002/12/17


hello RicoCali..,

is´nt it as esay to place
<{include file="themname/theme_navigation.html"}>
before e.g. your first table ??
direktly in the theme.html or do i misunderstand the problem ?

michael

7
mvandam
Re: How do I do this without hacking the core?
  • 2003/12/3 21:42

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Quote:

If the developers would add something in the header.php file such as:

include "extra.php";

...we can have extra flexibility to add template variables to the the theme without mucking with the original file

Something like this is probably a good idea for themes which include stuff that is normally part of a block etc. Though instead of "extra.php" a better name might be "theme_init.php" or something, where this file would be located in the directory of the particular theme you are using.

8
RicoCali
Re: How do I do this without hacking the core?
  • 2003/12/3 22:03

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


Quote:

mvandam wrote:
Though instead of "extra.php" a better name might be "theme_init.php" or something, where this file would be located in the directory of the particular theme you are using.


I agree...Thats why you are the annointed core developer and I'm not . But yes that is excellent. Very descriptive.

9
RicoCali
Re: How do I do this without hacking the core?
  • 2003/12/3 22:05

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


Quote:

zaax wrote:
hello RicoCali..,

is´nt it as esay to place
<{include file="themname/theme_navigation.html"}>
before e.g. your first table ??
direktly in the theme.html or do i misunderstand the problem ?

michael


B I N G O ! ! ! Thats it zaaz! I wish I was smart as you .

Login

Who's Online

399 user(s) are online (281 user(s) are browsing Support Forums)


Members: 0


Guests: 399


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