News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)

Started by Hj Ahmad Rasyid Hj Ismail, August 01, 2014, 04:20:12 PM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Updated!

# Version 1.4.0
- Further harmonize between this mod and Alternative Menu mod css stylings.
- Fixed options dependencies between one to another as introduced in version 1.3.0.
- Fixed main menu break when this mod is disable in its mod settings page.

# Version 1.3.0
- Added options to change main menu background, its bottom border and its text color.
- Added options to change top menu background and its text color when active.
- Added options to change top menu background and its text color when hovered upon.

For SMF 2.0.x users:
- If you faced problems with other mods, or $context['html_headers'] via hook is not working correctly, please install mostly hook (m) version.

DSystem

With version "1.4.0 m" of the mod. The Problem was resolved.

So I'm curious and trying to figure out why the version "1.4.0" doesn't work on my forum.

To test and try to find the mod that is generating this problem was removed all the mods that uses hooks.

But the problem still persists. I found in my tests that disable caching of Forum the problem disappears.

Do you have any idea what else I can do to try and find out where this incompatibility?

Hj Ahmad Rasyid Hj Ismail

$context['html_headers'] is the only heading to search and fix your said problem. It seems that somehow, it is not working properly as it should be. It is used to inject codes to the header part of the forum. Somehow rather either but mod or mistake, it is not functional properly or it function has been replaced.

The 1.4.0 m or manual version, makes modification in index.template.php by manually adding code just before the closing of the header. This version need not be used if your $context['html_headers'] is working as it should be. I recommend posting for support in 2.0.x board so that the cause can be properly traced and the problem can be properly resolved.

Currently I am on standby as my mother is critically ill due to her worsened diabetic conditions. I will try to help along when I am a bit freer.

mulwa

I have shifted the Nav menus to the top, but my logo is covered or completely removed. Please i want to make the logo to be on the same nav row either on the left or right without causing effects to the nav menus.
And also when the nav menus have been moved to the top, a space was left between the nav menus and the body. I failed to figure how to fix that space with firebug. Am using Face1_v2 theme
thanks

Hj Ahmad Rasyid Hj Ismail

This mod is not really for custom theme. It is mainly for SMF default theme or its similar variants. If you wanna build your forum from SMF default theme to look like FB, then may be I can help. But not from custom theme even if the custom theme is created by me myself.

But I'd suggest, create a topic in Coding Discussion board or Graphic and Template board on "How To Turn My Forum To Look Like Facebook?".

Using this mod on default theme is as simple as installing it, then your menu is fixed at the top. You might to do some minor adjustment to its css to move it from left to right. Add this code to your default theme index.css file:
#menu_nav
{
float: right;
}


With this, you will have your menu to the right. IMO, this code will work on any theme including Face1 theme as well but without changing its current menu to top.

mulwa

i have fixed that. The menu have been moved to the top as how i wanted it to be on the custom theme face1, but the logo is hidden both on the default theme and custom theme. I'd like to know how to make the logo appear to either sides of the top menu. Thanks,
i created a topic in graphics and template www.simplemachines.org/community/index.php?topic=528775.0

mulwa

please, i wanna make the logo not to be covered by the Nav menu.

Hj Ahmad Rasyid Hj Ismail

As I said, this mod doesn't cover custom theme.

But you can simply delete forum name and logo lines in index.template.php. Then, you can refer to revamp or simplerevamp theme on how to move forum name / image inside menu.

I haven't created that mod yet, but I will, if there is demand. ;)

mulwa

Okay, maybe i open a new topic in custom coding or graphics to get that fixed. Thanks i like the mod

DSystem

ahrasis. discovered the problem of $context ['html_headers']. I just don't know how to solve.

The problem happens even on a clean install of SMF. Very easy to simulate the problem.

The hook $context ['html_headers'] doesn't work when enabled the Level 2 Caching

Caching Level = Level 2 Caching

Believe to be a BUG in SMF. Anything but that mod that uses this hook presents problems when you use this setting the cache.

Hj Ahmad Rasyid Hj Ismail

Thank you for the feedbacks. I am not sure whether that a bug. Have check whether your do support such caching. If so, then you open a topic in coding to discuss whether this is a bug. If it is, a moderator will transfer the topic to bug. Or you can report it as a bug directly.

Hj Ahmad Rasyid Hj Ismail

Updated to be more responsive to screen size and support to FARM - Font Awesome Responsive Mod.

#Change Logs

@Version 1.4.1
- Fix inconsistency with FARM - Font Awesome Responsive Mod i.e. by disabling css hover and active.
- Add support for smaller screen i.e. margin is adjusted to be more responsive to screen size.

skb

Nice Mod. Our forum uses 2 themes where member chooses the theme.
With the default theme this mod works fine. With the other theme, it starts to give problems. The second theme is known as Blue Piece by Crip. Attached are the before / after screen shots. If you can help sort that out I'd could also attach the index.css of the second theme

SMF 2.1.4 / TP 2.2.2

Hj Ahmad Rasyid Hj Ismail

If you are not using default, you should consult the theme's author. Besides, I'm no longer active in this forum for quite sometimes.

skb

Hello Ahrasis,

I'm using this Mod and am getting lot of errors from the DMOT.subs.php file.

This is the error

8: Undefined index: dmot_hover_font
File: /home/diabesv6/public_html/forum/Sources/DMOT.subs.php
Line: 31

This is line 30 & 31
' . (!empty($modSettings['dmot_hover']) ? '#main_menu .dropmenu li a.firstlevel:hover, #main_menu .dropmenu li:hover a.firstlevel, #main_menu .dropmenu li a.firstlevel:hover span.firstlevel,
#main_menu .dropmenu li:hover a.firstlevel span.firstlevel{background: ' . $modSettings['dmot_hover'] . '; color: ' . $modSettings['dmot_hover_font'] . ';}' : '') . '


What could be the problem.

SMF 2.1.4 / TP 2.2.2

Bob Perry of Web Presence Consulting

Quote from: skb on March 18, 2017, 05:40:47 AM
Hello Ahrasis,

I'm using this Mod and am getting lot of errors from the DMOT.subs.php file.

This is the error

8: Undefined index: dmot_hover_font
File: /home/diabesv6/public_html/forum/Sources/DMOT.subs.php
Line: 31

This is line 30 & 31
' . (!empty($modSettings['dmot_hover']) ? '#main_menu .dropmenu li a.firstlevel:hover, #main_menu .dropmenu li:hover a.firstlevel, #main_menu .dropmenu li a.firstlevel:hover span.firstlevel,
#main_menu .dropmenu li:hover a.firstlevel span.firstlevel{background: ' . $modSettings['dmot_hover'] . '; color: ' . $modSettings['dmot_hover_font'] . ';}' : '') . '


What could be the problem.

I will be glad to take a look and see what's up should be easy to fix I think...

Better yet, I might recommend stop using as when the new beta SMF 2.1 comes to fruition (shouldn't be too much longer, its coming along nicely), you may change your mind about having a menu at the very top, since the author has not been associated with the site or supporting much anymore, what's the point in using it, constant errors are murder in terms of seo...

Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

skb

I solved my issue, two posts above, with the help of Arantor & Sir Osis of Liver. For anyone interested in that discussion, here's the link ;

http://www.simplemachines.org/community/index.php?topic=553049

SMF 2.1.4 / TP 2.2.2

crvteampl

Hello all.
I search solution about  Alternative Menu With Top Menu Icon & Button Remover
I install this mod on my forum and want make other iikon's for some menu category.
I change some code.
$areas['scl']['title'] = empty($modSettings['altmenu_replace_with_icon']) ? $action['scl'] : $txt['shop_icon'];
                $areas['scl']['show'] = empty($modSettings['altmenu_remove_scl']) ? true : false;


when i move mouse over ikon exmple : forum - i see ?action=forum but when i move mouse over new ikon i dont see ?action=scl
>:(



Please help me solve this problem if its possible .

Advertisement: