Advertisement:

Author Topic: URL's not converted? VB 3.8.7 to SMF 2.0.7?  (Read 10028 times)

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 612
  • Gender: Male
    • Satellite Fun
URL's not converted? VB 3.8.7 to SMF 2.0.7?
« on: March 15, 2014, 07:57:58 PM »
I just discovered that url's are not converted. Url's like:
[url=http://www.myforums.org/board/forumdisplay.php?f=33]click here[/url]

Are not converted. The "click here" is present, but is pointing to the vbulletin url instead of to the converted smf forum url and forum category.
Same goes for posts.

When editting such post, the bbcode is not visible either.

Is it correct that this is not converted? If not, what has gone wrong and can this be fixed?

If url's are not converted, it would be better to add it to this list:

Quote
The following is not converted:
- Permissions for boards are not converted.
- Membergorups are not converted. <--- typo here
- Avatar may not convert (under tested).

Please let me know.
Greetings, Black Tiger

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 612
  • Gender: Male
    • Satellite Fun
Re: URL's not converted? VB 3.8.7 to SMF 2.0.7?
« Reply #1 on: March 15, 2014, 08:23:34 PM »
I'm just wondering.... is the trailing 0 necessary in SMF?
This is the vbulletin style of url:
[url=http://www.myforums.com/board/showthread.php?t=13121]click here[/url]

And this is the same but SMF style:
[url=http://www.satellitefun.org/forum/index.php?topic=13121.0]click here[/url]

If the .0 after 13121 is not needed, then I could easily make a backup of my database, search all
Code: [Select]
/board/showthread.php?t=and replace it by:
Code: [Select]
/forum/index.php?topic=And do the same kind of thing for forumdisplay.

After that I could restore the adjusted backup and things would be fine, correct?

So i just nee to know if the trailing .0 is really necessary or if that can be left out?
Greetings, Black Tiger

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 612
  • Gender: Male
    • Satellite Fun
Re: URL's not converted? VB 3.8.7 to SMF 2.0.7?
« Reply #2 on: March 16, 2014, 09:48:00 PM »
Oke I heard in another topic that I can fix it like this.

However, I still would like to know if this is a bug in the conversion database or not? In a few months I have to convert another 3.8.7 pl4 to SMF and it would be nice if this link stuff would be fixed then, if it's indeed something that should have been converted with the convert script.
Greetings, Black Tiger

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: URL's not converted? VB 3.8.7 to SMF 2.0.7?
« Reply #3 on: March 19, 2014, 11:39:10 AM »
Hi.

Actually no, the converters do not convert internal links.

It should be possible to fix that afterwards with a SQL query (I've posted it in another context somewhere :P )
The converters do, in general terms, database operations between the 2 affected databases. AFAIK, none of our converters performs any operations inside content of posts, PMs, etc...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 612
  • Gender: Male
    • Satellite Fun
Re: URL's not converted? VB 3.8.7 to SMF 2.0.7?
« Reply #4 on: March 19, 2014, 12:08:54 PM »
Thank you, I just fixed that afterwards by using a search & replace in the mysql database and then restore it. I did not find the fix you posted that quickly.
Unfortunately I did not save it, but there were also showthread.php?thread=2339 and something like showthread.php?s=?t=2340 present in the database, probably from older times, because the vBulletin got upgraded a couple of times.
It was easy to fix them manually too.

But the convertor also does not convert single posts like this (vbulletin):
Code: [Select]
http://www.myforums.com/board/showpost.php?p=83973&postcount=2
Which should be converted to something like (SMF):
Code: [Select]
http://www.myforums.com/forum/index.php?topic=83973.msg2#msg2If I'm not mistaken...
Can this be easily fixed afterwards too? Or is this something which is really missing in the original convertor?

It would be nice if this could be done during conversion, just like showthread.php.
Greetings, Black Tiger

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 612
  • Gender: Male
    • Satellite Fun
Re: URL's not converted? VB 3.8.7 to SMF 2.0.7?
« Reply #5 on: November 20, 2014, 11:35:54 AM »
I'm sorry to bump an older post, but I'm converting another vBulletin forum and since this is not answered, I'm having this issue again (also still not fixed in my own forums).

How can I convert single posts like mentioned above in my last reply?
Anyone knows which SQL query Margarett is talking about?
Greetings, Black Tiger

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: URL's not converted? VB 3.8.7 to SMF 2.0.7?
« Reply #6 on: November 21, 2014, 02:03:32 PM »
The easiest way is to do a replace operation directly in MySQL although that's a bit incomplete. Let me explain...

You can do this:
Code: [Select]
UPDATE smf_messages SET body = REPLACE(body, 'http://www.myforums.com/board/showpost.php?t=', 'http://www.myforums.com/forum/index.php?topic=');This would update your general topics (SMF opens the topic without the .0 in it)

The problem are the posts inside topics... You would probably always open the first post in a topic...

For posts, I think you require either a PHP script to update your database or something like this:
http://www.simplemachines.org/community/index.php?topic=52477.0
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 612
  • Gender: Male
    • Satellite Fun
Re: URL's not converted? VB 3.8.7 to SMF 2.0.7?
« Reply #7 on: November 21, 2014, 02:37:53 PM »
Thank you for the answer Margarett.

The change from showpost.php to topic= is easy that's not the problem, I did that (and some other things) with a search/replace in the sql dumpfile, and then restore the dump again. Problem fixed.

It's indeed the posts which are the problem.
I just read the link you gave. I'm not sure if I would like to do it that way.
Luckily we don't have that lot of references to posts inside topics, so just to keep things safe, I think i just keep it this way.

For those interested and for feature references (at least up to 2.09) these are changes needed to be done (vb 3.8.7 pl4) presuming the old forum is at /board and the new forum is at /forum just as an example:
Code: [Select]
/board/showthread.php?t=
/board/showthread.php?threadid=
/board/showthread.php?s=&threadid=
to
/forum/index.php?topic=

Code: [Select]
/board/forumdisplay.php?s=&forumid=
/board/forumdisplay.php?f=
to
/forum/index.php?board=

Code: [Select]
/board/member.php?s=&action=getinfo&userid=
to
/forum/index.php?action=profile;u=
and
Code: [Select]
/board/private.php?s=
to
/forum/index.php?action=pm
Greetings, Black Tiger