Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Link Menus Plugin
#1
Plugin Description:

This plugin allows you to make link menus, simply by checking a checkbox, and adding an url in the page edit area!

How to use:

Create a new page, name it whatever you want, check the add to menu checkbox, give a menu name, and check the Link Menu checkbox, and enter the destination url, hit save and enjoy! Smile

Install Instructions:

Put LinkMenus.php into your plugins folder, and put the theme_functions.php into admin/inc/ That's it!

If you have any questions feel free to ask! Smile
Reply
#2
what exactly is the change to theme_functions.php

don't like the idea of overwriting core files for a plugin....
My Github Repos: Github
Website: DigiMute
Reply
#3
n00dles101 Wrote:what exactly is the change to theme_functions.php

don't like the idea of overwriting core files for a plugin....

I just edited the get_navigation() function!

The changes are:

after line 632:
Code:
$pagesArray[$count]['linkmenu'] = $data->linkmenu;
                    $pagesArray[$count]['linkmenuurl'] = $data->linkmenuurl;

and later down:

Code:
if ($page['menuStatus'] == 'Y') {
            
                if($page['linkmenu'] == "yes"){
                    
                        $menu .= '<li class="'. $classes .'"><a href="'. $page['linkmenuurl'] . '" title="'. strip_quotes($page['title']) .'">'.$page['menu'].'</a></li>'."\n";
                    
                }else{
                    if ("$currentpage" == "$url_nav") { $classes = "current ". $page['parent'] ." ". $url_nav; } else { $classes = trim($page['parent'] ." ". $url_nav); }
                    if ($page['menu'] == '') { $page['menu'] = $page['title']; }
                    if ($page['title'] == '') { $page['title'] = $page['menu']; }
                    $menu .= '<li class="'. $classes .'"><a href="'. find_url($page['url'],$page['parent']) . '" title="'. strip_quotes($page['title']) .'">'.$page['menu'].'</a></li>'."\n";
                }
            }

where i check if the menu is a link menu and if it is then create a simple link to the url given!

Btw, i dont like editing core files either, but this was made for personal use, then i relased it if somebody needs it!
Would be nice if there is a link menu check box in GS! Smile
Reply
#4
why didn't you copy the function, rebame it, make your changes and include it you plugin.

that way there is no need to change core files
My Github Repos: Github
Website: DigiMute
Reply
#5
n00dles101 Wrote:why didn't you copy the function, rebame it, make your changes and include it you plugin.

that way there is no need to change core files

Didn't thinked about that... good idea, thanks, will do it in the next version! Smile
Reply
#6
please i want to know how to integrate this plugin with i18n_navigation , anyone can help please!
Reply
#7
Why don't you use i18n custom fields do add external links to menu ?
Addons: blue business theme, Online Visitors, Notepad
Reply
#8
Hello, I downloaded your plugin and when I tried to activate it I got

Quote:Fatal error: Cannot redeclare get_page_content() (previously declared in /homez.344/entente/www/admin/inc/theme_functions.php:25) in /homez.344/entente/www/plugins/theme_functions.php on line 31

Now I can't acess anything, nor the site or the admin page !
Reply




Users browsing this thread: 1 Guest(s)