News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

phpBB2 Members, Posts, Forums and Attachements > SMF

Started by zigx, October 11, 2004, 11:05:14 PM

Previous topic - Next topic

zigx

Is it possible?

i just bought vbulletin SOLEY based on the fact that an individual on hxxp:vbulletin.org [nonactive] wrote an attachment importer for vb's impex (importing system)


can smf import phpbb2 attachments?

i will ebay my vBulletin license lol

zigx

just fyi.... i dont understand code THAT well...i see in the phpbb importer that it has some lines regarding attadhments and i just wanted to clarify.


packman

Quote from: zigx on October 11, 2004, 11:05:14 PM
can smf import phpbb2 attachments?

It should do, but as I never had attachments in my phpBB system I couldn't check this part of the code. It does all the other things you mention (as well as polls, smileys, avatars, PMs, etc), so give it a go on a test SMF install. If the attachment code doesn't work, it will be fixed.
Chris

Grudge

It should do attachments (Or the attachment mod specifically). I had tested it so it should work. Try it out, it won't touch your phpBB install so if it doesn't work you've lost nothing ;)
I'm only a half geek really...

Jerry

I tried running the attachments import for phpbb, and it showed as no having it installed. I have all the tables in the phbb database it is looking for . .. Any one have any ideas?


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Jerry

sorry for the double post, but when I took out the lines the check for the tables in the converter the attachments went over fine  :D I don't think its the best way to do it but it worked.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

packman

Chris

Jerry

the part that checks for the mod:
// Test whether they have the mod installed or not?
$result = mysql_query("
SHOW TABLES LIKE {$from_prefix}attachments");
list ($tableExists) = mysql_fetch_row($result);
mysql_free_result($result);

// if (empty($tableExists))
// {
// echo '
// <div style="color: red;">Fatal Error: Attachments MOD is not installed in your phpBB forum!!</div>';
//
// return;
// }

// Tell ummm...
the if (emty($tableExists)) part.
I am also having a problem with the smilies, it turns them all into words like : goes to P and :D goes to D and :roll: turns to roll, etc. ::) But the smilies of a post show up in quotes of a topic, but not in the post itself. confiusing :S


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

[Unknown]

What happens if you add:

var_dump($tableExists);die;

Before the commented section?

-[Unknown]

packman

Does the table name need single quotes round it, e.g.

SHOW TABLES LIKE 'phpbb2_attachments'

phpMyAdmin gives an error (on a different table in a different database) if I don't add the single quotes.

Error

SQL-query :

SHOW TABLES LIKE mmap_data

MySQL said:
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'mmap_data' at line 1
Chris

Jerry

[Unknown] - I have not had time to try yours
packman - when I add the ' ' s in phpMyadmin the table will show, but without it will not. Maybe thats the problem? In an hour or 2 I will try the ' ' s then if that does not work I will do [Unknown]'s


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Jerry

[Unknown] - That didn't help :(
[packman] - that probably was a problem, but didn't fix it.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

[Unknown]

Quote from: Jerry on October 26, 2004, 08:05:28 PM
[Unknown] - That didn't help :(
[packman] - that probably was a problem, but didn't fix it.

Aha, yes, the problem is missing quotes.

My question was just to diagnose, not to fix.

-[Unknown]

Jerry

well when I added your code to it it said NULL, but when I added the quotes, it still says the mod is not installed.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

[Unknown]

And, if you add both... does it still say NULL?

-[Unknown]

Jerry

::) I willl give that a try when my webhost is running normally, for some reason the mysql is going really slow :(


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Jerry



- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Jerry

I have decided to go ahead and convert my forums over any way with the smiley problem, I was only worried about getting my Attachments which went smoothly :) other then the code commenting :-\


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

[Unknown]

#19
The correct line should be:

SHOW TABLES LIKE '" . preg_replace('~^`.+?`\.~', '', $from_prefix) . "attachments'");

! The phpBB converter didn't check for the attachments table properly. (phpbb2_to_smf.php)

-[Unknown]

Advertisement: