PDA

View Full Version : UBB to vB import glitches again


Steve_S
Sun 10th Sep '00, 12:42am
Hello,

Ed was nice enought to post some code fixes but this still does not work properly.

Brand new import at:

http://www.geekvillage.com/forums/showthread.php?threadid=8081

Please note this BB is not yet live members :) but play if you want and all data will evenutally get nuked.

Compare this to original UBB post at:

http://geekvillage.com/ubb/Forum2/HTML/000114.html

1) img code is turned off for all forums and yet the smiles are not importing properly. I can not turn it on for my board as it's a serious security risk.

2) Parts of the "sig" are not importing properly

The code from admin/import.php which I have:


// do smilies
$htmlcode=str_replace("<IMG SRC=\"$ubbnoncgiurl/smile.gif\">",":)",$htmlcode);
$htmlcode=str_replace("<IMG SRC=\"$ubbnoncgiurl/frown.gif\">",":(",$htmlcode);
$htmlcode=str_replace("<IMG SRC=\"$ubbnoncgiurl/redface.gif\">",":o",$htmlcode);
$htmlcode=str_replace("<IMG SRC=\"$ubbnoncgiurl/biggrin.gif\">",":D",$htmlcode);
$htmlcode=str_replace("<IMG SRC=\"$ubbnoncgiurl/wink.gif\">",";)",$htmlcode);
$htmlcode=str_replace("<IMG SRC......SNIPED as it exceeeds your limit

// do lists
$htmlcode=str_replace("<ul type=square>","",$htmlcode);
$htmlcode=str_replace("</ul>","",$htmlcode);
$htmlcode=str_replace("</UL>","[/list]",$htmlcode);
$htmlcode=str_replace("<ol type=1>","[list=1]",$htmlcode);
$htmlcode=str_replace("<ol type=A>","[list=a]",$htmlcode);
$htmlcode=str_replace("</ol>","[/list=a]",$htmlcode);
$htmlcode=str_replace("<li>"," ",$htmlcode);
$htmlcode=str_replace("<LI>","[list]",$htmlcode);

$htmlcode=str_replace("<p>","\n\n",$htmlcode);
$htmlcode=str_replace("<P>","\n\n",$htmlcode);
$htmlcode=str_replace("<br>","\n",$htmlcode);
$htmlcode=str_replace("<BR>","\n",$htmlcode);

return $htmlcode;
}





I'm stumped so I would appreciate some help.

[Edited by Steve_S on 09-09-2000 at 11:54 PM]

Steve_S
Sun 10th Sep '00, 12:59am
yuk

my code got nuked in my previous post

try this for the entire file:

removed. my appolagies. sorry

sorry about that

[Edited by Steve_S on 09-10-2000 at 02:37 AM]

Mike Sullivan
Sun 10th Sep '00, 1:44am
Steve,

I'm going to have to ask you to remove that link, as the code you posted is NOT public domain. Or, could you please replace it with code snippits (ie, what you "posted" here :))

I'm looking at it now....

Mike Sullivan
Sun 10th Sep '00, 1:48am
Ok, try replacing the 2 code snippets you posted with this:


// do smilies
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/smile.gif\">",":)",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/frown.gif\">",":(",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/redface.gif\">",":o",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/biggrin.gif\">",":D",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/wink.gif\">",";)",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/tongue.gif\">",":p",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/cool.gif\">",":cool:",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/rolleyes.gif\">",":rolleyes:",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/mad.gif\">",":mad:",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/eek.gif\">",":eek:",$htmlcode);
$htmlcode=eregi_replace("<IMG SRC=\"$ubbnoncgiurl/confused.gif\">",":confused:",$htmlcode);


// do lists
$htmlcode=eregi_replace("<ul type=square>","[ list]",$htmlcode);
$htmlcode=eregi_replace("</ul>","[ /list]",$htmlcode);
$htmlcode=eregi_replace("</UL>","[ /list]",$htmlcode);
$htmlcode=eregi_replace("<ol type=1>"," [ list=1]",$htmlcode);
$htmlcode=eregi_replace("<ol type=A>"," [ list=a]",$htmlcode);
$htmlcode=eregi_replace("</ol>","[ /list=a]",$htmlcode);
$htmlcode=eregi_replace("<li>","[ *]",$htmlcode);
$htmlcode=eregi_replace("<LI>","[ *]",$htmlcode);Please note the code edits I made, so it wasn't parsed!!

Keeper
Sun 10th Sep '00, 3:15am
I want to switch servers AND switch to vB at the same time, is this possible? Or would I have to transfer the necessary files to my new server before beginning the transfer? My forum is huge, so that would be quite inconvenient.

Steve_S
Sun 10th Sep '00, 4:23am
Much thanks Ed :)

lists seems to be fixed - THANK YOU :)

smiles is still broken and does not work. I wounder if this is because [ img] code is turned off?

Any more help on this would be great.

http://www.geekvillage.com/forums/showthread.php?threadid=8081

Keeper, maybe start a new topic on your issue please rather than gumming up the works in this thread please :)

I will try and help you

eva2000
Sun 10th Sep '00, 4:41am
nice steve :D ... not sure about that smile smiley though :)

Mike Sullivan
Sun 10th Sep '00, 11:36am
Steve - could you please tell me EXACTLY what you're entering in for your UBB NON-CGI directory?

It should be this: http://geekvillage.com/ubb (<-- note, no slash)

Steve_S
Sun 10th Sep '00, 2:41pm
Hi Ed,

Thanks. I tried exactly what you said:


Steve - could you please tell me EXACTLY what you're entering in for your UBB NON-CGI directory?

It should be this: http://geekvillage.com/ubb (<-- note, no slash)

I recieve an error and import of posts won't run:

error: Doing forum 2. This could take a while - it can do at least 200 threads per minute on my test server

Doing threads threads 0 to 200

Cannot find forum's thread information file. Cannot continue.

What I think as a non PhP geek is maybe that the import filter is treating "smiles" as [img] and since [ img] is turned off it does not work? Each line in the import filter code has:

"<IMG......."

Also note the path in the post starts with [ img]

Any other ideas?