Bonjour,
Le père Kris à raison lorsqu'il dit qu'il faudrai créer une FAQ pour déposer tous ce qui existe comme hack de sécurityimage de monseigneur DuGris.
Voici un complément pour le smartfaq 1.08
Citation :
kraven30 a écrit:
Pour Smartfaq 1.08
Dans submit.php:
Vers la Ligne 43:
if (isset($_POST['post'])) {
$op = 'post';
[color=CC0000]// Hack SecurityImage by Dugris
include_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php");
if ( defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
redirect_header( 'index.php', 2, _SECURITYIMAGE_ERROR ) ;
exit();
}
// Hack SecurityImage by Dugris[/color]
} elseif (isset($_POST['preview'])) {
$op = 'preview';
Dans include/submit_inc.php:
Vers la Ligne 78
$form->addElement($notify_checkbox);
}
[color=CC0000]// Hack SecurityImage by Dugris
if (defined('SECURITYIMAGE_INCLUDED')) {
$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
if ($security_image->render()) {
$form->addElement($security_image, true);
}
}
// Hack SecurityImage by Dugris [/color]
$button_tray = new XoopsFormElementTray('', '');
Pour compléter,
le fichier request.php
$op = '';
if (isset($_GET['op'])) $op = $_GET['op'];
if (isset($_POST['op'])) $op = $_POST['op'];
switch ($op) {
case 'post':
[color=CC0000]// Hack SecurityImage by Dugris
include_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php");
if ( defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
redirect_header( 'index.php', 2, _SECURITYIMAGE_ERROR ) ;
exit();
}
// Hack SecurityImage by Dugris [/color]
Global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB;
et le fichier include/request.inc.php
$button_tray = new XoopsFormElementTray('', '');
$hidden = new XoopsFormHidden('op', 'post');
$button_tray->addElement($hidden);
[color=CC0000]// Hack SecurityImage by Dugris
if (defined('SECURITYIMAGE_INCLUDED')) {
$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
if ($security_image->render()) {
$form->addElement($security_image, true);
}
}
// Hack SecurityImage by Dugris [/color]
$button_tray->addElement(new XoopsFormButton('', 'post', _SUBMIT, 'submit'));
$form->addElement($button_tray);
Voili, voila, voilou pour smartfaq