SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    Jamison DaDaHost's Avatar
    Join Date
    Sep 2002
    Location
    Florida, USA
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Content Management Made Easy - with Editize!

    This forum thread discusses the SitePoint article 'Content Management Made Easy - with Editize!' by Alan Peavey.

    "Make it easy for multiple users to update formatted, edited content to your site's CMS. Alan shows how easy it is, using Editize and PHP."

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    IL
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I saw that article, but ultimately have not been able to figure out how to make it work when replacing a "textarea" tag and passing variable in Dreamweaver MX. It seems to me so far that DW MX wants only the built-in "textarea" tag to get it to work with it's internal database variable associations within a MySQL database. When you replace "Editize" it will load OK, but a lot of coding gets messed up if you do.

    What I would like to see is an emaple using a submit "textarea" form, like storing a person's name and address in MySQL database and recalling it using "Editize" to both send the text to the MySQL database table storing it, then retrieving it later to display if a record is found.

    From what I've done so far with "Editize", I can get it to submit an entire page like the sample article you mention, but I can't get it to work with forms in Dreamweaver MX for storing and displaying.

    If anyone has worked extensively with DW MX and "Editize", I would like to hear about how you did it.

    Thanks.

  3. #3
    SitePoint Enthusiast marcus's Avatar
    Join Date
    Apr 2003
    Location
    Mid-North-Coast, Australia
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am having trouble getting the code in the article to work. I am new to php and wanted to try and get a demo up and running using Alan's code. Once I have the demo running I plan to finish Kevin's book and get stuck into it. Can anyone help me with Alan's code? Is there something really basic I'm missing? On The Validation Page (authuser.php) the code seems to fail here:
    } else {
    header("Location: http://localhost/login.html");
    exit;
    }


    Thanks in advance for any help that can be offered.

    Cheers,

    Marcus

  4. #4
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got it working in DW, ultimately it was a big reason for ditching DW for Zend.

    I always had to set up the form and all of the funtions with a textarea tag first. Then I replaced the textarea code with the code for editize in codeview (!! Make sure the names are the same!!)

    You get a warning about the update procedure being out of whack but it works.

    Although I only did this in ASP, but it should be similiar.
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  5. #5
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Out of interest of using Zend Studio - I installed this the other day and only the splash screen appeared....

    I read somewhere that you need Java SDK installed before ZStudio installation ?

    Is this correct... I have the 1.3.1 SDK lying on a CD I could use I assume, or will I need to download another 34MB file - 1.4 ?

    ... Just as well I'm on my way to getting broadband later this month I suppose 8) At last...... Yahooo..... Ahem.

  6. #6
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know it needs java, but I am not sure. I already had 1.4 on my machine when I did the install so I am sorry I can't help explain the problem with only the splash screen. I know on my debian machine when I had 1.3 on it, the installation stopped and gave me an error until I got 1.4. The error came up though and told me to get 1.4, so I am not sure why you only got a splash screen.
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  7. #7
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks - I though that myself since on the splash screen the messges read something like:

    opening windows environment or something to this effect - I then automatically assumed I had to install Java 8)

    I'm waiting on broadband so it can wait another fortnight, though I was really looking forward to using ZStudio instead of DW MX 8)

    Is there any real difference ?

  8. #8
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there any real difference ?
    Ummm...yea. I would not really compare the two. I think they are really for two different markets. Zend has great project management/code completion and function help and such, but it is all hand code. You won't find a query builder or an update server behavior to mess with at all.

    The good thing is that I understand and enjoy php a whole lot more than I ever did with php or asp before in DW. When you have to write it all out you understand what is going on more and find a much greater degree of control and custimization in your apps.
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  9. #9
    Anonymous
    SitePoint Community Guest
    I tryed it, well, i think there are better things and even for free. I use this one in my cms:
    http://sourceforge.net/projects/itools-htmlarea/

    Its free and runs on any os with ie 5.5.
    greetings timepoint5

  10. #10
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yer, I've looked at that one myself and for what it does it does pretty well in fact;

    If you can understand Javascript then you're freely available to modify the source for your own needs I believe ?

    Need to download the latest version since it's been a while since I was there last.

  11. #11
    SitePoint Member jimboud's Avatar
    Join Date
    Feb 2004
    Location
    Lafayette, LA USA
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MovieJeff
    Yes, I saw that article, but ultimately have not been able to figure out how to make it work when replacing a "textarea" tag and passing variable in Dreamweaver MX. It seems to me so far that DW MX wants only the built-in "textarea" tag to get it to work with it's internal database variable associations within a MySQL database. When you replace "Editize" it will load OK, but a lot of coding gets messed up if you do.

    What I would like to see is an emaple using a submit "textarea" form, like storing a person's name and address in MySQL database and recalling it using "Editize" to both send the text to the MySQL database table storing it, then retrieving it later to display if a record is found.

    From what I've done so far with "Editize", I can get it to submit an entire page like the sample article you mention, but I can't get it to work with forms in Dreamweaver MX for storing and displaying.

    If anyone has worked extensively with DW MX and "Editize", I would like to hear about how you did it.

    Thanks.
    I have done what you say here with DW MX, replacing the text area tag with the editize information. The page works, the content is displayed in the Editize window, but the database table is NOT updated.

    The URL of the page is http://www.hemophiliafed.org/content...edit_board.php

    Here is the page's source:
    <?php require_once('../Connections/hfa.php'); ?>
    <?php require('../editize/editize.php'); ?>
    <?php
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    break;
    }
    return $theValue;
    }

    $editFormAction = $HTTP_SERVER_VARS['PHP_SELF'];
    if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
    $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING'];
    }

    if ((isset($HTTP_POST_VARS["MM_update"])) && ($HTTP_POST_VARS["MM_update"] == "editize")) {
    $updateSQL = sprintf("UPDATE content SET pagebody=%s WHERE id=%s",
    GetSQLValueString($HTTP_POST_VARS['editize'], "text"),
    GetSQLValueString($HTTP_POST_VARS['editize'], "int"));

    mysql_select_db($database_hfa, $hfa);
    $Result1 = mysql_query($updateSQL, $hfa) or die(mysql_error());

    $updateGoTo = "../board.php";
    if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
    $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
    $updateGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
    }
    header(sprintf("Location: %s", $updateGoTo));
    }

    mysql_select_db($database_hfa, $hfa);
    $query_pagebody = "SELECT pagebody FROM content WHERE id = 1";
    $pagebody = mysql_query($query_pagebody, $hfa) or die(mysql_error());
    $row_pagebody = mysql_fetch_assoc($pagebody);
    $totalRows_pagebody = mysql_num_rows($pagebody);
    ?>


    <HTML>
    <HEAD>
    <TITLE>Updade Board of Directors page</TITLE>
    </HEAD>
    <BODY>
    <p>Make your changes below!<br>
    Click &quot;Submit&quot; at the bottom when finished. </p>
    <form action="<?php echo $editFormAction; ?>" method="POST" name="editize" id="editize">
    <p>
    <?php
    $editize = new Editize;
    $editize->name = 'editize';
    $editize->width = '750';
    $editize->height = '600';
    $editize->codebase = 'http://www.hemophiliafed.org/editize';
    $editize->codeview = TRUE;
    $editize->display($row_pagebody['pagebody']);
    ?>
    </p>
    <p><?php $editize->displaySubmit('Submit',100,30,'Submit'); ?>
    </p>
    <input type="hidden" name="MM_update">
    </form>
    <p>&nbsp;</p>
    </BODY>
    </HTML>
    <?php
    mysql_free_result($pagebody);
    ?>

    The sticking point I'm at is that I can't update the database. Can anyone help?

  12. #12
    Anonymous
    SitePoint Community Guest
    Had it working on my JSP-pages in less than an hour. Perfect.

    Strong point about Editize is the clean HTML it produces. The code it produces is the same on every browser, which is not the case with HTML-Area. When used from Mozilla HTML-Area (and any other Javascript-editor) will produce totally different tags (eg. styletags instead of <em> or <strong>) than on IE or Opera.

    However in Editize I am missing support for internationalization and different character-sets. Not everybody speaks US-english in UTF-8 I have not yet figured out how to write 'géén' or 'zeeëenden' (Dutch words) in Editize...

    Also picture-support is not WYSIWYG.

    When lokking at the internals (the supporting Javascript) I noticed that HTML-code is translated before read back into Editize. Amazing someone would build an editor that can not read it's own output... This is because the input -field that is used to specify the start-up text cannot contain HTML. Better solution is the specify an URL on which Editize can get the startup content itself.

    Good Editor, not a professional editor (yet).

  13. #13
    Anonymous
    SitePoint Community Guest
    I'm guessing this will not work for a non-data driven static site. OK, somewhere I remember reading being able to write to a text file, but the instructions are not clear on this. The the manual states: "Editize begins with knowing how to build useful Web applications with the <textearea> tag and the server-side scripting language of your choice. If you've never written a server-side script or a database-driven Website before, there are some things you need to learn before you can put Editize to work for you."

    So in sum Editize is NOT really as simple as it is touted to be. I want to simply install and get to work, not have to learn a bunch of backend coding languages!

    For those who need a SIMPLE solution for non-database driven sites, I would recommend Macromedia's Contribute. It's easy to install, administer, and works great with existing Dreamweaver templates.

  14. #14
    SitePoint Enthusiast Adam E's Avatar
    Join Date
    Apr 2004
    Location
    Australia
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    htmlArea is good, but it doesn't produce valid XHTML output. Thats where Editize really takes over! Nice job SitePoint


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •