Menu principal

Recherche

Publicité










Extgallery 1.8 de Zoulou
#1
Webmestre
Benutzerinformationen
Pour une autre méthode de protection, notamment pour les envoi par "send e-cards", suivez ce lien.
Sinon, avec le module Securityimage de Dugris, c'est comme cela.

ATTENTION!! N'OUBLIEZ PAS D'ENLEVER LES ESPACES DU MOT:
j a v a s c r i p t


Dans le fichier public-upload.php


$permHandler 
ExtgalleryPublicPermHandler::getHandler();
if(
count($permHandler->getAuthorizedPublicCat($xoopsUser'public_upload')) < 1) {
    
redirect_header("index.php"3_MD_EXTGALLERY_NOPERM);
    exit;
}
switch(
$step) {
    case 
'enreg':
// Hack SecurityImage de Dugris
    
include_once(XOOPS_ROOT_PATH "/class/xoopsformloader.php");
    if ( 
defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
    
redirect_header'j a v a s c r i p t:history.go(-1)'2_SECURITYIMAGE_ERROR ) ;
    exit();
    }
// Hack SecurityImage de Dugris 
        
$photoHandler xoops_getmodulehandler('publicphoto''extgallery');
        
$result $photoHandler->postPhotoTraitement('photo_file'false);
        if(
$result == 2) {

Et enfin, ceci

$plugin 
xoops_getmodulehandler('plugin''extgallery');
        
$plugin->triggerEvent('photoForm'$form);
        
$form->addElement(new XoopsFormHidden("step"'enreg'));
// Hack SecurityImage de Dugris
        
if (defined('SECURITYIMAGE_INCLUDED')) {
        
$security_image = new SecurityImage_SECURITYIMAGE_GETCODE );
        if (
$security_image->render()) {
        
$form->addElement($security_imagetrue);
        }
    }
// Hack SecurityImage de Dugris
        
$form->addElement(new XoopsFormButton("""submit"_SUBMIT"submit"));
        
$form->display();
        include(
XOOPS_ROOT_PATH."/footer.php");
        break;


===================================
Pour le send e-cards, vous pouvez faire ceci:

Ouvrez le fichier public-sendecard.php

REMPLACER EXACTEMENT CECI

include_once XOOPS_ROOT_PATH.'/modules/extgallery/class/php-captcha.inc.php';
        
        
// Enable captcha only if GD is Used
        
if($xoopsModuleConfig['graphic_lib'] == 'GD') {
            if (!
PhpCaptcha::Validate($_POST['captcha'])) {
                
redirect_header("public-photo.php?photoId=".$photoId."#photoNav"3_MD_EXTGALLERY_CAPTCHA_ERROR);
                exit;
            }
        }


PAR CELA:

// Hack SecurityImage de Dugris
    
include_once(XOOPS_ROOT_PATH "/class/xoopsformloader.php");
    if ( 
defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
    
redirect_header'j a v a s c r i p t:history.go(-1)'2_SECURITYIMAGE_ERROR ) ;
    exit();
    }
// Hack SecurityImage de Dugris


ET ENFIN, REMPLACER EXACTEMENT CECI

// Enable captcha only if GD is Used
        
if($xoopsModuleConfig['graphic_lib'] == 'GD') {
            
$form->addElement(new XoopsFormText(_MD_EXTGALLERY_SECURITY'captcha''10''5'''),false);
        }


PAR CELA:

// Hack SecurityImage de Dugris
        
if (defined('SECURITYIMAGE_INCLUDED')) {
        
$security_image = new SecurityImage_SECURITYIMAGE_GETCODE );
        if (
$security_image->render()) {
        
$form->addElement($security_imagetrue);
        }
    }
// Hack SecurityImage de Dugris


Et voila

Pour les nullos, voici les 2 fichiers zippés dans le forum

Attacher un fichier:


Visible uniquement pour les utilisateurs enregistrés

Posté le : 10/06 19:29

Edité par webmaster sur 10/06/2010 19:57:45
Motif:
Outils MP Email PDF Bookmark Imprimer Réponse Citation Rapport





 Réponse Ecrire un nouveau message



Commentaires récents
Test TDMPicture (test) didgon 04/09/2010 02:53
Re: Afficher les adresses IP des Utilisateurs TÉLÉCHARGER Anonyme 02/09/2010 05:05
Re: RW-BANNER TÉLÉCHARGER Anonyme 02/09/2010 04:52



 

C.N.I.L 1113850 | Communauty the Nullos ami de Xoops CMS
XOOPS Code hosted on SourceForge   PHP   Powered by MySQL   Powered by Smarty   OSI certified  GPL  All content on this site is subject to the Creative Commons License
  Design by Cyberianet - Katisuhara