PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Wed Mar 28, 2007 4:20 pm Reply with quote Back to top

TinyMCE was 7.7. Not sure about the pagebreak convention, but I like using the new pagebreak convention, and converting the content to use it once.
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Wed Mar 28, 2007 8:47 pm Reply with quote Back to top

I agree about going to the new [--pagebreak--] and posting a conversion script. Do we have a consensus?
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Thu Mar 29, 2007 1:28 am Reply with quote Back to top

Sounds like a plan!
View user's profile Send private message Send e-mail Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Thu Mar 29, 2007 7:04 am Reply with quote Back to top

Agreed. You da' man!
View user's profile Send private message Visit poster's website
alnuke
New Member
New Member


Joined: Jun 07, 2005
Posts: 5

PostPosted: Thu Mar 29, 2007 8:10 am Reply with quote Back to top

i tried this <!--pagebreak--> in my local machine and does not have any problem

i can see the links to go to the previous and next page at the bottom of the pages.

if you want to put this <!--pagebreak--> you have to click on the source and then add it where you want

Image

Image


Last edited by alnuke on Thu Mar 29, 2007 8:49 am; edited 1 time in total
View user's profile Send private message
alnuke
New Member
New Member


Joined: Jun 07, 2005
Posts: 5

PostPosted: Thu Mar 29, 2007 8:10 am Reply with quote Back to top

Image

Image


Last edited by alnuke on Thu Mar 29, 2007 8:49 am; edited 1 time in total
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Thu Mar 29, 2007 8:29 am Reply with quote Back to top

alnuke wrote:
i tried this <!--pagebreak--> in my local machine and does not have any problem

if you want to put this <!--pagebreak--> you have to click on the source and then add it where you want


Wow...! Very interesting. Thank you for pointing this out. Let me try that also. So if you edit the source directly the editor must not be htmlentity'izing the text. That makes sense.

So the immediate question is, do we leave it like this and just educate people about this trick, or make it more foolproof and still cut over to [--pagebreak--] (it would work in either edit source mode or not). I'm inclined to still go with the [--pagebreak--] since that seems more user friendly and more in line with the original intent of the feature (pre-advanced editor). But a case could be made for not changing anything too.
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Thu Mar 29, 2007 8:59 am Reply with quote Back to top

I would still be inclined to go with [--pagebreak--] as it is less likely to give us issues in the future. I think its likely there will be more people convert to RN from 7.7+ than converting from 7.5 or lower to RN.
Not thats its any consolation but I'm assuming that anyone 'upgrading' from 7.6 to 7.7+ would have this same problem.
View user's profile Send private message Send e-mail Visit poster's website
alnuke
New Member
New Member


Joined: Jun 07, 2005
Posts: 5

PostPosted: Thu Mar 29, 2007 9:07 am Reply with quote Back to top

the only difficulty i encountered by putting it directly in the source is that when it involves long paragraph or many pages because there is no gaps between paragraphs in the source code that can guide me where to put <!--pagebreak-->.

so in my opinion, [--pagebreak--] option is better
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Thu Mar 29, 2007 9:18 am Reply with quote Back to top

Agreed.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Thu Mar 29, 2007 5:56 pm Reply with quote Back to top

We'll have to "cut-over" the page text as well to match. Unfortunately, it does not appear to be in the language define. Not an issue, just thought of it and wanted to mention it.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Thu Mar 29, 2007 6:37 pm Reply with quote Back to top

Here are the fixes.

In modules/Content/index.php, find this line of code:

Code:

$contentpages = explode( "<!--pagebreak-->", $mytext );


Replace it with this:

Code:

$contentpages = explode( '[--pagebreak--]', $mytext );


Then, for each language you support, you need to update the admin language file. For example, in modules/Content/admin/language/lang-english.php find this:

Code:

if (!defined('_PAGEBREAK')) { define('_PAGEBREAK','If you want multiple pages you can write <b>&lt;!--pagebreak--&gt;</b> where you want to cut.'); }


Replace it with
Code:

if (!defined('_PAGEBREAK')) { define('_PAGEBREAK','If you want multiple pages you can write <b>[--pagebreak--]</b> where you want to cut.'); }


And here is a conversion s~cript

Code:

<?php
///////////////////////////////////////////////////////////////////////
// content_pagebreak_convert.php by Gremmie
// This script converts content with the old <!--pagebreak--> style
// pagebreaks into the newer [--pagebreak--] style.
//
// To use:
// 1) Upload this script to the root directory of your PHP-Nuke
// site (the same directory as index.php).
// 2) Log into your site as an admin.
// 3) Execute the script from your browser, e.g.
// http://www.mysite.com/content_pagebreak_convert.php
// 4) Delete this script from your server
//
///////////////////////////////////////////////////////////////////////

include 'mainfile.php';
include 'header.php';
OpenTable();

if (is_admin($admin))
{
   $sql = 'SELECT pid, text FROM ' . $prefix . '_pages';
   $result = $db->sql_query($sql);
   while ($row = $db->sql_fetchrow($result))
   {
      $pid = intval($row['pid']);
      $text = $row['text'];

      $text = str_replace(array('<!--pagebreak-->', '&lt;!--pagebreak--&gt;'),
                          '[--pagebreak--]',
                          $text);
      $text = addslashes($text);

      $sql = "UPDATE {$prefix}_pages SET text = '$text' WHERE pid = '$pid'";
      $result2 = $db->sql_query($sql);
      if ($result2 === false)
      {
         echo "Oops, problem updating row #$pid!<br />";
      }
   }
   echo '<b>Conversion complete</b><br /><br />';
   echo '<b>Please delete this script from your server now.</b><br /><br />';
}
else
{
   echo '<b>You must be admin to run this script</b><br /><br />';
}

CloseTable();
include 'footer.php';
?>

View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Fri Mar 30, 2007 5:58 am Reply with quote Back to top

This looks great Gremmie! (Still cannot believe my previous post... what a dope I am sometimes... hadn't looked in admin/language.)

I will move this over as a RN Bugs, especially since it "breaks" the true functionality of the Content module.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Fri Mar 30, 2007 6:11 am Reply with quote Back to top

Ok, this has been placed into the RN Bug Fixes forum here:
Only registered users can see links on this board!
Get registered or login to the forums!


Any further discussion, if pertinent to the issue, should be posted in that thread.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Fri Mar 30, 2007 7:32 am Reply with quote Back to top

Yes, I removed my post and subsequent posts for two reasons: 1) to avoid confusing people with my brain fart, and 2) to save face. Embarassed Rolling Eyes
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sun Apr 15, 2007 9:12 pm Reply with quote Back to top

This issue has been assigned to me in the issue tracker. I can fix the code, but how do you want to handle the conversion script? Include with future versions of RN and update the docs to mention it?
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Mon Apr 16, 2007 6:28 am Reply with quote Back to top

Let us continue the discussion over in the issue tracker.
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum