have you tried in the style CSS?
i try to customize the header of my theme but i'm stuck with problem changing the output of the language chooser and the text "you're logged in ...".
<div class="headermenu"><?php echo $menu ?></div>
This is the part where i want to change the code behind, but i'm not able to find where $menu is set. I hope somebody could help me pls.
have you tried in the style CSS?
No, i want to change the html code behind. With css i'm very familiar.
then why are you configuring php if you want to do the HTML code?
In my Theme there's in header.html the php variabel $menu and i want to knwo, where moodle get's the code behind $menu ... And behind $menu there must be HTML and PHP ...
ahh ok, i get you. I am unable to help, but have you tried the moodle forums on the moodle website?
What precisely do you want to change? Do you mean the words "you're logged in as"? Forget looking in the code on your server.
Go to your Moodle >site admin on the front page>language>language editing>edit words and phrases.
Select the one that says moodle.php and scroll down until you find the text you want to change.
While you can alter the default text within the actual php files this is a far quicker and simpler way of editing any of Moodle's language.#
Last edited by secretlife; 5th July 2009 at 05:31 PM.
Sorry that i wrote a little bit inapprehensible.
I don't want to change any language strings. I want to change the code behind where the output is created! I want to hack the source code to create an output i'll like to have! So i need to know where $menu is "created".
fancy posting what you want to haappen here, perhaps even a little mock up image?
Sorry for choosing the wrong Forum. It will be better if i'm asking directly on the moodle site for developers.
i think you just need to be clearer in your posts. as we cant help you if we dont know what your trying to do.
My post is clear. I want to know where moodle "creates" the $menu variable in header.html of a theme. There's the login and the language selection. I want to modify the html behing the language selection and the login and this is stored in a variable named $menu.
The reason no-one has answered you is that it isn't as simple as you might have liked...
$menu isn't defined in only one place!
However depending on what you want to do that might not matter - but you haven't given any indication of what you actually want to achieve...
Most of the definitition of $menu takes place in /lib/weblib.php around line 2551
However I would caution you against hacking around too much in core files as it creates huge problems when it comes to upgrades (he says speaking from experience!)
If you are only looking to make a few changes, I would try and do it either through langauge strings or using JS to change things after they are printed... This way upgrades are not an issue.
Alternatively don't edit $menu, but instead don't call $menu in header.html but instead just call the functions that do the bits you are interested in (finding the functions from within weblib.php etc)...
Full details of where $menu is defined and also where it is used cand be found:
PHPXref 0.7: Moodle 1.9.3 [Build 15-Oct-2008]
There are currently 1 users browsing this thread. (0 members and 1 guests)