News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Slash Symbol before ' and "

Started by tempster, January 26, 2011, 12:32:14 PM

Previous topic - Next topic

tempster

I have run the converter to convert my ipb 2.3.1 boad to smf several times and the categories, topics, posts and attachments all converted.  However, none of the emdedded flash converted properly and there is a \ symbol in the text of the posts before every ' and every "

For example,

"this text" converted to \"this text\"  and,

he's converted to he\'s

While the attachments all converted the ipb code for attachments [attachment=4433:attachment] is still in the posts, with the attachments at the bottom of the posts.

Anyone know how I can get rid of this errant \ symbol in my posts before ' and "?

ThorstenE

this should fix the slashes in posts, in invision23_to_smf.sql find:
---* {$to_prefix}messages 200
---{

add after:
$ignore_slashes = true;

attachments: there are two solutions:
1) remove the inline attachment code completely from the messages
2) Install the ILA modification (check the customize site for details) and convert the [attachment=ID:attachment] tags to ILA tags..
Wich solution is your favorite?

tempster

#2
thanks for your help

does embedded video from youtube, dailymotion usually convert properly with the converter?

tempster

Make the mod and I'm still getting the slashes

ThorstenE

Quote from: tempster on January 26, 2011, 01:22:36 PM
does embedded video from youtube, dailymotion usually convert properly with the converter?
don't know that, sorry..
Quote from: tempster on January 26, 2011, 02:24:47 PM
Make the mod and I'm still getting the slashes
ok, which SMF converter do you use? the 1.1.x converter or the 2.0 version?

tempster

I used the two converters for ipb 2.3 at this topic http://www.simplemachines.org/community/index.php?topic=238557.0

The converter at the top of the post ran through to completion with the edit, but the slashes remained.

The other converter sql file in this topic at http://www.simplemachines.org/community/index.php?topic=238557.msg1666371#msg1666371 seemed like it addressed a similar problem.  However, the conversion stopped at converting attachments with this version of the converter with the edits you suggested. 

I thought all of these were for smf 1.1.12.  I'm running 1.1.12

ThorstenE

ok, let's start with the slashes first.. please try the attached version.

tempster

#7
looks like it worked for the slashes in the text, thank you so much for your help.

FYI, this is how the embedded youtube code converted

converted code
[object width="300" height="267"][param name="movie" value="http://www.youtube.com/v/2I6e4bV3HnY?fs=1&hl=en_US"][/param][param name="allowFullScreen" value="true"][/param][param name="allowscriptaccess" value="always"][/param][embed src="http://www.youtube.com/v/2I6e4bV3HnY?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="300" height="237"][/embed][/object]

true youtube code
<object width="300" height="237"><param name="movie" value="http://www.youtube.com/v/2I6e4bV3HnY?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2I6e4bV3HnY?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="300" height="237"></embed></object>

I did a search of "<center>" on the converted forum and the <center> code converted to the corresponding code fore centering in smf and works for centering

ThorstenE

ok, maybe there is an easy fix:
in invision23_to_smf.sql find and remove this line:
$row['body'] = substr(strtr(strtr($row['body'], '<>', '[]'), array('[br /]' => '<br />')), 0, 65534);

tempster

#9
thank you so much for your help, the embedded youtube code is working in the posts I checked and everything seems fine.

I will try the ILA modification  on a local desktop version of the converted database.

Can I use this same rouitine with the  invision23_to_smf.sql file you gave me (and edits) to convert a 2.1.7 ipb version of the 2.3.1 ipb board I just converted?

Thanks again.

ThorstenE

:) these should convert your attachments bbc to match the ILA syntax:
find:
---}
SELECT
p.pid AS ID_MSG, p.topic_id AS ID_TOPIC, p.post_date AS posterTime,

add before:
/*inline attachments? we need a simple fix */
preg_match_all('~\[attachment=(.+?)\]~is',$row['body'], $attachments);
/* replace inline attachments with a counter */
foreach ($attachments[1] as $index => $attach)
$row['body'] = str_replace($attach, $index + 1, $row['body']);


there are some differences between IPB2.1 and IPB2.3, but the lines for bbc conversion should be the same for both converters. Therefore the fix should also work for both converters.

tempster

#11
The effect of the inserted code on the conversion is that the attachement codes were all change to start at 1 as in "[attachment=1]".  It looks like all of the posts with attachments start at [attachment=1] and if there is more than one attachment in the post, then there are [attachment=2], [attachment=3] etc.

in one post using the converter before the inline edit
[attachment=4278:attachment] [attachment=4279:attachment]

in same post after conversion with the inline attachment edit
[attachment=1] [attachment=2]

the attachment number from the url of the actual attached image in the converted forum is 4083 ( ... index.php?action=dlattach;topic=42340.0;attach=4083 )


the original code in ipb was
<center>[attachment=4278:attachment] [attachment=4279:attachment] </center>

ThorstenE

Quote from: tempster on January 28, 2011, 03:29:01 AM
[attachment=1] [attachment=2]
indeed, this is intended and should work with the ILA modification.

tempster

is that mod compatible with smf 1.1.12?  I get error messages that the package is corrupt or not compatible with 1.1.12

ThorstenE

Quote from: tempster on January 28, 2011, 09:38:42 PM
is that mod compatible with smf 1.1.12?  I get error messages that the package is corrupt or not compatible with 1.1.12
ups, yes.. ILA is for SMF 2.0 series but this one should hopefully work:
http://custom.simplemachines.org/mods/index.php?mod=1159

tempster

Well, this is interesting, this mod inserts the attachment at a point in the post but the attachment is still an attachment, it is not displayed as a picture.  I guess I have to read more about how this mod works.

The mod did convert all the attachment code to show the attached files.

I really appreciate your help with all of this.  I never expected such a total conversion to smf.

ThorstenE

mhh, maybe the thumbnails are corrupted or img attachments wasn't properly detected.. please try the tool from this topic:
http://www.simplemachines.org/community/index.php?topic=187532.msg1193010#msg1193010

tempster

there is a file with this name in the conversion tools section.  I downloaded and ran the file you pointed to and there is no change.  Also, I ran the conversion with the Attachments Positioning mod already installed and got the same result.

I clicked on modify post on the converted board and clicked to insert an attachment again, the results were the some.  So, maybe this mod works this way on 1.1.12 boards.


ThorstenE

Quote from: tempster on January 29, 2011, 01:35:36 AM
The mod did convert all the attachment code to show the attached files.
yep, you're right.. tested the mod myself and it is different than ILA for SMF 2.0.. there is always the option to remove the inline tags compleletely, if you prefer?

tempster

#19
With a lot of the attachments in ipb, while I did attach the image to a post, I inserted the image at the top of the post or in the text of the post using the url to the image (which I got from the attachment).  So, a lot of the images in the converted board are displaying as images in the post because the urls to the images on the old board are valid.

I'm very happy with the conversion.  Thanks again for your help.

Advertisement: