You are not logged in.
- Topics: Active | Unanswered
#1 2011-02-28 08:27:13
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
[MOD] Upload Mod - 3.0.3
Users can upload files and pictures on a forum directly in post.
Thanks to bagu for "Uploadile".
http://fluxbb.org/resources/mods/upload-mod/
Use PHP 5.6.12+ for this mod.
----------------------
Language: Russian/English/French/German
Administrators have no restrictions on volume of loaded files (It is limited by server/PHP options).
Moderators have one limit, users - another.
It is possible to set extensions of the files to uploading. I don't recommend to upload flash!!!
Strictly forbidden (in code) files with extensions phtml, php, php3, php4, php5, php6, phps, cgi, exe, pl, asp, aspx, shtml, shtm, fcgi, fpl, jsp, htm, html, wml, htaccess.
For pictures of formats gif, jpeg, jpg, png, bmp, wbmp, xbm the preview (if library GD works) can be created.
All files after uploading are scanned on keywords in order to avoid XSS attacks.
For names of files there is transliteration to Latin.
Check conformity between extension and file format for picture and swf.
v 1.2
French is added. Thanks to Bloody.
Added management of uploaded files in Profile.
v 1.3.0
For FluxBB v.1.5.0
German is added. Thanks to cyberman.
Settings for each group of users.
Administration of files is changed.
v 1.3.2
Fix AP_Upload.php for FluxBB v.1.5.1.
v 2.0 beta
New type of the list of the uploaded files.
New javascipts.
New style.
v 2.0.1
Fix AP_Upload.php. Thanks to Quy.
v 2.2.0 beta
New uploader for browsers with FormData support (https://caniuse.com/#search=FormData).
Extended blacklist of file types for upload.
New .htaccess for img/members/ folder.
Automatically add bb-code to the message when uploading a file.
v 2.2.1 beta
Fix AP_Upload.php for SQLite.
v 2.2.2 beta
Updated .htaccess for img/members/ folder.
A group of administrators can set limits for themselves.
v 2.3.0 beta
Maximum "Space allocated to members" increased from 2 GiB to 20 TiB. For 32 and 64-bit systems.
Maximum "Max size members can upload" remained unchanged and depends on the server/PHP settings and OS bit depth.
v 3.0.0 beta
Added support for ImageMagick graphics library.
The file mentioned in the forum posts cannot be deleted. The search for the mention of the file goes through the search index and further LIKE in the message. Admin can delete files without checks in the admin plugin.
v 3.0.3
Fix for Opera 12.18
Fix english language
Last edited by Visman (2020-07-28 16:56:56)
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#2 2011-02-28 09:55:14
- cyberman
- Member
- From: Germany
- Registered: 2010-01-11
- Posts: 297
- Website
Re: [MOD] Upload Mod - 3.0.3
Many thanx - want to ask you (in the past) if we will see this mod outside your special FluxBB version .
Am I right this mod works without plugile?
Offline
#3 2011-02-28 10:53:39
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
Am I right this mod works without plugile?
Yes.
"Plugile" it is necessary to remove. Folder img/members/ not to delete!
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#4 2011-03-11 13:21:46
- alexzut
- Member
- Registered: 2011-03-10
- Posts: 10
Re: [MOD] Upload Mod - 3.0.3
upload does not work,
not work in 1.4.4, or i have a problem with server
using server with linux, need set a permission ?
Offline
#5 2011-03-11 14:01:14
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
Function move_uploaded_file can't move the uploaded file.
There is a folder img/members/[number of the user]/ ?
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#6 2011-03-11 21:41:13
- alexzut
- Member
- Registered: 2011-03-10
- Posts: 10
Re: [MOD] Upload Mod - 3.0.3
no
Offline
#7 2011-03-11 22:12:45
- Bloody
- Member
- From: French Strawberries Fields
- Registered: 2008-11-29
- Posts: 43
- Website
Re: [MOD] Upload Mod - 3.0.3
Thanks Visman,
The plugin works fine for me. Very easy to install it.
I've give you my lang file french translation.
<?php
$lang_up = array(
'err_1' => 'Pas de fichiers téléchargés actuellement.',
'err_2' => 'Pas de téléchargement.',
'err_3' => 'Impossible d\'insérer dans la table %s',
'err_4' => 'Erreur pendant le téléchargement',
'err_insert' => 'Erreur pendant la mise à jour de la base de données',
'err_size' => 'Erreur : Le fichier est trop gros pour être téléchargé, essayez à nouveau.',
'err_extension' => 'Erreur : Ce n\'est pas une extension autorisée, essayez à nouveau.',
'err_extension_multiple' => 'Erreur : Veuillez, mettre aucun point (.) dans le nom de votre fichier, et essayez à nouveau.',
'err_noExtension' => 'Erreur : vous devez préciser l\'extension du fichier lorsque vous modifiez son nom, et essayez à nouveau.',
'err_espace' => 'Erreur : Vous avez dépassé votre espace de stockage autorisé. Supprimez des fichiers et essayez à nouveau.',
'err_delete' => 'Erreur pendant lors de la supression du fichier, essayez à nouveau.',
'err_Move failed' => 'Erreur : Le serveur n\'a pas pu enregistrer le fichier uploadé.',
'err_image' => 'Erreur : Format invalide d\'image. Ou le serveur ne supporte pas le traitement d\'images.',
'err_image2' => 'Erreur : L\'image a été endommagée pendant la mise à jour.',
'err_open' => 'Erreur : Le fichier téléchargé ne s\'ouvre pas.',
'err_str' => 'Erreur lors du téléchargement. Compressez ce fichier et essayez à nouveau ou contacter à l\'administrateur.',
'installation_info' => 'Préparation de la base de données et du cache pour l\'installation Uploadile.',
'installation' => 'Installer',
'installation_success' => 'Votre base de données a été correctement préparés pour Uploadile. Consulter le fichier read_me.txt pour plus de précisions.',
'update_info' => 'Mise à jour. (valeurs par défauts) <br />',
'update' => 'Mis à jour',
'update_success' => 'Votre base de données a été actualisée avec succès pour Uploadile.',
'restore_info' => 'Restauration la base de données et mise à jour du cache pour la désinstallation d\'Uploadile.',
'restore' => 'Désinstaller',
'restore_success' => 'Restauration d\'Uploadile (Base de données et cache) réussie.',
'configuration' => 'Configuration',
'plugin_desc' => 'Ce plugin permet de configurer les fonctions d\'Uploadile dont vous avez besoin.',
'legend_2' => 'Choisisser vos options',
'laws' => 'Types de fichier autorisés',
'laws_info' => 'Séparer avec des virgules (,)',
'thumb' => 'Activer les miniatures',
'thumb_size' => 'Taille de la miniature: ',
'quality' => 'Qualité: ',
'maxsize_member' => 'La taille maximum que les membres peuvent télécharger.',
'maxsize_modo' => 'La taille maximum que les modérateurs peuvent télécharger.',
'maxsize_info' => '<br />Votre serveur a une limite par défaut.',
'limit_member' => 'Espace alloué aux membres',
'limit_modo' => 'Espace alloué aux modérateurs',
'oui' => 'Oui',
'non' => 'Non',
'px' => 'Pixel',
'bytes' => 'Bytes',
'pictures' => 'Images',
'for pictures' => 'Pour une image en poids, c\'est plus',
'Install quality' => 'Qualité de l\'image:',
'Size not more' => 'Taille pas plus grande (HxL):',
'to jpeg' => 'Convertir en jpeg',
'delete_success' => 'Fichier(s) supprimé(s) avec succés!',
'modif_success' => 'Fichier téléchargé!',
'uploadile' => 'Mes téléchargements',
'titre_2' => 'Télécharger un fichier',
'titre_4' => 'Mes téléchargements',
'popup_title' => 'Gestion des fichiers',
'info_2' => '/!\ Votre fichier ne doit dépasser la taille %s et doit faire %s.',
'info_2_admi' => '/!\ L\'extension de votre fichier doit être <strong>%s</strong> .',
'info_4' => '<div style="border:1px solid #4E642D; width:12em;"><div style="border-right: 2px solid #4E642D; background-color: #6C8A3F; text-align:right; width:%s%s;">%s%s</div></div><p><strong>Espace de stockage utilisé :</strong> %s en %s.</p>',
'legend' => 'Sélectionner un fichier et envoyer le :',
'fichier' => 'Sélectionner un fichier',
'th0' => 'Nom',
'th' => 'Url du fichier',
'th2' => 'Prévisualiser',
'no_preview' => 'Aucune',
'fichier_membre' => 'Fichiers des membres (nouveaux ci-dessus)',
'legend_1' => 'Conversion',
'convert' => 'Convertir',
'mo' => 'Valeur en MB',
'ko' => 'Valeur en KB',
'o' => 'Valeur en B',
'texte' => 'Placer votre texte ici',
'submit' => 'Envoyer',
'delete' => 'Supprimer',
'insert' => 'Insérer',
'insert_thumbnail' => 'Insérer une miniature',
'update_thumb' => 'Mettre à jour les miniatures',
'upfiles' => '<b>Téléchargements</b>',
);
?>
Don't you think it could be a good thing to put an access to the profil panel, to manage files uploaded ?
Regards,
Benoît V.
Watermelon -pixels - French front-end webdesigner - PluXml is a simple, light and easy to use blog engine.
Offline
#8 2011-03-12 03:48:50
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
no
Go to Administration -> Admin menu "Index" -> Show info
safe_mode = ON ???
disable_functions = ???
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#9 2011-03-12 03:51:59
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
Don't you think it could be a good thing to put an access to the profil panel, to manage files uploaded ?
It necessarily is required?
What for users to access to files from a profile?
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#10 2011-03-12 10:10:14
- Bloody
- Member
- From: French Strawberries Fields
- Registered: 2008-11-29
- Posts: 43
- Website
Re: [MOD] Upload Mod - 3.0.3
What for users to access to files from a profile?
As I said, it's easier for user to manage uploads in its profile panel than manage them only on the topic view : like delete files for example.
It necessarily is required?
Twice are usable. The link in the view topic is required, but the link in the profile panel not.
This is just a improvement suggest.
Another idea: Would it be possible to add a "close window" button on the pop-up ?
Regards,
Benoît V.
Watermelon -pixels - French front-end webdesigner - PluXml is a simple, light and easy to use blog engine.
Offline
#11 2011-03-12 10:46:08
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
As I said, it's easier for user to manage uploads in its profile panel than manage them only on the topic view : like delete files for example.
Well, I will add in a profile.
Another idea: Would it be possible to add a "close window" button on the pop-up ?
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#12 2011-03-12 16:41:39
- Bloody
- Member
- From: French Strawberries Fields
- Registered: 2008-11-29
- Posts: 43
- Website
Re: [MOD] Upload Mod - 3.0.3
Thanks for answer.
I know that there is an X to close all the pop-up window.
Visman, will you put the french lang file in your next release ?
Regards,
Benoît V.
Watermelon -pixels - French front-end webdesigner - PluXml is a simple, light and easy to use blog engine.
Offline
#13 2011-03-12 17:09:43
- Bloody
- Member
- From: French Strawberries Fields
- Registered: 2008-11-29
- Posts: 43
- Website
Re: [MOD] Upload Mod - 3.0.3
Actually, I try to put the fancy box (I'd install your mod) to replace the pop-up that doesn't please me.
I food the pop-up code but I don't know how to change it with the fancybox code.
echo '<script type="text/javascript">'."\n";
echo '/* <![CDATA[ */'."\n";
echo 'function PopUp(c,d,a,b,e){window.open(c,d,"top="+(screen.height-b)/3+", left="+(screen.width-a)/2+", width="+a+", height="+b+", "+e);return false};';
echo 'var all_ul=document.getElementsByTagName("ul"),i=all_ul.length-1;';
echo 'while (i>-1){';
echo 'if(all_ul[i].className=="bblinks"){';
echo 'var ul_html=all_ul[i].innerHTML;';
echo 'ul_html+="<li><span><a href=\"upfiles.php\" onclick=\"return PopUp(this.href,\'gest\',\'820\',\'430\',\'resizable=yes,location=no,menubar=no,status=no,scrollbars=yes\');\">'.$lang_up['upfiles'].'</a></span></li>";';
echo 'all_ul[i].innerHTML=ul_html;';
echo 'i=0;';
echo '}';
echo 'i--';
echo '}'."\n";
echo '/* ]]> */'."\n";
echo '</script>'."\n";
Any Idea ?:)
Regards,
Benoît V.
Watermelon -pixels - French front-end webdesigner - PluXml is a simple, light and easy to use blog engine.
Offline
#14 2011-03-13 05:14:13
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
Visman, will you put the french lang file in your next release ?
Yes.
Actually, I try to put the fancy box (I'd install your mod) to replace the pop-up that doesn't please me.
Very interesting idea.
But while I don't have its decision.
P.S. Tips & Tricks http://www.fancybox.net/blog
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#15 2011-03-13 09:06:10
- Bloody
- Member
- From: French Strawberries Fields
- Registered: 2008-11-29
- Posts: 43
- Website
Re: [MOD] Upload Mod - 3.0.3
P.S. Tips & Tricks http://www.fancybox.net/blog
Thanks Visman.
I knew this site. I have again downloaded the script to try to replace the pop-up script by Fancybox one in "uploadf.php" file.
If I succeeded, I will put here my code.
Regards,
Benoît V.
Watermelon -pixels - French front-end webdesigner - PluXml is a simple, light and easy to use blog engine.
Offline
#16 2011-03-18 23:47:15
- jejeje
- Member
- Registered: 2011-03-18
- Posts: 288
- Website
Re: [MOD] Upload Mod - 3.0.3
no
try this one which i did, create a folder members inside img (img/members) and give it 777 full writes and everything should be working
Thx for this mod
Offline
#17 2011-03-19 00:29:31
- jejeje
- Member
- Registered: 2011-03-18
- Posts: 288
- Website
Re: [MOD] Upload Mod - 3.0.3
umm using my suggestion means anyone can download those files do you guys have any suggestion on how to strict the guests from downloading these files ?
Offline
#18 2011-03-19 03:40:45
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
to jejeje:
file parser.php
function handle_url_tag($url, $link = '', $bbcode = false)
{
$url = pun_trim($url);
$full_url = str_replace(array(' ', '\'', '`', '"'), array('%20', '', '', ''), $url);
if (strpos($url, 'www.') === 0) // If it starts with www, we add http://
$full_url = 'http://'.$full_url;
else if (strpos($url, 'ftp.') === 0) // Else if it starts with ftp, we add ftp://
$full_url = 'ftp://'.$full_url;
else if (!preg_match('#^([a-z0-9]{3,6})://#', $url)) // Else if it doesn't start with abcdef://, we add http://
$full_url = 'http://'.$full_url;
// Ok, not very pretty :-)
if ($bbcode)
{
if ($full_url == $link)
return '[url]'.$link.'[/url]';
else
return '[url='.$full_url.']'.$link.'[/url]';
}
else
{
if ($link == '' || $link == $url)
{
$url = pun_htmlspecialchars_decode($url);
$link = utf8_strlen($url) > 55 ? utf8_substr($url, 0 , 39).' … '.utf8_substr($url, -10) : $url;
$link = pun_htmlspecialchars($link);
}
else
$link = stripslashes($link);
return '<a href="'.$full_url.'">'.$link.'</a>';
}
}
-->
function handle_url_tag($url, $link = '', $bbcode = false)
{
global $pun_user, $pun_config;
$url = pun_trim($url);
$full_url = str_replace(array(' ', '\'', '`', '"'), array('%20', '', '', ''), $url);
if (strpos($url, 'www.') === 0) // If it starts with www, we add http://
$full_url = 'http://'.$full_url;
else if (strpos($url, 'ftp.') === 0) // Else if it starts with ftp, we add ftp://
$full_url = 'ftp://'.$full_url;
else if (!preg_match('#^([a-z0-9]{3,6})://#', $url)) // Else if it doesn't start with abcdef://, we add http://
$full_url = 'http://'.$full_url;
if ($pun_user['is_guest'] && strpos($full_url, $pun_config['o_base_url']) === 0)
return 'No link';
// Ok, not very pretty :-)
if ($bbcode)
{
if ($full_url == $link)
return '[url]'.$link.'[/url]';
else
return '[url='.$full_url.']'.$link.'[/url]';
}
else
{
if ($link == '' || $link == $url)
{
$url = pun_htmlspecialchars_decode($url);
$link = utf8_strlen($url) > 55 ? utf8_substr($url, 0 , 39).' … '.utf8_substr($url, -10) : $url;
$link = pun_htmlspecialchars($link);
}
else
$link = stripslashes($link);
return '<a href="'.$full_url.'">'.$link.'</a>';
}
}
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#19 2011-03-19 09:13:54
- jejeje
- Member
- Registered: 2011-03-18
- Posts: 288
- Website
Re: [MOD] Upload Mod - 3.0.3
thx and to make it more more eye candy i changed
return 'No link';
to
return '<font color="red">You need to </font><a href="http://YOURWEBSITE.com/register.php" target="_blank">register</a><font color="red"> first to download this file</font>';
Offline
#20 2011-03-19 09:46:10
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
to jejeje:
if ($pun_user['is_guest'] && strpos($full_url, $pun_config['o_base_url']) === 0)
-->
if ($pun_user['is_guest'] && strpos($full_url, $pun_config['o_base_url'].'/img/members/') === 0)
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#21 2011-03-19 09:54:44
- jejeje
- Member
- Registered: 2011-03-18
- Posts: 288
- Website
Re: [MOD] Upload Mod - 3.0.3
done
Offline
#22 2011-03-23 16:13:58
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
v 1.1.0 - Supports FluxBB: 1.4.4, 1.4.5
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline
#23 2011-04-01 08:34:36
- jejeje
- Member
- Registered: 2011-03-18
- Posts: 288
- Website
Re: [MOD] Upload Mod - 3.0.3
I have a suggestion when someone visits yourwebsite.com/img/members/2(number of your profile) he can see all the files uploaded (as an ftp) can you modify your code so when someone register automatically a folder is created on img/members/(his number id) and inside of it an index.html with this code:
<html><head><title>.</title></head><body>.</body></html>
So at least no one will enjoy downloading the files without registering
Another thing on my server finally i dont need to make my members folder as 777 ive changed it to 711 , if someone cant do the same i suggest have a chichat with your server provider for security issues
Offline
#24 2011-04-05 14:53:52
- jejeje
- Member
- Registered: 2011-03-18
- Posts: 288
- Website
Re: [MOD] Upload Mod - 3.0.3
I have a suggestion when someone visits yourwebsite.com/img/members/2(number of your profile) he can see all the files uploaded (as an ftp) can you modify your code so when someone register automatically a folder is created on img/members/(his number id) and inside of it an index.html with this code:
<html><head><title>.</title></head><body>.</body></html>
So at least no one will enjoy downloading the files without registering
Yo visman could you please answer my question
Offline
#25 2011-04-05 16:07:41
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,536
- Website
Re: [MOD] Upload Mod - 3.0.3
Ups
Has forgotten files.
File /img/members/.htaccess
RemoveHandler .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml
AddType application/x-httpd-php-source .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml
<IfModule mod_rewrite.c>
RewriteEngine On
# Uncomment and properly set the RewriteBase if the rewrite rules are not working properly
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* nofile.gif [L]
</IfModule>
And copy file _http://forum.alltes.ru/fluxbb14test/img/members/nofile.gif to [yourwebsite]/img/members/nofile.gif
My modification of FluxBB 1.5.11 - rev.83, Parserus, ForkBB Pre-Alpha
I speak only Russian
Offline