GetDotted Domains

Viewing Thread:
"How do I.... Create a marquee that automatically changes"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 01/05/08 at 11:52
Moderator
"possibly impossible"
Posts: 24,985
I'd like to write a bit of code that will create a scrolling message which changes depending on the date.

So I need to:
Get the current date
Find out if there is a specific message for that date (or between 2 dates) such as "Happy Christmas"
If not, display the default message, such as "Welcome to this site".

Is that possible?

I also need to find the easiest way to include a big box of formatted text that can be altered by anyone who has a password. This is for a weekly newsletter which is in word format that needs to be pasted on to a website every week.
Thu 12/06/08 at 13:38
Regular
"you've got a beard"
Posts: 7,442
hmmm, intersting...
i`m starting to think the best option would just be to make a long html page with most of it commented out that gives the owner instructions on where to paste the name and feedback they want to appear. that will allow for proof reading, etc.

it`s a bit more involved than they`d probably like to get, but safetly is more important i think. the only reason i`m trying to make is so easy is that i can`t guarantee i`ll still be living here as and when they need more stuff doing and i don`t want to leave them with a site that they can`t do anything with unless i do so.

thanks for the suggestions everyone!
Thu 12/06/08 at 10:59
Regular
"Devil in disguise"
Posts: 3,151
As Hmmm... has said you're better off removing the public contact form from the process, its easier to secure things and less hassle in long run. Even ignoring spammers, its a huge leap to think people submitting "positive feedback" are going to manage to be able to spell and/or string 2 words together in a legible sentence.

Security wise, make sure you validate all input. Strip out all tags, convert special characters to html entities. In the case of form to mail, you can also check all your fields for strings like to: cc: bcc: content-type: Content-Transfer-Encoding: and so on. You could also throw in a few common spam words into that list like porn, viagra etc.
Thu 12/06/08 at 09:53
Moderator
"Are you sure?"
Posts: 5,000
I'm not sure allowing comments to 'go live' on a site (guess it does depend on what the site is) is a good idea - I'm afraid even if you are using captcha type code you will always end up with some daft ****** turning up eventually, and I don't think your script allows comments to be easily removed, so that could be embarrassing!

How about you let people submit the feedback which comes in as normal formmail and then someone chooses which comments to use before manually running your script to add them to the marquee.

Your form/script could be protected using .htaccess to make it secure - so the 'admin' person would log in to update things.


Not so instant, but might work out better in the long run...


Search Freeola Chat
Thu 12/06/08 at 08:40
Regular
"you've got a beard"
Posts: 7,442
ah curses!

ok, how do i go about securing the form then? any tips?

would something as simple as having an "are you sure?" alert on submission help?

or perhaps one of those "enter the same code as this one" boxes? or is that still vulnerable because even though the combination would be random, it`ll still be held in a variable.

can i disable html from being allowed?
Wed 11/06/08 at 22:33
Regular
"Devil in disguise"
Posts: 3,151
Most sites get picked up by bots trawling through domain records and ip addresses looking for exploitable forms. What they are looking for is access to server and ability to send spam or install dubious code on your site. The business size or site traffic is totally irrelevant really.

So you're probably better sorting any security vulnerabilities now rather than having to explain to your client why his marquee is advertising porn or his/her domain has been blacklisted etc..
Wed 11/06/08 at 20:50
Regular
"you've got a beard"
Posts: 7,442
right, i`ve got this working in the following way:

i`ve got an html "leave feedback" form that the customer fills in, they select whether their feedback is positive, negative or neutral feedback. leaving any kind of feedback will send an email containing said feedback to the owner of the business, but if it`s POSITIVE feedback then it gets added to an "open" html file (as in, there are no closing tags.

feedback form -> php script - email (and html file if feedback is positive)

the html "positive feedback list" page contains the marquee command (parameters defined in css) and the contents to be scrolled; each time positive feedback is added, the php script adds it to the end of this file in a new paragraph.

so there we go, i`m sure it`s quite a clunky way of doing it, but i`m still very much a novice to scripting and things, but it`s up and working. i`ve got the html page with the marquee to appear in a
so i can easily place it anywhere on the site and it`ll automatically have up-to-date feedback.

it`s probably a security laughing stock, but i`m going with the notion that it`s quite a specialised site for a small business so the odds of it being hack-worthy are about 1%

.. i`m still not telling you lot the url though :P
Thu 05/06/08 at 00:12
Regular
"Devil in disguise"
Posts: 3,151
Hmmm... wrote:
> Also, If you get it working please update this post with some
> code tips as this could be a useful script...

Maybe I have a go at writing one too.
Wed 04/06/08 at 22:40
Regular
"you've got a beard"
Posts: 7,442
Hmmm... wrote:
> Very_Metal wrote:
> can anyone see any potential catastrophes that may arise from
> that method?
>
> Hi Very_Metal,
> Make sure your form is secure!!!
>
> Not a 'catastrophe' but how are you intending on getting the old
> messages removed?
>
> Also, If you get it working please update this post with some
> code tips as this could be a useful script...

the old entries will probably stay put i`d imagine. it`d be brief customer feedback so more content means more customers and therefore - more confidence from potential clients.

good point about the security as well, it`s not the kind of place people will stumble across by accident, but i`ll definitely keep an eye on it. any tips on what to look for?

if i get the script working i`ll post it up here in future :)
Wed 04/06/08 at 17:50
Moderator
"Are you sure?"
Posts: 5,000
pb wrote:
> Somehow, I knew you'd get that in somewhere. Well done on the
> advertising, at least you're trying! :D


One day I'll get a GAD for helping others here or for promoting Freeola ;¬)





Search Freeola Chat
Wed 04/06/08 at 17:46
Moderator
"Are you sure?"
Posts: 5,000
Very_Metal wrote:
> can anyone see any potential catastrophes that may arise from
> that method?

Hi Very_Metal,
Make sure your form is secure!!!

Not a 'catastrophe' but how are you intending on getting the old messages removed?

Also, If you get it working please update this post with some code tips as this could be a useful script...



Search Freeola Chat

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Thanks!
Thank you for dealing with this so promptly it's nice having a service provider that offers a good service, rare to find nowadays.
First Class!
I feel that your service on this occasion was absolutely first class - a model of excellence. After this, I hope to stay with Freeola for a long time!

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.