4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: brez on August 17, 2009, 03:11:01 PM

Title: Adding an msexcel created webpage
Post by: brez on August 17, 2009, 03:11:01 PM
Is this possible?

I have v1.7.6 and i have an msexcel webpage that i need to add to it.

It is 18 colums and 2260 rows long.
Title: Re: Adding an msexcel created webpage
Post by: V@no on August 17, 2009, 03:30:22 PM
Welcome to 4images forum.

Are you talking about adding (uploading) .html files as "images"? if so, FAQ might help: How can I add more allowed file extensions? (http://www.4homepages.de/forum/index.php?topic=7277.0)
Title: Re: Adding an msexcel created webpage
Post by: brez on August 17, 2009, 09:12:07 PM
Many thanks for the swift answer and the warm welcome too!

Do you not consider allowing .html files rather risky?
Title: Re: Adding an msexcel created webpage
Post by: V@no on August 18, 2009, 01:54:19 AM
Yes I do, but only if you allow others to upload...if you are interested, I can give a little code that would remove .html extension from the list of allowed upload list for the non-admins, while admins still be able upload .html
Title: Re: Adding an msexcel created webpage
Post by: brez on August 18, 2009, 12:18:46 PM
Yes please V@no,
That would be brilliant as experience has taught me(The hard way) that maverick .html files can ruin Months of work.

This is my first time using 4images and i love the simplicity and feel of it, i have so far tried about 12 other galleries!

BREZ
Title: Re: Adding an msexcel created webpage
Post by: mawenzi on August 18, 2009, 12:29:10 PM
@ brez
... only a hint ...
... you can also use a excel-table as a pdf-file to show it on your 4images website ...
... simple to produce and safely to show ...

@V@no
... the little code would be interested ...
Title: Re: Adding an msexcel created webpage
Post by: V@no on August 18, 2009, 02:59:49 PM
in member.php find:
require(ROOT_PATH.'includes/sessions.php');

Insert below:
if ($user_info['user_level'] != ADMIN)
{
  $disallow = array("htm", "html"); //list of extensions members may not upload.

  $config['allowed_mediatypes_array'] = array_diff($config['allowed_mediatypes_array'], $disallow);
  $config['allowed_mediatypes'] = implode(",", $config['allowed_mediatypes_array']);
  $config['allowed_mediatypes_match'] = implode("|", $config['allowed_mediatypes_array']);
}
Title: Re: Adding an msexcel created webpage
Post by: mawenzi on August 19, 2009, 01:09:12 AM
@V@no ...

... thanks for this useful code snippet ... it works perfekt incl. displaying the right extensions on uploadform ...
... I have successfull tested a code extension with general settings via ACP ...
... on my website I can use over 35 different file extension for uploading / displaying ...
... and now I can comfortable define via ACP which files for uploading are only allowed by admin and which are allowed for all users ...
...
... if anyone is interested ... so let me know ...
... I can create a small "TUT" ...
Title: Re: Adding an msexcel created webpage
Post by: Sunny C. on August 19, 2009, 03:32:02 PM
Ja, ich bitte darum!
Den Code von Vano habe ich auch schon in meiner Liste aufgenommen! Über ein TUT würde ich mich freuen!
Title: Re: Adding an msexcel created webpage
Post by: brez on August 19, 2009, 04:30:27 PM
Thanks,

That is a great piece of code.

Tested - PERFECT!
Title: Re: Adding an msexcel created webpage
Post by: Sunny C. on August 19, 2010, 01:57:11 PM
@V@no ...

... thanks for this useful code snippet ... it works perfekt incl. displaying the right extensions on uploadform ...
... I have successfull tested a code extension with general settings via ACP ...
... on my website I can use over 35 different file extension for uploading / displaying ...
... and now I can comfortable define via ACP which files for uploading are only allowed by admin and which are allowed for all users ...
...
... if anyone is interested ... so let me know ...
... I can create a small "TUT" ...

Machst du das Tutorial noch?