Taking Posts made in PHPBB and putting them outside the foru

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
User avatar
Tienchen
Registered User
Posts: 91
Joined: Thu Sep 14, 2006 5:23 pm
Location: Germany
Contact:

Re: Taking Posts made in PHPBB and putting them outside the foru

Post by Tienchen » Tue Jan 02, 2007 6:25 pm

Wait! I think I have found something on this page... Funny, it's about plants and bees. But, wait...
Ah, yes, here it is.
I don't like these cold, precise, perfect people, who, in order not to speak wrong, never speak at all, and in order not to do wrong, never do anything. (Henry Ward Beecher)
Die Stifthelden

User avatar
turblety
Registered User
Posts: 23
Joined: Sun Feb 20, 2005 1:57 pm

Re: Taking Posts made in PHPBB and putting them outside the foru

Post by turblety » Tue Jan 02, 2007 6:55 pm

Replace

Code: Select all

echo $row['post_text'];
with

Code: Select all

echo $bbcode->bbcode_second_pass($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield']);
That should work. I havn't tried it and only briefly edited it so if it doesn't work, post the error you get and I'll see if I can help.

Mark

TanisLinkEragon
Registered User
Posts: 6
Joined: Sat Feb 25, 2006 12:39 am

Re: Taking Posts made in PHPBB and putting them outside the foru

Post by TanisLinkEragon » Tue Jan 02, 2007 8:39 pm

turblety wrote: Replace

Code: Select all

echo $row['post_text'];
with

Code: Select all

echo $bbcode->bbcode_second_pass($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield']);
That should work. I havn't tried it and only briefly edited it so if it doesn't work, post the error you get and I'll see if I can help.

Mark

Thanks!!

(Even if that doesn't work, I found a longer, slightly more complex way to do it)

User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: Taking Posts made in PHPBB and putting them outside the foru

Post by Highway of Life » Wed Jan 03, 2007 5:13 am

TanisLinkEragon wrote:
turblety wrote: Replace

Code: Select all

echo $row['post_text'];
with

Code: Select all

echo $bbcode->bbcode_second_pass($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield']);
That should work. I havn't tried it and only briefly edited it so if it doesn't work, post the error you get and I'll see if I can help.

Mark

Thanks!!

(Even if that doesn't work, I found a longer, slightly more complex way to do it)

Yes, and I found a shorter, slightly simpler way to do it... j/k

Actually it's interesting to note how many different ways a simple piece of code can be programmed, depending on the hands that mold it.
Each programmer seems to have their own unique style... I have yet to find two exactly alike.
Just look at the difference between PsotFX and Meik to see what I mean.

BTW, we finished the little function to pull posts onto an outside page, though it does require a template file, this was the easiest implementation and still retain all the BBCode formatting. (including smileys)
Image

User avatar
Handyman
Registered User
Posts: 522
Joined: Thu Feb 03, 2005 5:09 am
Location: Where no man has gone before!
Contact:

Re: Taking Posts made in PHPBB and putting them outside the foru

Post by Handyman » Wed Jan 03, 2007 5:45 am

That actually looks like a phpBB2 way of parsing the bbcode... it's parsed a bit differently in phpBB3.
I put a lot of work into figuring out how to parse bbcode, so I wrote a tutorial on it so nobody would have to go through all that.
My phpBB3 Mods || My Mod Queue
Search Engine Friendly (SEO) URLs || Profile link on Avatar and/or Username || AJAX Chat
Display Posts Anywhere || CashMod || AJAX Quick Edit || AJAX Quick Reply

Image

Post Reply