Advertisement:

Author Topic: [Tip] Additional Dropdown Menu for Curve Theme 2.0 RC3  (Read 97257 times)

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #20 on: February 08, 2010, 12:35:52 AM »
The reason I make it bigger because of my logo which is why it messed up with the header as shown in the image so I change it to 120. It depend how big logo you have.  ;)
“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline navjotjsingh

  • Jr. Member
  • **
  • Posts: 118
  • Gender: Male
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #21 on: February 14, 2010, 06:26:40 AM »
Excellent Tutorial. Thanks a ton. :)

Offline diamondred123

  • Jr. Member
  • **
  • Posts: 353
  • Gender: Male
  • Diamond Red owner
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #22 on: February 21, 2010, 09:32:27 AM »
can i be honest and say im not to good with the code and i always mess it up, is there not a package?

also can i make a forum or a section look work like this:
http://gta-worldmods.t-n-network.de/phpkit/start/include.php?path=content/overview.php&catid=50&type=4
because i want it to show the main images and a short description
Learner but knows a little

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #23 on: February 25, 2010, 06:43:36 PM »
ScopeXL, is there any way to hide lines from guests?
“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline ScopeXL

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • In a box on an island...with broadband.
    • BnetWeb
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #24 on: February 25, 2010, 07:18:17 PM »
ScopeXL, is there any way to hide lines from guests?
I assume you mean hide a link from a guest? If so then yes. Simply change the array in Subs.php for the link you want hidden
Code: [Select]
'sub_menu2' => array(
                  'title' => 'Sub Menu 2',
                  'href' => $scripturl,
                  'show' => true,
               ),

Should look like
Code: [Select]
'sub_menu2' => array(
                  'title' => 'Sub Menu 2',
                  'href' => $scripturl,
                  'show' => !$user_info['is_guest'],
               ),

All that really changes is the 'show'. make it !$user_info['is_guest'] for members eyes only, and $user_info['is_guest'] for guests eyes only.

Offline ScopeXL

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • In a box on an island...with broadband.
    • BnetWeb
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #25 on: February 25, 2010, 07:21:23 PM »
@diamondred123: I am not sure what you are asking. I don't see any resemblance to my navigation trick on that URL. If you need help adding the navigation, PM me and I can assist you. But as for a package there is not one. Labradoodle-360 asked to make it a package, but as of now I have not heard much about it.

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #26 on: February 25, 2010, 08:40:05 PM »
ScopeXL, is there any way to hide lines from guests?
I assume you mean hide a link from a guest? If so then yes. Simply change the array in Subs.php for the link you want hidden
Code: [Select]
'sub_menu2' => array(
                  'title' => 'Sub Menu 2',
                  'href' => $scripturl,
                  'show' => true,
               ),

Should look like
Code: [Select]
'sub_menu2' => array(
                  'title' => 'Sub Menu 2',
                  'href' => $scripturl,
                  'show' => !$user_info['is_guest'],
               ),

All that really changes is the 'show'. make it !$user_info['is_guest'] for members eyes only, and $user_info['is_guest'] for guests eyes only.
Thank you, you are a genius.
“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline ScopeXL

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • In a box on an island...with broadband.
    • BnetWeb
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #27 on: February 25, 2010, 09:07:54 PM »
I have fixed the issue with only being able to show 4 or show menu items. Use this fix ONLY if you have made the first edits prior to this fix. I have updated my original post with the new code. Heres the fix for those of you who are already using my trick.

In /Themes/default/index.template.php

Find:
Code: [Select]
function template_menu_top()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '
      <div id="main_menu">
         <ul class="dropmenu" id="main_nav">

Replace with:
Code: [Select]
function template_menu_top()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '
      <div id="main_menu">
         <ul class="dropmenu" id="main_nav" style="float:right;">

In /Themes/default/css/index.css

Find:
Code: [Select]
#siteslogan, img#smflogo
{
margin-top: 15px;
padding: 0;
float: right;
line-height: 3em;
}

Replace with:
Code: [Select]
#siteslogan, img#smflogo
{
margin-top: 15px;
padding: 0;
float: right;
line-height: 3em;
width: 75%;
}

You should be able to add as many links as you want now. Keep in mind that users with smaller resolutions may see overflow, so don't add a ton of them. 8 or 9 should be fine considering most computers now have larger resolutions.

