cotonti.com : CSS Menu Current https://www.cotonti.com Son konu mesajları Cotonti en Thu, 09 Oct 2025 03:26:05 -0000 GHengeveld
{PHP.xk} Source key for submitting form fields
{PHP.i} Iterator, often used in loops (not always)
{PHP.usr.*} Various information about the current user/visitor
{PHP.cfg.*} Various configuration variables]]>
Cmt, 18 Eyl 2010 17:58:10 -0000
ez
@pieter,
I find them by looking through the code.. (but that is huge).
Most of them are in commons.php (guesing here, i do not have source code present) I believe.]]>
Cum, 17 Eyl 2010 22:40:48 -0000
Kort Cum, 17 Eyl 2010 22:36:12 -0000 pieter
Is there a way to find those variables?
Maybe I can help with this.]]>
Cum, 17 Eyl 2010 22:30:27 -0000
ez Cum, 17 Eyl 2010 21:49:06 -0000 Kort
ps. as you might know, z can be admin, forums, index, message, page, pfs, polls, pm, plug or users]]>
Cum, 17 Eyl 2010 21:43:59 -0000
ez The z I have never used...

Question still remains is there a list somewhere of available var's (the usefull ones, NOT all)

tnx :)]]>
Cum, 17 Eyl 2010 21:39:12 -0000
Kort ez, you're forgetting obvious things :)]]> Cum, 17 Eyl 2010 20:41:09 -0000 ez
You mention {PHP.z}, {PHP.e}... (what does this mean ???)

Is there a list, somewhere, for usable var's? (I know only a few)
I would realy like to know, because it is usefull for skin-design.

tnx]]>
Cum, 17 Eyl 2010 20:13:43 -0000
Kort This is what we used sometime ago for this purpose: highlighter_183.zip (requires Cotlib Library)]]> Cum, 17 Eyl 2010 17:19:55 -0000 GHengeveld Cum, 17 Eyl 2010 01:39:19 -0000 urlkiller do you really need to put that in the footer if it is encapsuled in a document ready function?
as i understand it the doc ready function is there for implementing it in the header.]]>
Cum, 17 Eyl 2010 01:37:34 -0000
Twiebie
Edit: Gives another problem with pages. When i'm viewing for example the page: page.php?id=44, the button for page page.php?id=4 is also highlighted.. Any ideas?

Thanks.]]>
Per, 16 Eyl 2010 07:32:12 -0000
GHengeveld
<script type="text/javascript"> 
$(document).ready(function(){
    $('#cssmenu a').each(function(){
        if('{PHP.out.uri}'.indexOf($(this).attr('href')) == 0) { $(this).addClass('active'); }
        if($(this).attr('href') == 'index.php' && '{PHP.out.uri}' == '') { $(this).addClass('active'); }
    });
});
</script>

indexOf looks for the first instance and returns its position. Position 0 is at the beginning of the string.]]>
Per, 16 Eyl 2010 06:57:34 -0000
Twiebie
Edit: Got an issue - when viewing for example a topic in the forums, it doesn't keep the Forums button highlighted?]]>
Per, 16 Eyl 2010 04:26:31 -0000
GHengeveld
<script type="text/javascript"> 
$(document).ready(function(){
    $('#cssmenu a').each(function(){
        if($(this).attr('href') == '{PHP.out.uri}') { $(this).addClass('active'); }
        if($(this).attr('href') == 'index.php' && '{PHP.out.uri}' == '') { $(this).addClass('active'); }
    });
});
</script>

Use .active in your css for the currently active menu item. You can replace 'index.php' in the second if statement with the link of your default page (index) if you need to. See my website for an example.]]>
Per, 16 Eyl 2010 00:44:35 -0000
Twiebie
I'd like to have the link that is active highlighted, for example when somebody is on the Forums page, the Forum link is highlighted.

My html at the moment:

<div class="cssmenu">
<ul id="cssmenu">
<li><a href=https://www.cotonti.com/"index.php">Home</a></li>
<li><a href=https://www.cotonti.com/"plug.php?e=contactus">Contact</a></li>
<li><a href=https://www.cotonti.com/"page.php?id=4">Roster</a></li>
<li><a href=https://www.cotonti.com/"forums.php">Forums</a></li>
<li><a href=https://www.cotonti.com/"page.php?id=5">Gameserver</a></li>
<li><a href=https://www.cotonti.com/"list.php?c=files">Files</a></li>
<li><a href=https://www.cotonti.com/"plug.php?e=search">Search</a></li>
<li><a href=https://www.cotonti.com/"page.php?id=39">Chat</a></li>
<li><a href=https://www.cotonti.com/"page.php?id=44">Recruitment</a></li>
<li><a href=https://www.cotonti.com/"http://www.dev-enter.net/stats/" target="_blank">Stats</a></li>
</ul>
</div>

I was thinking using for example:
<li><a href=https://www.cotonti.com/"index.php" id="current">Home</a></li>

It does highlight the button, but it will keep it highlighted on different pages aswell, probably because the menu is not in seperate files, but all in the header.tpl.

Any ideas how to fix this?]]>
Çrş, 15 Eyl 2010 23:16:53 -0000