for example; rather than a drop down list > the more link when clicked would lead to 'page' containing the other page links DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
OR ..... is it possible to just 'hide' the 'more link' and drop-down menu from it ? DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
As far as I know the only way to hide the 'more' link is to reduce the number of top menu links to be within the 'max' number you've set (Advanced Settings). You could choose to hide (uncheck Guest and Member) for all non-essential modules listed in the Navigation module.... then place links to those "secondary" modules in either a new combined menu tab... or as links in a custom footer.
For example... create a new top menu tab called "Media" then place links to Photos, Videos, Sounds, ... in it. There is at least one mod that you can buy that will allow you to nicely combine modules under one tab... but you can do something simple on your own.
http://pkforum.dolphinhelp.com |
humm I have a lot of pages and sub-pages !! it would take hrs... even days!
I was hoping there would be a quick code fix to hide it so I don't have to restore every single link /sub link
I just learned that hiding the main pages from guest etc in-fact takes all sub pages away also ..
As far as I know the only way to hide the 'more' link is to reduce the number of top menu links to be within the 'max' number you've set (Advanced Settings). You could choose to hide (uncheck Guest and Member) for all non-essential modules listed in the Navigation module.... then place links to those "secondary" modules in either a new combined menu tab... or as links in a custom footer.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I noticed when I looked at your site last week that it had lots of mods... each with lots of sub-pages. I agree it will be a lot of work to reorganize them and decide which ones to link to and which to hide. But in the end, after all the reorganizing, your site will look much "cleaner". http://pkforum.dolphinhelp.com |
im opening a new re-worded thread to see if anyone else is able to help also!
I think the title is wrong to what I am asking...
I noticed when I looked at your site last week that it had lots of mods... each with lots of sub-pages. I agree it will be a lot of work to reorganize them and decide which ones to link to and which to hide. But in the end, after all the reorganizing, your site will look much "cleaner".
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I understood and provided an answer to your question... "As far as I know the only way to hide the 'more' link is to reduce the number of top menu links to be within the 'max' number you've set (Advanced Settings)... "
Just because you hide the top menu link (i.e. from being listed in the top menu) does not mean that you cannot access the page if you use the appropriate URL. This means you can still place custom links to those pages elsewhere on your site.
http://pkforum.dolphinhelp.com |
sorry, i ment to see if others know a solution also...
i get what your saying but how do i get the sub pages to show on each main module pages ?
I understood and provided an answer to your question... "As far as I know the only way to hide the 'more' link is to reduce the number of top menu links to be within the 'max' number you've set (Advanced Settings)... "
Just because you hide the top menu link (i.e. from being listed in the top menu) does not mean that you cannot access the page if you use the appropriate URL. This means you can still place custom links to those pages elsewhere on your site.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
This "how do i get the sub pages to show on each main module pages" is a very good question... when you get an answer PLEASE let me know. http://pkforum.dolphinhelp.com |
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
Ok. I know hiding the more menu item was discussed in the forums before, but i cannot seem to find it.
So i did it myself. Make the following marked changes to the genTopItems function in templates/base/scripts/BxBaseMenu.php at about line 157. Comment out the lines marked in RED as shown.
function genTopItems() { $iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; if ($aItem['Caption'] == "{profileNick}" && $this->aMenuInfo['profileNick']=='') continue;
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] );
if ($bActive && $iCounter >= $this->iElementsCntInLine) { $this->iJumpedMenuID = $iItemID; break; } $iCounter++; }
$iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; //generate list( $aItem['Link'] ) = explode( '|', $aItem['Link'] );
$aItem['Link'] = $this->replaceMetas( $aItem['Link'] ); $aItem['Onclick'] = $this->replaceMetas( $aItem['Onclick'] );
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] ); $bActive = ($aItem['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bActive;
if ($this->bDebugMode) print $iItemID . $aItem['Caption'] . '__' . $aItem['Link'] . '__' . $bActive . '<br />';
$isBold = ($aItem['Icon'] != '') ? true : false; $sImage = ($aItem['Icon'] != '') ? $aItem['Icon'] : $aItem['Picture'];
//Draw jumped element if ($this->iJumpedMenuID>0 && $this->iElementsCntInLine == $iCounter) { $aItemJmp = $this->aTopMenu[$this->iJumpedMenuID]; list( $aItemJmp['Link'] ) = explode( '|', $aItemJmp['Link'] ); $aItemJmp['Link'] = $this->replaceMetas( $aItemJmp['Link'] ); $aItemJmp['Onclick'] = $this->replaceMetas( $aItemJmp['Onclick'] );
$bJumpActive = ( $this->iJumpedMenuID == $this->aMenuInfo['currentTop'] ); $bJumpActive = ($aItemJmp['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bJumpActive;
$this->genTopItem(_t($aItemJmp['Caption']), $aItemJmp['Link'], $aItemJmp['Target'], $aItemJmp['Onclick'], $bJumpActive, $this->iJumpedMenuID, $isBold);
if ($this->bDebugMode) print '<br />pre_pop: ' . $this->iJumpedMenuID . $aItemJmp['Caption'] . '__' . $aItemJmp['Link'] . '__' . $bJumpActive . '<br /><br />'; }
//if ($this->iElementsCntInLine == $iCounter) { //$this->GenMoreElementBegin();
//if ($this->bDebugMode) print '<br />more begin here ' . '<br /><br />'; //}
if ($this->iJumpedMenuID>0 && $iItemID == $this->iJumpedMenuID) { //continue; if ($this->bDebugMode) print '<br />was jump out here ' . '<br /><br />'; } else { if ($this->iElementsCntInLine > $iCounter) { $this->genTopItem(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID, $isBold, $sImage); } else { //$this->genTopItemMore(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID); } } $iCounter++; }
//if ($this->iElementsCntInLine < $iCounter) { //$this->GenMoreElementEnd(); //} }
As for putting them on a different page you would have to do that manually. The more menu item is dynamically generated in this code as the menu items are counted. The contents of that menu item changes based on the order of the items in the top menu, and on how many item you have set to show on the menu for both guests and members.
I am sure the functions with this script could be further modified to store the items that would appear in the more menu into a tmp file that you could retrieve in a php block to display the items on a separate page but that will require a lot more work that i just do not have time to do right now.
https://www.deanbassett.com |
OMG I SPENT HRS LOOKING AND LOOKING FOR A ANSWER TO THIS !! THANK YOU DEANO ;)
I will try this and let you all know how it does !
Thanks again, Josh
Ok. I know hiding the more menu item was discussed in the forums before, but i cannot seem to find it.
So i did it myself. Make the following marked changes to the genTopItems function in templates/base/scripts/BxBaseMenu.php at about line 157. Comment out the lines marked in RED as shown.
function genTopItems() { $iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; if ($aItem['Caption'] == "{profileNick}" && $this->aMenuInfo['profileNick']=='') continue;
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] );
if ($bActive && $iCounter >= $this->iElementsCntInLine) { $this->iJumpedMenuID = $iItemID; break; } $iCounter++; }
$iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; //generate list( $aItem['Link'] ) = explode( '|', $aItem['Link'] );
$aItem['Link'] = $this->replaceMetas( $aItem['Link'] ); $aItem['Onclick'] = $this->replaceMetas( $aItem['Onclick'] );
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] ); $bActive = ($aItem['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bActive;
if ($this->bDebugMode) print $iItemID . $aItem['Caption'] . '__' . $aItem['Link'] . '__' . $bActive . '<br />';
$isBold = ($aItem['Icon'] != '') ? true : false; $sImage = ($aItem['Icon'] != '') ? $aItem['Icon'] : $aItem['Picture'];
//Draw jumped element if ($this->iJumpedMenuID>0 && $this->iElementsCntInLine == $iCounter) { $aItemJmp = $this->aTopMenu[$this->iJumpedMenuID]; list( $aItemJmp['Link'] ) = explode( '|', $aItemJmp['Link'] ); $aItemJmp['Link'] = $this->replaceMetas( $aItemJmp['Link'] ); $aItemJmp['Onclick'] = $this->replaceMetas( $aItemJmp['Onclick'] );
$bJumpActive = ( $this->iJumpedMenuID == $this->aMenuInfo['currentTop'] ); $bJumpActive = ($aItemJmp['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bJumpActive;
$this->genTopItem(_t($aItemJmp['Caption']), $aItemJmp['Link'], $aItemJmp['Target'], $aItemJmp['Onclick'], $bJumpActive, $this->iJumpedMenuID, $isBold);
if ($this->bDebugMode) print '<br />pre_pop: ' . $this->iJumpedMenuID . $aItemJmp['Caption'] . '__' . $aItemJmp['Link'] . '__' . $bJumpActive . '<br /><br />'; }
//if ($this->iElementsCntInLine == $iCounter) { //$this->GenMoreElementBegin();
//if ($this->bDebugMode) print '<br />more begin here ' . '<br /><br />'; //}
if ($this->iJumpedMenuID>0 && $iItemID == $this->iJumpedMenuID) { //continue; if ($this->bDebugMode) print '<br />was jump out here ' . '<br /><br />'; } else { if ($this->iElementsCntInLine > $iCounter) { $this->genTopItem(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID, $isBold, $sImage); } else { //$this->genTopItemMore(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID); } } $iCounter++; }
//if ($this->iElementsCntInLine < $iCounter) { //$this->GenMoreElementEnd(); //} }
As for putting them on a different page you would have to do that manually. The more menu item is dynamically generated in this code as the menu items are counted. The contents of that menu item changes based on the order of the items in the top menu, and on how many item you have set to show on the menu for both guests and members.
I am sure the functions with this script could be further modified to store the items that would appear in the more menu into a tmp file that you could retrieve in a php block to display the items on a separate page but that will require a lot more work that i just do not have time to do right now.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
https://www.deanbassett.com |
it worked :) thank you very much ! I have another question you might think is odd seems I asked to make it disappear
is there a way I can keep the + tab but as a link and no drop down list ?
I dont know if the code above could be edited to perform such an action
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
making new page with icon linked is no good as when pages out of menu limits is clicked the 'page' shifts to the left and does not remain at the far right by search DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
Yeah deano
i would just like to add that you should really copy that function and place it BxTemplMenu.php and modify it from there.
that way when it comes time to upgrade the changes will not get over written in /base.
https://dolphin-techs.com - Skype: Dolphin Techs |
I will look into it when i get a chance. It will require a lot more rewrites. That section calls a begin function that inserts that, however it does not close it. Thats done later with the close after the items have been inserted. So to do that would require the first section that was commented out to be re-enabled and then to redesigned the begin function.
Maybe it would just be easier to insert a new menu item using a icon instead of text like the profile and dashboard do. The icon for the more is tm_sitem_down.gif
https://www.deanbassett.com |
Yeah deano
i would just like to add that you should really copy that function and place it BxTemplMenu.php and modify it from there.
that way when it comes time to upgrade the changes will not get over written in /base.
Yea. It should be done that way.
https://www.deanbassett.com |
making new page with icon linked is no good as when pages out of menu limits is clicked the 'page' shifts to the left and does not remain at the far right by search
Please see my site 'socialmunch' > then click the '+' tab > select something not in main menu like PETS > see what happens ?!
I will look into it when i get a chance. It will require a lot more rewrites. That section calls a begin function that inserts that, however it does not close it. Thats done later with the close after the items have been inserted. So to do that would require the first section that was commented out to be re-enabled and then to redesigned the begin function.
Maybe it would just be easier to insert a new menu item using a icon instead of text like the profile and dashboard do. The icon for the more is tm_sitem_down.gif
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
Ok. Understood. So you want the more icon shown linked to a specific page.
https://www.deanbassett.com |
I would like the icon I made to stay at the far right even when other pages are selected ... or
for the original 'more link' to not show drop down like normal...but to lead to my made up page when clicked
the original more link always stayed far right no matter what and thats what I would like...
Ok. Understood. So you want the more icon shown linked to a specific page.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
please see my site and click the + tab to see what I have done and what happens when a page not in the top menu is clicked ..
Ok. Understood. So you want the more icon shown linked to a specific page.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
this issue is why I ask about the original 'more link' being a link rather that drop-down menu
please see my site and click the + tab to see what I have done and what happens when a page not in the top menu is clicked ..
Ok. Understood. So you want the more icon shown linked to a specific page.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
the '+' tab there currently is one I have created and added to navigation DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
change this function:
function GenMoreElementBegin() {
$sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$this->sCode .= <<<EOF
<td class="top" style="width:38px;">
<a href="javascript: void(0);" onclick="void(0);" class="top_link">
<span class="down"><img src="{$sMoreMainIcon}"/></span>
<!--[if gte IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table id="mmm"><tr><td><![endif]-->
<div style="position:relative;display:block;">
<ul class="sub">
EOF;
}
To this:
function GenMoreElementBegin() {
$sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$aIconTitle = _t('_top_menu_link');
$this->sCode .= <<<EOF
<td class="top">
<a href="javascript: void(0);" onclick="void(0);" class="top_link">
<span class="down"><img class="top_menu_more_icon" style="margin-right: 5px; margin-top: 2px;" src="{$sMoreMainIcon}"/>$aIconTitle</span>
<!--[if gte IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table id="mmm"><tr><td><![endif]-->
<div style="position:relative;display:block;">
<ul class="sub">
EOF;
}
This will make the more link become text with an icon next to it that you can control from a lang key.
add this key to the langs settings in admin _top_menu_link name it "More Links" or what ever you want to call it. then you can make this text a link to your page as well as having it be a drop down.
https://dolphin-techs.com - Skype: Dolphin Techs |
Hey Jay ... Been a while mate, I hope you are good :)
Ok this is very cool, however is it possible to stop the 'drop down' menu full stop ?
I want to keep the original 'more link' but simply as a click-able link and not a drop down whatsoever...
change this function:
function GenMoreElementBegin() {
$sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$this->sCode .= <<<EOF
<td class="top" style="width:38px;">
<a href="javascript: void(0);" onclick="void(0);" class="top_link">
<span class="down"><img src="{$sMoreMainIcon}"/></span>
<!--[if gte IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table id="mmm"><tr><td><![endif]-->
<div style="position:relative;display:block;">
<ul class="sub">
EOF;
}
To this:
function GenMoreElementBegin() {
$sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$aIconTitle = _t('_top_menu_link');
$this->sCode .= <<<EOF
<td class="top">
<a href="javascript: void(0);" onclick="void(0);" class="top_link">
<span class="down"><img class="top_menu_more_icon" style="margin-right: 5px; margin-top: 2px;" src="{$sMoreMainIcon}"/>$aIconTitle</span>
<!--[if gte IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table id="mmm"><tr><td><![endif]-->
<div style="position:relative;display:block;">
<ul class="sub">
EOF;
}
This will make the more link become text with an icon next to it that you can control from a lang key.
add this key to the langs settings in admin _top_menu_link name it "More Links" or what ever you want to call it. then you can make this text a link to your page as well as having it be a drop down.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
Ok. Do this. I am starting over.
Make the following marked changes to the genTopItems function in templates/base/scripts/BxBaseMenu.php at about line 157. Comment out the lines marked in RED as shown. There is now only one line to be commented out.
function genTopItems() { $iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; if ($aItem['Caption'] == "{profileNick}" && $this->aMenuInfo['profileNick']=='') continue;
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] );
if ($bActive && $iCounter >= $this->iElementsCntInLine) { $this->iJumpedMenuID = $iItemID; break; } $iCounter++; }
$iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; //generate list( $aItem['Link'] ) = explode( '|', $aItem['Link'] );
$aItem['Link'] = $this->replaceMetas( $aItem['Link'] ); $aItem['Onclick'] = $this->replaceMetas( $aItem['Onclick'] );
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] ); $bActive = ($aItem['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bActive;
if ($this->bDebugMode) print $iItemID . $aItem['Caption'] . '__' . $aItem['Link'] . '__' . $bActive . '<br />';
$isBold = ($aItem['Icon'] != '') ? true : false; $sImage = ($aItem['Icon'] != '') ? $aItem['Icon'] : $aItem['Picture'];
//Draw jumped element if ($this->iJumpedMenuID>0 && $this->iElementsCntInLine == $iCounter) { $aItemJmp = $this->aTopMenu[$this->iJumpedMenuID]; list( $aItemJmp['Link'] ) = explode( '|', $aItemJmp['Link'] ); $aItemJmp['Link'] = $this->replaceMetas( $aItemJmp['Link'] ); $aItemJmp['Onclick'] = $this->replaceMetas( $aItemJmp['Onclick'] );
$bJumpActive = ( $this->iJumpedMenuID == $this->aMenuInfo['currentTop'] ); $bJumpActive = ($aItemJmp['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bJumpActive;
$this->genTopItem(_t($aItemJmp['Caption']), $aItemJmp['Link'], $aItemJmp['Target'], $aItemJmp['Onclick'], $bJumpActive, $this->iJumpedMenuID, $isBold);
if ($this->bDebugMode) print '<br />pre_pop: ' . $this->iJumpedMenuID . $aItemJmp['Caption'] . '__' . $aItemJmp['Link'] . '__' . $bJumpActive . '<br /><br />'; }
if ($this->iElementsCntInLine == $iCounter) { $this->GenMoreElementBegin();
if ($this->bDebugMode) print '<br />more begin here ' . '<br /><br />'; }
if ($this->iJumpedMenuID>0 && $iItemID == $this->iJumpedMenuID) { //continue; if ($this->bDebugMode) print '<br />was jump out here ' . '<br /><br />'; } else { if ($this->iElementsCntInLine > $iCounter) { $this->genTopItem(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID, $isBold, $sImage); } else { //$this->genTopItemMore(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID); } } $iCounter++; }
if ($this->iElementsCntInLine < $iCounter) { $this->GenMoreElementEnd(); } }
Now go down to the function GenMoreElementBegin at about line 777. Change the javascript: void(0); in the line marked below with page/more
function GenMoreElementBegin() { $sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$this->sCode .= <<<EOF <td class="top" style="width:38px;"> <a href="page/more" onclick="void(0);" class="top_link"> <span class="down"><img src="{$sMoreMainIcon}"/></span> <!--[if gte IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table id="mmm"><tr><td><![endif]--> <div style="position:relative;display:block;"> <ul class="sub"> EOF; }
Thats it. Your done.
If you wish to do it properly, then those two functions that are being modified should actually be copied into templates/your_template_name/scripts/BxTemplMenu.php and edited there instead.
class BxTemplMenu extends BxBaseMenu {
/** * Class constructor; */ function BxTemplMenu() { parent::BxBaseMenu(); } INSERT THE TWO FUNCTIONS HERE }
And leave the one in base alone. This way your do not run the risk of it being over written when dolphin is upgraded because it's a isolated change that is specific to your template and the UNI template will function as normal.
https://www.deanbassett.com |
thanks deano ...... how do I turn the '+' in to a link to another page ?
Ok. Do this. I am starting over.
Make the following marked changes to the genTopItems function in templates/base/scripts/BxBaseMenu.php at about line 157. Comment out the lines marked in RED as shown. There is now only one line to be commented out.
function genTopItems() { $iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; if ($aItem['Caption'] == "{profileNick}" && $this->aMenuInfo['profileNick']=='') continue;
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] );
if ($bActive && $iCounter >= $this->iElementsCntInLine) { $this->iJumpedMenuID = $iItemID; break; } $iCounter++; }
$iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; //generate list( $aItem['Link'] ) = explode( '|', $aItem['Link'] );
$aItem['Link'] = $this->replaceMetas( $aItem['Link'] ); $aItem['Onclick'] = $this->replaceMetas( $aItem['Onclick'] );
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] ); $bActive = ($aItem['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bActive;
if ($this->bDebugMode) print $iItemID . $aItem['Caption'] . '__' . $aItem['Link'] . '__' . $bActive . '<br />';
$isBold = ($aItem['Icon'] != '') ? true : false; $sImage = ($aItem['Icon'] != '') ? $aItem['Icon'] : $aItem['Picture'];
//Draw jumped element if ($this->iJumpedMenuID>0 && $this->iElementsCntInLine == $iCounter) { $aItemJmp = $this->aTopMenu[$this->iJumpedMenuID]; list( $aItemJmp['Link'] ) = explode( '|', $aItemJmp['Link'] ); $aItemJmp['Link'] = $this->replaceMetas( $aItemJmp['Link'] ); $aItemJmp['Onclick'] = $this->replaceMetas( $aItemJmp['Onclick'] );
$bJumpActive = ( $this->iJumpedMenuID == $this->aMenuInfo['currentTop'] ); $bJumpActive = ($aItemJmp['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bJumpActive;
$this->genTopItem(_t($aItemJmp['Caption']), $aItemJmp['Link'], $aItemJmp['Target'], $aItemJmp['Onclick'], $bJumpActive, $this->iJumpedMenuID, $isBold);
if ($this->bDebugMode) print '<br />pre_pop: ' . $this->iJumpedMenuID . $aItemJmp['Caption'] . '__' . $aItemJmp['Link'] . '__' . $bJumpActive . '<br /><br />'; }
if ($this->iElementsCntInLine == $iCounter) { $this->GenMoreElementBegin();
if ($this->bDebugMode) print '<br />more begin here ' . '<br /><br />'; }
if ($this->iJumpedMenuID>0 && $iItemID == $this->iJumpedMenuID) { //continue; if ($this->bDebugMode) print '<br />was jump out here ' . '<br /><br />'; } else { if ($this->iElementsCntInLine > $iCounter) { $this->genTopItem(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID, $isBold, $sImage); } else { //$this->genTopItemMore(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID); } } $iCounter++; }
if ($this->iElementsCntInLine < $iCounter) { $this->GenMoreElementEnd(); } }
Now go down to the function GenMoreElementBegin at about line 777. Change the javascript: void(0); in the line marked below with page/more
function GenMoreElementBegin() { $sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$this->sCode .= <<<EOF <td class="top" style="width:38px;"> <a href="page/more" onclick="void(0);" class="top_link"> <span class="down"><img src="{$sMoreMainIcon}"/></span> <!--[if gte IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table id="mmm"><tr><td><![endif]--> <div style="position:relative;display:block;"> <ul class="sub"> EOF; }
Thats it. Your done.
If you wish to do it properly, then those two functions that are being modified should actually be copied into templates/your_template_name/scripts/BxTemplMenu.php and edited there instead.
class BxTemplMenu extends BxBaseMenu {
/** * Class constructor; */ function BxTemplMenu() { parent::BxBaseMenu(); } INSERT THE TWO FUNCTIONS HERE }
And leave the one in base alone. This way your do not run the risk of it being over written when dolphin is upgraded because it's a isolated change that is specific to your template and the UNI template will function as normal.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
thanks deano ...... how do I turn the '+' in to a link to another page ?
Umm, thats what the changes i just provided do. It turnes the More + into a link.
https://www.deanbassett.com |
I have made a custom page with menu/links within it and I would like that '+' to go directly to my custom page when clicked ?
thanks deano ...... how do I turn the '+' in to a link to another page ?
Ok. Do this. I am starting over.
Make the following marked changes to the genTopItems function in templates/base/scripts/BxBaseMenu.php at about line 157. Comment out the lines marked in RED as shown. There is now only one line to be commented out.
function genTopItems() { $iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; if ($aItem['Caption'] == "{profileNick}" && $this->aMenuInfo['profileNick']=='') continue;
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] );
if ($bActive && $iCounter >= $this->iElementsCntInLine) { $this->iJumpedMenuID = $iItemID; break; } $iCounter++; }
$iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; //generate list( $aItem['Link'] ) = explode( '|', $aItem['Link'] );
$aItem['Link'] = $this->replaceMetas( $aItem['Link'] ); $aItem['Onclick'] = $this->replaceMetas( $aItem['Onclick'] );
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] ); $bActive = ($aItem['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bActive;
if ($this->bDebugMode) print $iItemID . $aItem['Caption'] . '__' . $aItem['Link'] . '__' . $bActive . '<br />';
$isBold = ($aItem['Icon'] != '') ? true : false; $sImage = ($aItem['Icon'] != '') ? $aItem['Icon'] : $aItem['Picture'];
//Draw jumped element if ($this->iJumpedMenuID>0 && $this->iElementsCntInLine == $iCounter) { $aItemJmp = $this->aTopMenu[$this->iJumpedMenuID]; list( $aItemJmp['Link'] ) = explode( '|', $aItemJmp['Link'] ); $aItemJmp['Link'] = $this->replaceMetas( $aItemJmp['Link'] ); $aItemJmp['Onclick'] = $this->replaceMetas( $aItemJmp['Onclick'] );
$bJumpActive = ( $this->iJumpedMenuID == $this->aMenuInfo['currentTop'] ); $bJumpActive = ($aItemJmp['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bJumpActive;
$this->genTopItem(_t($aItemJmp['Caption']), $aItemJmp['Link'], $aItemJmp['Target'], $aItemJmp['Onclick'], $bJumpActive, $this->iJumpedMenuID, $isBold);
if ($this->bDebugMode) print '<br />pre_pop: ' . $this->iJumpedMenuID . $aItemJmp['Caption'] . '__' . $aItemJmp['Link'] . '__' . $bJumpActive . '<br /><br />'; }
if ($this->iElementsCntInLine == $iCounter) { $this->GenMoreElementBegin();
if ($this->bDebugMode) print '<br />more begin here ' . '<br /><br />'; }
if ($this->iJumpedMenuID>0 && $iItemID == $this->iJumpedMenuID) { //continue; if ($this->bDebugMode) print '<br />was jump out here ' . '<br /><br />'; } else { if ($this->iElementsCntInLine > $iCounter) { $this->genTopItem(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID, $isBold, $sImage); } else { //$this->genTopItemMore(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID); } } $iCounter++; }
if ($this->iElementsCntInLine < $iCounter) { $this->GenMoreElementEnd(); } }
Now go down to the function GenMoreElementBegin at about line 777. Change the javascript: void(0); in the line marked below with page/more
function GenMoreElementBegin() { $sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$this->sCode .= <<<EOF <td class="top" style="width:38px;"> <a href="page/more" onclick="void(0);" class="top_link"> <span class="down"><img src="{$sMoreMainIcon}"/></span> <!--[if gte IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table id="mmm"><tr><td><![endif]--> <div style="position:relative;display:block;"> <ul class="sub"> EOF; }
Thats it. Your done.
If you wish to do it properly, then those two functions that are being modified should actually be copied into templates/your_template_name/scripts/BxTemplMenu.php and edited there instead.
class BxTemplMenu extends BxBaseMenu {
/** * Class constructor; */ function BxTemplMenu() { parent::BxBaseMenu(); } INSERT THE TWO FUNCTIONS HERE }
And leave the one in base alone. This way your do not run the risk of it being over written when dolphin is upgraded because it's a isolated change that is specific to your template and the UNI template will function as normal.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I don't see how, or where I can make it link to a page I choose ?
Thanks again :)
Awesome help
thanks deano ...... how do I turn the '+' in to a link to another page ?
Umm, thats what the changes i just provided do. It turnes the More + into a link.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I am aware of that. That is the second change i provided. It turnes the more item into a actual link to page/more
https://www.deanbassett.com |
ohhh ok awesome stuff .... thank you a lot Deano ...
Very Good
Thanks :)
I am aware of that. That is the second change i provided. It turnes the more item into a actual link to page/more
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
will update how this goes for me !! brb. DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
If you read my post THOROUGHLY. I started over. So the original changes i provided should be reversed. There is now only one line to comment out in that section. Then i provided a second edit that changes the icon into a link.
So make sure you read the post completely. The previous changes need to be undone.
https://www.deanbassett.com |
I see you have added it. Your template shows a CSS issue that does not show up on mine, so i will have to provide more changes.
I will need a few minutes.
https://www.deanbassett.com |
Deano it worked !!! its alot better thank you !
theres one more thing I wonder if you can help with ?!
if you hover cursor over the '+' it seems to show line ?
please see what I mean
how can I stop that so it looks/acts like the home icon ?
thank you again :)
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
do you mean that line thingy ??
thanks deano,,, this makes a BIG difference to me
I see you have added it. Your template shows a CSS issue that does not show up on mine, so i will have to provide more changes.
I will need a few minutes.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
Yea, that line thingy.
I have found a fix. Undo the changes, i have more code to post. I will start over again. I have done a replacement do to the embeded html code. I will post the solution in a couple of minutes.
.
https://www.deanbassett.com |
ok that file is back to original way before all changes in this thread .
Yea, that line thingy.
I have found a fix. Undo the changes, i have more code to post. I will start over again. I have done a replacement do to the embeded html code. I will post the solution in a couple of minutes.
.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
DAMMIT. Found another flaw.
EDIT: REMOVED ALL CODE
New code will be posted soon.
https://www.deanbassett.com |
I see you changed it already. There is a minor flaw in the code i posted. I will post a corrected version when i get a proper bug free version.
https://www.deanbassett.com |
Ok. Final revision.
templates/base/scripts/BxBaseMenu.php at line 157 comment out the lines marked in red.
function genTopItems() { $iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; if ($aItem['Caption'] == "{profileNick}" && $this->aMenuInfo['profileNick']=='') continue;
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] );
if ($bActive && $iCounter >= $this->iElementsCntInLine) { $this->iJumpedMenuID = $iItemID; break; } $iCounter++; }
$iCounter = 0; foreach( $this->aTopMenu as $iItemID => $aItem ) { if( $aItem['Type'] != 'top' ) continue; if( !$this->checkToShow( $aItem ) ) continue; //generate list( $aItem['Link'] ) = explode( '|', $aItem['Link'] );
$aItem['Link'] = $this->replaceMetas( $aItem['Link'] ); $aItem['Onclick'] = $this->replaceMetas( $aItem['Onclick'] );
$bActive = ( $iItemID == $this->aMenuInfo['currentTop'] ); $bActive = ($aItem['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bActive;
if ($this->bDebugMode) print $iItemID . $aItem['Caption'] . '__' . $aItem['Link'] . '__' . $bActive . '<br />';
$isBold = ($aItem['Icon'] != '') ? true : false; $sImage = ($aItem['Icon'] != '') ? $aItem['Icon'] : $aItem['Picture'];
//Draw jumped element if ($this->iJumpedMenuID>0 && $this->iElementsCntInLine == $iCounter) { $aItemJmp = $this->aTopMenu[$this->iJumpedMenuID]; list( $aItemJmp['Link'] ) = explode( '|', $aItemJmp['Link'] ); $aItemJmp['Link'] = $this->replaceMetas( $aItemJmp['Link'] ); $aItemJmp['Onclick'] = $this->replaceMetas( $aItemJmp['Onclick'] );
$bJumpActive = ( $this->iJumpedMenuID == $this->aMenuInfo['currentTop'] ); $bJumpActive = ($aItemJmp['Link']=='index.php' && $this->aMenuInfo['currentTop']==0) ? true : $bJumpActive;
$this->genTopItem(_t($aItemJmp['Caption']), $aItemJmp['Link'], $aItemJmp['Target'], $aItemJmp['Onclick'], $bJumpActive, $this->iJumpedMenuID, $isBold);
if ($this->bDebugMode) print '<br />pre_pop: ' . $this->iJumpedMenuID . $aItemJmp['Caption'] . '__' . $aItemJmp['Link'] . '__' . $bJumpActive . '<br /><br />'; }
if ($this->iElementsCntInLine == $iCounter) { $this->GenMoreElementBegin();
if ($this->bDebugMode) print '<br />more begin here ' . '<br /><br />'; }
if ($this->iJumpedMenuID>0 && $iItemID == $this->iJumpedMenuID) { //continue; if ($this->bDebugMode) print '<br />was jump out here ' . '<br /><br />'; } else { if ($this->iElementsCntInLine > $iCounter) { $this->genTopItem(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID, $isBold, $sImage); } else { //$this->genTopItemMore(_t($aItem['Caption']), $aItem['Link'], $aItem['Target'], $aItem['Onclick'], $bActive, $iItemID); } } $iCounter++; }
//if ($this->iElementsCntInLine < $iCounter) { // $this->GenMoreElementEnd(); //} }
Then at line 777 change this function.......
function GenMoreElementBegin() { $sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$this->sCode .= <<<EOF <td class="top" style="width:38px;"> <a href="javascript: void(0);" onclick="void(0);" class="top_link"> <span class="down"><img src="{$sMoreMainIcon}"/></span> <!--[if gte IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table id="mmm"><tr><td><![endif]--> <div style="position:relative;display:block;"> <ul class="sub"> EOF; }
To this ......
function GenMoreElementBegin() { $sMoreIcon = getTemplateIcon("tm_sitem_down.gif");
$sMoreMainIcon = getTemplateIcon('tm_item_more.png');
$this->sCode .= <<<EOF <td class="top" style="width:38px;"> <a href="page/more" class="top_link"> <span class="down"><img src="{$sMoreMainIcon}"/></span> </a></td> EOF; }
Done.
https://www.deanbassett.com |
Ok. I double checked my final code. Corrected a typo and tested the version i last posted to make sure i got everything this right.
I think this is wrapped up.
https://www.deanbassett.com |
in your new code this is missing: <a href="page/more" onclick="void(0);" class="top_link">
Do I add this ?
It looks great how it is without your new code ... what was the bug ?
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
in your new code this is missing: <a href="page/more" onclick="void(0);" class="top_link">
Do I add this ?
It looks great how it is without your new code ...
I edited that. Look again. I worded things differently. Instead i showed the origional code, and what to change it to. I had to add a closing </td> to it. It was easier to provide origional plus replacement insead of what to edit.
My origional was missing the closing </td> as that was normally provided in another function that is now commented out. Some browsers can handle that, others cannot.
https://www.deanbassett.com |
working great and exactly how I wanted it...
thank you deano for your help and time with this! awesome stuff :)
I'm sure others here will also find this helpful
Regards, Josh
in your new code this is missing: <a href="page/more" onclick="void(0);" class="top_link">
Do I add this ?
It looks great how it is without your new code ...
I edited that. Look again. I worded things differently. Instead i showed the origional code, and what to change it to. I had to add a closing </td> to it. It was easier to provide origional plus replacement insead of what to edit.
My origional was missing the closing </td> as that was normally provided in another function that is now commented out. Some browsers can handle that, others cannot.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |