|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Embarassed WYSIWYG user
I'm not what you'd call a crash hot at php but I thought I was ok.
I am having a real problem with EditWorks. Can someone help me please? All I need is a sample file/s which I can put on my server that work in a live situation with no coding from me, so that I can follow the process you claim is so simple. [ -- Editors Note: The included EditWorksPro.PHP documentation includes clear, easy to follow examples. Out of hundreds of customers, nobody has ever had any trouble following our included sample PHP code and we are going to do our best to help Gaby come to grips with PHP -- ] |
|
#2
|
|||
|
|||
|
Gaby,
There hasn't actually been anyone left in the "lurch" about EditWorks. Not one customer, as we look after every single customer that purchases from us. Did you not receive the email sample that I sent you? It was catered exactly to your site, and worked fine when we tested it. What I would like to do is show you how to modify your actual page on your web site to show you just how easy it is. I know that you've emailed me and told me that you're unfamiliar with PHP, which is OK... there is no need to feel embarrased! If you can email your site URL and FTP details to mitchell@devarticles.com then I will login and create the sample script to show you exactly what you're doing wrong. As for your friends with computer science degrees, I find this very hard to believe. I have 4 friends who have just finished university with a computer science degree and even though they don't know PHP, they could easily read the setup guide and use EditWorks. Also, one of our network admin's here has just skimmed over a beginners PHP guide and he too said that he would have no trouble with EditWorks. Anyhow, if you can email me your site's details then I will get you up and running ASAP! |
|
#3
|
|||
|
|||
|
Here is the EditWorks Professional.PHP documentation that is included with every purchase:
EditWorks Professional.PHP Introduction Introducing EditWorks Professional.PHP: the only tool you need to bring your PHP pages to life! EditWorks Professional.PHP is a custom PHP class that you can use to replace the typical HTML textbox in your web pages. It allows you to add rich text, images, tables and lists into your applications in a fast WYSIWYG (What You See Is What You Get) editing environment. System Requirements Server Side · Windows NT/2000 + IIS/Apache OR Linux/Unix + Apache · PHP version 4.1 or above Client Side · Microsoft Internet Explorer 5.0 or later · JavaScript must be enabled Setup Guide Setting up EditWorks Professional.PHP is extremely easy. Just follow these simple steps: · Unzip ewpphp.zip and copy the EditWorks Professional.PHP files to your a directory on your web server. Make sure you preserve the directory structure of the zip file so that the ewp_images directory is created. The zip will extract 4 PHP scripts and a directory called ewp_images containing 17 small images. · Make sure that the 4 extracted PHP scripts (colors.ewp.php, class.ewp.php, image.ewp.php and table.ewp.php) have execute permissions. You can do this by CHMOD’ing the scripts to 755. That’s all there is to it! You are now ready to use EditWorks Professional.PHP in your PHP pages. The text that follows will show you instructions on how to add the EditWorks Professional.PHP class to your PHP Pages. Adding the Control · Create a new PHP script in the same directory where you extracted the 4 PHP scripts from the ewpphp.zip file. · Add a call to the include() function. This call will include the contents of class.ewp.php into your PHP script, which contains the class and methods to manipulate your EditWorks Professional.PHP class(es): <?php include("class.ewp.php"); · We now need to instantiate the EWP class, which is contained in the class.ewp.php file. We can do so with the following line of code: $myEWP = new EWP; · Lastly, we simply call the ShowControl function, passing in three parameters: the width of the control, the height of the control, and the name of the directory where our uploaded images will be stored: $myEWP->ShowControl(400, 300, "myimages "); In the example above, the EditWorks Professional.PHP control will be drawn at 400 pixels wide by 300 pixels high. When we click on the image button on the control to upload/insert images, the class will grab all files from the myimages directory. This directory must exist before you use the class and you can call it whatever you like. · Lastly, to retrieve the value of the EditWorks Professional.PHP control from your PHP script, you simply instantiate the class and call its GetValue method, like this: $myEWP->GetValue(); Here’s a simple script that will display one EditWorks Professional.PHP control and then post the results of the form back to itself, displaying what was entered in the control: <?php include("class.ewp.php"); $myEWP = new EWP; if(@$_POST["show"] == "") { // Show the HTML form ?> <form action= "test.php" method= "post"> <input type= "hidden" name= "show" value="1"> <?php $myEWP->ShowControl(400, 300, "myimagedir"); ?> <input type= "submit" value= "Post It >>"> </form> <?php } else { // Show what was entered into the control echo "You entered " . $myEWP->GetValue(); } ?> That’s all there is to it! Of course, the fun doesn’t end there. EditWorks Professional.PHP also has a number of handy features and methods that you can call to manipulate the control, disable buttons and more. We will look at each of them now. Image Manager The image manager allows you to upload images and insert them directly into your content. You set the path to your image directory as part of the call to the ShowControl method, which looks like this: void ShowControl ( mixed width, mixed height, string imageDir) You must give PHP full read/write/execute access to this directory so that you can upload and retrieve images from the directory. Uploading images is simply a matter of clicking on the button, which will load the image manager. From here you can browse your hard drive to upload an image, or you can view/insert images already in your image directory. Valid image types include GIF, JPEG and PNG formats. Table Tool The button launches the table creation popup window, which is a simple page that allows you to insert a table into your content. The page allows you to specify table width, border, rows, columns, cell spacing, cell padding and the tables alignment. Simply click the “Insert Table” button once you’ve setup the options for your table and it will be inserted directly into your content! Color Popup It’s easy to set the foreground or background color of your content. The button lets you choose a foreground color and the button allows you to choose a background color. When the color popup window appears, it allows you to choose a color from one of the 255 in the web-safe color palette. Simply click on a color square and then click on the “Use Color” button to choose that color and close the color popup window. If you want to specify your own HTML color code then you can enter it manually in the text box on the color popup page. Set Border Width You can set the border width of the EditWorks Professional.PHP control by calling its SetBorderWidth function, which has this signature: void SetBorderWidth ( mixed borderWidth) You can specify borderWidth as a numerical value, or as a specific measurement, such as “1px”, “3pt”, etc. Example: $myEWP->SetBorderWidth(1); Set Border Color Setting the border color is simply a matter of passing a color value to the SetBorderColor method: void SetBorderColor ( string borderColor) The borderColor parameter should be a HTML color code value, such as “#000000”, “red”, “#9DCA2E”, etc. Example: $myEWP->SetBorderColor(“red”); Adding Custom Inserts A custom insert is a simple piece of HTML code that you find yourself using over and over again. With EditWorks Professional.PHP, you can create custom inserts and they will appear in a drop down list at the top of the control. After creating one/more custom inserts, it’s simply a matter of selecting them from the drop down list and they will be added to the content of your EditWorks Professional.PHP control immediately. The AddCustomInsert method lets you add your own custom inserts and its signature looks like this: void AddCustomInsert ( string insertName, string insertHTMLCode) The first parameter, insertName, is the name by which this custom insert will appear in the drop down list on your EditWorks Professional.PHP control, for example “My Company Signature”. InsertHTMLCode is the code that will be added to your content when this custom insert is selected. Example: $myEWP->AddCustomInsert(“My Name”, “<b>John Doe</b>”); Hiding Buttons Every single button on the EditWorks Professional.PHP control can be hidden by calling the appropriate method. Here is a list of functions that will disable the various buttons. You should call the function against your instantiation of the EditWorks Professional.PHP class, like this: $myEWP->HideImagButton(), etc: · Hide the bold button: HideBoldButton(); · Hide the italic button: HideItalicButton(); · Hide the underline button: HideUnderlineButton(); · Hide the left align button: HideLeftAlignButton(); · Hide the center align button: HideCenterAlignButton(); · Hide the right align button: HideRightAlignButton(); · Hide ordered list button: HideOrderedListButton(); · Hide bullet list button: HideBulletListButton(); · Hide the text color button: HideTextColorButton(); · Hide the background color button: HideBackgroundColorButton(); · Hide the link button: HideLinkButton(); · Hide the horizontal rule button: HideHorizontalRuleButton(); · Hide the table button: HideTableButton(); · Hide the image button: HideImageButton(); Hiding Drop Down Lists You can also hide the font drop down and custom insert drop down lists in the same way that you hide the buttons: · Hide the font drop down: HideFontList(); · Hide the size drop down: HideSizeList(); · Hide the hading drop down: HideHeadingList(); · Hide the custom insert list: HideCustomInsertList(); Using Multiple EditWorks Professional.PHP’s On One Page It’s extremely easy to use anywhere from 2 to 200 controls on the one page. The way you reference the controls corresponds to the order in which they are instantiated. For example, if you instantiate and use two controls on a page like this: include("class.ewp.php"); $myEWP1 = new EWP; $myEWP2 = new EWP; ?> <form action= "otherpage.php" method= "post"> <?php $myEWP1->ShowControl(400, 300, "myimagedir"); ?> <?php $myEWP2->ShowControl(550, 385, "myimagedir"); ?> <input type= "submit" value= "Post It >>"> </form> <?php Now, in otherpage.php, you can get the values of the controls by instantiating the EWP class twice. The first instantiation will hold the content of the $myEWP1 control in the code above, and the second would hold the value of the $myEWP2 control, like this: include("class.ewp.php"); $myEWP1 = new EWP; $myEWP2 = new EWP; echo “First control’s value is “ . $myEWP1->GetValue() . “<br><br>”; echo “Second control’s value is “ . $myEWP2->GetValue() . “<br><br>”; EditWorks Professional.PHP keeps an internal counter of how many controls are in existence so you don’t have to worry about messy control ID’s or anything like that; just remember that the order in which you instantiate the controls is the order in which their values will be retrieved and assigned… simple! |
|
#4
|
|||
|
|||
|
Gaby, I dont know why your having problems?? Its really easy.
I have been using Edit works for about 10 days, and it took me 15 to get it running on my work pc. Ive only known php for about 2 months now. Its as simple as pasting the code from the instruction guide. Its so easy, ive just bought another 2 liences for another couple of projects. Are you sure your following the manual correctly. I copied and pasted the example php code, tweaked it abit, and it worked fine with my mySQL server (I am using it for a news site). Would you like me to paste some of my code here to help you out? |
|
#5
|
|||
|
|||
|
Hi,
I'm sending Mitchell a copy of my files to date to work out how. Your "tweaked it abit" can mean lots. Don't go away ... cos I'm not ... I'm going to skin this cat if its the last thing I do. Gaby |
|
#6
|
|||
|
|||
|
Gabby,
Have you tried reading a beginners guide to PHP? I havent even seen the EditWorks product but from the sample code you've been given even a PHP newbie could figure it out! |
|
#7
|
|||
|
|||
|
The following snippets have been extracted in their cronological order from the Setup document
<?php include("class.ewp.php"); $myEWP = new EWP; $myEWP->ShowControl(400, 300, "myimages "); $myEWP->GetValue(); They in no way relate to this code......... <?php include("class.ewp.php"); $myEWP = new EWP; if(@$_POST["show"] == "") { // Show the HTML form ?> <form action= "test.php" method= "post"> <input type= "hidden" name= "show" value="1"> <?php $myEWP->ShowControl(400, 300, "myimagedir"); ?> <input type= "submit" value= "Post It >>"> </form> <?php } else { // Show what was entered into the control echo "You entered " . $myEWP->GetValue(); } ?> Here's what Mitchell sent me ........... TO SAVE THE VALUE TO A FILE: <?php // Let's assume the form has been posted to this page and contains a name, age and editworks control for some persons description. include("class.ewp.php"); $name = $_POST["name"]; $age = $_POST["age"]; $ewpBox = new EWP; // Let's now get the contents of the control into a variable called personDesc: $personDesc = $ewpBox->GetValue(); // Let's now write the persons description to a file called person.html, like this: $fp = fopen("person.html", "w"); fputs($fp, $personDesc); fclose($fp); // Person.HTML will now contain the HTML entered into the EditWorksControl ?> Now, to retrieve the value from person.html, we could use something like this: TO RETRIEVE THE VALUE FROM A FILE <?php include("class.ewp.php"); $ewpBox = new EWP; // Open the file person.html and gets its contents into a variable called $incoming_data $fp = fopen("person.html", "rb"); $incoming_data = fread($fp, filesize("person.html")); // Set the value of our EditWorks control $ewpBox->SetValue($incoming_data); $ewpBox->ShowControl(400, 400, "yourimagedir"); ?> Again all very descriptive but .... nothing more than confusing Mitchell also supplied "gpullman" at this post http://www.devarticles.com/forum/sh...light=EditWorks <?php include("class.ewp.php"); $fp = fopen("myfile.html", "rb"); $ewpBox1 = new EWP; while(!feof($fp)) { $myData .= fgets($fp, 1024); } $ewpBox1->SetValue($myData); ?> It delivers this error ....... SetValue($myData); ?> He still hasn't had a response to the post that answers his question. Is it any wonder I'm confused. I'll be the first chearing from the rooftops if I can get this thing going believe you me. I write great testimonials. Gaby |
|
#8
|
|||
|
|||
|
Sounds like the stand-off at the OK Coral?
Got any more bombs to throw Gaby? The Moderators aren't much better. From an observer who has just joined your ranks it appears both of you have taken intransigent view points. Funny but both of you are right and both a wrong. My 0.2c for what its worth. Gaby I suggest you get some capable personal assistance or have a read of some good beginners guides to php. I haven't yet worked through the manual that has been posted but hey ease off a bit. EditWorks I suggest you send Gaby the files asked for. Doesn't sound too much of an ask. Remember Gaby has offered an olive branch of a great testimonial. We've all read that. Just been on the site for the WYSIWYG and oops I read "even if you have no experience with PHP, our step-by-step setup guide makes it easy" (must be careful sounds like I'm siding with Gaby). If what Gaby has posted is the coding that has been provided then hey it could be seen to be confusing. Get your heads together guys and swallow some pride, it would be great to read of positive outcome here and a great testimonial on the web site from Gaby. billman ================= I collect what you can't |
|
#9
|
|||
|
|||
|
Its not that hard, if you read the instructions. It gives you an full example all you have to do is copy it into a blank php page and save it to your sever
<?php include("class.ewp.php"); $myEWP = new EWP; if(@$_POST["show"] == "") { // Show the HTML form ?> <form action= "test.php" method= "post"> <input type= "hidden" name= "show" value="1"> <?php $myEWP->ShowControl(400, 300, "myimagedir"); ?> <input type= "submit" value= "Post It >>"> </form> <?php } else { // Show what was entered into the control echo "You entered " . $myEWP->GetValue(); } ?> that will bring up the wysiwyg editor and when you click on the 'post it>>' button, it prints out everthing you type in the editor. simple Gaby, just post that into a blank php page, and your set. |
|
#10
|
|||
|
|||
|
Gaby, did you try the example that Edwin gave? It should work.
I have also attached a file which contains an example of editworkspro in action Note: This file doesnt contain the editworkspro class file. just an example file. If you could please try that file, if you having any problems with it, please contact me. BillMan: I asure you were trying to help Gaby every way we can Regards Ben Rowe |
|
#11
|
|||
|
|||
|
Also try reading this post again
URL |
|
#12
|
|||
|
|||
|
Andrew,
We don't appreciate being sworn at via email. We've tried to help you as much as we can, however you're trying to use EditWorks to perform a task that it wasn't designed for and can't do: editing the content of your entire site. As the site states, EditWorks is a replacement for the HTML <textbox> tag, not a full-site editor. It's only purpose it to let webmasters add the capability to accept rich text, images, tables, etc in place of standard plain-text, which textboxes provide. No where on the site does it state that it can be used to edit an entire site. I have refunded your order and you will receive an email from our payment processor, 2Checkout.com. I've just searched the net for the last 2 hours, and the perfect tool for your requirements is WebEditPro at http://www.webedpro.com. It's $145 and includes everything to edit every single page on your site, including style sheets, tables, images and more. It comes in a PHP version and they offer free installation, which is exactly what you need. |
|
#13
|
|||
|
|||
|
geez,
ewp is a richtext editor not Content Management System
__________________
Regards, James Yang .NET Developer / Network Engineer MCSE, MCDBA, MCSA, CCNA http://www.yellowpin.com/ http://www.opentechsupport.com/ |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Embarassed WYSIWYG user |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|