onPrepareContent mambot with mospagebreak

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
User avatar
yoshi
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Dec 09, 2005 12:30 pm
Location: uk
Contact:

onPrepareContent mambot with mospagebreak

Post by yoshi » Wed Feb 06, 2008 12:45 am

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 ???

User avatar
yoshi
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Dec 09, 2005 12:30 pm
Location: uk
Contact:

Re: onPrepareContent mambot with mospagebreak

Post by yoshi » Wed Feb 06, 2008 12:49 pm

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?

qureshi
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Jul 02, 2006 2:12 pm

Re: onPrepareContent mambot with mospagebreak

Post by qureshi » Tue Mar 18, 2008 11:32 pm

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


Post Reply