Getting <!-- pagebreak --> to work with TinyFCK/TinyMC

Share your CuteNews.RU skins and code snippets.

Getting <!-- pagebreak --> to work with TinyFCK/TinyMC

Postby DistantJ » Sat Aug 01, 2009 3:00 pm

Very simple one, this.


In show.news.php find:
Code: Select all
         $row['full'] = explode('<!--nextpage-->', ($row['full'] ? $row['full'] : $row['short']));

And replace it with:
Code: Select all
         $row['full'] = explode('<!-- pagebreak -->', ($row['full'] ? $row['full'] : $row['short']));


And you're done! Simple as that! Now your pagebreak button in TinyFCK/TinyMCE will be useable.

If you have existing articles, just log into cutenews, go to options, Search and Replace, then search and replace <!--nextpage--> with <!-- pagebreak -->. This will fix the pagebreaks in previous articles and allow them to show up in the editor if you go back to edit them.

Please note that there are no spaces in <!--nextpage--> but there are spaces in <!-- pagebreak -->. This is important as TinyFCK/TinyMCE puts spaces in the tag when inserting it and neither the editor nor cutenews will be able to understand it without them.
DistantJ
 
Posts: 33
Joined: Tue Jul 29, 2008 10:27 am

Return to Skins and snippets



Who is online

Users browsing this forum: No registered users and 2 guests

cron