Virtual Learning Platforms Thread, $menu in header in Technical; Hi there,
i try to customize the header of my theme but i'm stuck with problem changing the output of ...
-
5th July 2009, 02:30 PM #1
- Rep Power
- 0
$menu in header
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 ...".
<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.
-
-
IDG Tech News
-
5th July 2009, 02:43 PM #2 have you tried in the style CSS?
-
-
5th July 2009, 03:19 PM #3
- Rep Power
- 0
No, i want to change the html code behind. With css i'm very familiar.
-
-
5th July 2009, 03:22 PM #4 then why are you configuring php if you want to do the HTML code?
-
-
5th July 2009, 03:25 PM #5
- Rep Power
- 0
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 ...
-
-
5th July 2009, 03:28 PM #6 ahh ok, i get you. I am unable to help, but have you tried the moodle forums on the moodle website?
-
-
5th July 2009, 05:28 PM #7 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.
-
-
5th July 2009, 06:08 PM #8
- Rep Power
- 0
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".
-
-
6th July 2009, 09:19 AM #9 fancy posting what you want to haappen here, perhaps even a little mock up image?
-
-
6th July 2009, 09:42 AM #10
- Rep Power
- 0
Sorry for choosing the wrong Forum. It will be better if i'm asking directly on the moodle site for developers.
-
-
6th July 2009, 09:44 AM #11 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.
-
-
6th July 2009, 09:46 AM #12
- Rep Power
- 0
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.
-
-
6th July 2009, 07:53 PM #13
- Rep Power
- 7
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]
-
SHARE:
Similar Threads
-
By beeswax in forum EduGeek Joomla 1.5 Package
Replies: 3
Last Post: 24th January 2009, 06:44 PM
-
By SYSMAN_MK in forum EduGeek Joomla 1.5 Package
Replies: 12
Last Post: 30th June 2008, 05:20 PM
-
By apoth0r in forum EduGeek Joomla 1.0 Package
Replies: 4
Last Post: 25th February 2008, 08:26 PM
-
By dagza in forum EduGeek Joomla 1.0 Package
Replies: 2
Last Post: 21st January 2008, 10:14 PM
-
By FN-GM in forum EduGeek Joomla 1.0 Package
Replies: 24
Last Post: 9th December 2007, 12:48 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules