Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Links Manager (was Link Manager 2)
#1
This topic is about the GetSimple Links Manager (was Link Manager 2) plugin, an easy to use plugin allowing you to manage a list of links on your website.

I have completed a complete re-write of the code to allow easier maintenance and additions (30/9/13).

Installation

Download the latest version here, unzip the downloaded file and copy its contents to your plugins folder. Please note that because of the name change, if you have an old version of Link Manager 2 you will have to remove that first to avoid a clash.

Usage

Once you've followed the directions described above, You can access the plugin via the Links tab. Click on the Add Link button to start adding new links, change the order of the links by drag & drop.

Either place php code in your theme or template or directly input placeholder tag in an edited page.

Note: The 'display' parameter from the php 'get' calls has been removed. Use 'return' calls instead.

Show all links
* PHP code
Code:
<?php $links_html = return_links(); echo $links_html; ?>
<?php get_links(); ?>
* Page placeholder
Code:
(% links %)

Show links from specific category
The following will show links from category id 3
* PHP code
Code:
<?php $links_html = return_links(3); echo $links_html; ?>
<?php get_links(3); ?>
* Page placeholder
Code:
(% links:3 %)

Show category name
The following will show category name for category id 3
* PHP code
Code:
<?php $category_name = return_category_name(3); echo $category_name; ?>
<?php get_category_name(3); ?>
* Page placeholder
Code:
(% link_category:3 %)

Show a single link by id
The following will show a link with id 7
* PHP code
Code:
<?php $link_html = return_link(7); echo $link_html; ?>
<?php get_link(7); ?>
* Page placeholder
Code:
(% link:7 %)

Show a single link by name
The following will show a link named 'Fred'. This is a case-sensitive exact match.
* PHP code
Code:
<?php $link_html = return_link('Fred'); echo $link_html; ?>
<?php get_link('Fred'); ?>
* Page placeholder
Code:
(% link:Fred %)

Show a random link
The following will show a random link between minimum id 2 and maximum id 9. If only 1 id is used then it is assumed as a maximum with minimum 0. If no id is used then minimum is 0 and maximum is current max id.
* PHP code
Code:
<?php $link_html = return_randlink(2, 9); echo $link_html; ?>
<?php get_randlink(2, 9); ?>
* Page placeholder
Code:
(% randlink:2:9 %)

Search links by keyword
The following will show links with name or description containing 'fish'. This is a case-insensitive search.
* PHP code
Code:
<?php $links_html = return_search_links('fish'); echo $links_html; ?>
<?php search_links('fish'); ?>
* Page placeholder
Code:
(% search_links:fish %)

For example, if you use the vanilla GS Innovation theme, you could add:

Code:
<div class="section linksmanager">
  <h2><?php get_category_name(3); ?></h2>
  <?php get_links(3); ?>
</div>

somewhere between the <aside></aside> tags in the file sidebar.php to show the links from category 3 with appropriate heading in the sidebar section of your site.

There is sample css (links_manager_links.php) included with the plugin which has been tested with Innovation for styling of the links.
Reply


Messages In This Thread
Links Manager (was Link Manager 2) - by mrdragonraaar - 2012-10-28, 03:49:15
RE: Link Manager 2 - by bhwebco - 2012-12-06, 04:39:22
RE: Link Manager 2 - by grassfrog - 2012-12-30, 18:17:55
RE: Link Manager 2 - by grassfrog - 2013-01-05, 07:45:33
RE: Link Manager 2 - by mtw - 2013-02-06, 21:03:08
RE: Link Manager 2 - by datiswous - 2013-02-21, 08:14:14
RE: Link Manager 2 - by mtw - 2013-06-28, 08:11:16
RE: Link Manager 2 - by datiswous - 2013-06-29, 09:37:07
RE: Link Manager 2 - by datiswous - 2013-02-22, 10:17:35
RE: Link Manager 2 - by mtw - 2013-06-30, 15:42:34
RE: Link Manager 2 - by mrdragonraaar - 2013-09-21, 07:34:21
RE: Link Manager 2 - by mrdragonraaar - 2013-09-22, 23:15:19
RE: Link Manager 2 - by datiswous - 2013-09-23, 11:13:36
RE: Link Manager 2 - by mrdragonraaar - 2013-09-23, 14:35:28
RE: Link Manager 2 - by datiswous - 2013-09-24, 09:45:19
RE: Link Manager 2 - by mrdragonraaar - 2013-09-24, 19:53:46
RE: Link Manager 2 - by mrdragonraaar - 2013-09-24, 08:36:11
RE: Link Manager 2 - by mrdragonraaar - 2013-09-25, 12:27:43
RE: Link Manager 2 - by datiswous - 2013-09-27, 04:50:23
RE: Link Manager 2 - by mrdragonraaar - 2013-09-30, 10:21:28
RE: Links Manager (was Link Manager 2) - by mtw - 2013-11-23, 19:37:30
RE: Links Manager (was Link Manager 2) - by Rene - 2013-11-30, 00:27:34
RE: Links Manager (was Link Manager 2) - by morvy - 2015-06-05, 19:50:10
RE: Links Manager (was Link Manager 2) - by morvy - 2015-06-10, 08:28:46
RE: Links Manager (was Link Manager 2) - by morvy - 2015-06-10, 20:04:38
RE: Links Manager (was Link Manager 2) - by morvy - 2015-06-16, 03:59:12
RE: Links Manager (was Link Manager 2) - by morvy - 2015-06-19, 01:21:37
RE: Links Manager (was Link Manager 2) - by morvy - 2015-08-11, 20:31:40
RE: Links Manager (was Link Manager 2) - by morvy - 2015-08-12, 11:46:32
RE: Links Manager (was Link Manager 2) - by morvy - 2015-09-18, 10:23:01
Link Manager 2 - by Carlos - 2012-10-29, 07:10:45
Link Manager 2 - by Carlos - 2012-10-29, 07:29:40
Link Manager 2 - by mrdragonraaar - 2012-10-29, 10:05:06
Link Manager 2 - by mrdragonraaar - 2012-10-29, 10:11:11
Link Manager 2 - by mrdragonraaar - 2012-10-29, 11:29:05
Link Manager 2 - by Carlos - 2012-10-30, 01:35:52
RE: Link Manager 2 - by mrdragonraaar - 2012-10-30, 09:34:47
RE: Link Manager 2 - by mrdragonraaar - 2012-11-03, 09:50:35



Users browsing this thread: 1 Guest(s)