+ Post New Thread
Results 1 to 13 of 13
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 ...
  1. #1

    Join Date
    Jul 2009
    Posts
    6
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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.

  2. #2

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,783
    Thank Post
    1,623
    Thanked 1,877 Times in 1,395 Posts
    Blog Entries
    2
    Rep Power
    422
    have you tried in the style CSS?

  3. #3

    Join Date
    Jul 2009
    Posts
    6
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    No, i want to change the html code behind. With css i'm very familiar.

  4. #4

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,783
    Thank Post
    1,623
    Thanked 1,877 Times in 1,395 Posts
    Blog Entries
    2
    Rep Power
    422
    then why are you configuring php if you want to do the HTML code?

  5. #5

    Join Date
    Jul 2009
    Posts
    6
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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 ...

  6. #6

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,783
    Thank Post
    1,623
    Thanked 1,877 Times in 1,395 Posts
    Blog Entries
    2
    Rep Power
    422
    ahh ok, i get you. I am unable to help, but have you tried the moodle forums on the moodle website?

  7. #7

    Join Date
    Dec 2007
    Location
    Preston
    Posts
    364
    Thank Post
    14
    Thanked 84 Times in 77 Posts
    Rep Power
    30
    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.

  8. #8

    Join Date
    Jul 2009
    Posts
    6
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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".

  9. #9
    gaz350's Avatar
    Join Date
    Jul 2007
    Location
    Rutland, east.leicestershire :P
    Posts
    579
    Thank Post
    47
    Thanked 49 Times in 41 Posts
    Rep Power
    28
    fancy posting what you want to haappen here, perhaps even a little mock up image?

  10. #10

    Join Date
    Jul 2009
    Posts
    6
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Sorry for choosing the wrong Forum. It will be better if i'm asking directly on the moodle site for developers.

  11. #11
    gaz350's Avatar
    Join Date
    Jul 2007
    Location
    Rutland, east.leicestershire :P
    Posts
    579
    Thank Post
    47
    Thanked 49 Times in 41 Posts
    Rep Power
    28
    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.

  12. #12

    Join Date
    Jul 2009
    Posts
    6
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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.

  13. #13

    Join Date
    Jan 2009
    Location
    Taunton
    Posts
    62
    Thank Post
    2
    Thanked 5 Times in 5 Posts
    Rep Power
    12
    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:
+ Post New Thread

Similar Threads

  1. Header & Menu
    By beeswax in forum EduGeek Joomla 1.5 Package
    Replies: 3
    Last Post: 24th January 2009, 05:44 PM
  2. RT_Rokwebify Header Issue
    By SYSMAN_MK in forum EduGeek Joomla 1.5 Package
    Replies: 12
    Last Post: 30th June 2008, 05:20 PM
  3. header and blank
    By apoth0r in forum EduGeek Joomla 1.0 Package
    Replies: 4
    Last Post: 25th February 2008, 07:26 PM
  4. Strange header problem
    By dagza in forum EduGeek Joomla 1.0 Package
    Replies: 2
    Last Post: 21st January 2008, 09:14 PM
  5. Create menu & sub-menu with Edugeek Joomla
    By FN-GM in forum EduGeek Joomla 1.0 Package
    Replies: 24
    Last Post: 8th December 2007, 11:48 PM

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
  •