How to allow posting announcements to a website

Discussion in 'HTML & Website Design' started by robmo, Oct 12, 2010.

  1. #1
    Hi,

    I need to provide the ability for a user to login and post announcements. I have done some searching and haven't really came up with anything that will work so far. I would like to use a script that is external to the web page that will display the message. If that is not best practice, please let me know.

    My idea was to create a Div that contains a multi-line text box within it and perhaps post the announcement there. I am curious if it would be a good idea to include a database for this task. The announcements will likely be posted by only one user and they will be very infrequent so maybe a text file would suffice.

    A form is probably the best way to collect the data but I wouldn't want to expose the form until a user has authenticated to prevent just anyone from posting. The announcements will be posted on the home page of the site and I thought I would place a Div to reserve the space so I don't have to deal with rearranging content when there are no active announcements. I would just leave the "announcement Div" in place at all times.

    Is this a good approach or is there a better way? I'm not really asking anyone to code this for me but some suggestions for achieving this task would be greatly appreciated. I am trying to move away from using a CMS for this particular site. I have been told that javascript is the wrong approach to this solution and would need to use server-side scripting. PHP was called out for this project.

    Thanks for your help!
    Rob
     
    robmo, Oct 12, 2010 IP
  2. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #2
    If you need a user login system as well as permissions to post announcements then you might want to re-consider using a simple cms. It would be much simpler to edit one of those than to make one from scratch. It would also be much more secure.

    If you insist on using your own solution then you will want to look into creating a user login system with php and mysql. Once you have that system in then you can add database tables for announcements. And grab the information from there when you want to display it on the site.
     
    Thorlax402, Oct 12, 2010 IP
  3. GWiz

    GWiz Peon

    Messages:
    359
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Another potentially simpler solution may be to simply use an include file. If this user has and access to ftp he can simply download the include file with the announcement text, modify it, then re-upload. This offline approach wouldn't require any database or security. However it may require the user making the changes to have some basic understanding of html.

    The include file mentioned above would be then be included inside the page where the announcement should appear.
     
    GWiz, Oct 12, 2010 IP
  4. robmo

    robmo Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thorlax402/GWiz,

    These are both pretty good ideas. I have been using Joomla for a CMS but I found it to be really difficult and time consuming to maintain or make attractive. You pretty much need to be a developer to do something beyond the out of box experience. I find it to be too constraining. I think it is so much simpler to use Dreamweaver and write your own HTML/CSS. I want to try doing this on my own before giving up and going back to Joomla or some other CMS.

    I did a brief search and there are many examples explaining how to setup a secure login using PHP and MySQL. I think I'll give this a try. From there I'll have to figure out how to post content from a database to a place on my home page.

    Does anyone else have any suggestions? I think we're on the right track even though this is doing it the hard way. I want to learn how to do this so I am willing to give it a try.

    Thanks,
    Rob
     
    robmo, Oct 12, 2010 IP
  5. GWiz

    GWiz Peon

    Messages:
    359
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I am not surprised, Joomla isn't the most intuitive CMS out there. I would probably recommend Wordpress above all else simply for its ease of use.

    But if you want to take the simple approach of doing a custom script, you can consider getting a ready script. You can search for a "news script" that would basically have everything for you.

    http://www.scriptdungeon.com/free_php_scripts/news_publishing/free_php_scripts.php
     
    GWiz, Oct 12, 2010 IP
  6. robmo

    robmo Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    GWiz,

    Thanks a lot for that link! That is exactly what I was hoping for but I wasn't sure exactly what to search on. I will definitely be looking at the news posting solutions. News posting sounds pretty much like what I need. I'm like most people, I don't believe in reinventing the wheel.

    I prefer not to use Wordpress because the site I am building is not a blog. I want more freedom to do what I want to do with it. If I can't overcome this challenge, I might have to fall back on CMS but I really don't want to. I'm very persistent and have lots of patience.

    Thanks again!
    Rob
     
    robmo, Oct 13, 2010 IP