Get started with PHP-Fusion

Start a New Thread

Users Participated

  • Homdax
    Post made: 2
  • Joe Kriz
    Post made: 1
  • Craig
    Post made: 3
  • smokeman
    Post made: 22
  • honeyy
    Post made: 1
  • PolarFox
    Post made: 3
  • DjordjeB
    Post made: 3
  • agerulestheworld
    Post made: 2
  • MarcusG
    Post made: 1
  • crucifuge
    Post made: 8
  • icb
    Post made: 1
  • Rolf Mayer
    Post made: 2
  • Ankur
    Post made: 1
  • rudic
    Post made: 4
  • eZkimo
    Post made: 3
  • JoiNNN
    Post made: 3
  • Remus
    Post made: 1
  • maoriorgnz
    Post made: 7
  • mattish91
    Post made: 1
  • XXN
    Post made: 1
  • Gillette
    Post made: 2
  • KasteR
    Post made: 5
  • Charon
    Post made: 9

  1. PHP-Fusion Support Forums
  2. AddonDB
  3. Official releases [Infusions]

CSS/JavaScript Dropdown Menu v1.0e

Support for Infusions in the AddonDB

85 Replies 34,296 Views Last Updated on 3 years ago

smokeman


Veteran Member

#41

Posted 5 years ago

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. Sad

Posts: 928

Joined: 23/06/2006

Remus


Newbie

#42

Posted 5 years ago

A very nice infusion Grin

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!

Posts: 7

Joined: 17/02/2011

maoriorgnz


Junior Member

#43

Posted 5 years ago

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 Grin

Posts: 34

Joined: 12/03/2011

rudic


Junior Member

#44

Posted 5 years ago

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.phpa/news.php for my dev site

Posts: 30

Joined: 18/11/2010

smokeman


Veteran Member

#45

Posted 5 years ago

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

Posts: 928

Joined: 23/06/2006

rudic


Junior Member

#46

Posted 5 years ago

smokeman wrote:

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


here you go - many thanks Smile

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

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

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"Wink."</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;"Wink.newsopts($info,"&middot;"Wink.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;"Wink.articleopts($info,"&middot;"Wink.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"Wink {

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";

}
?>

Posts: 30

Joined: 18/11/2010

smokeman


Veteran Member

#47

Posted 5 years ago

Fisrt overwrite the content of your theme.php with this:
Code Gist: Download source  

<?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

Posts: 928

Joined: 23/06/2006

rudic


Junior Member

#48

Posted 5 years ago

thanks, ALMOST there!!!

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

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



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

Posts: 30

Joined: 18/11/2010

smokeman


Veteran Member

#49

Posted 5 years ago

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.dvdsid...hread_id=8

Posts: 928

Joined: 23/06/2006

rudic


Junior Member

#50

Posted 5 years ago

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 Smile

Posts: 30

Joined: 18/11/2010

Posted 5 years ago

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?

Posts: 6

Joined: 26/10/2008

smokeman


Veteran Member

#52

Posted 5 years ago

Open up the file menu.php in the infusions and find this:
Code Gist: Download source  

#menu li ul li a {

- right under add the following:
Code Gist: Download source  

text-align: left;


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

Posts: 928

Joined: 23/06/2006

Posted 5 years ago

smokeman wrote:

Open up the file menu.php in the infusions and find this:
Code Gist: Download source  

#menu li ul li a {

- right under add the following:
Code Gist: Download source  

text-align: left;


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


Cheers Smokeman! Worked a treat!

Posts: 6

Joined: 26/10/2008

icb


Member

#54

Posted 5 years ago

will it work for 7.00.07 version as well or only for 7.02 ?

Posts: 57

Joined: 01/11/2010

smokeman


Veteran Member

#55

Posted 5 years ago

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

But yes, it's working under V7.00.xx to V7.02.xx

Posts: 928

Joined: 23/06/2006

XXN


Newbie

#56

Posted 5 years ago

I have installed the infusion, but though I create the menus, they do not appear:(
Edited by XXN on 25-12-2011 14:14

Posts: 9

Joined: 27/11/2011

mattish91


Junior Member

#57

Posted 5 years ago

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?

Posts: 43

Joined: 18/11/2011

smokeman


Veteran Member

#58

Posted 5 years ago

Newer version released: http://www.php-fu...d_id=30054
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.

Posts: 928

Joined: 23/06/2006

honeyy


Junior Member

#59

Posted 4 years ago

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.c...roblem.png and www.text2future.c...

Thanks for help in advance.


Regards,

Honeyy

Posts: 40

Joined: 04/11/2007

Gillette


Senior Member

#60

Posted 4 years ago

Agree's w/ smokeman:
Code Gist: Download source  

echo "<td class='full-header'>n".showbanners()."</td>n";

Posts: 338

Joined: 09/04/2012

Jump to Forum:
8 users are online
0 member and 8 guests