521
kaotik
Re:Smallstore 1.0 released
  • 2004/10/4 11:23

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Here's a demo site so you can see it in action.

Demo site



522
kaotik
Smallstore 1.0 released
  • 2004/10/3 23:50

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


With the new XOOPS facelift, I've decided to release a small little module I've been working on.
It's a small shop that allows you to arrange your products in whatever way you like (such as using frontpage, dreamweaver, etc), place the code into the pages of Smallstore, then have the users fill out a form which gets emailed to you.
For my XOOPS site I needed something REALLY simple as I only had 3 products to sell.

Please read the readme to understand how it works.

Hope you like it!

Smallstore ver 1.0



523
kaotik
Image upload not being saved to directory
  • 2004/9/30 11:58

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


I'm using the folowing code. Can someone tell me why it's not saving to the directory I specified?
Any help would be greatly apreciated.

include("../../mainfile.php");


$op 'form'

function 
form() {
$max_imgsize 10000000;
include 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$my_form = new XoopsThemeForm("Upload""form""index.php");
$my_form->setExtra"enctype='multipart/form-data'" ) ; 
$img_box = new XoopsFormFile("Image""photo"$max_imgsize);
$img_box->setExtra"size ='50'") ;
$my_form->addElement($img_box); 
$button_tray = new XoopsFormElementTray('' ,'');
$button_tray->addElement(new XoopsFormButton('''post',"Submit"'submit'));
$my_form->addElement($button_tray);
$my_form->display();
}

foreach ( 
$_POST as $k => $v ) { 
${
$k} = $v
}
if ( isset(
$post) ) {
$op 'post';
}

switch (
$op) {

case 
"post"
$max_imgsize 10000000
$max_imgwidth 50000
$max_imgheight 50000
$allowed_mimetypes = array('image/gif''image/jpeg''image/pjpeg''image/x-png');
$img_dir XOOPS_ROOT_PATH "/modules/WebMailFX/images" ;

include_once(
XOOPS_ROOT_PATH."/class/uploader.php");
$field $_POST["xoops_upload_file"][0] ; 

if( !empty( 
$field ) || $field != "" ) { 

$uploader = new XoopsMediaUploader($img_dir$allowed_mimetypes$max_imgsize$max_imgwidth$max_imgheight);
$uploader->setPrefix'img' ) ;
if( 
$uploader->fetchMedia$field ) && $uploader->upload() ) { 
$photo=$uploader->getSavedFileName();

} else { 
echo 
$uploader->getErrors();
}
}

break; 

case 
'form':
default:

form();

break;
}



524
kaotik
Re: uploader.php and Notice: Undefined index:
  • 2004/9/29 16:02

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


The original line was:
if ($uploader->fetchMedia($HTTP_POST_VARS['uploade_file_name'])) {

I've just been tring diferent things there tring to get it to work



525
kaotik
Re: uploader.php and Notice: Undefined index:
  • 2004/9/29 15:59

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


yes, it's the uploader.php file found in /class.
I copied the initial part into a different file:

include_once 'uploader.php';
$allowed_mimetypes = array('image/gif''image/jpeg''image/pjpeg''image/x-png');
$maxfilesize 50000;
$maxfilewidth 120;
$maxfileheight 120;

$uploader = new XoopsMediaUploader('/home/xoops/uploads'$allowed_mimetypes$maxfilesize$maxfilewidth$maxfileheight);
if (
$uploader->fetchMedia($_POST[img][0])) {
if (!
$uploader->upload()) {
echo 
$uploader->getErrors();
} else {
echo 
'<h4>File uploaded successfully!</h4>';
echo 
'Saved as: ' $uploader->getSavedFileName() . '<br />';
echo 
'Full path: ' $uploader->getSavedDestination();
}
} else {
echo 
$uploader->getErrors();
}
?>


then copied uploader.php into the same directory (just for testing purposes)
I've read the comments regarding this line in uploader.php
@param   string  $media_name Name of the file field
     
* @param   int     $index      Index of the file (if more than one uploaded under that name)

but can't understand what it's asking for. can you help me plz?



526
kaotik
uploader.php and Notice: Undefined index:
  • 2004/9/29 14:28

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


I'm getting this error:
Notice: Undefined index: upload_file_name in c:\mailattach.php on line 53

Errors Returned While Uploading
File not found

Here's the line:
if ($uploader->fetchMedia($HTTP_POST_VARS['upload_file_name'])) {

can someone help me?

Here's the entire code:
include_once 'uploader.php';
$allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
$maxfilesize = 50000;
$maxfilewidth = 120;
$maxfileheight = 120;
$uploader = new XoopsMediaUploader('/home/xoops/uploads', $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
if ($uploader->fetchMedia($HTTP_POST_VARS['upload_file_name'])) {
if (!$uploader->upload()) {
echo $uploader->getErrors();
} else {
echo '<h4>File uploaded successfully!</h4>';
echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
echo 'Full path: ' . $uploader->getSavedDestination();
}
} else {
echo $uploader->getErrors();
}
?>



527
kaotik
smtp.class and mime types
  • 2004/9/29 0:31

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


has anyone implemented the various mime types in the smtp.class?
specificlly:
To:
Subject:
X-Priority:
Mime-Version:
Content-Type:
Content-Transfer-Encoding:

Any help would be GREATLY apreciated, i'm stumped...



528
kaotik
Re: Getting the webmail module to work - Here's the file!
  • 2004/9/28 15:55

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Regrading the admin not updating:
Verify that cache/config.php is chmod 777. The reason for the admin info not updating is lack of write permission. Also make sure to go through the other chmod in the readme.
Please report back if this solves the problem or not.



529
kaotik
Re: XOOPS 2.0.7.3
  • 2004/9/28 2:12

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Here:
http://prdownloads.sourceforge.net/xoops/xoops-2.0.7.3.zip?download



530
kaotik
Re: Getting the webmail module to work - Here's the file!
  • 2004/9/28 2:04

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


what version are you using?




TopTop
« 1 ... 50 51 52 (53) 54 55 56 ... 59 »



Login

Who's Online

141 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 141


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits