Petite amélioration

Started by Mak-B, October 07, 2004, 06:40:06 AM

Previous topic - Next topic

Mak-B

Hola!!! Voilà, en vu des risques de l'insertion Flash sur les pages du forum, je me demande pourkoi on ne pourrait pas restreindre l'insertion seulement aux administrateurs!!! Car dans mon cas et pour les news,ca seerait une solution intéréssante....
Qu'en pensez vous?
Makina, Hardcore, Hardtrance!!!!
Toute l'actualité de la makina en France:
http://www.makinarena.com
Pontaeri, Xque, Kontrol, Chasis...
Forum makina

Meriadoc

je cherche pour une solution , mais c'est difficile...
j'essaye encore plus tard, maintenant c'est le temp de travaille ;)

tu ce voudrais juste pour les messages, non?
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Mak-B

Oui c'est cela!!!!
Vu que le flash peut apporter des failles de sécurité, ils serait intéréssant de voir apparaitre, pourquoi pas dans une prochaine version, dans le menu "modifier les permissions", pouvoir ou non insérer du flash et ainsi pouvoir choisir les groupes qui ont la permissions ou non (dans le meme genre que fichiers joints)!!!! ;D
Makina, Hardcore, Hardtrance!!!!
Toute l'actualité de la makina en France:
http://www.makinarena.com
Pontaeri, Xque, Kontrol, Chasis...
Forum makina

Meriadoc

#3
voilà! :) avec l'aide d'[Unknown] je l'ai!

Dans Subs-Post.php
chercher: (ligne 126)

// Remove \r's, replace tabs with spaces, two spaces with hard spaces, and \n's with breaks. (last is optional...)
$message = strtr($message, array("\r" => '', '  ' => '  '));
if ($breaks)
$message = strtr($message, array("\n" => '<br />'));


et replacer:

// Remove \r's, replace tabs with spaces, two spaces with hard spaces, and \n's with breaks. (last is optional...)
$message = strtr($message, array("\r" => '', '  ' => '&nbsp; '));
if ($breaks)
$message = strtr($message, array("\n" => '<br />'));

// If the user is not an administrator, parse Flash codes to links.
if (!$user_info['is_admin'])
$message = preg_replace('~\[flash=(\d+),(\d+)\](?:<br />)*(.+?)(?:<br />)*\[/flash\]~i', '[url]$3[/url]', $message);


Alors, faites attention! Tu dois enabler l'insertion de Flash. Mais, si l'utiliseur (c'est juste, ce mot?) n'est pas un administrateur, le [ flash ] [/flash] est changer à [ url ] [/url]
ce marche, mais si tu desires le changer au future... :-/
si tu dis-enabler pour tous, c'est OK, mais si tu voudrais enabler pour tous, removes le code là ^ premier. Mais les vieux messages des non-admins ne changent pas - ils restent en [ url ] . j'espère que ceci est bon.

et aussi que mon explination en français et compréhensible ;)


- Merry

[edit] aussi notice que un promotion d'un utiliseur à administrateur ne pas changera son vieux messages [/edit]
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Mak-B

Merci c'est exactement ca!!!!!
Pour mon utilisation, c'est impeccable! Il serait bon, comme j'ai dit, de l'intégrer dans les autorisations de membres , où d'en faire un mod pour autoriser certains groupes à pouvoir.

En tout cas merci pou ta rapidité et ton aide en Francais!!!
Bravo la team
Makina, Hardcore, Hardtrance!!!!
Toute l'actualité de la makina en France:
http://www.makinarena.com
Pontaeri, Xque, Kontrol, Chasis...
Forum makina

Meriadoc

oui, j'ai dit à [Unknown] de la possiblité d'un mod ou 'feature' pour les permissions et il a dit que ce serait simple avec le function isAllowed( )... alors, peut-etre pour SMF 1.1 :)

bon :)
If I know the way home and am walking along it drunkenly, is it any less the right way because I am staggering from side to side? : Leo Tolstoy
Everything I know I learned from Calvin and Hobbes.
And patience is about the most useful thing you could ever have.  That and backups. : [Unknown]
If I choose to send thee, Tuor son of Huor, then believe not that thy one sword is not worth the sending. : Ulmo, Lord of the Waters - Unfinished Tales, by J.R.R. Tolkien

Advertisement: