DuGris
Xoops Planète
SecurityImage : SecurityImage avec le module Wordbook 1.16
Posté par DuGris le 23/04/2006 00:20:00
SecurityImage

WordbookUtilisation de la class SecurityImage avec le module
Wordbook 1.16



Modification à apporter dans le fichier : include/storyform.inc.php

Ajouter les lignes en rouge, comme indiqué ci-dessous

....
....
if ( is_object( $xoopsUser ) ) {
	$uid = $xoopsUser->getVar('uid');
$sform -> addElement( new XoopsFormHidden( 'uid', $uid ) );
$notify_checkbox = new XoopsFormCheckBox( '', 'notifypub', $notifypub );
$notify_checkbox -> addOption( 1, _MD_WB_NOTIFY );
$sform -> addElement( $notify_checkbox ); 
} // Ligne 48

 

 
// Hack SecurityImage by DuGris
if (defined('SECURITYIMAGE_INCLUDED')) {
	$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
	if ($security_image->render()) { 
		$sform->addElement($security_image, true); 
	} 
}
// Hack SecurityImage by DuGris
 
$button_tray = new XoopsFormElementTray( '', '' ); $hidden = new XoopsFormHidden( 'op', 'post' ); $button_tray -> addElement( $hidden ); $button_tray -> addElement( new XoopsFormButton( '', 'post', _MD_WB_CREATE, 'submit' ) );
 

Modification à apporter dans le fichier : submit.php

Ajouter les lignes en rouge, comme indiqué ci-dessous

...
...
...
switch ( $op ) {
case 'post': // Ligne 60



// Hack SecurityImage by DuGris
include_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php");
if ( defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
redirect_header('javascript:history.go(-1)' , 2, _SECURITYIMAGE_ERROR ) ;
exit();
}
// Hack SecurityImage by DuGris
...
...
 
Créer un fichier PDF à partir de cet article Format imprimable Envoyer cet article à un ami  
Afux sur Facebook
Facebook
Dugris Xoops Planète
Profil Facebook de Laurent Jen
Faire un don
_DMB_SELECTAMT


Voulez-vous que votre nom soit cité avec votre don ?
Oui - Citez- moi comme un généreux donateur.
Non - Listez mon don anonymement


Archives
Recherche


Qui est en ligne
WF-Downloads : 1
Documentation : 4
Téléchargements : 1

Membre(s): 0
Invité(s): 8

Plus ...
Visiteurs
140871 A ce jour
669765 Pages vues