Page 5 of 12 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 114
  1. #41
    Join Date
    Mar 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    Hello All,

    I have been trying very hard to get this to work and could use some help. I have created a price list that draws from the database and want to make it so that users have to log in to see it. I have taken the steps below to make this work. I have described the results at the end. Any help would be appreciated.

    1. I copied includes/templates/template_default/templates/tpl_page_default.php to includes/templates/*my template*/templates/

    2. I modified the code in tpl_page_default.php to the following:

    <div><?php echo $titlecheck=substr($var_pageDetails->fields[pages_title],0,5);
    if ($titlecheck=="Print"){
    eval(stripslashes('?>' . $var_pageDetails->fields['pages_html_text'])); }
    else{echo $var_pageDetails->fields['pages_html_text']; }?></div>

    3. I created a new Ez page called “Print” and a new page called “priceList_ezInclude.php”.

    4. I inserted the following code into the Print ez page via the html box.

    <php?

    include (" http://www.blackoliveeastnursery.net/zenCart_boe/priceManager/priceList_ezInclude.php");

    ?>
    <a href="http://www/zen-cart.com">Get Zenned</a>

    5. I actived the “Page is SSL” button in the Admin > Tools > ez pages page for the Print ez page.

    RESULT:

    When I click on the “Print” link in the sidebox, I am sent to the Login page. After I log in, I am taken to the Print page, but the included page does not appear. All that is there is the include code below:

    Print
    <php?
    include
    (" http://www.blackoliveeastnursery.net/zenCart_boe/priceManager/priceList_ezInclude.php"); ?>
    <a href="http://www/zen-cart.com">Get Zenned</a>

    I have verified that the link to the included file is working, so that is not the problem. Any help would be appreciated.

  2. #42
    Join Date
    Mar 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    I have also made the changed to the FCKeditor as suggested.

    Same results.

    thanks

  3. #43
    Join Date
    Sep 2009
    Posts
    1
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    My blog post wasn't about zen cart, the site I was working on was one that I created, so I may not be understanding how zen cart code operates.

    "All that is there is the include code below"

    To see that include code did you view the source code of the page, or are you saying that the page itself was displaying code instead of the code's output?

    If the later, then I think you need to modify the regex governing protected source code to include more tags.

    FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code

    jasonwhitener.com/2009/03/02/fckeditor-php-html-header-is-gone

  4. #44
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: PHP inside ezpages

    Quote Originally Posted by lndlyb4 View Post
    I have also made the changed to the FCKeditor as suggested.

    Same results.

    thanks
    PHP included into EZ Pages requires additional code alteration..see thread/post at
    http://www.zen-cart.com/forum/showpo...48&postcount=7

  5. #45
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: PHP inside ezpages

    and have you made the changes themselves within fckconfig.js in fckeditor as per my post on the previous page of this thread, that must be enabled to have it recognise php and view the page head info etc within source code. once its done you should on any new blank page click on source and already be able to see the following:

    HTML Code:
    <html dir="ltr">
        <head>
            <title></title>
        </head>
        <body>
            <p>&nbsp;</p>
        </body>
    </html>
    if you cant then those changes have not been made properly.

  6. #46
    Join Date
    Mar 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    I made all the changes suggested above. I think I have a problem with my install of fckeditor. My php code keeps getting wiped out even if I work in source code. I went to Admin > My Store > html editor to make sure fckeditor was selected and it wasn't even available on the list. I think I was still working in the regular html editor which is why the code was getting wiped out even though I had installed fckeditor.

    I re-uploaded the fckeditor files, but it is still not availible in the html editor list.

    My next strategy is to remove all of the fckeditor files from the server and re-install unless someone else has a better idea.

    Any guidance would be appreciated as this is a bit discouraging.

  7. #47
    Join Date
    Jun 2009
    Location
    Kent, UK
    Posts
    347
    Plugin Contributions
    5

    Default Re: PHP inside ezpages

    first of all try logging out and clearing your browser cache, if no change or still doesnt appear then remove all fckeditor files and then reinstall making sure you use the latest version from the fckeditor site instead.

    it still sounds like you are missing changes to your fckconfig.js, ive uploaded mine, compare changes and see if that helps?
    Attached Files Attached Files

  8. #48
    Join Date
    Mar 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    bonnit, misty, jason, Thanks for hanging with me on this.

    1. I re-installed fckeditor and the situation has improved somewhat. The editor inside the ez page is no longer wiping out my code. I can see the html code that bonnit referred to.

    2. To test it out, I inserted some php into the ez page editor as presented below:

    <html dir="ltr">
    <head>
    <title></title>
    </head>
    <body>
    <div id="test_php"><?php print("this");?></div>
    </body>
    </html>

    3. Neither the html, the php code or the php output appeared in the ez page when I accessed it. However, I could see the php code in the source code of the ez page. The login feature seems to be working fine as it does send me to the login page first.

    4. I replaced this code in tpl_page_default.php:

    <div><?php echo $var_pageDetails->fields['pages_html_text']; ?></div>

    with this:

    <div><?php eval(stripslashes('?>' . $var_pageDetails->fields['pages_html_text'])); ?></div>

    5. I change "false" to "true" in fckconfig.js.

    FCKConfig.FullPage = true ;

    6. I removed the // from

    FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ;

    I'm not sure what I am overlooking.

  9. #49
    Join Date
    Mar 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    bonnit,

    The version of fckeditor I installed is 2.6.4.1.

    I did a comparison. The fullpage script and the protect script are identical in our fckconfig files. There some other differences in regard to email and such, does that matter?

    Bill

  10. #50
    Join Date
    Mar 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    Is this the only code that is changed in tpl_page_default.php?

    <div><?php echo $var_pageDetails->fields['pages_html_text']; ?></div>

    Is there something else in this file I should be changing? I got a little confused because of the shift in techniques mid stream on the thread. By the way, thank you TecBrat for the initial solution.

    Is there part of TechBrat's solution I should be incorporating?

    thanks

 

 
Page 5 of 12 FirstFirst ... 34567 ... LastLast

Similar Threads

  1. PHP inside EZ-Pages
    By digiprint in forum General Questions
    Replies: 0
    Last Post: 17 Jun 2013, 09:10 AM
  2. PHP code inside of an EZ page
    By tcarden in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Dec 2012, 05:19 PM
  3. PHP inside EZpages
    By hookah in forum General Questions
    Replies: 3
    Last Post: 15 Nov 2008, 08:40 AM
  4. search inside php files
    By papadopoulos in forum General Questions
    Replies: 2
    Last Post: 20 Jun 2006, 02:31 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR