How to customize the archive plugin

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
jonemo
Posts: 2
Joined: Sat Feb 11, 2006 1:26 am

How to customize the archive plugin

Post by jonemo » Sat Feb 11, 2006 1:31 am

Hi,

I'm a newbie to this forum and have fiddled around with serendipity for a while integrating this blog into my website.

i just wanted to quickly make the right sidebar where all the plugins are located look a bit neat but got stuck. where can i edit the appearance of the archive section and the syndication section? i couldnt find any template file that represent these sections neither hardcoded html in any of the php code...

Jonemo

carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway » Sat Feb 11, 2006 9:11 pm

jonemo, you appear to have stripped out almost every unique serendipity style from your theme, and in your sidebar.tpl you've removed the class names for your divs which would have allowed you to style each sidebar plugin differently.

By replacing all of your sidebar containers with <div style="clear:both"> you will not be able to do what you want to do. I suggest going back to the default sidebar.tpl, then view the source code from your browser. Now write down every style name you can find about the plugin you want to change.

Now experiment. If I can help more I will, but I can't help you if there is nothing to style.

Carl

jonemo
Posts: 2
Joined: Sat Feb 11, 2006 1:26 am

Post by jonemo » Sat Feb 11, 2006 9:17 pm

i think you got me wrong. i do not want to style it, i want to change the html. for exmple for the feeds section the html looks like this at the moment:

Code: Select all

   <h2>Blog abonnieren</h2>           <div style="padding-bottom: 2px;">

            <a href="/england/feeds/index.rss"><img src="/england/templates/default/img/xml.gif" alt="XML" style="border: 0px" /></a>
            <a href="/england/feeds/index.rss">RSS 0.91 feed</a>
        </div>
        <div style="padding-bottom: 2px;">
            <a href="/england/feeds/index.rss1"><img src="/england/templates/default/img/xml.gif" alt="XML" style="border: 0px" /></a>
            <a href="/england/feeds/index.rss1">RSS 1.0 feed</a>
        </div>
        <div style="padding-bottom: 2px;">

            <a href="/england/feeds/index.rss2"><img src="/england/templates/default/img/xml.gif" alt="XML" style="border: 0px" /></a>
            <a href="/england/feeds/index.rss2">RSS 2.0 feed</a>
        </div>
        <div style="padding-bottom: 2px;">
            <a href="/england/feeds/atom03.xml"><img src="/england/templates/default/img/xml.gif" alt="ATOM/XML" style="border: 0px" /></a>
            <a href="/england/feeds/atom03.xml">ATOM 0.3 feed</a>
        </div>
        <div style="padding-bottom: 2px;">

            <a href="/england/feeds/atom10.xml"><img src="/england/templates/default/img/xml.gif" alt="ATOM/XML" style="border: 0px" /></a>
            <a href="/england/feeds/atom10.xml">ATOM 1.0 feed</a>
        </div>
        <div style="padding-bottom: 2px;">
            <a href="/england/feeds/comments.rss2"><img src="/england/templates/default/img/xml.gif" alt="XML" style="border: 0px" /></a>
            <a href="/england/feeds/comments.rss2"><span style="white-space: nowrap">RSS 2.0 Kommentare</span></a>
        </div>


i want to change the html. of course i could just style everything using serenidpity classnames but thats not what i want to do. my question is, where the html shown above is generated.

carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway » Sat Feb 11, 2006 9:26 pm

ah forgive me, I did misunderstand. I believe that html is defined within the s9y core code. In the include folder, try functions_entries.inc.php which seems to generate that code. It may also be generated in another of the functions files, so if that doesn't work then open the rest and search for 'padding' within your text editor. You will find what you are looking for.

Carl

jonemo_as_guest

Post by jonemo_as_guest » Sat Feb 11, 2006 11:08 pm

ok, i found it. the file is includes/plugin_internal.inc.php

what i had to see there (in terms of code style) made me consider the choice of serendipity as blogging tool again...

User avatar
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert » Sun Feb 12, 2006 2:55 am

Sorry you didn't like it. But there's nothing we can do about it unless you give us more specific details. Do you simply object to the use of camel-case, or do you not like the way we pass arrays?

Of course, if you improve it, we'll review it and add it to the baseline. (Isn't Open Source wonderful?)
Judebert
---
Website | Wishlist | PayPal

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking » Sun Feb 12, 2006 9:52 pm

We still have some very few internal Plugins that only use PHP+HTML output instead of Smarty templating.

That reasoning is simple: Internal plugins are often used and should be lightning fast. Smarty templating is not lightning fast.

But the style of those HTML things can be chagned with CSS usually, because the HTML amount is VERY little.

In the end, you can duplicate the plugin easily and make it use smarty, if you like that better.

Sad though, that your tone sounds very aggressive.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

Boris

Post by Boris » Mon Feb 13, 2006 7:09 pm

garvinhicking wrote:In the end, you can duplicate the plugin easily and make it use smarty, if you like that better.

Or you can duplicate the plugin private and change the HTML-Code. That's what I did some time ago to make the Feeds-List a real HTML-list.
(Now I'm not using a plugin at all for this, it's now in index.tpl, because I need nothing dynamic for that)

Post Reply