Recent Topics

1 Jun 05, 2005 17:26    

[url=http://www.mwf-reflections.de/mwf/mwf-b2uploader.rar]download uploader.rar[/url]
-->the scandir() bug is fixed<--

A brand new b2evo File uploader for b2evo v 0.9.0.11
by mwf-reflections.de
(more info in b2upload.php)

Features:
- Preview Files
- Uploaded Filelist
- Rename Files
- Delete Files
- Linkable Images
- Switch html-checker for Flash-files and other...
- Many settings for Flash including
- Full autocode support for every Filetype
- very easy handling

Install:
1. Make a copy of admin/b2upload.php and use the new one.

2. Make the hacks as follow if you want to get a not topable blogengine!

#########################################
# Changes: #
#########################################
replace File to get the new Uploader

--- admin/b2upload.php ---

changed -> nearly all

#########################################
# HACKS #
#########################################
add a checkbox to disable html-checker

admin/_edit_form.php

insert: -> line 102 (after: <span class="line">)
<input type="checkbox" class="checkbox" name="htmlhack" value="htmlhack" />Disable HTML-checker (you can add any HTML-tags, Flash, JavaApplet and JavaScript).<br /><br />

###########################################################
make the checkbox working

--- b2evocore/_functions.php ---

changed: -> line 181
if( $use_html_checker )

to:
if( !$_POST['htmlhack'] == 'htmlhack' )

###########################################################
allow more filetypes

--- conf/_admin.php ---

changed -> line 130
to:
$fileupload_allowedtypes = ' jpg jpeg gif png swf mp3 mov mpg zip rar tar gz sit txt pdf ';

allow bigger files

changed -> line 138
to:
$fileupload_maxk = '2000';

2 Jun 05, 2005 17:40

Ummmm!!!
Error
Fatal error: Call to undefined function: scandir() in /home/yadayada/admin/b2upload.php on line 137

3 Jun 05, 2005 19:17

ouch!!

scandir() is php5

It seems I've to look for a better way...

4 Jun 05, 2005 19:38

when php5 is not aviable replace in b2upload.php in line 137


$media_scan = scandir($fileupload_realpath);


with:


$media_scan_opendir  = opendir($fileupload_realpath);
while (false !== ($media_filename = readdir($media_scan_opendir))) {
	   $media_scan[] = $media_filename;
}

5 Jun 06, 2005 02:06

That fixed it :)

This looks very interesting, well done.

6 Jun 06, 2005 18:23

This is available in Phoenix (next version), btw.

7 Jun 06, 2005 20:38

oh, thanks!

may be, I add some more features next weekend...

8 Jun 07, 2005 20:14

Hi,
I have two errors:

1.
Erlaubte Dateitypen:jpg, jpeg, gif, png, swf, mp3, mov, mpg, zip, rar, tar, gz, sit, txt, pdf

=> As the script says I'm allowed to upload jpg files, but when I try this I get the error "this type of file is not allowed" ,-(

2.
List of uploaded files
Warning: filesize() [function.filesize]: stat failed for /is/htdocs/wp1007894_VJJE4QE9HI/www/e-discussion.org/media/barfuss_toursmall.jpg in /is/htdocs/wp1007894_VJJE4QE9HI/www/e-discussion.org/admin/b2upload.php on line 269

(Full path seems to be correct as I know)

Can you help?

Kai.

9 Jun 13, 2005 07:33

hi @kcb

1. alowed filetypes
make sure you have one whitespace at begin, end and between every filetype
in your conf/_admin.php.
Example:
That is wrong:
$fileupload_allowedtypes = 'jpg jpeg gif ';
That is right:
$fileupload_allowedtypes = ' jpg jpeg gif ';

2: filesize:
That is not a fullpath:
/is/htdocs/wp1007894_VJJE4QE9HI/www/e-discussion.org/media/barfuss_toursmall.jpg

a fullpath begins with c:/ or any else
my be you provider block that!? hmm...

however -
you can comment the line 269 in admin/b2upload.php
your kb total displays always 0!
from:
$media_file_size = (round(filesize($media_list_file)/1024*100))/100;
to:
//$media_file_size = (round(filesize($media_list_file)/1024*100))/100;

