BASE HREF PROBLEM for developer - urgent

Last post 03-11-2008, 12:36 PM by Adam. 10 replies.
Sort Posts: Previous Next
  •  02-22-2008, 11:25 AM 37281

    BASE HREF PROBLEM for developer - urgent

    Rhonda:

    hello

    kyle:
    i can't get $editor->BaseHref to work
    kyle:
    is there a bug in the code
    kyle:
    (i am a customer)
    kyle:
    hello?
    kyle:
    i'm still waiting for an answer
    Rhonda:

    i am here

    kyle:
    have you received my question?
    Rhonda:

    y

    Rhonda:
    can you give me more information
    kyle:
    sure...i purchased the editor a few days ago
    kyle:
    and I have successfully installed it
    kyle:
    when I try to use the BaseHref property it doesn't work
    Rhonda:

    how can i reproduce the problem

    kyle:
    your document states that BaseHref - Sets or retrieves the baseline URL on which relative links will be based.
    kyle:
    One moment, I will give you a URL illustrating this problem
    Rhonda:
    thank you
    kyle:
    http://www.modifywebsite.com/au3/cute/au_test.php
    kyle:
    The php code to generate that page is...
    One word in your message exceeded the maximum length of a single word (30).
    One word in your message exceeded the maximum length of a single word (30).
    kyle:
    it's not letting me post the code
    kyle:
    but i generated it using the simple examples in your documentation
    kyle:
    But the important thing is that there's a line of code in that php file that has $editor->BaseHref="http://prayingforourchildren.com";
    kyle:
    now when i copy and paste html code from the prayingforourchildren.com website, all of the images still appear as invalid
    kyle:
    with red x's on them indicating that they're invalid
    kyle:
    to recreate, you can copy and paste the source code from prayingforourchildren.com
    Rhonda:
    I am not able to duplicate this problem. Would you be able to fully document this issue and post it to our support forum so that our developers can take a look at it.
    kyle:
    to duplicate, you can copy and paste the source code from prayingforourchildren.com
    Rhonda:
    just copy and paste the text that you have used in this chat
    kyle:
    unfortunately, I need help right away and due to the pressure I'm under can't wait for a developer to respond
    kyle:
    I can all you need to do to duplicate the error is copy and paste the source code from prayingforourchildren.com (View>Source>Copy) then paste into the http://www.modifywebsite.com/au3/cute/au_test.php
    kyle:
    when you click on the normal mode again, you will see that it does not show the images like it should
    kyle:
    please help as I'm under a LOT of pressure to finish right away
    Rhonda:
    I understand. If you can post it to the forum now and send me the link to the forum, I will get a developer on it right away.
    kyle:
    thanks
    kyle:
    i'll do it now
    kyle:
    can i have a link to that?
    kyle:
    please?
    kyle:
    if you are sending me a link I can't see it
    kyle:
    thank you I am writing the post now
     
     
    -----------------------------------------
     
     
    Also, I was having a problem with LoadHTML...no matter what I did, it would say file not found.  I had to comment out line 818 in your cuteEditor_files/include_CuteEditor.php file to get it to work.  Can you shed some light on this??? please?
     
    Kyle
  •  02-22-2008, 11:58 AM 37285 in reply to 37281

    Re: BASE HREF PROBLEM for developer - urgent

    Kyle,
     
    Please check this online demo:
     
     
    The settings in this example are as followings:
     

                    $editor->URLType="Absolute";
                    $editor->BaseHref="https://Yahoo.com/";
     
    Keep me posted
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-22-2008, 12:50 PM 37294 in reply to 37285

    Re: BASE HREF PROBLEM for developer - urgent

    Thank you, I have checked the online demo, and while it appears to work I don't think Yahoo.com is a good example.  Here's why:
     
    Yahoo ALREADY uses absolute URL's, so whether or not we set the BaseHref property it will display the Yahoo graphics.  For example, even when I copy and paste the Yahoo.com source code in THIS editor, it shows the Yahoo graphics.
     
    I've set up a demonstration on my server for you see what I've done and maybe you can help.  Thanks in advance...
     
    - http://www.modifywebsite.com/au3/cute/basetest.php
     
    Here's my code for basetest.php
     
    <?php include_once("CuteEditor_Files/include_CuteEditor.php") ; ?>
    <?php
    $editor=new CuteEditor();
    $editor->ID="Editor1";
    $editor->Text="<b>Type your text here</b>";
    $editor->FilesPath="CuteEditor_Files";
    $ClientID=$editor->ClientID();

    $editor->EditCompleteDocument=true;
    $editor->URLType="Absolute";
    $editor->BaseHref="http://www.prayingforourchildren.com";

    $editor->Draw();
    $editor=null;
    ?>
     
    When I copy and paste the code from the home page of prayingforourchildren.com, it doesn't work.  Try it.
     
    Thanks
     

  •  02-22-2008, 1:11 PM 37296 in reply to 37294

    Re: BASE HREF PROBLEM for developer - urgent

    Don't forget to read the above post 
     
    I'm also having a problem with LoadHTML...no matter what I did, it would say file not found.  I had to comment out line 818 in your cuteEditor_files/include_CuteEditor.php file to get it to work.  Can you shed some light on this??? please?
     
    Kyle
  •  02-22-2008, 2:25 PM 37298 in reply to 37296

    Re: BASE HREF PROBLEM for developer - urgent

    I talked with Rhonda and she set up a demo page at http://phphtmledit.com/basehref1.php with the base href set to http://cutesoft.net  and it worked
     
    When I duplicated this code on my machine after changing the one line of code to $editor->BaseHref = "http://cutesoft.net";,
    it doesn't work
     
    So basically the code works on your server, but not on mine.
     
    I'm running a Windows 2003 with IIS 6.0 and PHP 5 (i believe).  Everything else works except this. 
     
    Please shed some light as soon as possible as time is of the utmost essense.
     
    Thanks,
    Kyle

  •  02-22-2008, 11:21 PM 37306 in reply to 37298

    Re: BASE HREF PROBLEM for developer - urgent

    Kyle,
     
    1. Download the control again and create new project, test it.
     
    2. If you still have problem, create a new php file with the following code in it:
    <?php
    // Show all information, defaults to INFO_ALL
    phpinfo();
    ?>
     
    I need to the result of DOCUMENT_ROOT.
     
    3. For the LoadHTML issue, how did you use this method?
     
    If you set DOCUMENT_ROOT correctly, it should not have any problems..
     
    Keep me posted
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-29-2008, 5:03 PM 37479 in reply to 37306

    Re: BASE HREF PROBLEM for developer - urgent

    Still having base href problems
     
    You can see the document_root or whatever here: http://www.modifywebsite.com/cute/phpinfo.php


  •  02-29-2008, 5:12 PM 37480 in reply to 37479

    Re: BASE HREF PROBLEM for developer - urgent

    I noticed that when I do this, and set the urltype to absolute, it shows as 'modifywebsite.com' even though i set the base href value to something else (in this case prayingforourchildren.com).  Does the fact that I have a domain license have anything to do with this?  If so, that doesn't make any sense because the control IS hosted on modifywebsite.com, I just want to reference images from other domains.
     
    please reply
    kyle
  •  03-04-2008, 12:32 PM 37550 in reply to 37480

    Re: BASE HREF PROBLEM for developer - urgent

    Kyle,
     
     
    If you set Editor.EditCompleteDocument Property to true, the editor will process content outside the page body and preserve header tags (e.g. <head>...</head>, <title>...</title>, etc.).
     
    All the elements inside head tag are in your control, include base element.
     
    This is by design.
     
    For example, you can try the following code:
     
    <html>
        <head>
            <title>Example of the BASE Tag</title>
            <base href=http://www.CuteSoft.net />
        </head>
        <body>       
             <img alt="" src="http://cutesoft.net/uploads/21.jpg" border="0" />
        </body>
    </html>
     
    Hope it helps.
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-07-2008, 1:58 PM 37696 in reply to 37550

    Re: BASE HREF PROBLEM for developer - urgent

    Hi Adam, I'm not sure if I explained my situation clearly.  I can't get the following code to work together:
     
       $editor->EditCompleteDocument=true;
       $editor->BaseHref=http://www.imvo.org;
     
    1. When I run the above code, it DOES edit the complete document, but BaseHref won't work (it won't display relative images as coming from http://www.imvo.org).
    2. But when I REMOVE the EditCompleteDocument=true line of code, the BaseHref DOES work perfectly fine (it DOES display relative images as coming from http://www.imvo.org.
    Your comment suggests that I include the base href call inside the actual html code.  I don't want to do this.  I want to be able to set the base href command from the php code that initializes the editor. 
     
    Nevertheless, when i try your suggestion, and load the editor with the <base href code in the <head> section, the editor removes it removes it.  even still, I don't like this approach as it's not relavant to what I'm trying to accomplish.
     
    Here's my code in full...
     
    <?php
    $editor=new CuteEditor();
    $editor->ID="Editor1";

    $editor->FilesPath="CuteEditor_Files";
    $ClientID=$editor->ClientID();

    $editor->URLType="Absolute";
    $editor->EditCompleteDocument=true;  //with it set like this, BaseHref won't work, but if you comment this line out, BaseHref WILL work
    $editor->BaseHref=http://www.imvo.org;
    $editor->Draw();
    $editor=null;
    ?>
  •  03-11-2008, 12:36 PM 37791 in reply to 37696

    Re: BASE HREF PROBLEM for developer - urgent

    Kyle,
     
     
    If you set Editor.EditCompleteDocument Property to true, the editor will process content outside the page body and preserve header tags (e.g. <head>...</head>, <title>...</title>, etc.).
     
    All the elements inside head tag are in your control, include base element. The BaseHref property is ignored in this situation.
     
    This is by design.
     
    For example, you can try the following code:
     
    <html>
        <head>
            <title>Example of the BASE Tag</title>
            <base href=http://www.CuteSoft.net />
        </head>
        <body>       
             <img alt="" src="http://cutesoft.net/uploads/21.jpg" border="0" />
        </body>
    </html>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML