Page 3 of 12 FirstFirst 12345 ... LastLast
Results 21 to 30 of 114
  1. #21
    Join Date
    May 2007
    Posts
    11
    Plugin Contributions
    0

    Default Page 2, 3 & 4

    I am a newbee, how do I

    1. edit the above pages to show different page names.
    I have changed page title and header, but dont know where to change the page names as they appear in the lefthand column sidebox on the main page.

    2. I seem to have lost icon.gif and put in in the wrong location(UK flag showing language as english) where does that image file go?

    Somebody help please.

  2. #22
    Join Date
    Feb 2005
    Posts
    246
    Plugin Contributions
    0

    Default Re: Page 2, 3 & 4

    Quote Originally Posted by jackrich1967 View Post
    I am a newbee, how do I

    1. edit the above pages to show different page names.
    I have changed page title and header, but dont know where to change the page names as they appear in the lefthand column sidebox on the main page.

    2. I seem to have lost icon.gif and put in in the wrong location(UK flag showing language as english) where does that image file go?

    Somebody help please.
    1. Whatever you name the page on the ezpages view is the anchor text for the link to it in the menu. (I use the sidebox version)

    2. This really isn't an ezpages question, but the path you are asking for is /includes/languages/english/images/icon.gif Being in the US, I often replace the unionjack with the stars and stripes.

  3. #23
    Join Date
    May 2007
    Posts
    11
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    Thanks for the advice. I sorted out the problems and catalogued it. Much appreciated.

    jackrich1967

  4. #24
    Join Date
    Jun 2006
    Posts
    96
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    I've tried to use this code to implement a "Catalog Request" form in an ez-page that I created. The form handling and everything is done from within the ez-page. However, when the form is submitted, I simply get redirected back to the index page of my site, and the submit fails. I had a similar problem with another form I tried to create.

    The form itself is pretty basic and I'm confident that the problem doesn't lie within the code itself. Any thoughts?

    Thanks!

  5. #25
    Join Date
    Feb 2005
    Posts
    246
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    I remember pulling my hair out trying to get a form to work inside infopages. (predecessor to ezpages). I'll take a look and see if I can remember how I did it.

  6. #26
    Join Date
    Feb 2005
    Posts
    246
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    Okay,
    inside my infopage is this line.
    Code:
    <? include( "/home/USERNAME/public_html/FORM_FILE_NAME.php" );?>
    then inside my included file I have this
    Code:
    <?
    
    $comments=stripslashes($comments);//needed during re-populate mode
    if (!$formstatus=="submitted" || $frmerr=="retry"){
    ?>
    <form method="POST" action="<? echo "$PHP_SELF"; ?>?main_page=infopages&pages_id=<? echo $pages_id;?>">
    <input type=hidden name=formstatus value="submitted">
    in my handler file (also included) I have this
    Code:
    if(!frmerr){ do whatever I need to do with this info}
    else{
    <form method="POST" action="<? echo "$PHP_SELF"; ?>?main_page=infopages&pages_id=<? echo $pages_id;?>">
    <?
     foreach($_POST as $var => $val) {?>
    <input type=hidden name=<? echo "$var";?> value="<?echo stripslashes($val);?>" >
    <?}?>
    <input type=hidden name=frmerr value="retry" >
    <input type=submit value="Correct This">
    </form>
    ...}
    Obviously you'll have to take care of frmerr (Form error) yourself, and deal with re-populating the fields if you want to prevent someone from needing to retype all their info when they leave one required field blank.

    You'll need to replace 'infopages' with 'page' and 'pages_id' with 'id'.

    Code carefully, I may have introduced errors when removing personally identifiable information from my code.
    Last edited by TecBrat; 3 Jul 2007 at 09:24 PM. Reason: fix typo and add warning to watch for errors in my code.

  7. #27
    Join Date
    Sep 2005
    Posts
    95
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    This is a great tip. I will use it for sure.
    Zen-Cart, The Greatest Shopping Cart&#33;

  8. #28
    Join Date
    Dec 2006
    Location
    Vermont
    Posts
    128
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    Hi,

    We want to be able to use PHP inside our "Main" page, under the "Define Pages Editor", so that when we copy our site to our "test" site, the links to special items change to match that.

    What do we have to do, for instance, to change this link to PHP code in the "Main" page?:

    HTML Code:
    http://vtstuff.com/index.php/vt-capital-tree-souvenirs-c-63.html
    I want the
    HTML Code:
    http://vtstuff.com
    to be changed according to the index location, ie; vtstuff.com vs. vtstuff.com/vtstuffwork

    Can anyone tell me what we need to do?

    Thanks.

  9. #29
    Join Date
    Dec 2006
    Location
    Vermont
    Posts
    128
    Plugin Contributions
    0

    Default Re: PHP inside ezpages

    OK, I got something to work to do this in the "Define Pages", but the same code won't work in the EZ Pages. That's OK for now, but it would be nice to be able to do it in an EZ Page

    This is solely for the purpose of being able to COPY a site to a WORK area that has direct links to categories or products in the HTML code, so that the domain changes according to the site location.

    Here's what I did to show the Product Info Page for an item:

    PHP Code:
    <?php echo '<a href="' zen_href_link(FILENAME_DEFAULT) . 'index.php/buttermilk-ranch-dressing-marinade-drews-p-441.html'' ">' 'Click here to check out Drews Buttermilk Ranch Dressing & Marinade' '</a>';?>
    Just embed this code into the Define Pages page you're working on, chaning the item link and description sections to your item.

    Make sure you enter this in TEXT mode.

    Note, our site uses SEO URL's.

  10. #30
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PHP inside ezpages

    If you want your "copy" to contain URLs that are "relative" to your install, regardless of where it is, just create relative links ... don't include the whole domain name ... make your links relative from the start, and you won't have to write custom code to fudge things around.
    .

    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.

 

 
Page 3 of 12 FirstFirst 12345 ... 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