Page 1 of 1

Perun's Template

Posted: Sat Jan 15, 2005 2:23 pm
by garvinhicking
Hi Guys!

Vladimir Simovic (www.perun.net) took the time and designed a Template for us which he just sent me via mail.

I want to share it with you all and want to get some oppinions, since I really enjoy the theme. I'd even recommend to use it as new default theme (maybe only think about making a blue version of it?).

It's licensed as BSD, as far as I understood. I only had a first glance at it
this night and will look closer tomorrow, but I wanted to shared it right now.

I just installed it on my test installation at
http://supergarv.dyndns.org/cvs/serendi ... /index.php - the template file itself is at http://supergarv.dyndns.org/perun-red.zip

Thanks, Vlad, for that great job in advance!

Best regards,
Garvin.

Posted: Mon Jan 17, 2005 2:45 pm
by wyh
in china,i can not see anything :oops:

Looks all wrong in Firefox

Posted: Mon Jan 17, 2005 2:52 pm
by Little Hamster
Have a look here:
http://www.ecs.soton.ac.uk/~sw2/template.jpg

The calendar spills over the side bar, and so are most of the side bar titles. And I'm using my normal font size! Seems to me that the frames/tables are all fixed size and don't scale properly.

Posted: Wed Mar 02, 2005 7:14 pm
by hollow
Have a look at

http://blog.mausdompteur.de,

where I use peruns's template.

It looks great if You don't override font sizes with Your browsers.

Ahhh, the joys of web design....

Regards,
Harald

your blog

Posted: Wed Mar 02, 2005 7:51 pm
by Half Sideways
Looks very nice, Harald! Everything works together nicely (both color and form) and it has a solid, comfortable flow. I am usually leery of "heavy" colors like red but this comes together well.

Posted: Wed Mar 02, 2005 10:50 pm
by Roaster
Hi,

small issue with Perun's template and the language selection box. You can see an example here: http://blog.thisworx.de/

Please scroll down a little bit andlook an the right side. The language selection box is a bit to big and crosses the border.

cu,
Roaster

Posted: Mon Mar 07, 2005 8:56 pm
by SILU
Hi, also work with Peruns Template, just modified the colours at the moment. But now i want to change more and therefore i have some questions:

1. Where to modify the colours of the category-menu and the shoutbox-entries ?

2. i dont want this xml-buttons any longer, which file to edit ?

3. if you look at my content: notice that there is a timestamp and the name of the category, but no username, how to get it ?

I apalogize for my bad english and my noob questions, thx !

my site: http://www.ichbinegoist.com

so long
SILU

Posted: Tue Mar 08, 2005 1:03 pm
by garvinhicking
1. Change CSS for h3.serendipity_categories_plugin. Until now you could not edit a plugin content area, but I just committed a fix to CVS of Serendipity which allows you to use div.container_serendipity_categories_plugin for styling.

2. You can go to plugin configuration, configure the 'Categories' plugin. It has options to remove XML images.

3. When you upgraded to Serendipity 0.8 you got a note telling you, you need to replace "$entry.username" to "$entry.author" in your custom templates, if you manually modified one. You need to to do now. :-)

Have fun!

Regards,
Garvin

Posted: Thu Mar 10, 2005 4:25 pm
by SILU
Thx. I have another questions yet: where to edit the categorie-plugin ? I want to edit this plugin to modify the headline of this plugin thx.

Posted: Thu Mar 10, 2005 5:38 pm
by garvinhicking
The header of the categories plugin is hardcoded together with the Language you're using. You would need to create your own categories plugin (with the same code but a different title) and use that instead.

So use this plugin. Save it as serendipity/plugins/serendipity_plugin_silucategories/serendipity_plugin_silucategories.php
and go to your plugin configuration to add the plugin.

Code: Select all

class serendipity_categories_plugin extends serendipity_plugin {
    var $title = 'Silu Categories';

    function introspect(&$propbag) {
        global $serendipity;

        $propbag->add('name',        'Silu Categories');
        $propbag->add('description', 'Silu Categories');
        $propbag->add('stackable',     true);
        $propbag->add('author',        'Serendipity Team');
        $propbag->add('version',       '1.0');
        $propbag->add('configuration', array('authorid', 'image', 'title'));
    }

