more divs for plugin_remoterss

Creating and modifying plugins.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

more divs for plugin_remoterss

Post by stm999999999 »

the plugin_remoterss has a irritating use of div / br:

the output:

Code: Select all

<div class="sidebar">
    <div class="serendipitySideBarItem container_serendipity_plugin_remoterss">
        <div class="sidebar_header"><h2 class="serendipitySideBarTitle serendipity_plugin_remoterss">feed-title</h2></div>
        <div class="sidebar_content_container">

<a href="xxx">titel</a><br />
<div class="serendipitySideBarDate">(01.10.2006)</div><br />
<a href="xxx">titel</a><br />
<div class="serendipitySideBarDate">(01.10.2006)</div><br />
* the <br /> after the div has no sense - space to the next item should be made by css

* the date has a div, the titel is no div but a br!?

my changes:

no br, instead a div around the content:

Code: Select all

\plugins\serendipity_plugin_remoterss\serendipity_plugin_remoterss.php

482a483,484
>                         $content .= '<div class="serendipitySideBarContent">';
> 
501c503
<                         $content .= "<br />\n";
---
>                         $content .= "</div>\n";
506c508
<                                       . '</div><br />';
---
>                                       . '</div>';
the css can be look like this:

Code: Select all

.container_serendipity_plugin_remoterss .serendipitySideBarContent {
	margin-bottom:3pt;
} 
for "no date" or with .serendipitySideBarDate
Ciao, Stephan
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: more divs for plugin_remoterss

Post by yellowled »

stm999999999 wrote:

Code: Select all

<div class="sidebar">
    <div class="serendipitySideBarItem container_serendipity_plugin_remoterss">
        <div class="sidebar_header"><h2 class="serendipitySideBarTitle serendipity_plugin_remoterss">feed-title</h2></div>
        <div class="sidebar_content_container">

<a href="xxx">titel</a><br />
<div class="serendipitySideBarDate">(01.10.2006)</div><br />
<a href="xxx">titel</a><br />
<div class="serendipitySideBarDate">(01.10.2006)</div><br />
* the <br /> after the div has no sense - space to the next item should be made by css
I have to admit I don't know the plugin in question, but I'll try to keep up anyway :wink: You're right in general. In terms of 'sensible XHTML code', tha date should either be a div without br or a span with br. However, there are 'CSS scenarios' in which the code makes sense, i.e. if .serendipitySideBarDate has 'display: inline;'. I can't really think of a sensible example right now, but it's definitely possible.
stm999999999 wrote: * the date has a div, the titel is no div but a br!?
'titel' is wrapped inside <a></a>, hence the <br />.

YL
Post Reply