Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Link Menus Plugin
Author Message
rigor789 Offline
Junior Member

Posts: 35
Joined: Jan 2011
2011-12-18 20:59:26
Link Menus Plugin
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
(This post was last modified: 2011-12-18 21:00:14 by rmccawl.)
Find all posts by this user Quote this message in a reply
n00dles101 Offline
Administrator

Posts: 981
Joined: Aug 2009
2011-12-19 01:16:53
Link Menus Plugin
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
Visit this user's website Find all posts by this user Quote this message in a reply
rigor789 Offline
Junior Member

Posts: 35
Joined: Jan 2011
2011-12-19 03:13:41
Link Menus Plugin
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
(This post was last modified: 2011-12-19 03:15:38 by rmccawl.)
Find all posts by this user Quote this message in a reply
n00dles101 Offline
Administrator

Posts: 981
Joined: Aug 2009
2011-12-19 04:02:50
Link Menus Plugin
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
Visit this user's website Find all posts by this user Quote this message in a reply
rigor789 Offline
Junior Member

Posts: 35
Joined: Jan 2011
2011-12-19 05:15:48
Link Menus Plugin
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
Find all posts by this user Quote this message in a reply
SteveSy Offline
Junior Member

Posts: 10
Joined: Jan 2013
2013-02-08 14:05:41
RE: Link Menus Plugin
please i want to know how to integrate this plugin with i18n_navigation , anyone can help please!
Find all posts by this user Quote this message in a reply
yojoe Offline
GS Freak

Posts: 1,162
Joined: Jun 2010
2013-02-08 18:53:22
RE: Link Menus Plugin
Why don't you use i18n custom fields do add external links to menu ?

Themes: Getsimple BlueBusiness theme
Plugins: Online Visitors, Notepad
Visit this user's website Find all posts by this user Quote this message in a reply
EntenteduVaucluse Offline
Junior Member

Posts: 1
Joined: Feb 2013
2013-02-21 19:05:37
RE: Link Menus Plugin
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 !
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)

Contact Us | GetSimple | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication
Generate Leads from Documents vCard Hosting