Results 1 to 9 of 9
  1. #1
    Join Date
    May 2013
    Location
    Florence (Italy)
    Posts
    5
    Plugin Contributions
    1

    red flag Ckeditor change my php code

    Hello,

    I added the CKEditor module v. 3.6.6 rel.7689 (I think 3.7E!?)

    The problem:
    When I published a page with code like the following

    …<div align="center">
    <a href="<?php echo zen_href_link(FILENAME_DEFAULT, 'cPath=104') ?> ">
    <img alt="MyImage" border="0" height="140" hspace="0" src="images/myimage.png" width="140" />
    </a>
    </div> …


    After saving the edited page, the program (ckeditor) replaces the whole as follows:

    …<div align="center">
    <a href="http://www.my-site.com/admin/%3C?php echo zen_href_link(FILENAME_DEFAULT, 'cPath=104') ?&gt;">
    <img alt=" MyImage " border="0" height="140" hspace="0" src="images/myimage.png" width="140" />
    </a>
    </div> …


    with obvious error link!
    someone is able to solve this "defect" ?

    thanks
    Last edited by Rampino; 8 May 2013 at 02:26 PM.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Ckeditor change my code

    What type of page are you editing???

    If an ezpage - they do not parse php code

    Actually, any page besides a define page - i.e. product description, etc... do not parse php code

  3. #3
    Join Date
    May 2013
    Location
    Florence (Italy)
    Posts
    5
    Plugin Contributions
    1

    Default Re: Ckeditor change my code

    In some "Define Pages" I need to make links like the one shown in the previous example.
    I do not understand why ckeditor change the link code?

    I need to make sure that ckeditor does not automatically change my link code!

    How can I do?

    Or, does anyone know another syntax to use the function "zen_href_link" in "define Page"?
    Thank you for your attention

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Ckeditor change my php code

    n some "Define Pages" I need to make links like the one shown in the previous example
    Enter code ONLY when in text ("source") mode in the editor

  5. #5
    Join Date
    May 2013
    Location
    Florence (Italy)
    Posts
    5
    Plugin Contributions
    1

    Default Re: Ckeditor change my php code

    hi Kobra,
    I did not understand your answer
    could you, please, explain with other words (or examples)

    What am I doing wrong?
    thanks

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Ckeditor change my php code

    Quote Originally Posted by Rampino View Post
    hi Kobra,
    I did not understand your answer
    could you, please, explain with other words (or examples)

    What am I doing wrong?
    thanks
    there is a "Source" or "View Source" icon on the CKEDITOR toolbar.. click THAT icon and paste your code there.. You cannot put your code into the WYSIWYG editiors..

    Your alternative is to chose the default editor from the editor pulldown BEFORE you edit your defined page so you are using the default text editor and NOT CKEditor..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  7. #7
    Join Date
    May 2013
    Location
    Florence (Italy)
    Posts
    5
    Plugin Contributions
    1

    Default Re: Ckeditor change my php code

    I would like to point out that:
    even without making changes, just the simple SAVE a "define_page" with the editor "CKEditor", to get the replacement string ("<? php) with the string (http://www.my-site/admin /% 3C? php)

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Ckeditor change my php code

    Quote Originally Posted by Rampino View Post
    I would like to point out that:
    even without making changes, just the simple SAVE a "define_page" with the editor "CKEditor", to get the replacement string ("<? php) with the string (http://www.my-site/admin /% 3C? php)
    We know.. which is why we posted the advice we posted..

    Because you can't use the WYSIWYG editor when you include PHP code.. that includes creating or editing or even doing NOTHING and saving..

    you can't use the WYSIWYG editor when you include PHP code!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  9. #9
    Join Date
    May 2013
    Location
    Florence (Italy)
    Posts
    5
    Plugin Contributions
    1

    Default Re: Ckeditor change my php code

    Quote Originally Posted by DivaVocals View Post

    you can't use the WYSIWYG editor when you include PHP code!!
    thanks

    so it is clear for all

 

 

Similar Threads

  1. v153 php help with Password Min_length code change
    By rebecca_L in forum General Questions
    Replies: 5
    Last Post: 15 Apr 2015, 04:12 AM
  2. v151 CKEditor corrupts code
    By pewe in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 12 Jan 2014, 09:21 PM
  3. v150 Is this a correct code change for PHP 5.3?
    By dbltoe in forum Contribution-Writing Guidelines
    Replies: 7
    Last Post: 13 Sep 2012, 10:04 PM
  4. Replies: 1
    Last Post: 21 Jul 2011, 04:29 PM

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