or try that ( on your own risk! it may change your upload directory... ):
add that code between line 262 and 263 in admin/b2upload.php after // --------- list files -------


// get fullpath of this file from $_server vars directly
// ...admin/b2upload.php
$fileupload_realpath = explode('/', $_SERVER['SCRIPT_FILENAME']);
// climb up to ...admin
array_pop($fileupload_realpath);
// climb up to ...
array_pop($fileupload_realpath);
//rebuild path and add /media
$fileupload_realpath = implode('/', $fileupload_realpath) . '/media';
// print fullpath
echo 'fullpath = ' . $fileupload_realpath . '<br /><br />';


that *may* fix it.

mfg stb

10 Jun 21, 2005 16:15

Will this work with the latest version (0.9.0.12)? If not, can I downgrade to 0.9.0.11 and how would I go about doing that without destroying anything? Thanks.

UPDATE: I tried this on my installation running PHP5 and it did not work. Does anyone know why? I have been told that this hack does work with the latest b2evolution.

11 Jun 21, 2005 21:38

I just did this hack again and it does not work correctly with my setup. I'm using b2evo 0.9.0.12 with PHP 5.0.4 and mySQL 4.1.11. I didn't even bother modifying the _admin.php file this time as to rule out the problem of bad form. I still cannot get this to work and get the error:

File : type is not allowed.
OK

I'm not sure what the problem is right now as I have made no other modifications to the blog. Thanks for your help.

12 Jun 22, 2005 00:01

Hi,

I have the same Installation (PHP5...) and ran in the same problem.... Getting more and more frustrated :-(

13 Jun 23, 2005 18:41

I've just decided that PHP5 isn't worth the trouble. I'm going back to Fedora Core 3 again to get PHP4 back! Good luck with the PHP5 problem.

14 Jun 24, 2005 14:16

Hi!

I had the same problem with PHP5 and IIS.

I managed to solve this problem by changing the following line in the php.ini file.

register_long_arrays = Off
to
register_long_arrays = On

HTH.

15 Jun 24, 2005 14:21

Hi,

jaylemur wrote:

Hi!
I managed to solve this problem by changing the following line in the php.ini file.

register_long_arrays = Off
to
register_long_arrays = On

thanks, I will try this in 3 weeks after my holiday (and now I have to go to the airport :-) )

Regards, Volker

16 Jun 24, 2005 14:25

You're welcome.

I had to restart IIS after this modification.

Have a nice Holiday

17 Jun 24, 2005 20:05

Just wanted to say that I have made a modified version of this hack. More information can be found here. It is confirmed to work with the following:

Apache 2.0.25
PHP 4.3.11
mySQL 3.23.58

Try it out if you like and let me know. You can view my post at:
http://forums.b2evolution.net/viewtopic.php?p=21703

EDIT: Added link.

18 Jul 26, 2006 19:56

I tried the html hack to disbale the html checker.

It seems to work fine when posting, but looking at my error logs, I get this message everytime I post, whether I check the 'disable html' box or not:

Undefined index: htmlhack...

MySQL keeps stopping on my dedicated server for some reason, and I am trying to eliminate all errors so I can figure out if it's the equipment or me causing the problem.

I like this feature and would like to keep it if I can get rid of the error. Any ideas?

19 Jul 26, 2006 21:59

if you are still using a 0.9.0 version of b2evo, i think it's time you got round to updating it.

20 Jul 26, 2006 22:29

Hopefully by the time I have time to upgrade, the newest version will come out. I plan to, I just need to get to it...damn careers...

21 Jul 26, 2006 23:17

0.9.0.11 is almost 2 years old!!! There have been FIVE new releases since then. It's time to upgrade to (at least) 0.9.2 as very few people are using (and therefore supporting) anything older than that.

22 Jul 28, 2006 21:31

:oops: OK, you've embarrased me into upgrading... :) Stayed up late, but now at least I am in modern times...It was relatively painless. Thanks for the push...


Form is loading...