Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Mar 2006
    Location
    Florence, Italy
    Posts
    153
    Plugin Contributions
    0

    help question HTMLAREA problems with entering <?php code

    I've tested the possibility of writing PHP code in a page (for example the main-page) with HTMLAREA (clicking the "<>" icon), and I've seen that is going well.
    For example the code
    <br>
    SESSION['language'] = <?php echo $_SESSION['language']; ?>
    <br>
    show in the main-page
    SESSION['language'] = english

    The problem is that if I open again the main-page for making some change, (alwais clicking the "<>" icon) the code appear changed, and not good.

    Have somebody an idea for how to avoid this?
    Thanks - Giovanni

  2. #2
    Join Date
    Mar 2006
    Location
    Florence, Italy
    Posts
    153
    Plugin Contributions
    0

    Default Re: HTMLAREA problems

    Nobody......?
    Thats what happen to the original code:

    <br />
    SESSION['language'] = <!--p echo $_SESSION['language'];-->
    <br />

  3. #3
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: HTMLAREA problems

    I don't think HTMLArea can handle PHP code block . that might be the reason that code block changes when you reopen them in HTMLArea.

    I can only suggest , using FCKeditor or TinyMCE . you can find both of them in free add on .

  4. #4
    Join Date
    Mar 2006
    Location
    Florence, Italy
    Posts
    153
    Plugin Contributions
    0

    Default Re: HTMLAREA problems

    Many thanks, tony_sar.
    I'll find FCKeditor and TinyMCE, hoping that there's a readme.txt for explainig how to install.
    Thanks again - Giovanni

  5. #5
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: HTMLAREA problems

    there is installation info , and by far , they seems to be the easiest modules to install

  6. #6
    Join Date
    Mar 2006
    Location
    Florence, Italy
    Posts
    153
    Plugin Contributions
    0

    Default Re: HTMLAREA problems

    Well, I've installed the FCKeditor, and the problem is the same. Maybe that all the WYSIWYG editors are not good for the PHP tags.
    So I've decided to work in this way:

    - I can prepare the layout of the page with HTMLarea or FCKeditor (even if I prefer always to write the code by myself).
    - Then I select the editor "Text only" to properly correct the code, and save.

    I think this is the better thing to do.

    Giovanni

  7. #7
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: HTMLAREA problems with entering <?php code

    open fckconfig.js in your fckeditor folder


    around line 55 uncomment the like
    FCKConfig.ProtectedSource.Add
    just uncomment the one for php source protection ..

    don't forget , you have to alway enter your php code in source view ..
    after uncommenting .. FCKeditor will not damage your code block .

  8. #8
    Join Date
    Mar 2006
    Location
    Florence, Italy
    Posts
    153
    Plugin Contributions
    0

    Default Re: HTMLAREA problems with entering <?php code

    Many thanks, tony_sar.
    That's o.k.
    Giovanni

  9. #9
    Join Date
    Mar 2006
    Location
    Florence, Italy
    Posts
    153
    Plugin Contributions
    0

    Default Re: HTMLAREA problems with entering <?php code

    But now arise another problem:
    while in the extra pages the php code is translated, in the product description this don't happen!!
    Some suggestion????

    Thanks - Giovanni

  10. #10
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: HTMLAREA problems with entering <?php code

    you can not add php code in product description .. same goes for EZpages .

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Entering PHP Code with FCKEditor
    By johnk in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 5 Oct 2009, 10:41 AM
  2. Multiple entering Redemption Code.
    By kamoljan in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 25 Jul 2009, 03:42 PM
  3. EZPages - problems with htmlarea editor
    By beyerg in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 6 Feb 2009, 11:52 AM
  4. Entering HTM Code into PHP Files - Adding Live Search to search_header.php
    By Jump Network in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Sep 2007, 02:47 PM
  5. Problems with HTMLAREA editor
    By RAlfieri in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Jul 2006, 08:57 AM

Posting Permissions

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