Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2009-07-19 00:48:35

M@x
Member
From: 127.0.0.1
Registered: 2008-05-17
Posts: 26
Website

Add "current class" in brdmenu

Hello,

I actually test to use a new style in fluxbb 1.4. But i want use a specific image when im on a page.

Example :
Im on index, i change menu index image
Im on member list, i change member list image

I know how to make these changes but I would like to know if it was possible to integrate that basic fluxbb ?

How to ?!

Add in Index, Rules, UserList, Search, Profil and Administration before header include :

$current_page = 'index';

Edit in header :

$tpl_main = str_replace('<pun_navlinks>','<div id="brdmenu" class="inbox">'."\n\t\t\t". generate_navlinks()."\n\t\t".'</div>', $tpl_main);

By :

$tpl_main = str_replace('<pun_navlinks>','<div id="brdmenu" class="inbox">'."\n\t\t\t". generate_navlinks(isset($current_page) ? $cuccent_page : null)."\n\t\t".'</div>', $tpl_main);

And update in include/functions.php

function generate_navlinks()

by

function generate_navlinks($current_page)

And add in all function links

$links[] = '<li id="navindex"'.((!empty($current_page)) ? 'class="current"' : null).'><a href="index.php">'.$lang_common['Index'].'</a>';

It's possible ? I think it's a good update for all style creator.

Thanks for read and sorry for my very bad english tongue

Last edited by M@x (2009-07-19 11:46:26)

Offline

#2 2009-07-19 10:07:12

kierownik
Member
From: Tilburg, Netherlands
Registered: 2008-05-10
Posts: 339

Re: Add "current class" in brdmenu

I would rather see a define like:

define('FORUM_PAGE', 'index');

just like in fluxbb 1.3


My GitHub Profile

Offline

#3 2009-07-19 11:48:00

M@x
Member
From: 127.0.0.1
Registered: 2008-05-17
Posts: 26
Website

Re: Add "current class" in brdmenu

kierownik wrote:

I would rather see a define like:

define('FORUM_PAGE', 'index');

just like in fluxbb 1.3

No problem. This is more or less identical.

PS : I update my first post. (class="current")

Offline

Board footer

Powered by FluxBB