Page 1 of 1

onPrepareContent mambot with mospagebreak

Posted: Wed Feb 06, 2008 12:45 am
by yoshi
hi all,

I am trying to get a mambot to write div tags around the article content.
I have this working well in most circumstances. However, one area I am struggling with is the mospagebreak scenario.

Basically I want to know how I can make my mambot detect a page break or pagination, and write the divs for every page.

Hope that makes sense.  its for a joomla 1.0.14 compatible mambot.
Thanks for any help or pointers

Lee ???

Re: onPrepareContent mambot with mospagebreak

Posted: Wed Feb 06, 2008 12:49 pm
by yoshi
anyone help me on this?

I figure I need to incorporate

Code: Select all

$regexBreak = '/{(mospagebreak)\s*(.*?)}/i' ;
			
			preg_match_all( $regexBreak, $row->text, $matches, PREG_SET_ORDER ) ; //Search item for {mospagebreak}
			$text = preg_split( $regexBreak, $row->text ) ; //And split into pages

			$n = count( $text ) ;
with

Code: Select all

for ($i=0 ; $i<$n ; $i++) 
some how, but I have no idea how
Anyone help me achieve enlightenment?

Re: onPrepareContent mambot with mospagebreak

Posted: Tue Mar 18, 2008 11:32 pm
by qureshi
Peace yoshi,

Please take a look at http://forum.joomla.org/viewtopic.php?f ... 6#p1241066. I was facing a similar problem, and found a way around it.

Good luck,

Nadeem Qureshi