page_param last_edit doesn't show

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
svasti
Posts: 1649
Joined: Wed Dec 17, 2008 5:08 pm

page_param last_edit doesn't show

Post by svasti » Sun Feb 14, 2010 11:45 pm

Hi everybody,
using cmsimple_xh 1.1

I want at the bottom of a page: This page was last edited xxx...

So I switched page_param show_last_edit on and entered the text "This page was last edited" in the page_params language file $plugin_tx['page_params']['last_edit']

It won't show! It always shows the text of the cmsimple language file $tx['lastupdate']['text'].

I would like a different text on the template (shows last edit for the whole site) and on a specific page (shows last edit of this page).

Any hint why the plugin doesn't work as expected? Am I doing something wrong?

bca
Posts: 293
Joined: Tue Sep 15, 2009 4:49 pm

Re: page_param last_edit doesn't show

Post by bca » Mon Feb 15, 2010 1:39 pm

hi
the parameter you changed $plugin_tx['page_params']['last_edit'] refers to the text that shows on the page params page just under the radio buttons not the text that appears on your page

b

svasti
Posts: 1649
Joined: Wed Dec 17, 2008 5:08 pm

Re: page_param last_edit doesn't show

Post by svasti » Mon Feb 15, 2010 2:31 pm

ah, it's true, the text under the radio button changes.

Too bad, I thought, I could influence the text at the page buttom.
But don't you think its a strange feature, as the text under the radio button somehow suggests that the shown text will appear at the buttom of the page?

Would be nice to have it implemented in the next update.

Martin
Posts: 346
Joined: Thu Oct 23, 2008 11:57 am
Contact:

Re: page_param last_edit doesn't show

Post by Martin » Mon Feb 15, 2010 3:09 pm

Hi svasti,

you are right! That's a small bug. Page_params uses by mistake the standard text from the CMSimple language file. It will be fixed in the next version. For now you could adjust lastupdate_text in the language settings to your needs or repair the in fact somewhat strange feature by replacing $tx['lastupdate']['text'] with $plugin_tx['page_params']['last_edit'] in

Code: Select all

if($pd_current['show_last_edit'] == '1' && $pd_current['last_edit'] !== ''){
        $c[$pd_s] .= '<div id = "pp_last_update">'.$tx['lastupdate']['text'].": ".date($tx['lastupdate']['dateformat'], $pd_current['last_edit']).'</div>';
    } 
in plugins/page_params/index.php (l. 73-75)

Martin

svasti
Posts: 1649
Joined: Wed Dec 17, 2008 5:08 pm

Re: page_param last_edit doesn't show

Post by svasti » Mon Feb 15, 2010 3:36 pm

Yes, now it works nicely!!! Wonderful, thank u, Martin

svasti

Post Reply