Thread: ez-pages

Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2007
    Posts
    324
    Plugin Contributions
    0

    Default ez-pages

    Can the ez-pages be place anywhere else beside the top, and also the links look very small.

    Thank you
    Ladydee
    Last edited by deemurphy; 15 May 2009 at 02:20 AM. Reason: for got to add an instant replay

  2. #2
    Join Date
    Jul 2007
    Posts
    324
    Plugin Contributions
    0

    Default Re: ez-pages

    for got to add an instant replay message

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: ez-pages

    You are, I believe, talking about the EZPages LINKS... ?

    There are three standard "locations" you can choose for these links.

    1. EZPages header bar
    2. EZPages sidebox (you need to switch on the sidebox)
    3. EZPages in the footer.

    Additionally, you may need to look at:

    Admin>>>Configuration>>>EZPages Settings...

    When you Add/Edit an EZPAge, in addition to selecting "Yes" for its display positions, you must apply a SORT ORDER (Value must be greater than 0).
    20 years a Zencart User

  4. #4
    Join Date
    Jul 2007
    Posts
    324
    Plugin Contributions
    0

    Default Re: ez-pages

    When adding an EX-Page does the customer have to be logged on to use the ex-Pages, I have one that does an upload and was worndering where to put it, because they must be logged on to use that and get gredit coupon.

    Thank you
    LadyDee

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: ez-pages

    Quote Originally Posted by deemurphy View Post
    ... I have one that does an upload ...
    ... be very interested to know how you are achieving this...
    20 years a Zencart User

  6. #6
    Join Date
    Jul 2007
    Posts
    324
    Plugin Contributions
    0

    Default Re: ez-pages

    Are we allowed to post code here: If so I can tell you how I did the upload.

    Thank you
    LadyDee

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: ez-pages

    Yes... you can post the code... use the #, or the <> or the "php" icons in your posting editor - depending on the format of the "code" you are posting. Just paste the code, highlight it then click the appropriate icon...
    20 years a Zencart User

  8. #8
    Join Date
    Jul 2007
    Posts
    324
    Plugin Contributions
    0

    Default Re: ez-pages

    the html code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html charset=iso-8859-2" />
    <title>what ever</title>
    </head>
    <body>
    <center>
    <h1>Brain-Host Essay Uploader</h1>
    <form action="upload.php" method="post" enctype="multipart/form-data">
    <label>File:</label> <input type="file" name="file" /><br />
    <input type="submit" name="submit" value="Submit" />
    </form>
    </center>
    </body>
    </html>

    The php code:

    <?php
    // Upload directory: remember to give it write permission!
    $uploaddir = "../uploads/";
    // what file types do you want to disallow?
    $blacklist = array(".php", ".phtml", ".php3", ".php4", ".php5", ".exe", ".js",".html", ".htm", ".inc");
    // allowed filetypes
    $allowed_filetypes = array('.doc','.docx','.pdf', '.html', '.DOC', '.DOCX', '.PDF', '.HTML');

    if (!is_dir($uploaddir)) {
    die ("Upload directory does not exists.");
    }
    if (!is_writable($uploaddir)) {
    die ("Upload directory is not writable.");
    }

    if ($_POST['submit']) {

    if (isset($_FILES['file'])) {
    if ($_FILES['file']['error'] != 0) {
    switch ($_FILES['file']['error']) {
    case 1:
    print 'The file is too big.'; // php installation max file size error
    exit;
    break;
    case 2:
    print 'The file is too big.'; // form max file size error - DEPRECATED
    exit;
    break;
    case 3:
    print 'Only part of the file was uploaded.';
    exit;
    break;
    case 4:
    print 'No file was uploaded.';
    exit;
    break;
    case 6:
    print "Missing a temporary folder.";
    exit;
    break;
    case 7:
    print "Failed to write file to disk";
    exit;
    break;
    case 8:
    print "File upload stopped by extension";
    exit;
    break;
    }
    } else {
    foreach ($blacklist as $item) {
    if (preg_match("/$item$/i", $_FILES['file']['name'])) {
    echo "Invalid filetype !";
    unset($_FILES['file']['tmp_name']);
    exit;
    }
    }
    // Get the extension from the filename.
    $ext = substr($_FILES['file']['name'], strpos($_FILES['file']['name'],'.'), strlen($_FILES['file']['name'])-1);
    // Check if the filetype is allowed, if not DIE and inform the user.
    if(!in_array($ext,$allowed_filetypes)){
    die('The file you attempted to upload is not allowed.');
    }
    if (!file_exists($uploaddir . $_FILES["file"]["name"])) {
    // Proceed with file upload
    if (is_uploaded_file($_FILES['file']['tmp_name'])) {
    //File was uploaded to the temp dir, continue upload process
    if (move_uploaded_file($_FILES['file']['tmp_name'], $uploaddir . $_FILES['file']['name'])) {
    // uploaded file was moved and renamed succesfuly. Display a message.
    echo "Upload successful!";
    } else {
    echo "Error while uploading the file, Please contact the webmaster.";
    unset($_FILES['file']['tmp_name']);
    }
    } else {
    //File was NOT uploaded to the temp dir
    switch ($_FILES['file']['error']) {
    case 1:
    print 'The file is too big.'; // php installation max file size error
    break;
    case 2:
    print 'The file is too big.'; // form max file size error
    break;
    case 3:
    print 'Only part of the file was uploaded';
    break;
    case 4:
    print 'No file was uploaded';
    break;
    case 6:
    print "Missing a temporary folder.";
    break;
    case 7:
    print "Failed to write file to disk";
    break;
    case 8:
    print "File upload stopped by extension";
    break;
    }
    }
    } else { // There's a file with the same name
    echo "Filename already exists, Please rename the file and retry.";
    unset($_FILES['file']['tmp_name']);
    }
    }
    } else { // user did not select a file to upload
    echo "Please select a file to upload.";
    }
    } else { // upload button was not pressed
    header("Location: form.html");
    }
    ?>

    Hope this works for you, I made it an ez-page with the php outside the html, but in store directory.

    Thanks
    LadyDee

 

 

Similar Threads

  1. v151 Is there a simple approach to renaming ez pages to look like my core pages
    By mrcastle in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 Sep 2014, 01:00 PM
  2. v151 Banners show in all pages, except for product pages. Help!
    By AquaticAddiction in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Mar 2014, 05:56 PM
  3. remove <meta description> from ez pages and define pages : help
    By vandiermen in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 Oct 2010, 12:13 AM
  4. German pack: Define Pages editor works, EZ pages does not
    By jami1955 in forum Addon Language Packs
    Replies: 1
    Last Post: 8 Jul 2010, 10:52 AM
  5. SEO url in EZ Pages (better name than "pages.html?ID=4)
    By headyntl in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 26 Aug 2008, 02:22 AM

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