Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

CSS/JavaScript Dropdown Menu v1.0e

Asked Modified Viewed 50,909 times
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
asked
Veteran Member

[mp]115[/mp]
0 replies

85 posts

S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Well, I "hate" this security system as well - and have being caught by it several times - just if I was searching for some words!

I have told @Diemux about it several times. But Im not the Super Admin - he is..

And yes: It's just bull**** that crappy stupid security system. :(
0 replies
R
Remus
R
Remus 10
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 2 threads in the forums
answered
Newbie

A very nice infusion :D

I've made one main modification by putting it in the sub-header navbar instead of letting it create a new navbar above it. I'd like to make one more modification: to use a &middot at the beginning of each <li>. However, the &middot appears on a line above the hyperlink and I really cannot figure out why.

Effectively, each list item should echo in html as:
[syntaxhighlighter brush=html,first-line=1,highlight=0,collapse=false,html-script=false]<li> &middot; <a href='link.php' target='_blank'>Menu Item</a></li>[/syntaxhighlighter]

An example of the code taken from menu.php - note that I'm skipping using THEME_BULLET to take that out of my hunt:

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<li> &middot; <a href='".$mdata['menu_link']."'".$link_target.">".$mdata['menu_name']."</a>\n";[/syntaxhighlighter]

I've tried ruling out margin, padding and z-index simply because this symbol is inside the <li>.

Is there anything you can suggest I do to solve this? Thank you!
0 replies
M
maoriorgnz
M
  • Junior Member, joined since
  • Contributed 37 posts on the community forums.
  • Started 12 threads in the forums
answered
Junior Member

thanks for your efforts smokeman in helping - I have found another way to get the same thing - just dropped a whole lot of code in the includes_header.php where I want a drop down menu, added a table to the DB and in business :D
0 replies
— 28 days later —
R
rudic
R
rudic 10
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 7 threads in the forums
answered
Junior Member

hi smokeman, firstly thanks for this infusion, love it.

my little problem i have is that when i enable the infusion by placing the text in the banner 1 section, the logo i have for my site disappears. any ideas on how to correct? if i place the code into the banner 2 section, the bar appears above my site logo, which i dont want.

also, i wonder if its possible to get your infusion to use the standard nav bar instead of creating a new one, meaning i have two.

my site is http://thecarlifamily.com/cfa/news.php for my dev site
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

@rudic: Pls post the content of yout theme.php here and I'll show you how to do. :)
0 replies
R
rudic
R
rudic 10
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 7 threads in the forums
answered
Junior Member

Quote

smokeman wrote:

@rudic: Pls post the content of yout theme.php here and I'll show you how to do. :)


here you go - many thanks :)

<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("THEME_BULLET", "<span class='bullet'>&middot;</span>");

require_once INCLUDES."theme_functions_include.php";

function render_page($license=false) {

global $settings, $main_style, $locale;

//Header
echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='full-header'>n".showbanners()."</td>n";
echo "</tr>n</table>n";

echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='sub-header-left'></td>n";
echo "<td class='sub-header'>".showsublinks(" ".THEME_BULLET." ", "white")."</td>n";
echo "<td align='right' class='sub-header'>".showsubdate()."</td>n";
echo "<td class='sub-header-right'></td>n";
echo "</tr>n</table>n";

//Content
echo "<table cellpadding='0' cellspacing='0' width='100%' class='$main_style'>n<tr>n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "</tr>n</table>n";

//Footer
echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='sub-header-left'></td>n";
echo "<td align='left' class='sub-header'>".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."</td>n";
echo "<td align='right' class='sub-header'>".showcounter()."</td>n";
echo "<td class='sub-header-right'></td>n";
echo "</tr>n</table>n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td align='center' class='main-footer'>".stripslashes($settings['footer']);
if (!$license) { echo "<br /><br />n".showcopyright(); }
echo "</td>n";
echo "</tr>n</table>n";

}

function render_news($subject, $news, $info) {

echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='capmain-left'></td>n";
echo "<td class='capmain'>".$subject."</td>n";
echo "<td class='capmain-right'></td>n";
echo "</tr>n</table>n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>n<tr>n";
echo "<td class='main-body middle-border'>".$news."</td>n";
echo "</tr>n<tr>n";
echo "<td align='center' class='news-footer middle-border'>n";
echo newsposter($info," &middot;").newsopts($info,"&middot;").itemoptions("N",$info['news_id']);
echo "</td>n";
echo "</tr><tr>n";
echo "</tr>n</table>n";

}

