# Links Plugin

The links section used to be an integral part of the Geeklog core code, but have been moved to a plugin as of Geeklog 1.4.0.

## Configuration File

The links plugin has its own configuration file, located at `/path/to/geeklog/plugins/links/config.php`. There you will find the following options:

Variable | Default Value | Description
--- | --- | ---
delete_links | 0 | Defines what to do when a user is deleted that is the owner of a link. When set to 0, all links owned by the deleted user will be assigned to a user of the "Root" group (e.g. the site admin). When set to 1, the links are deleted.
hidelinksmenu | 0 | Whether to hide the "Links" entry from Geeklog's menu bar (when set to 1) or to show it (when set to 0).
hidenewlinks | 0 | Whether new links should be hidden from the "What's New" block (when set = 1) or whether to list them there (when set to = 0).
linkcols | 3 | The number of link categories to display per column.
linksloginrequired | 0 | When set to 1, only registered users can access the links section. Please note that `$_CONF['loginrequired']` in `config.php` takes precedence over this setting. So when `'loginrequired'` is set to 1, anonymous users can not access the links section even when `'linksloginrequired'` is set to 0.
linksperpage | 10 | The number of links to show per page.
linksubmission | 1 | Whether links submitted by users will have to be approved by an admin first (when set = 1) or show up immediately (when set = 0).
newlinksinterval | 1209600 | For how long a link should be considered "new" and show up in the "What's New" block on the site. The interval is given in seconds, so the default value equals 14 days.
notification | 0 | Whether to send an email notification when a new link was submitted (when set to = 1) or not (when set to = 0).
show_top10 | `true` | When both `$_LI_CONF['linkcols']` and `$_LI_CONF['linksperpage']` are not 0, the plugin will show a list of the 10 most clicked-on links on the Links plugin's index page automatically. If you do not want that "top 10" list there, set this option to `false`.

## Layout of the Links plugin's index page

The general layout of the index page of the Links plugin is defined by the options `$_LI_CONF['linkcols']` and `$_LI_CONF['linksperpage']`, as explained above.

If you'd rather have a straight list of all your links, you can set both of these options to 0. This probably makes the most sense when you only have a few links. Setting only `$_LI_CONF['linksperpage']` to 0 zero will list all the links of the current category on one page. Setting only `$_LI_CONF['linkcols']` to 0 will hide the categories and will display all your links spread over several pages.

### Template files

To further change the layout of your Links section, you can change the template files. Please note that they are now located in the plugin's directory, i.e. in

`/path/to/geeklog/plugins/links/templates/`

If you're using a theme that was made for an older version of Geeklog (prior to Geeklog 1.4.0), you may still have a "links" directory in your theme's directory - but that is not used any more and can be safely removed.