Recent Topics

1 Jan 02, 2008 21:08    

My b2evolution Version: 2.x

Sorry for the stupid question, but where can I find a list of Item properties (like $Item->title())?

I am specifically trying to determine which blog number a post belongs to.

I know I should be able to find this documentation myself, but I am stuck...

Thanks!

3 Jan 02, 2008 21:54

Man -- I looked for 30 minutes. Yikes. I am a dope.

RTFM (if you can find it). :)

Thanks!!!
Mark

4 Jan 02, 2008 22:01

OK -- so I was expecting to find $Item->BlogID or somesuch. I think the issue is that items don't belong to blogs...

How can I find the blog ID for a post?

Thanks,
Mark

6 Jan 03, 2008 00:04

I find it easier to browse teh files than the docs ;)

inc/items/model/_item.class.php ( approx 2711 )

	/**
	 * Get the Blog object for the Item.
	 *
	 * @return Blog
	 */
	function & get_Blog()
	{
		if( is_null($this->Blog) )
		{
			$this->load_Blog();
		}

		return $this->Blog;
	}

So, you should be able to do :

<?php
$items_blog = $Item->get_Blog();
$items_blog_ID = $items_blog->ID;
?>

¥

7 Jan 04, 2008 06:16

that worked perfectly. Thanks!


Form is loading...