Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Entering PHP Code with FCKEditor

    That would depend on what limitations you choose to include in your php.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  2. #2
    Join Date
    Feb 2005
    Posts
    56
    Plugin Contributions
    0

    Default Re: Entering PHP Code with FCKEditor

    I'm sorry, but to me that's a very vague answer.

    Are you suggesting that in my mainpage php code I could write something along the lines of (roughly speaking):

    if products_id=826;
    include membership form;
    else
    don't;
    endif

    If that's the case, I think I'd rather get drunk :)

    As I said, I have other options. However, my question has been raised hundreds of times by others on the Internet, so I hardly think I'm alone here.

    Thanks for your reply.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Entering PHP Code with FCKEditor

    There's a MUCH more important issue you're overlooking entirely.

    Even if you were to add PHP code to the product description, Zen Cart isn't going to RUN that PHP code anyway. It'll just echo it out to your browser.
    To make it execute the code, you'd need to edit the core code that outputs the description and have it check whether there's any embedded PHP, have it run that PHP, and include it in the output.

    So, rather than beat your head against the wall about a fancy text editor, why not get your core PHP logic working first?
    ie:
    1. Turn OFF all your rich-text editors ... just use "Plain Text" or "NONE" as your product-description editor. Put your PHP in there. That way the editor is no longer a factor.
    2. Work on the logic to make that PHP code actually run as you intend it.
    3. Then you'll probably find that turning on the rich-text editor may actually have no negative impact at all.

    I would suggest that maybe some alternative approaches be explored, as they would negate all issues related to FCKeditor or other editors:
    a) some sort of boilerplate approach
    b) a hard-coded approach such as you've been discussing with kuroi
    c) maybe use product-attributes instead ... but that might necessitate a lot more coding, essentially building a custom product-type ...... which might not be a bad idea if you wanted to share it
    d) or maybe rethink whether you want this done as a "product" at all ... cuz technically it really isn't a product, as far as I can tell.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Feb 2005
    Posts
    56
    Plugin Contributions
    0

    Default Re: Entering PHP Code with FCKEditor

    Hi DrByte.

    I don't think I'm overlooking anything because I just don't know. All I was looking for was an alternative to Plan A, but it seems that the alternative - to include PHP code in FckEditor isn't an option.

    Quite seriously, I really think I've wasted your time because Plan A is still acceptable, and the one I will use. Hopefully others with a similar need, will discover this thread and stop wasting their time, or follow the suggestions you have all come up with.

    Thanks to all for taking time out to reply. it was very kind of you.

 

 

Similar Threads

  1. Can I require entering a referral code to create account?
    By tamadrummer1975 in forum General Questions
    Replies: 1
    Last Post: 2 Aug 2011, 12:36 AM
  2. html code in fckeditor
    By wowemall in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 May 2010, 10:44 AM
  3. HTMLAREA problems with entering <?php code
    By g.nencini in forum General Questions
    Replies: 10
    Last Post: 18 Sep 2009, 10:42 AM
  4. Multiple entering Redemption Code.
    By kamoljan in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 25 Jul 2009, 03:42 PM
  5. 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

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