Page 1 of 1

Easiest way to get some links above "Calendar"?

Posted: Mon Mar 24, 2008 12:01 pm
by BenD
Hi.

I am missing some general "link-plugin", where I can put my favourite links in the navigation part of my site. I am using the bulletproof template and spent multiple hours on trying to get some ordinary html-code into the index.tpl file. Getting the links into the content-section is no problem, but it seems to be a no-go to show them as a kind of menu item in the bar on the right side.
They shall have the same look as such a box (like e.g. "Kalender"), but only contain some links. I even tried to figure out how to write a plugin to do this (but the plugin I wrote did not even display in plugin overview ^^).

Image

Any help?

Re: Easiest way to get some links above "Calendar"

Posted: Mon Mar 24, 2008 12:26 pm
by yellowled
BenD wrote:I am missing some general "link-plugin", where I can put my favourite links in the navigation part of my site.
http://spartacus.s9y.org/index.php?mode ... sidebar_en

* Link List: Links manager - Shows your favorite links in the sidebar
* Quick Link: Displays a box for quick links

If none of these suffice, you can use the HTML Nugget sidebar plugin shipped with s9y to insert any HTML code you like into a sidebar box.

All of these should integrate well with Bulletproof.

YL

Posted: Mon Mar 24, 2008 5:55 pm
by BenD
Hi.

The QuickLink-Plugin does not show up in Serendipity Pluginpanel, although I uploaded its folder to "plugins".
The Link List-Plugin is not suitable for me, because I do not have a side bar... well, I think I don't have one, because installing the plugin does not change anything on my blog (I chose a 2-column-design). Maybe it also doesn't work, because it shows up in "event plugins" and not in "sidebar plugins" (there is no page for configuration).


I tried the HTML nugget, but as the description reads ("Puts an HTML nugget on top or bottom of the page, or inside the page's HEAD tag") it is not able to put a box like the calendar into the sidebar. I just tested all options it offers. It is only limited to showing text above and under the content.

Thanks for your efforts anyway.

There has to be an easy way to create such a box. I only want to show some links? Isn't it possible with Serendipity?

Edit: I just noticed there are two links to install plugins :oops:... I'll try if I have success with the installation link for side bar plugins ^^.

Edit: Ok, I just wrote myself a very little "plugin". One file, one kb :wink::

Code: Select all

<?php # $Id: serendipity_plugin_links.php 1337 2008-03-24 11:00:00Z hackattack2001 $

class serendipity_plugin_links extends serendipity_plugin {
    var $title = "Links in Navigation";

    function introspect(&$propbag)
    {
        $this->title = $this->get_config('title', $this->title);

        $propbag->add('name',          'Links in Navigation');
        $propbag->add('description',   'Zeigt in der Navigation meine Lieblingslinks');
        $propbag->add('stackable',     false);
        $propbag->add('author',        'Sebastian Flemig');
        $propbag->add('version',       '1.0');
        $propbag->add('requirements',  array(
            'serendipity' => '0.8',
            'smarty'      => '2.6.7',
            'php'         => '4.1.0'
        ));
        $propbag->add('configuration', array('links'));
        $propbag->add('groups', array('FRONTEND_VIEWS'));
    }

    function introspect_config_item($name, &$propbag)
    {
      switch($name)
      {
        case 'links':
          $propbag->add('type', 'string');
          $propbag->add('name', 'Links in Navigation');
          $propbag->add('description', 'Zeigt in der Navigation meine Lieblingslinks');
          break;
        default:
          return false;
      }
      return true;
    }

    function generate_content(&$title)
    {
        global $serendipity;
        $title       = 'Links';
        $wordwrap    = $this->get_config('links');

       echo "<a title=\"Some Link\" href=\"http://www.google.de\">google.de</a>";

    }
}
?>

Posted: Mon Mar 24, 2008 6:15 pm
by judebert
The smaller of the two columns is a sidebar. You should have success with the HTML Nugget sidebar plugin, although the link list or quick link plugin would also work.

I like the HTML Nugget because it's small and fast. The others use DHTML and trees and things. I still use a nugget on my sidebar to complement my navigation menu.