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!
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 »

muse-ic wrote: ^ that doesn't make sense

It means that it is a forum created for testing purposes, and will be deleted when I'm done testing, and that only one person has tried to help me solve my problem.

ngungo
Registered User
Posts: 13
Joined: Sun Nov 26, 2006 12:25 am

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

Post by ngungo »

I am interested to write a function like get_post_contents( $post_number) that will return either empty string or post contents. Any hint?

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 »

I'll draw it up and either post it on Nils' Olympus Wiki, or STG on or after the first of the year.
Image

code reader
Registered User
Posts: 653
Joined: Wed Sep 21, 2005 3:01 pm

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

Post by code reader »

the short of it, (as best i understand) is so:
  • construct a parse_message object (look in message_parser.php), let's call it $parser
  • loop through the unparsed messages you extracted from the db, such:
    1. set $parser->message = $unparsed_message;
    2. call $parser->parse();
    3. now $parser->message supposedly contained the parsed message (bbcode replaced by html), ready to use
  • note that this retrieves the message body only. no poster, subject, or signature.
caveats (partial list):
  • this is an outline, not a code snippet. you'll have to figure out by yourself how to construct the object, and what are the parameters of the parse() call.
    (i assume that if you are able to extract the messages you want from the db, you'll be able to figure this by yourself.)
  • be prepared for surprises. for instance: the smilies may point to image files with relative path, which may or may not be the correct path for your purpose. same may (or may not) be true for attached files.
  • not sure what's the deal with censoring. it is possible you'll get the uncensored content.
  • this is based on my understanding of the code, by means of reading it. i did not try it myself, and i don't guarantee that this outline will actually do the job.
hope it helps,

ngungo
Registered User
Posts: 13
Joined: Sun Nov 26, 2006 12:25 am

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

Post by ngungo »

Highway of Life wrote: I'll draw it up and either post it on Nils' Olympus Wiki, or STG on or after the first of the year.

Highway, where is Nils' Olympus Wiki? And should I make a request for the function at STG?

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 »

His Wiki is here: http://olympuswiki.naderman.de
It's in not the official phpBB3 wiki, but it's the only phpBB3 Wiki I know of, so it'll work.

And if you want put in a request, sure, I'll add any feature requests if you post them.

Edit, what in the world, I can't get the URL to work. (for .de)
Image

APTX
Registered User
Posts: 680
Joined: Thu Apr 24, 2003 12:07 pm

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

Post by APTX »

Last edited by naderman on Fri Jan 05, 2007 12:25 am, edited 1 time in total.
Don't give me my freedom out of pity!

User avatar
Lastof
Registered User
Posts: 518
Joined: Wed Mar 17, 2004 8:10 pm
Location: Two weeks last wednesday
Contact:

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

Post by Lastof »

Hmm, within a couple of hours of Highway of Life posting the link some jackass had already messed with the front page. [sigh]

Whoever 82.40.102.160 is needs to find something better to do with their life. :roll:
Last edited by Lastof on Tue Jan 02, 2007 6:24 pm, edited 1 time in total.
Last edited by Lastof on 04 May 2008, 00:00, edited -1 times in total
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Look, I'm officially not a bug!!
SHS`: "Oooh Bertie, spank me with that casing stick, spank me spank me spaaaaannnnk mee!"
Image

ngungo
Registered User
Posts: 13
Joined: Sun Nov 26, 2006 12:25 am

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

Post by ngungo »

I just got in there. It's still working.

User avatar
Lastof
Registered User
Posts: 518
Joined: Wed Mar 17, 2004 8:10 pm
Location: Two weeks last wednesday
Contact:

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

Post by Lastof »

ngungo wrote: I just got in there. It's still working.


You'll have to look at the history. It's not like I was gonna leave it messed up.
Last edited by Lastof on 04 May 2008, 00:00, edited -1 times in total
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Look, I'm officially not a bug!!
SHS`: "Oooh Bertie, spank me with that casing stick, spank me spank me spaaaaannnnk mee!"
Image

Post Reply