View Full Version : Text handling for "News" database entry
jingman
January 21st, 2004, 05:07 AM
I've created a full flash site for a band.
I need it to be easy for them to add news and press entries.
I know that I can do this with a database, but I want to do something with the entry text - like, when they have a link specified in the text (how can I do that, btw), when they submit the entry, flash/PHP/whatever should change it to the appropriate HTML code, and also change the color of the link (again with HTML). Only then will the information be displayable on the main flash site.
Know what I mean?
Is this possible?
(ps I put this here and not in server-side because I think it has more to do with actionscript, if I'm wrong plz move)
eyezberg
January 21st, 2004, 07:32 AM
Depends, either you parse the text in Flash, or in PHP, really your choice..make it now :)
jingman
January 21st, 2004, 01:55 PM
Assuming that PHP and Flash are equally adept and handling such a task, I'd like to use Flash.
Have I made my situation clear enough? (I wrote it at 4am).
I want the user to input a bunch of text, and use some kind of notation like [.URL=http://www.thelink.com]link this[./URL] that gets transformed into '<font color="ff0000"><a href="http://www.thelink.com">link this</a></font>'
See what I mean?
jingman
January 21st, 2004, 03:34 PM
problem solved, I just added a "link adder" function that takes a "name" and "url" for input, and appends the existing text with the appropriate html attached. It actually works quite well.
This, for example, adds a red link:
function addLink(){
newsInput.text += '<font color="#FF0000"><a href="'+linkURLInput.text+'">'+linkNameInput.text+'</a></font>';
newsOutput.htmlText = newsInput.text;
}
riderchic88
January 21st, 2004, 03:41 PM
actually I'm working on the same type of project... I'd be interested to see your site, if you don't mind. :)
I noticed you use movable type for your photolog, which is what I was planning to use for the band's site I'm remaking... you might want to consider that... of course now I have to teach all the boys how to add new entries :P
jingman
January 21st, 2004, 03:46 PM
Hehe, yeah, I'm trying to avoid having to teach them to use flash.
The website is:
http://www.friendslikethesemusic.com
It's still a little buggy and incomplete, but I got the photo gallery finished yesterday:
http://www.friendslikethesemusic.com/photos
The photo gallery and "shows" section are XML driven - so that works like a charm, and is super easy to update.
riderchic88
January 21st, 2004, 04:47 PM
very nice very nice.... might i suggest one thing? your text boxes, if they were dynamic text boxes, would be mighty easier to read... just a hint ;) but i like it a lot, buggy or whatever. the photo gallery is nice with the resizing and stuff. I'm still debating how i'm going to do theirs. we're still in the planning stages........
they can't even pick out a font they want for a logo........ lol
but yeah, they look at code and go running screaming. which is why i'm planning the Movable Type route :P gotta love rss/xml feeds.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.