1

Topic: loose style sheet when call Header.Php

ver 1.1.2

loose style sheet when call Header.php ,
when build my home page to show same header from PunBB

line 124 file header.php

<link rel="stylesheet" type="text/css" href="style/<?php echo $style.'.css' ?>">

to

<link rel="stylesheet" type="text/css" href="<?php echo $pun_config['o_base_url'].'/style/'.$style.'.css' ?>">

If your people come crazy, you will not need to your mind any more.

Re: loose style sheet when call Header.Php

I'm not sure I understand what you're asking, but if you want to do what I've done here at punbb.org (the "Style" selected in your profile applies to the whole website), you need to include common.php so that it can fetch the user info from the database. Have a look at this topic:

http://punbb.org/forums/viewtopic.php?pid=9727#9727

The first piece of code there should work. You may have to change $pun_root to point to your forums directory, but once you've included that code, you have access to $cur_user['style'] which is the style selected by the current user. If it isn't set, you have to choose a default style.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: loose style sheet when call Header.Php

it not a bug ist a  Troubleshooting, sorry for rash post.

my Troubleshoot
i want to give my home page header and my Mods (Addons) as like in forum, i mean the Navigateor

Home | User list | Rules | Search | Profile | Logout

so, i include a header.php as like use it in forum (need some includes also) and work good but :

the forum is in      www.parmaja.com/forum/
my home page from www.parmaja.com/index.php
all link an NAV are reefer to root link
for User list
www.parmaja.com/userlist.php
not to
www.parmaja.com/forum/userlist.php

and style sheet has this problem
all url link broken when include part of forum from outside of forum like

www.parmaja.com/fileman my file manager is also need same header of forum

that mean if i want to build addon (mod) for forum PunBB that force me to upload index.php of File Manager into a forum directory.

thanks

If your people come crazy, you will not need to your mind any more.

4 (edited by guardian34 2006-12-28 01:02)

Re: loose style sheet when call Header.Php

Thought I saw this somewhere? I was just integrating a page and had this problem?

The header.php file and the `generate_navlinks()` function assumes all files are in the PunBB folder. For the style link, I added `PUN_ROOT` to the URL; For the navlinks, I added this:

'.$pun_config['o_base_url'].'/

Edit: I saw that this is fixed in v1.3. smile