If for some reason your site doesn't properly display the menu, (i.e. the menu wraps down a line) then change the width of #siteslogan in index.css to a percent or pixel that fits your needs.

Any other bugs or requests let me know.

I welcome any coders to make this into a modification, just let me know.

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #28 on: February 25, 2010, 09:10:11 PM »
What about the tabs? Are you saying this code now has the ability to have more than 4 tabs?
“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline ScopeXL

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • In a box on an island...with broadband.
    • BnetWeb
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #29 on: February 25, 2010, 09:12:33 PM »
What about the tabs? Are you saying this code now has the ability to have more than 4 tabs?

Yes, Click here for the demo with more than 4 tabs.

Offline steve51184

  • Sr. Member
  • ****
  • Posts: 781
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #30 on: February 25, 2010, 09:15:33 PM »
will this ever get changed into a mod?

Offline ScopeXL

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • In a box on an island...with broadband.
    • BnetWeb
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #31 on: February 25, 2010, 09:19:48 PM »
will this ever get changed into a mod?

I don't have the time at the moment to create the admin options to create, delete, or modify navigation items, if someone would like to partner with me I can certainly help with the mod creation, but I am not familiar enough with SMF mod coding to package it and do everything myself. If I had time to read up on it maybe, but as of right now I cannot.

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #32 on: February 25, 2010, 09:20:25 PM »
What about the tabs? Are you saying this code now has the ability to have more than 4 tabs?

Yes, Click here for the demo with more than 4 tabs.
Jesus Christ...awesome.
“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline diamondred123

  • Jr. Member
  • **
  • Posts: 353
  • Gender: Male
  • Diamond Red owner
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #33 on: March 02, 2010, 04:26:05 PM »
my one said to me:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in C:\Inetpub\webroot\version2test\Sources\Subs.php  on line 4066


and yes it is hosted off a pc, and what can i do to fix this? thanks
Learner but knows a little

Offline ScopeXL

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • In a box on an island...with broadband.
    • BnetWeb
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #34 on: March 02, 2010, 04:31:18 PM »
my one said to me:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in C:\Inetpub\webroot\version2test\Sources\Subs.php  on line 4066

you missed a ')' when editting the Subs.php file, look over that tab, make sure each array you open is closed. Attach your Subs.php file and I can fix it for you if you cannot find it.
« Last Edit: March 02, 2010, 04:52:52 PM by ScopeXL »

Offline diamondred123

  • Jr. Member
  • **
  • Posts: 353
  • Gender: Male
  • Diamond Red owner
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #35 on: March 02, 2010, 04:33:26 PM »
ok man i did that file again and said:
Parse error: syntax error, unexpected $end in C:\Inetpub\webroot\version2test\Sources\Subs.php  on line 3657
Learner but knows a little

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #36 on: March 05, 2010, 05:37:03 AM »
This had a big impact on netbook because of its resolution.
I tried to change CSS;
the #top_section's min-height and #siteslogan, img#smflogo's width.
but it doesn't really do good. My logo is also big. I hope there's a fix for it.
The site is http://thetwoworldsforum.com
“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline ScopeXL

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • In a box on an island...with broadband.
    • BnetWeb
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #37 on: March 05, 2010, 05:43:50 AM »
This had a big impact on netbook because of its resolution.
I tried to change CSS;
the #top_section's min-height and #siteslogan, img#smflogo's width.
but it doesn't really do good. My logo is also big. I hope there's a fix for it.
The site is http://thetwoworldsforum.com

Please let me know the resolution you are experiencing problems with so I can debug on my end.

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #38 on: March 05, 2010, 06:31:29 AM »
This had a big impact on netbook because of its resolution.
I tried to change CSS;
the #top_section's min-height and #siteslogan, img#smflogo's width.
but it doesn't really do good. My logo is also big. I hope there's a fix for it.
The site is http://thetwoworldsforum.com

Please let me know the resolution you are experiencing problems with so I can debug on my end.
Simple, Netbooks. They are mostly small.
Look at SM.org here and Dream Portal's dropdown which had no affect because they use a different code somehow.
“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline ScopeXL

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • In a box on an island...with broadband.
    • BnetWeb
Re: [Tip] Additional Dropdown Menu for Curve Theme
« Reply #39 on: March 05, 2010, 12:35:54 PM »
In index.css, under #siteslogan, img#smflogo, change width: 75%; to width: 60%; That should fix all resolution problems. If you are still having problems try width: 50%; and lower and lower until it works with your logo.