xpla Posted July 5, 2009 Posted July 5, 2009 Hi there, 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 ...". <?php echo $menu ?> 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.
xpla Posted July 5, 2009 Author Posted July 5, 2009 No, i want to change the html code behind. With css i'm very familiar.
featured_spectre Posted July 5, 2009 Posted July 5, 2009 then why are you configuring php if you want to do the HTML code?
xpla Posted July 5, 2009 Author Posted July 5, 2009 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 ...
featured_spectre Posted July 5, 2009 Posted July 5, 2009 ahh ok, i get you. I am unable to help, but have you tried the moodle forums on the moodle website?
secretlife Posted July 5, 2009 Posted July 5, 2009 (edited) 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.# Edited July 5, 2009 by secretlife
xpla Posted July 5, 2009 Author Posted July 5, 2009 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".
gaz350 Posted July 6, 2009 Posted July 6, 2009 fancy posting what you want to haappen here, perhaps even a little mock up image?
xpla Posted July 6, 2009 Author Posted July 6, 2009 Sorry for choosing the wrong Forum. It will be better if i'm asking directly on the moodle site for developers.
gaz350 Posted July 6, 2009 Posted July 6, 2009 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.
xpla Posted July 6, 2009 Author Posted July 6, 2009 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.
andykemp Posted July 6, 2009 Posted July 6, 2009 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]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now