function render_article($subject, $article, $info) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>n<tr>n";
echo "<td class='capmain-left'></td>n";
echo "<td class='capmain'>".$subject."</td>n";
echo "<td class='capmain-right'></td>n";
echo "</tr>n</table>n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>n<tr>n";
echo "<td class='main-body middle-border'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>n";
echo "</tr>n<tr>n";
echo "<td align='center' class='news-footer'>n";
echo articleposter($info," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']);
echo "</td>n</tr>n</table>n";

}

function opentable($title) {

echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='capmain-left'></td>n";
echo "<td class='capmain'>".$title."</td>n";
echo "<td class='capmain-right'></td>n";
echo "</tr>n</table>n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>n<tr>n";
echo "<td class='main-body'>n";

}

function closetable() {

echo "</td>n";
echo "</tr><tr>n";
echo "</tr>n</table>n";

}

function openside($title, $collapse = false, $state = "on") {

global $panel_collapse; $panel_collapse = $collapse;

echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='scapmain-left'></td>n";
echo "<td class='scapmain'>$title</td>n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='scapmain' align='right'>".panelbutton($state, $boxname)."</td>n";
}
echo "<td class='scapmain-right'></td>n";
echo "</tr>n</table>n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>n<tr>n";
echo "<td class='side-body'>n";
if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside() {

global $panel_collapse;

if ($panel_collapse == true) { echo "</div>n"; }
echo "</td>n</tr>n</table>n";

}
?>
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Fisrt overwrite the content of your theme.php with this:
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("THEME_BULLET", "<span class='bullet'>&middot;</span>");

require_once INCLUDES."theme_functions_include.php";

function render_page($license=false) {

global $settings, $main_style, $locale;

//Header
echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='full-header'>n".showbanners()."</td>n";
echo "</tr>n</table>n";

echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='sub-header-left'></td>n";
echo "<td class='sub-header'>";
include INFUSIONS."css_dropdown_menu/menu.php";
echo "</td>n";
//echo "<td align='right' class='sub-header'>".showsubdate()."</td>n";
echo "<td class='sub-header-right'></td>n";
echo "</tr>n</table>n";

//Content
echo "<table cellpadding='0' cellspacing='0' width='100%' class='$main_style'>n<tr>n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "</tr>n</table>n";

//Footer
echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='sub-header-left'></td>n";
echo "<td align='left' class='sub-header'>".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."</td>n";
echo "<td align='right' class='sub-header'>".showcounter()."</td>n";
echo "<td class='sub-header-right'></td>n";
echo "</tr>n</table>n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td align='center' class='main-footer'>".stripslashes($settings['footer']);
if (!$license) { echo "<br /><br />n".showcopyright(); }
echo "</td>n";
echo "</tr>n</table>n";

}

function render_news($subject, $news, $info) {

echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='capmain-left'></td>n";
echo "<td class='capmain'>".$subject."</td>n";
echo "<td class='capmain-right'></td>n";
echo "</tr>n</table>n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>n<tr>n";
echo "<td class='main-body middle-border'>".$news."</td>n";
echo "</tr>n<tr>n";
echo "<td align='center' class='news-footer middle-border'>n";
echo newsposter($info," &middot;").newsopts($info,"&middot;").itemoptions("N",$info['news_id']);
echo "</td>n";
echo "</tr><tr>n";
echo "</tr>n</table>n";

}

function render_article($subject, $article, $info) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>n<tr>n";
echo "<td class='capmain-left'></td>n";
echo "<td class='capmain'>".$subject."</td>n";
echo "<td class='capmain-right'></td>n";
echo "</tr>n</table>n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>n<tr>n";
echo "<td class='main-body middle-border'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>n";
echo "</tr>n<tr>n";
echo "<td align='center' class='news-footer'>n";
echo articleposter($info," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']);
echo "</td>n</tr>n</table>n";

}

function opentable($title) {

echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='capmain-left'></td>n";
echo "<td class='capmain'>".$title."</td>n";
echo "<td class='capmain-right'></td>n";
echo "</tr>n</table>n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>n<tr>n";
echo "<td class='main-body'>n";

}

function closetable() {

echo "</td>n";
echo "</tr><tr>n";
echo "</tr>n</table>n";

}

