341
talunceford
Re: Help with some upload code.....

NM Got it figured out.



342
talunceford
Re: module to install modules

Ono, how hard would it be to make an RSS feed for the downloads? Specifically the modules for X2.



343
talunceford
Re: module to install modules

Right now it is strictly upload through the interface. Although uploading from another site is a very good idea. I need to do some research on how to write a function to do that.

Some of the features that I have now are:

Ability to upload module, unzip & delete zip file in one motion. Install the module from the directory list. Its very rough right now. Mostly because I scavanged code from differnt scripts available on the net, and haven't had enough time to strip the functions out and put them in their own individual functions.

The biggest thing is that it works. I think it will be a mini-module the way that it is going.

Here are some in action pics of the module...

Resized Image

Resized Image

Resized Image

Resized Image

Resized Image

Resized Image

Resized Image


I will keep you guys posted on the progress....




344
talunceford
Re: module to install modules

I've been toying with the very idea....

Resized Image

Ive got the workings of the system done....

just need to work on the RSS feed... or list of some sort....




345
talunceford
Help with some upload code.....

Well, I decided to expand on the upload and extract module, module/hack. One problem, I cant get the upload to work correctly. Ive got the upload code stored in a function, and it seems to hit the function properly, but it errors out as soon as I submit something.... By error out, I mean that it doesn't submit anything and displays the canned error message.

Here is the code..

<code>
function xoopsmoduleupload() {
global $HTTP_POST_VARS;
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
$uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('text/html', 'application/x-cdf', 'text/plain'), 2000000);
$uploader->setPrefix('tmp');
if ($uploader->fetchMedia($HTTP_POST_VARS['upload_file_name'][0])) {
if (!$uploader->upload()) {
$err = $uploader->getErrors();
} else {
echo '<h4>File uploaded successfully!</h4>';
echo 'Saved as: ' . $uploader->getSavedFileName() . '<br />';
echo 'Full path: ' . $uploader->getSavedDestination();
redirect_header("unzip.php",1,'Module Successfully Uploaded <br> Saved as: $uploader->getSavedFileName() <br> Full path: $uploader->getSavedDestination()' );
}
} else {
redirect_header("unzip.php",1,$uploader->getErrors());
echo $uploader->getErrors();
}
}
</code>

What am I doing wrong here?

Thanks for the help,



346
talunceford
Re: Modifying the Mainfile properties from the admin menu...... idea....

Yup what Mithy said......



347
talunceford
Re: Modifying the Mainfile properties from the admin menu...... idea....

The download should work now..... Please do not try this on a live site. This is for testing purposes only. All feedback is much appreciated.



348
talunceford
Re: Modifying the Mainfile properties from the admin menu...... idea....

Please delete this post....



349
talunceford
Re: Modifying the Mainfile properties from the admin menu...... idea....

please delete this post....



350
talunceford
Re: Modifying the Mainfile properties from the admin menu...... idea....

Correct, but with this hack it allows you to chmod it back to the read only state after modifications are made.

Let me see what is going on with the download thing.....




TopTop
« 1 ... 32 33 34 (35) 36 »



Login

Who's Online

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


Members: 0


Guests: 246


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