My little dream... how to proceed?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Shockfrost
Forum Newbie
Posts: 2
Joined: Sat Feb 26, 2005 7:33 am

My little dream... how to proceed?

Post by Shockfrost »

Okay, I'd like to design a tool to interface with message boards.

Here's what I imagine:
Someone loads a local html file. This slaps a frame to the top of the pages. The frame has a text area, and a main button, and maybe some radio buttons for settings and sub buttons.

When at a reply page, like this one, the quote data already in the textarea is loaded into the text area of the frame. It may be parsed a bit.

the user types into the frame's textbox, and pushes a button. This text is parsed for special codes such as :hugegrin: and these get replaced with matching [IMG] codes to a private image host... this will allow custom smiley codes 8) Then the parsed text is sent to the text area in the main body of the browser, ready to be submitted.

The http and support files are local.

This little http should be small and eaily ported to any machine, to be opened, to jump to said message board, and auto-add the smilies.

In its most complex form, the http would open a file in the same directory called EmoCodes.txt, and load a list of :: keywords and be ready to swap them for [img] the matching tags. EmoCodes.txt would just be a set of keywords and picture locations. There might even be a button to add a new keyword and file location, right on the form.

A friend said PHP was the language to learn. I know some C and some Basic.

How does this little miracle occur?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

First off, PHP currently requires running off a server to be parsed. So opening a local file is out of the question unless you use Java or ActiveX.. as Javascript is not allowed access to the local filesystem. In order to retrieve the "quoted text" you'll need to inject some level of Javascript into the framed page, or use an interval to check the url of the frame. You'll need some Javascript to dump the "updated" text back to the frame as well. Each board may require specialized code, as some boards' editor and tag list may be customized. You'll also need to be careful of boards that use frames..

I think it may be easier to implement a Firefox/Mozilla extension that will parse/replace the selected text...
Shockfrost
Forum Newbie
Posts: 2
Joined: Sat Feb 26, 2005 7:33 am

Post by Shockfrost »

feyd wrote:First off, PHP currently requires running off a server to be parsed. So opening a local file is out of the question unless you use Java or ActiveX.. as Javascript is not allowed access to the local filesystem. In order to retrieve the "quoted text" you'll need to inject some level of Javascript into the framed page, or use an interval to check the url of the frame. You'll need some Javascript to dump the "updated" text back to the frame as well. Each board may require specialized code, as some boards' editor and tag list may be customized. You'll also need to be careful of boards that use frames..

I think it may be easier to implement a Firefox/Mozilla extension that will parse/replace the selected text...
Thanks much. I get the feeling that developing a Javascript app to float nearby might be wiser.
Post Reply