function openside($title, $collapse = false, $state = "on") {

global $panel_collapse; $panel_collapse = $collapse;

echo "<table cellpadding='0' cellspacing='0' width='100%'>n<tr>n";
echo "<td class='scapmain-left'></td>n";
echo "<td class='scapmain'>$title</td>n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='scapmain' align='right'>".panelbutton($state, $boxname)."</td>n";
}
echo "<td class='scapmain-right'></td>n";
echo "</tr>n</table>n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>n<tr>n";
echo "<td class='side-body'>n";
if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside() {

global $panel_collapse;

if ($panel_collapse == true) { echo "</div>n"; }
echo "</td>n</tr>n</table>n";

}
?>

- second you delete/remove the code to the dropdown menu from your field(s) "Banner1" / "Banner 2" because now we have inserted it manually in your theme.php
0 replies
R
rudic
R
rudic 10
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 7 threads in the forums
answered
Junior Member

thanks, ALMOST there!!!

now i have these strange nnnn's throughout the page....

take a look here -- http://thecarlifamily.com/cfa/news.php



Quote

smokeman wrote:

Fisrt overwrite the content of your theme.php with this:

- second you delete/remove the code to the dropdown menu from your field(s) "Banner1" / "Banner 2" because now we have inserted it manually in your theme.php
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Ahhh dammit, I forgot that this forum here on this site removes all backslashes - therefor you have a lot of "n" on your site.

I have posted the code for you here instead:
http://www.dvdside.dk/forum/viewthrea...hread_id=8
0 replies
R
rudic
R
rudic 10
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 7 threads in the forums
answered
Junior Member

Quote

smokeman wrote:

Ahhh dammit, I forgot that this forum here on this site removes all backslashes - therefor you have a lot of "n" on your site.



all workign now - thank you so much, really appreciate it :)
0 replies
A
agerulestheworld
A
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 2 threads in the forums
answered
Newbie

Fantastic work and excellent mod!

Was wondering if it was possible to set the Main menu links as centered but have the sub menu links as left aligned?
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Open up the file menu.php in the infusions and find this:
#menu li ul li a {

- right under add the following:
text-align: left;


And from the administration of the infusion you should now define the text as "Center".
0 replies
A
agerulestheworld
A
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 2 threads in the forums
answered
Newbie

Quote

smokeman wrote:

Open up the file menu.php in the infusions and find this:
#menu li ul li a {

- right under add the following:
text-align: left;


And from the administration of the infusion you should now define the text as "Center".


Cheers Smokeman! Worked a treat!
0 replies
I
icb
I
icb 10
  • Member, joined since
  • Contributed 54 posts on the community forums.
  • Started 16 threads in the forums
answered
Member

will it work for 7.00.07 version as well or only for 7.02 ?
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

@icb: Well, you could try it first - before asking. ;)

But yes, it's working under V7.00.xx to V7.02.xx
0 replies
— 7 months later —
X
XXN
X
XXN 10
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 4 threads in the forums
answered
Newbie

I have installed the infusion, but though I create the menus, they do not appearsad
Edited by XXN on 25-12-2011 15:14,
0 replies
M
mattish91
M
Great regards Mattish91
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 10 threads in the forums
answered
Junior Member

It's actually not showing for me, installation worked just fine, and adding stuff to a menu worked in the infusion settings, but it is not showing up for me at all... is there any way to make this work?
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Newer version released: [url]http://www.php-fusion.co.uk/forum/viewthread.php?thread_id=30054
[/url]
But I think why the menu does not appear is because your theme ain't coded after the standards...

Probably you missing the function showbanners() in theme.php - then it can't show what you type in the fields "Banner1" and "Banner 2".

It's kind of boring that not all devolopers code their themes after the standard-coding. You and many others as well experience this problem when trying to use the two above mentioned fields for the banner area.
0 replies
— 3 months later —
H
honeyy
H
honeyy 10
  • Junior Member, joined since
  • Contributed 40 posts on the community forums.
  • Started 11 threads in the forums
answered
Junior Member

Hi..

Ive just started trying to get this mod to work. But ive experiences some issues. Could you please help me fix them?

Due to my designer, im not able to use banners so i tried to edit the theme.php file directly.

Please take a look at:

www.text2future.com/css_problem.png and www.text2future.com/theme.phps

Thanks for help in advance.


Regards,

Honeyy
0 replies
G
Gillette
G
Gillette 10
  • Senior Member, joined since
  • Contributed 335 posts on the community forums.
  • Started 4 threads in the forums
answered
Senior Member

Agree's w/ smokeman:
echo "<td class='full-header'>n".showbanners()."</td>n";
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 85 posts
  • Votes 0 votes
  • Topic users 23 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet