1
Tijntje
Adding links to Main Menu
  • 2004/4/20 17:52

  • Tijntje

  • Just popping in

  • Posts: 6

  • Since: 2004/4/20


I wil ad some links to the main menu but I don't know how to do this. These links wil link to page's i've made by my selve, these are no other modules. But the Links withc are know in the Main Menu must be stil visible. Where can I find this in the source, or where can I find a module for this problem.

2
Mithrandir
Re: Adding links to Main Menu

See if this Wiki about adding HTML pages to XOOPS will help you

3
Tijntje
Re: Adding links to Main Menu
  • 2004/4/20 18:00

  • Tijntje

  • Just popping in

  • Posts: 6

  • Since: 2004/4/20


That's not the problem, adding HTML page's is the thing I can do. But to put a link in the Main Menu, that's the problem. I will make the link visible in the Main Menu but I don't know how to do this.

(Sorry for the English)

4
Mithrandir
Re: Adding links to Main Menu

Did you go as far as to check out the various content modules? TinyContent, CjayContent etc.?

You don't have to repost to get more attention - a bump will usually do.

5
Tijntje
Re: Adding links to Main Menu
  • 2004/4/20 19:05

  • Tijntje

  • Just popping in

  • Posts: 6

  • Since: 2004/4/20


I'd try a few of them, but the only thing I have to do on this moment is to place a link to www.mypage.nl/modules/news/shuttle.php, and shuttle.php is not a news message but just a page written by myself.

6
Mithrandir
Re: Adding links to Main Menu

There are also modules like multiMenu and iMenu for new blocks with navigation items

OR you could look at the b_system_main_show() function in modules/system/blocks/system_blocks.php and just hardcode your links in there.

7
Tijntje
Re: Adding links to Main Menu
  • 2004/4/20 19:17

  • Tijntje

  • Just popping in

  • Posts: 6

  • Since: 2004/4/20


Thnx a lot thats what i was looking for

8
bmmolloy
Re: Adding links to Main Menu
  • 2004/4/25 18:37

  • bmmolloy

  • Friend of XOOPS

  • Posts: 84

  • Since: 2004/4/21


This seems to be the question I have, but the code itslef totally confuses me. I currently have this on my main menu for anonymous users:

Home
Submit Question
FAQ

I'd like to add a bar that says "Archives", and link it to www.google.com or something.

Here's what my code looks like from that file:

function b_system_main_show()
{
    global 
$xoopsUser,$xoopsModule;
    
$block = array();
    
$block['lang_home'] = _MB_SYSTEM_HOME;
    
$block['lang_close'] = _CLOSE;
    
$module_handler =& xoops_gethandler('module');
    
$criteria = new CriteriaCompo(new Criteria('hasmain'1));
    
$criteria->add(new Criteria('isactive'1));
    
$criteria->add(new Criteria('weight'0'>'));
    
$modules =& $module_handler->getObjects($criteriatrue);
    
$moduleperm_handler =& xoops_gethandler('groupperm');
    
$groups is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
    
$read_allowed =& $moduleperm_handler->getItemIds('module_read'$groups);
    foreach (
array_keys($modules) as $i) {
        if (
in_array($i$read_allowed)) {
            
$block['modules'][$i]['name'] = $modules[$i]->getVar('name');
            
$block['modules'][$i]['directory'] = $modules[$i]->getVar('dirname');
            
$sublinks =& $modules[$i]->subLink();
            if ((
count($sublinks) > 0) && (!empty($xoopsModule)) && ($i == $xoopsModule->getVar('mid'))) {
                foreach(
$sublinks as $sublink){
                    
$block['modules'][$i]['sublinks'][] = array('name' => $sublink['name'], 'url' => XOOPS_URL.'/modules/'.$modules[$i]->getVar('dirname').'/'.$sublink['url']);
                }
            } else {
                
$block['modules'][$i]['sublinks'] = array();
            }
        }
    }
    return 
$block;
}


Where would I insert my link to show under FAQ?

9
Mithrandir
Re: Adding links to Main Menu

Sorry, my mistake, that's just the function to retrieve the elements

modules/system/templates/blocks/system_block_mainmenu.html holds the template used by the block.

10
bmmolloy
Re: Adding links to Main Menu
  • 2004/4/25 19:13

  • bmmolloy

  • Friend of XOOPS

  • Posts: 84

  • Since: 2004/4/21


<table cellspacing="0">
  <
tr>
    <
td id="mainmenu">
      <
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
      <!-- 
start module menu loop -->
      <{foreach 
item=module from=$block.modules}>
      <
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a>
        <{foreach 
item=sublink from=$module.sublinks}>
          <
class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a>
        <{/foreach}>
      <{/foreach}>
      <!-- 
end module menu loop -->
<
a href="http://www.google.com">Archives</a>
    </
td>
  </
tr>
</
table>


I still can't add my link to this code. I've gotta tell you I'm a real dummy when it comes to the code itself... I tried adding:

<a href="http://www.google.com">Archives</a>


right underneath

<!-- end module menu loop -->


but it didn't produce any results... Sorry for my confusion.

Login

Who's Online

229 user(s) are online (119 user(s) are browsing Support Forums)


Members: 1


Guests: 228


kenaanna,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits