Zen Follower
- Join Date:
- Jul 2007
- Posts:
- 324
- Plugin Contributions:
- 0
ez-pages
Can the ez-pages be place anywhere else beside the top, and also the links look very small.
Thank you
Ladydee
Views: 1,268
Zen Follower
Can the ez-pages be place anywhere else beside the top, and also the links look very small.
Thank you
Ladydee
Zen Follower
for got to add an instant replay message
Totally Zenned
You are, I believe, talking about the EZPages LINKS... ?
There are three standard "locations" you can choose for these links.
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).
Zen Follower
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
Totally Zenned
deemurphy:
... I have one that does an upload ...
... be very interested to know how you are achieving this...
Zen Follower
Are we allowed to post code here: If so I can tell you how I did the upload.
Thank you
LadyDee
Totally Zenned
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...
Zen Follower
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
Tell staff why this post should be reviewed.