Utilisation de la class SecurityImage avec le module
Newbb version 1.16
Modification à apporter dans le fichier : include/forumform.inc.php
Ajouter les lignes en rouge, comme indiqué ci-dessous
...
...
...
if(empty($isWysiwyg)){
if ( !empty($isreply) && !empty($hidden) ) {
$forum_form->addElement(new XoopsFormHidden('hidden', $hidden));
$quote_button = new XoopsFormButton('', 'quote', _MD_QUOTE, 'button');
$quote_button->setExtra("onclick='xoopsGetElementById(\"message\").value=xoopsGetElementById(\"message\").value+ xoopsGetElementById(\"hidden\").value;xoopsGetElementById(\"hidden\").value=\"\";'");
$quote_button->setExtra("tabindex='4'");
$button_tray->addElement($quote_button);
}
$preview_button = new XoopsFormButton('', 'contents_preview', _PREVIEW, "submit");
$preview_button->setExtra("tabindex='5'");
$button_tray->addElement($preview_button);} // Ligne 338
// Hack SecurityImage by DuGris
if ( defined('SECURITYIMAGE_INCLUDED') ) {
$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
if ($security_image->render()) {
$forum_form->addElement($security_image, true);
}
}
// Hack SecurityImage by DuGris
$button_tray->addElement($submit_button);
...
...
Modification à apporter dans le fichier : post.php
Ajouter les lignes en rouge, comme indiqué ci-dessous
...
...
include XOOPS_ROOT_PATH."/header.php"; // Ligne 78
// 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
...
...
...
Modification à apporter dans le fichier : viewtopic.php
Ajouter les lignes en rouge, comme indiqué ci-dessous
...
...
$notification_handler =& xoops_gethandler('notification');
if(is_object($xoopsUser) && $xoopsModuleConfig['notification_enabled'] && $notification_handler->isSubscribed('thread', $topic_id, 'new_post', $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid'))) {
$forum_form->addElement(new XoopsFormHidden('notify', 1)); } // Ligne 565
// Hack SecurityImage by DuGris
if ( defined('SECURITYIMAGE_INCLUDED') ) {
$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
if ($security_image->render()) {
$forum_form->addElement($security_image, true);
}
}
// Hack SecurityImage by DuGris
$forum_form->addElement(new XoopsFormHidden('contents_submit', 1));
...
...
...