Core lastupdate force an extra line

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
lillebitte
Posts: 55
Joined: Fri Jan 29, 2016 7:20 am

Core lastupdate force an extra line

Post by lillebitte » Fri Jan 29, 2016 2:23 pm

CMSimple do not fully separate layout and styling from the content.
You can not CSS style the lastupdate function on one line on your site, core inserts a <br> before the timestamp.
Furthermore unlike other text strings in the language file, core places a colon between the text and the <br>. If you empty the text field in the language file you get a colon and the <br> tag, e.g. like

:
January 29, 2016

lillebitte
Posts: 55
Joined: Fri Jan 29, 2016 7:20 am

Re: Core lastupdate force an extra line

Post by lillebitte » Fri Jan 29, 2016 2:57 pm

I am talking about CMSimple_XH and it doesn't work with <?php echo lastupdate('');?> in the template.html

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Core lastupdate force an extra line

Post by Gert » Fri Jan 29, 2016 2:59 pm

lillebitte wrote:I am talking about CMSimple_XH ...
I have seen it in the Danish Thread, that's why I have deleted my post.
Gert Ebersbach | CMSimple | Templates - Plugins - Services

lillebitte
Posts: 55
Joined: Fri Jan 29, 2016 7:20 am

Re: Core lastupdate force an extra line

Post by lillebitte » Fri Jan 29, 2016 3:03 pm

Ok :)

lillebitte
Posts: 55
Joined: Fri Jan 29, 2016 7:20 am

Re: Core lastupdate force an extra line

Post by lillebitte » Fri Jan 29, 2016 5:35 pm

I have just learned that I can avoid the <br> with <?php echo lastupdate("true");?>, but it does not eat the colon.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Core lastupdate force an extra line

Post by cmb » Fri Jan 29, 2016 7:36 pm

lillebitte wrote:I have just learned that I can avoid the <br> with <?php echo lastupdate("true");?>, but it does not eat the colon.
Yes, indeed that is unfortunate. Quick fix: change line 420 in cmsimple/tplfuncs.php to:

Code: Select all

$t = $tx['lastupdate']['text']; 
Probably it's best to change this generally for XH 1.7, and to add the colon to the language files where it could easily be removed or modified by the user.

PS: Just noticed that Preben already posted this solution in the Danish forum. :)
Last edited by cmb on Fri Jan 29, 2016 7:50 pm, edited 1 time in total.
Reason: added PS
Christoph M. Becker – Plugins for CMSimple_XH

lillebitte
Posts: 55
Joined: Fri Jan 29, 2016 7:20 am

Re: Core lastupdate force an extra line

Post by lillebitte » Fri Jan 29, 2016 9:11 pm

Thanks, I did not dare to make changes in tplfuncs.php on my own, I stick to html and css! But now I have more solutions to choose from, awesome :)

Post Reply