Recent Topics

1 Apr 04, 2010 17:32    

My b2evolution Version: Not Entered

I need the $content to stop at first page.But cant figure it out.

$content =
Post Content Page 1
[pagebreak]
Post Content Page 2
[pagebreak]
Post Content Page 3 ...
<!-- item title -->

What i'd like :

$content_short = 
Post Content Page 1
<!-- item title -->

2 Apr 04, 2010 19:04

pre-rendered or raw?

Take a look in /inc/items/model/_item.light.class.php && /inc/items/model/_item.class.php for get_content_extension()

¥

3 Apr 05, 2010 10:11

¥åßßå wrote:

pre-rendered or raw?

Take a look in /inc/items/model/_item.light.class.php && /inc/items/model/_item.class.php for get_content_extension()

¥

i dont know if i need pre-rendered or raw..i guess sth could be done with preg_replace or substr replace using a wild card around the next-page tag, but i am not sure how to do it..thank you for the tip tough, i ll see what i can do

4 Apr 05, 2010 18:02

Take a look at the function I pointed to, you *should* be able to get the pre-rendered content of the first page

¥

5 Apr 05, 2010 21:30

¥åßßå wrote:

Take a look at the function I pointed to, you *should* be able to get the pre-rendered content of the first page

¥

i am pretty sure i can find that out, but i dont think i can make that into how i want it to be as described above

6 Apr 06, 2010 10:00

	/**
	 * Get a specific page to display (from the prerendered cache)
	 *
	 * @param integer Page number
	 * @param string Format, used to retrieve the matching cache; see {@link format_to_output()}
	 */
	function get_content_page( $page, $format = 'htmlbody' )
	{
		// Make sure, the pages are split up:
		$this->split_pages( $format );

		if( $page < 1 )
		{
			$page = 1;
		}

		if( $page > $this->pages )
		{
			$page = $this->pages;
		}

		return $this->content_pages[$format][$page-1];
	}

$foo = $Item->get_content_page(1).$Item->title;

¥

7 Apr 09, 2010 00:19

yay! after dealing with the syntax and where to put what where, i finally got around it.. thanks a heap


Form is loading...