Remove Date in RemoteRSS

Creating and modifying plugins.
Post Reply
User avatar
Eni
Regular
Posts: 62
Joined: Thu Jan 27, 2005 11:47 pm
Location: Münster, Germany

Remove Date in RemoteRSS

Post by Eni » Thu Jan 10, 2013 1:53 pm

Hi~

I'm not able to remove the date from the RemoteRSS plugin. Setting the date display to "no" in the configuration has no effect, whether with or without Smarty enabled.

Removing related lines from the tpl files in the plugin directory has no effect either. I tried both with Smarty on and off.

What could be the problem. Any ideas? Or does anyone know what exactly needs to be edited to get rid of the date display? :|

I'm hiding it now via...
.serendipitySideBarDate {
display:none;
}
... but I'd rather have it removed ._.

~eni
Sorry, I'm Late. But I Got Lost On The Road Of Life.

User avatar
yellowled
Regular
Posts: 7083
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Remove Date in RemoteRSS

Post by yellowled » Fri Jan 11, 2013 2:30 am

Eni wrote:Removing related lines from the tpl files in the plugin directory has no effect either. I tried both with Smarty on and off.
First of all, you should never edit the tpl files in the plugin directory because they will be overwritten in case of an update (to s9y if it's a core plugin or to the plugin itself). You can, however, place the tpl file(s) you want to edit in your template's directory and edit those copies. In that case, the template will use the edited copy instead of the plugin's original, and it's safe in case of updates.

As far as I can see, plugin_remoterss.tpl just loops over all the fields. So you would need to find out an identifier for the date field and make the foreach loop skip the date field. Is the date wrapped in a span? If so, it should be called <span class="rss_FOO">, and you could (probably, this is untested) use

Code: Select all

{if $fieldname!="FOO"}{$field|@escape}{/if}
in the foreach loop.

Then again, hiding it via CSS does just what you want to achieve and is much less of a hassle. :)

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Eni
Regular
Posts: 62
Joined: Thu Jan 27, 2005 11:47 pm
Location: Münster, Germany

Re: Remove Date in RemoteRSS

Post by Eni » Fri Jan 11, 2013 11:32 am

Thank you! I'm always a bit afraid with CSS that it's not working for viewers, so I tend to only use it for simple formatting and remove things I don't need from the tpl. But I suppose "display" is widespread enough. I saw a recommendation to use "visibility:hidden" as well to be sure that it works for everyone, but wouldn't that cause a conflict since it attributes a different behavior for the hiding?
I'm a bit outdated with my CSS background. When I learned it, half of the things didn't work in a lot of used browsers with the IE always needing an "extrawurst" :x I really should refresh on that soon...
First of all, you should never edit the tpl files in the plugin directory because they will be overwritten in case of an update (to s9y if it's a core plugin or to the plugin itself).
I know, I know :oops: But I edit other files in the plugin directories as well, e.g. some language files. So what I do is keeping a "modified plugins" folder in which I backup the ones I edited, document my changes in the files and when there is an update, I use xdiff to check for changes and eventually move my modifications to the new file. This way I also don't run into conflicts when the new tpl changes something affecting my changes - or at least, that's my logic :mrgreen:
Sorry, I'm Late. But I Got Lost On The Road Of Life.

User avatar
yellowled
Regular
Posts: 7083
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Remove Date in RemoteRSS

Post by yellowled » Fri Jan 11, 2013 1:59 pm

Eni wrote:I saw a recommendation to use "visibility:hidden" as well to be sure that it works for everyone, but wouldn't that cause a conflict since it attributes a different behavior for the hiding?
Basically, the difference is that visibility: hidden; only hides the content of an element, maintaining its layout, while display: none; removes the element completely. However, both also affect the “visibility” in screen readers, which is why the recommendation is to use both if you want to hide an element from both visual browsers and screen readers.

TL;DR: If you want to hide an element completely using CSS, use both. Of couse, it will still be in the source code, but that should not affect “normal” visitors.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
Eni
Regular
Posts: 62
Joined: Thu Jan 27, 2005 11:47 pm
Location: Münster, Germany

Re: Remove Date in RemoteRSS

Post by Eni » Fri Jan 11, 2013 3:00 pm

Ok, I think I'll just go the easy way for now and do that. Thank you! :D
Sorry, I'm Late. But I Got Lost On The Road Of Life.

Post Reply