Page 1 of 1

recently_updated

Posted: Thu Nov 15, 2007 11:42 am
by piotr22
hi 

I would like to created site which displaying  last change (date and user which insert changes on the site)
i.e.

About us
Last modificatrion:  10.11.2007  17:33  by    Peter Been (fullname)

Kontakt
Last modificatrion:  10.11.2007  17:33  by    Chris Saab

....


thank you very much

Re: recently_updated

Posted: Thu Nov 15, 2007 1:09 pm
by cyberman
Then you have to rewrite the plugin ;D.

Not sure but you can try this - add after line 84 (in that plugin)

Code: Select all

    $output .= ' by ' . $curcontent->GetAuthor();

Re: recently_updated

Posted: Thu Nov 15, 2007 1:29 pm
by piotr22
thank but it doesn't work


Fatal error: Call to undefined method Content::GetAuthor() in /var/www/is/plugins/function.recently_updated.php on line 85

Re: recently_updated

Posted: Fri Nov 16, 2007 10:33 am
by piotr22
is anybody who can help me.




pleaseee :)

thank you very much

Re: recently_updated

Posted: Fri Nov 16, 2007 12:37 pm
by cyberman
OK, as I said on other place I'm not a coder for real - another try :):

Add after line 73

Code: Select all

    $curauthor =& $curnode->GetAuthor();
Add after line 84

Code: Select all

    $output .= ' by ' . $curauthor;

Re: recently_updated

Posted: Mon Nov 19, 2007 7:42 am
by piotr22
thank you  very much  but

Fatal error: Call to undefined method Tree_Node::GetAuthor() in /var/www/is/plugins/function.recently_updated.php on line 74


please help

Re: recently_updated

Posted: Mon Nov 19, 2007 7:47 am
by alby
piotr22 wrote:
Fatal error: Call to undefined method Tree_Node::GetAuthor() in /var/www/is/plugins/function.recently_updated.php on line 74
Try to add red code in source:
    .....
    $output .= $leadin;
    $output .= date($dateformat,strtotime($updated_page['modified_date']));
  $userops =& $gCms->GetUserOperations();
  $thisuser =& $userops->LoadUserByID($gCms->variables['pageinfo']->content_last_modified_by_id);
  $output .= ' by '. cms_htmlentities($thisuser->firstname .' '. $thisuser->lastname);
    $output .= '';
    .....
Alby

Re: recently_updated

Posted: Mon Nov 19, 2007 9:17 am
by piotr22
thank you very much Alby :)

Re: recently_updated

Posted: Mon Nov 19, 2007 9:27 am
by piotr22
thank you very much Alby :)

I have next problem :) with  rss

I insert in site

{cms_module module="news" category="EG" makerssbutton="true"}

and when I click this in IE 7.0 or firefox everythink is ok  but when I click this button in IE 6.0 somethink is wrong.
I see some code. I know that IE 6 has't plugin whitch read rss.

And my question.
It's possible insert some code which

if user have IE 7 or firefox  then   user see this button   else    user see some text information.

where and how to do this

thx please help

Re: recently_updated

Posted: Mon Nov 19, 2007 10:02 am
by cyberman
piotr22 wrote: I have next problem :) with  rss
Please open a new thread with related topic.