Page 1 of 1

Getting rid of br-tags?

Posted: Thu Oct 06, 2005 11:03 am
by heddesheimer
Hi,

I have a problem creating a style for s9y. I want to make the links in the side bar acting like buttons having all the same width. So I have to declare a style="display:block" for the anchor-tags, so that the links can extend to the right margin.

I found, that this does not work with some elements. One of the problems is, that in include/plugin_internal.inc.php the funktion generate_content() do include br-tags after the links.

Would it be reasonable to replace these and put the tag into a div-container instead? I think it would be more convenient for style-programmers who like to change the styles for the individual links.

It should not be a big problem, I changed it in the file so far, but I would appreciate if it could go into development for the next version.

I am using 0.8.5

Marian

Re: Getting rid of br-tags?

Posted: Thu Oct 06, 2005 3:15 pm
by garvinhicking
You can also set the "br" tag to "display: none" without needing to touch the PHP files. :)

Best regards,
Garvin

Posted: Thu Oct 06, 2005 4:09 pm
by heddesheimer
Great idea. Thanks

I have learned to get my HTML as logical structured als possible. Because br-tags are normally for display purpose and don't add much too the structure, wouldn't you aggree that it's a better goal to get rid of all those br-tags in the long run?

Marian

Posted: Fri Oct 07, 2005 6:42 pm
by heddesheimer
I jost got a note from my designer, that we will need the links as a HTML-List to make the pages better accessible for blind people. WordPress and other Blog-Scripts already have this as default.

Posted: Sun Oct 09, 2005 10:56 pm
by garvinhicking
You can change the markup of many plugins from within their PHP code. Some plugins like the linklist or staticpage linklist or "entry's links" already use <li>s for linklists.

Where exactly are you missing <li> in linklists?

Regards,
Garvin

Posted: Mon Oct 10, 2005 12:08 am
by heddesheimer
garvinhicking wrote:Where exactly are you missing <li> in linklists?
not in linklists but in the main navigation links

Posted: Mon Oct 10, 2005 1:09 pm
by garvinhicking
What do you mean with main navigation links exactly?

Best regards,
Garvin

Posted: Mon Oct 10, 2005 3:31 pm
by heddesheimer
garvinhicking wrote:What do you mean with main navigation links exactly?

Best regards,
Garvin

Code: Select all

        <h3 class="serendipitySideBarTitle serendipity_categories_plugin">Kategorien</h3>        <div class="serendipitySideBarContent"><div><a href="/blog/categories/4-Allgemein" title="Dies und Das" style="padding-left: 6px">Allgemein</a></div>
<div><a href="/blog/categories/3-Programmieren" title="Skriptsprachen" style="padding-left: 6px">Programmieren</a></div>
<div><a href="/blog/categories/2-MySQL" title="Alles über MySQL" style="padding-left: 12px">MySQL</a></div>
<div><a href="/blog/categories/1-PHP" title="Alles über PHP" style="padding-left: 12px">PHP</a></div>
<br /><a href="/blog/index.php" title="Alle Kategorien">Alle Kategorien</a></div>
    </div>
    <div class="serendipitySideBarItem container_serendipity_plugin_staticpage">

Or:
Seen on this blog:
http://www.smartphoner.ch/serendipity/

Code: Select all

            <h2>Aktuelle Einträge</h2>            <p><a href="/serendipity/index.php?/archives/48-SonyEricsson-stellt-das-P990-vor.html" title="SonyEricsson stellt das P990 vor">SonyEricsson stellt das P990 vor</a><br /><div class="serendipitySideBarDate">Montag, Oktober 10 2005</div><br /><a href="/serendipity/index.php?/archives/46-Neue-Fotos-vom-SonyEricsson-P1000.html" title="Neue Fotos vom SonyEricsson P1000">Neue Fotos vom SonyEricsson P1000</a><br /><div class="serendipitySideBarDate">Montag, Oktober 10 2005</div><br /><a href="/serendipity/index.php?/archives/44-Geruecht-Apple-iPhone.html" title="Gerücht: Apple iPhone">Gerücht: Apple iPhone</a><br /><div class="serendipitySideBarDate">Sonntag, Oktober  9 2005</div><br /><a href="/serendipity/index.php?/archives/43-Geruecht-SonyEricsson-P1000.html" title="Gerücht: SonyEricsson P1000">Gerücht: SonyEricsson P1000</a><br /><div class="serendipitySideBarDate">Sonntag, Oktober  9 2005</div><br /><a href="/serendipity/index.php?/archives/42-Geruecht-Nokia-7380.html" title="Gerücht: Nokia 7380">Gerücht: Nokia 7380</a><br /><div class="serendipitySideBarDate">Sonntag, Oktober  9 2005</div><br /><a href="/serendipity/index.php?/archives/40-SonyEricsson-W800i-wird-zum-iPod.html" title="SonyEricsson W800i wird zum iPod">SonyEricsson W800i wird zum iPod</a><br /><div class="serendipitySideBarDate">Freitag, Oktober  7 2005</div><br /></p>
HTH

Posted: Mon Oct 10, 2005 4:53 pm
by garvinhicking
Ah, okay.

Well, since I get this request from time to time I just took some of my time to make the Categories plugin use the Smarty features.

I committed it to version 0.9-beta2, since it does not work with 0.8 because of the new permission functions and some other new changes to the categories plugin.

If you are not using 0.9 already you can either upgrade, or you need to edit your include/plugin_internal.inc.php file and locate the "serendipity_categories_plugin" code to adapt the HTML code. It is not so hard, so you should easily be able to do it.

And for the future you can use the new plugin in 0.9 :)

Best regards,
Garvin

Posted: Mon Oct 10, 2005 5:08 pm
by heddesheimer
sounds good.

Thanks

Marian