PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Sep 15, 2019 3:36 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Mar 29, 2010 3:00 am 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4313
Location: Sofia, Bulgaria
viewtopic.php?f=2&t=114380&p=599351

I have an SQL code in my post - now it's absolutely unreadable :(

The same applies to viewtopic.php?f=50&t=113253 - even PHP blocks are a mess.

_________________
There are 10 types of people in this world, those who understand binary and those who don't


Top
 Profile  
 
PostPosted: Mon Mar 29, 2010 12:14 pm 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
Yeah phpBB actually saves these posts in the database with the html added and line feeds removed. I'm not aware of any method to migrate these to the new format. I resaved all the posts in the second thread. This removed the html but did not restore the line feeds.

_________________
Image


Top
 Profile  
 
PostPosted: Mon Mar 29, 2010 1:54 pm 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4313
Location: Sofia, Bulgaria
Hm, when I try to edit my old posts they are still "well-formated" - i.e. it's a plain text surrounded with [ php ] BBtags ... Does phpBB do some "reverse" formatting? I'm not very familiar with phpB, but it seems very hard yo me to do a "reverse formatting" from an HTML to a plain BBcode/plain text. Even if it's done this way, can't you use it to "reformat" to the new version?

_________________
There are 10 types of people in this world, those who understand binary and those who don't


Top
 Profile  
 
PostPosted: Mon Mar 29, 2010 2:56 pm 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
Yes, it actually does that. Either by removing the HTML or somehow parsing it. I haven't had time to dig around in the code in order to figure out how it all works. Even the
Syntax: [ Download ] [ Hide ]
tags are assigned their own unique ID's, which seems pointless to me.

_________________
Image


Top
 Profile  
 
PostPosted: Tue Mar 30, 2010 2:28 am 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4313
Location: Sofia, Bulgaria

_________________
There are 10 types of people in this world, those who understand binary and those who don't


Top
 Profile  
 
PostPosted: Tue Mar 30, 2010 1:09 pm 
Offline
DevNet Master

Joined: Wed Feb 11, 2004 4:23 pm
Posts: 4872
Location: Palm beach, Florida
The new formatting is great and all, but I don't see why adding a new format has to break the old one, regardless of what phpbb does internally. Just allow the html....

100,000s of thousands of posts are now essentially destroyed....

I don't know what the purpose of coming on this site is if our posts are going to be destroyed by future enhancements.


Top
 Profile  
 
PostPosted: Tue Mar 30, 2010 1:11 pm 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
I agree. I didn't write the code. Unfortunately, we had to upgrade the forums. Perhaps you can research a fix?

_________________
Image


Top
 Profile  
 
PostPosted: Tue Mar 30, 2010 1:23 pm 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
Tell you what, I'll take another look at the old records as compared to the new records and report my findings. Perhaps we can write a script to reformat them.

_________________
Image


Top
 Profile  
 
PostPosted: Tue Mar 30, 2010 1:48 pm 
Offline
DevNet Master
User avatar

Joined: Mon Feb 24, 2003 11:12 am
Posts: 2572
Location: The Republic of Texas

_________________
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.


Last edited by AbraCadaver on Tue Mar 30, 2010 1:52 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue Mar 30, 2010 1:52 pm 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
Yes. His use php bb tags, while yours used code=php tags.

_________________
Image


Top
 Profile  
 
PostPosted: Tue Mar 30, 2010 1:54 pm 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine


Top
 Profile  
 
PostPosted: Fri Apr 02, 2010 11:05 am 
Offline
Forum Commoner

Joined: Thu Apr 01, 2010 7:28 pm
Posts: 96
Location: Chicagoland, IL, USA
I noticed that when I use the [ syntax=php ] form for code blocks, it doesn't give line numbers. Is there any way to add that in, or am I doing it wrong?

I was trying to get the (apparently) old [ code=php ] form to work, but it ate all my code. :banghead: I think the parser doesn't like something in my large code block over in the Coding Critique section... [ syntax=php ] works, but without line numbers, and if i replace [ syntax=php ] bbcode with [ code=php ], previewing eats all my code. Any suggestions?


Top
 Profile  
 
PostPosted: Sun Apr 04, 2010 4:28 am 
Offline
Forum Commoner

Joined: Thu Apr 01, 2010 7:28 pm
Posts: 96
Location: Chicagoland, IL, USA
I think the most problematic instance of this is in the Tutorials, as well as the stickies and guidelines. Some of the tutorials seem VERY helpful, but alas, the code blocks are broken!

I'd like to help out with this issue. Should I just report very helpful posts that are stricken with the problem, or is the something more I can do?

I noticed that if you quote one of these problem posts, the editor doesn't keep the HTML mess, it just shows what (I assume) the original contents of the code block is, inside the bbcode tags. So, it should be pretty simple to replace:
Syntax: [ Download ] [ Hide ]
[syntax=php]or[/syntax][syntax=php][/syntax]
 

...with the corrected bbcode tags.

I hesitate to start work on coding a routine for that, since I'm not that familiar with the interworkings of phpBB. I'll get started on learning it, so hopefully I can help out more.

EDIT: OK, wow. I realized that most of the stuff I'm saying was covered days ago, in this very thread. I've got to stop feeling helpful at 4 in the morning. Please forgive, I promise I mean well.


Last edited by minorDemocritus on Thu Apr 08, 2010 3:41 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Apr 04, 2010 6:34 pm 
Offline
DevNet Master

Joined: Wed Feb 11, 2004 4:23 pm
Posts: 4872
Location: Palm beach, Florida


Top
 Profile  
 
PostPosted: Sun Apr 04, 2010 11:32 pm 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
Great theory, however the line feeds are not in the database.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group