Advertisement:

Author Topic: DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)  (Read 20123 times)

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #20 on: September 08, 2014, 11:03:40 AM »
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.

Offline DSystem

  • Jr. Member
  • **
  • Posts: 238
  • Gender: Male
  • EletronicaBR - Admin
    • eletronicaBR.com
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #21 on: September 14, 2014, 12:49:57 PM »
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?

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #22 on: September 14, 2014, 10:37:17 PM »
$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.

Offline mulwa

  • Jr. Member
  • **
  • Posts: 119
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #23 on: October 07, 2014, 10:55:19 AM »
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

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #24 on: October 07, 2014, 09:27:02 PM »
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:
Code: [Select]
#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.

Offline mulwa

  • Jr. Member
  • **
  • Posts: 119
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #25 on: October 09, 2014, 08:34:04 AM »
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

Offline mulwa

  • Jr. Member
  • **
  • Posts: 119
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #26 on: October 10, 2014, 03:01:53 PM »
please, i wanna make the logo not to be covered by the Nav menu.

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #27 on: October 11, 2014, 02:13:58 PM »
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. ;)

Offline mulwa

  • Jr. Member
  • **
  • Posts: 119
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #28 on: October 11, 2014, 05:10:12 PM »
Okay, maybe i open a new topic in custom coding or graphics to get that fixed. Thanks i like the mod

Offline DSystem

  • Jr. Member
  • **
  • Posts: 238
  • Gender: Male
  • EletronicaBR - Admin
    • eletronicaBR.com
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #29 on: October 13, 2014, 06:05:39 PM »
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.

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #30 on: October 13, 2014, 06:27:42 PM »
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.

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #31 on: January 16, 2015, 07:15:35 AM »
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.

Offline skb

  • Jr. Member
  • **
  • Posts: 374
    • Metabolically Challenged
Re: DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)
« Reply #32 on: August 04, 2016, 08:35:28 AM »
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
Learning, every day.
Forum - The Diabetic Pub
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)
« Reply #33 on: August 15, 2016, 07:36:18 AM »
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.

Offline skb

  • Jr. Member
  • **
  • Posts: 374
    • Metabolically Challenged
Re: DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)
« Reply #34 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
Code: [Select]
' . (!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.
Learning, every day.
Forum - The Diabetic Pub
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2

Offline Bob Perry of Web Presence Consulting

  • Sophist Member
  • *****
  • Posts: 1,018
  • Gender: Male
  • (T)ogether (E)veryone (A)chieves (M)ore
    • Bobert921 on Facebook
    • https://www.linkedin.com/in/bperry921/ on LinkedIn
    • @bperry921 on Twitter
    • Web Presence Consulting
Re: DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)
« Reply #35 on: March 31, 2017, 03:07:28 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
Code: [Select]
' . (!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...

« Last Edit: March 31, 2017, 03:25:47 AM by Bob Perry »
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

Offline skb

  • Jr. Member
  • **
  • Posts: 374
    • Metabolically Challenged
Re: DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)
« Reply #36 on: April 05, 2017, 04:00:39 AM »
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
Learning, every day.
Forum - The Diabetic Pub
Because every diabetic needs help
SMF 2.1 RC2 (default theme) / TP 1.6.2

Offline crvteampl

  • Newbie
  • *
  • Posts: 4
Re: DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)
« Reply #37 on: January 29, 2018, 06:01:02 AM »
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.
Code: [Select]
$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 .