233751
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;
}



233752
Guido83
Re: stubbourn articles
  • 2004/9/30 11:47

  • Guido83

  • Just popping in

  • Posts: 60

  • Since: 2003/12/7


The article is somewhere in my database, isn't it? The thing is, I don't know where.



233753
Rancid
Re: Question about a game based on Xoops
  • 2004/9/30 11:46

  • Rancid

  • Just popping in

  • Posts: 3

  • Since: 2004/9/30


I've been discussing this with a friend who works in web development, he pointed out that based on his experience with smarty, performance problems *might* arise when when the game reaches a certain complexity(large number of templates) and several thousand users in the community.

Has anybody had any experience with XOOPS in such conditions?



233754
hlint
news 1.2 > list of articles
  • 2004/9/30 11:45

  • hlint

  • Friend of XOOPS

  • Posts: 25

  • Since: 2004/2/6 7


hello all,

Something I wondered about since I started using XOOPS and the (buid in)news module.
In the admin part I only get the first 10 articles in a list, I would like to see them all. On the website in question some are not on the front page and only viewable though links in other articles. So the front of the website itself can't help me either.

How and where can I change this?

greeting erik.



233755
sbkiller
Re: Problems with 2.0.7.3 installation
  • 2004/9/30 11:39

  • sbkiller

  • Just can't stay away

  • Posts: 461

  • Since: 2004/6/9 2


I suggest that you should try not to inlcude the html folder, just upload the files in the html folder to the main based directory of your site.



233756
hailstorm
Problems with 2.0.7.3 installation
  • 2004/9/30 11:26

  • hailstorm

  • Just popping in

  • Posts: 1

  • Since: 2004/9/30


I've downloaded the XOOPS package from sourceforge, and installed it on my FreeBSD.

I've made changes to Apache so that it's documentroot would point to the HTML folder of the XOOPS package.

Well, now i just can't get over the first setup screen. If i click next, it will just take me back to the first screen, the one with the welcome message.

Can anyone help me?



233757
Herko
Re: stubbourn articles
  • 2004/9/30 11:17

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


That's Google's side, there's not much you can do about that.

Herko



233758
chrislale
This page was last updated on?
  • 2004/9/30 11:13

  • chrislale

  • Just popping in

  • Posts: 1

  • Since: 2004/9/30


I want to include the date when content in a block was last updated.

Presumably, I cannot use Server-Side Include because this would return a 'last-modified' date associated with the HTML page. The file with the content would be in the SQL database.

Any ideas?



233759
draken
Re: debaser new version!
  • 2004/9/30 11:08

  • draken

  • Just popping in

  • Posts: 28

  • Since: 2002/2/1 1


it's the same problem for me... but i don't need this function... ;_)

Quote:
I've tried a bunch of different types of audio files but all I get is this error msg:

"This is not a valid mpeg file"



233760
draken
Re: debaser new version!
  • 2004/9/30 11:07

  • draken

  • Just popping in

  • Posts: 28

  • Since: 2002/2/1 1


Hi Francis!

Just wonder if you release debaser 0.8 !BETA soon?

thx u!







Login

Who's Online

177 user(s) are online (135 user(s) are browsing Support Forums)


Members: 0


Guests: 177


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