osCmax v2.5 User Manual
Results 1 to 4 of 4

Problems with mainpage.php

This is a discussion on Problems with mainpage.php within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, I have some php code in my mainpage.php that is getting removed when launching the editor. It is replacing ...

      
  1. #1
    Lurker
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0


    Default Problems with mainpage.php

    Hi, I have some php code in my mainpage.php that is getting removed when launching the editor.

    It is replacing this:

    <td><?php require(DIR_WS_MODULES . 'products_cycle_slideshow.php'); ?></td>
    <td><?php require(DIR_WS_MODULES . 'products_cycle_slideshow2.php'); ?></td>
    <td><?php require(DIR_WS_MODULES . 'products_cycle_slideshow3.php'); ?></td>


    with this:
    <td>&nbsp;</td>

    <td>&nbsp;</td>

    <td>&nbsp;</td>

    My current workaround is to simply paste the code back into the source code and save it and that works fine, but is there anyway to prevent it from doing that in the first place? Please advise. Thanks.

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Problems with mainpage.php

    I think you would have to modify the editor. It filters php by default as a security measure. You may want to check the CKEditor documentation over at their support site.

    Typically if you want to use php code in the input boxes, I recommend just disabling the editor altogether and pasting in your raw source code.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    Lurker
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0


    Default Re: Problems with mainpage.php

    Ok,Thanks for your response.It's pretty strange that it disables it when it first opens up but it allows me to save the php code when saving. Either way, I will give that a shot. Normally I would just update the raw source code but this is for a non technical user and she wants to be able to update that page whenever she wants using the editor.

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Problems with mainpage.php

    It only allows you to save it if you paste it in the raw source - which bypasses the editor completely. That is why it works.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. Define Mainpage
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 07-01-2007, 05:32 PM
  2. Mainpage Help
    By ALElder in forum osCMax v2 Features Discussion
    Replies: 8
    Last Post: 06-08-2007, 09:20 AM
  3. javascript scroller on mainpage.php (Define mainpage)
    By zuqaili in forum osCmax v2 Customization/Mods
    Replies: 7
    Last Post: 04-30-2007, 09:51 PM
  4. mainpage.php bug?
    By titaniumtommy in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 03-08-2004, 02:38 AM
  5. Please, just a little help with the mainpage
    By smalto in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 02-22-2004, 04:49 PM

Tags for this Thread

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
  •