Recent Topics

1 Apr 05, 2008 11:12    

My b2evolution Version: Not Entered

So if you look at a permalink page, it changes when you get a comment. Thus I would like to see the "post_datemodified" field updated when a post gets a comment. Search engines and the sitemap.php file being the reason.

2 Apr 05, 2008 11:44

I've got a plugin that does this ... I'll have to dig it out .... but there should be something similar in the core .... soon :p

¥

*edit*
You probably don't want the whole of the plugin, so this is the relevant bit :

	/**
	 * This is a blogrum function
	 *
	 * @param unknown_type $params
	 */
	function AfterCommentFormInsert( $params )
	{
			$params['Comment']->Item->set( 'datemodified', $params['Comment']->get( 'date' ) );
			$params['Comment']->Item->dbupdate();
	}

3 Apr 05, 2008 11:54

Cool! Thanks again! I'm not a fan of doing (a lot of) core hacks (anymore), but hey once you start you might as well go for it right?

4 Apr 09, 2008 02:06

ideally there would be an additional field in the db (updated by the core) named sth like:

post_datetouched
ot
post_dateamended

which do you think is best?


Form is loading...

Build your own website! – This forum is powered by b2evolution CMS, a complete engine for your website.