easy update

Discussion in 'HTML' started by l e o, Jul 13, 2005.

  1. l e o

    l e o Guest

    I have a section on the web site that I would like to allow somebody who
    doesn't know html to be able to update the content. I am using
    Dreamweaver and need something much simpler for a secretary type of
    person. Maybe something that can be updated right on the website (using
    perl, etc, I presume), something like blog would work but I need to be
    have some control to be able to integrate it to the website's design.
    Thanks.
     
    l e o, Jul 13, 2005
    #1
    1. Advertising

  2. Actually, with a blogger blog, you could simply use an iframe, and set
    the blog template to whatever you need. This is the least technically
    sophisticated method. Of course, it's kludgy, but it should work fine,
    if you can use an iframe (which is non-reccommended, but a useful
    solution.) You could also have her use the blog, then use PHP to
    re-process the blog's contents, and display it that way (more kludgy,
    but more standard markup, I think)

    Otherwise, a perl-cgi interface, if you have a server you have access
    to, would be a significant project. A better solution might be to have
    some php that parses a simple tab-delimited text file, so you can have
    her upload that.
     
    David Manheim, Jul 14, 2005
    #2
    1. Advertising

  3. l e o wrote:
    > I have a section on the web site that I would like to allow somebody who
    > doesn't know html to be able to update the content....


    You need a content management system. Google "website content
    management systems" for choices. One called Mambo seems to be very
    popular.

    --
    -=tn=-
     
    Travis Newbury, Jul 14, 2005
    #3
  4. l e o wrote:

    > I have a section on the web site that I would like to allow somebody who
    > doesn't know html to be able to update the content. I am using
    > Dreamweaver and need something much simpler for a secretary type of
    > person. Maybe something that can be updated right on the website (using
    > perl, etc, I presume), something like blog would work but I need to be
    > have some control to be able to integrate it to the website's design.
    > Thanks.


    On the site in my sig I use a bit of php and mysql to do something like
    this. There are various admin pages for the site where a , non-tecchy,
    friend of mine can update the content simply by typing in to a <textarea>
    or <input> and clicking 'Send'.

    For instance, the short main paragraphs on the home page are written out
    from a mysql db thus:

    <div class="content">
    <?php
    $result = mysql_query('SELECT * FROM mainnews', $link_id);
    while($query_data = mysql_fetch_row($result)) {
    echo"<h1>$query_data[0]</h1>";
    echo"<p>$query_data[1]</p>";
    }
    ?>
    </div>

    where mainnews is the table containing the data he has entered, the first
    field being the headline and the second the text. The admin page is
    something like:

    <div class="admincontent">
    <form method="post" action="add_news.php">
    <p>Title: <input type="text" name="title"></p>
    <p><textarea name="words" cols="40" rows="20"></textarea></p>
    <p><input type="submit" value="Post" class="sendbutton"></p>
    </form>
    <?php
    $query =
    "UPDATE mainnews SET title = '$title'";
    $result = mysql_query($query);
    $query =
    "UPDATE mainnews SET words = '$words'";
    $result = mysql_query($query);
    ?>
    </div>

    It means I can drop the content exactly in to the site as I want it. I've
    only ever taught myself enough php and mysql as I've needed to know to get
    this done however so I can't exactly vouch for the code being the best and
    I'm not denying I had some problems along the way getting to where I am now
    but it all seems to run pretty smoothly these days and I thought maybe it
    would give you something to think about

    I would actually like to find a way for him to insert paragraphs/line
    breaks, as each entry is currently just a single block of text, but I
    suspect this will involve someting other than a <textarea> for input and
    I've not really looked in to how this would be done yet. At the moment I
    would have to recreate all the above again and add it to the page where I
    wanted the new paragraph.

    regards,
    --
    Robert
    http://brightonfixedodds.net
     
    Robert Frost-Bridges, Jul 14, 2005
    #4
  5. In news:hduBe.3456$,
    Robert Frost-Bridges <> wrote:
    > I would actually like to find a way for him to insert paragraphs/line
    > breaks, as each entry is currently just a single block of text, but I
    > suspect this will involve someting other than a <textarea> for input
    > and I've not really looked in to how this would be done yet. At the
    > moment I would have to recreate all the above again and add it to the
    > page where I wanted the new paragraph.


    Try nl2br(). It converts newlines to <br>. Even if it's not exactly what
    you're looking for, the user comments will help you code your own nl2p()
    type function.
    http://uk2.php.net/manual/en/function.nl2br.php


    --
    Andrew @ Rockface
    np: Kyuss - 100 Degrees
    www.rockface-records.co.uk
     
    Andrew @ Rockface, Jul 14, 2005
    #5
  6. Robert Frost-Bridges, Jul 14, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    663
    Hazzard
    Apr 6, 2004
  2. Bruno Desthuilliers
    Replies:
    5
    Views:
    402
    Bruno Desthuilliers
    Aug 29, 2007
  3. luckyads
    Replies:
    0
    Views:
    577
    luckyads
    Jan 21, 2009
  4. luckyads
    Replies:
    0
    Views:
    442
    luckyads
    Jan 22, 2009
  5. Kostia
    Replies:
    1
    Views:
    275
    Scott Mitchell [MVP]
    Feb 26, 2004
Loading...

Share This Page