    function introspect_config_item($name, &$propbag)
    {
        global $serendipity;
        switch($name) {
            case 'authorid':
                $row_authors = serendipity_db_query("SELECT realname, authorid FROM {$serendipity['dbPrefix']}authors");
                $authors     = array('all' => ALL_AUTHORS);
                if (is_array($row_authors)) {
                    foreach($row_authors as $row) {
                        $authors[$row['authorid']] = $row['realname'];
                    }
                }

                $propbag->add('type',         'select');
                $propbag->add('name',         CATEGORIES_TO_FETCH);
                $propbag->add('description',  CATEGORIES_TO_FETCH_DESC);
                $propbag->add('select_values', $authors);
                $propbag->add('default',     'all');
                break;

            case 'title':
                $propbag->add('type',         'string');
                $propbag->add('name',         'TITLE');
                $propbag->add('description',  'Your title');
                $propbag->add('default',     serendipity_getTemplateFile('img/xml.gif'));
                break;

            case 'image':
                $propbag->add('type',         'string');
                $propbag->add('name',         XML_IMAGE_TO_DISPLAY);
                $propbag->add('description',  XML_IMAGE_TO_DISPLAY_DESC);
                $propbag->add('default',     serendipity_getTemplateFile('img/xml.gif'));
                break;

            default:
                return false;
        }
        return true;
    }

    function generate_content(&$title) {
        global $serendipity;

        $which_category = $this->get_config('authorid');
        $categories = serendipity_fetchCategories(empty($which_category) ? 'all' : $which_category);
        $title = $this->get_config('title', 'SILU Categories');
        $html       = '';
        $image = $this->get_config('image', serendipity_getTemplateFile('img/xml.gif'));
        $image = (($image == "'none'" || $image == 'none') ? '' : $image);
        if (is_array($categories) && count($categories)) {
            $categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
            foreach ( $categories as $cat ) {
                $html .= '<div style="padding-bottom: 2px;">';
                if ( !empty($image) ) {
                    $html .= '<a href="'. serendipity_rewriteURL(PATH_FEEDS .'/'. PATH_CATEGORIES .'/'. serendipity_makePermalink(PERM_FEEDS_CATEGORIES, array('id' => $cat['categoryid'], 'title' => $cat['category_name']))) .'"><img src="'. $image .'" alt="XML" style="border: 0px" /></a> ';
                }
                $html .= '<a href="'. serendipity_rewriteURL(PATH_CATEGORIES . '/' . serendipity_makePermalink(PERM_CATEGORIES, array('id' => $cat['categoryid'], 'title' => $cat['category_name'])), 'serendipityHTTPPath') .'" title="'. $cat['category_name'] .'" style="padding-left: '. $cat['depth']*6 .'px">'. $cat['category_name'] .'</a>';
                $html .= '</div>' . "\n";
            }
        }

        $html .= sprintf(
            '<br /><a href="%s" title="%s">%s</a>',

            $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'],
            ALL_CATEGORIES,
            ALL_CATEGORIES
        );

        print $html;
    }
}
Regards,
Garvin

Posted: Thu Mar 10, 2005 5:57 pm
by SILU
Wow, big thx ! But it doesn`t worx - just got this problem:

Screen: http://www.ichbinegoist.com/uploads/screen.jpg

Saved this file: http://www.ichbinegoist.com/plugins/ser ... gories.php

Posted: Thu Mar 10, 2005 7:55 pm
by SILU
I edited the file now on beginning with <?php and at the end with ?> and now i get this error by choosing plugin-section:

Fatal error: Cannot redeclare class serendipity_categories_plugin in /var/www/web96/html/serendipity/plugins/serendipity_plugin_silucategories/serendipity_plugin_silucategories.php on line 3
Plugin

Posted: Thu Mar 10, 2005 10:25 pm
by Guest
Roaster wrote:Hi,

small issue with Perun's template and the language selection box. You can see an example here: http://blog.thisworx.de/

Please scroll down a little bit andlook an the right side. The language selection box is a bit to big and crosses the border.

cu,
Roaster
this also happens with the theme chooser. A little fix to the css along these lines helps:

#theme_chooser > select {
width: 165px;
}

Posted: Sun Mar 13, 2005 1:14 pm
by garvinhicking
SILU: Please replace "serendipity_categories_plugin" just with "serendipity_suli_categories_plugin". Forgot to rewrite that part in my previous posting :)

Regards,
Garvin