SOLVED | Last edited:

About the template and stylesheet - and changing the menu
Post Reply
twc
Posts: 233
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands

SOLVED | Last edited:

Post by twc » Thu Jan 17, 2013 10:52 pm

Last edited: is now add below the pages, how can i get it above the page under the txt page?

thanks
Last edited by twc on Fri Jan 18, 2013 9:51 am, edited 1 time in total.

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Last edited:

Post by Tata » Thu Jan 17, 2013 11:18 pm

Try to put the call

Code: Select all

<?php echo lastupdate();?>
in your template on desired position.
Or put it directly on the page just below the headding

Code: Select all

{{{PLUGIN:lastupdate();}}}
In this case the info will be placed below the heading, however.
The wanted posittion cann be tricked by CSS styling.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

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

Re: Last edited:

Post by cmb » Thu Jan 17, 2013 11:38 pm

Hi twc, hi Tata,

I guess twc is asking about the last update of each single page, which can be shown by setting "Show last edit?" to "yes" in the "Page" tab above the editor. This is simply appended to the page content. It has an ID, so basically it's possible to position it with CSS, but that's a bit beyond my CSS capabilities.

Another solution: in plugins/page_params/index.php from line 73:

Code: Select all

    if($pd_current['show_last_edit'] == '1' && $pd_current['last_edit'] !== ''){
        $c[$pd_s] .= '<div id = "pp_last_update">' . $plugin_tx['page_params']['last_edit']
                  .  ' ' . date($tx['lastupdate']['dateformat'], $pd_current['last_edit']) . '</div>';
    } 
Replace this with:

Code: Select all

    if($pd_current['show_last_edit'] == '1' && $pd_current['last_edit'] !== ''){
        $c[$pd_s] = '<div id = "pp_last_update">' . $plugin_tx['page_params']['last_edit']
                  .  ' ' . date($tx['lastupdate']['dateformat'], $pd_current['last_edit']) . '</div>' . $c[$pd_s];
    } 
That's neither elegant nor safe regarding updates, but maybe a viable workaround.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

twc
Posts: 233
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands

Re: Last edited:

Post by twc » Fri Jan 18, 2013 9:56 am

thanks :D

i have cms site privit that shows my music collection, so many txt below :lol:
so better display last edit above.........

Maby a good idea for next version 1.6 display last edit above or below option ?

cmb wrote:Hi twc, hi Tata,

I guess twc is asking about the last update of each single page, which can be shown by setting "Show last edit?" to "yes" in the "Page" tab above the editor. This is simply appended to the page content. It has an ID, so basically it's possible to position it with CSS, but that's a bit beyond my CSS capabilities.

Another solution: in plugins/page_params/index.php from line 73:

Code: Select all

    if($pd_current['show_last_edit'] == '1' && $pd_current['last_edit'] !== ''){
        $c[$pd_s] .= '<div id = "pp_last_update">' . $plugin_tx['page_params']['last_edit']
                  .  ' ' . date($tx['lastupdate']['dateformat'], $pd_current['last_edit']) . '</div>';
    } 
Replace this with:

Code: Select all

    if($pd_current['show_last_edit'] == '1' && $pd_current['last_edit'] !== ''){
        $c[$pd_s] = '<div id = "pp_last_update">' . $plugin_tx['page_params']['last_edit']
                  .  ' ' . date($tx['lastupdate']['dateformat'], $pd_current['last_edit']) . '</div>' . $c[$pd_s];
    } 
That's neither elegant nor safe regarding updates, but maybe a viable workaround.

Christoph

Post Reply