Old HTML Posts

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

Old HTML Posts

Postby yaashul » Mon Jul 20, 2009 5:08 pm

I have many post in HTML like

Code: Select all
<img src="image url here" alt="alt text here">


How can I convert them into bbcode?

like

Code: Select all
[img]image code here[/img]


I know I need to run this command in my database

Code: Select all
update table_name set table_field = replace(table_field,'search_for_this','replace_with_this');


and then reparse bbocde.

But can you suggest my what exactly I should write to replace. I'm really confused on this.
yaashul
PR1
PR1
 
Posts: 128
Joined: Wed Aug 29, 2007 1:21 am

Advertisement

Re: Old HTML Posts

Postby dcz » Sat Jul 25, 2009 11:52 am

Since the post test field is using BLOB type, I doubt that the query you proposed would work. Beside, it's kind of tricky to run such a query with many posts.

If you code a bit you could inspire from our phpbb_seo/sync_url.php script to loop through all posts and edit them, it's a very simple example on how to perform batch operation on a db using meta refresh to loop.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 9 guests