31
aitor
xoops 2.5 antispammer?
  • 2010/2/7 14:40

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


I would want if anti spam system could be inserted in XOOPS 2.5 in this two days 3 spammers get in to the web so after deleting comments with phpmyadmin i make a hack in XOOPS 2.4 and show that XOOPS 2.5 has same system.

I changed this file.

modules/profile/admin/deactivate.php

From

$user->setVar('level'$_REQUEST['level']); if ($member_handler->insertUser($user)) { if ($_REQUEST['level'] == 1) { $message _PROFILE_AM_USER_ACTIVATED; } else { $message _PROFILE_AM_USER_DEACTIVATED; } } else { if ($_REQUEST['level'] == 1) { $message _PROFILE_AM_USER_NOT_ACTIVATED; } else { $message _PROFILE_AM_USER_NOT_DEACTIVATED; } }


To
if ($member_handler->insertUser($user)) { if ($_REQUEST['level'] == 1) { $message _PROFILE_AM_USER_ACTIVATED; } else { $message _PROFILE_AM_USER_DEACTIVATED '<br> <form method="post" action="spamremove.php?id=' $user->getVar('uid') . '"> <input type="hidden" name="uid" value="11091" /> <input type="hidden" name="level" value="1" /> <input type="button" value="Borrar_Spam" onclick="submit();" /> </form> '; } } else { if ($_REQUEST['level'] == 1) { $message _PROFILE_AM_USER_NOT_ACTIVATED; } else { $message _PROFILE_AM_USER_NOT_DEACTIVATED; } }


and created the file

modules/profile/admin/spamremove.php

<?php include 'header.php'xoops_cp_header(); if (!isset($_REQUEST['uid'])) { redirect_header("index.php"2_PROFILE_AM_NOSELECTION); } $member_handler xoops_gethandler('member'); $user $member_handler->getUser($_REQUEST['uid']); if (!$user || $user->isNew()) { redirect_header("index.php"2_PROFILE_AM_USERDONEXIT); } if (in_array(XOOPS_GROUP_ADMIN$user->getGroups())) { redirect_header("index.php"2_PROFILE_AM_CANNOTDEACTIVATEWEBMASTERS); } $user->setVar('level'$_REQUEST['level']); if ($member_handler->insertUser($user)) { if ($_REQUEST['level'] == 1) { $message "Spam Removed " $xoopsDB->query('delete from '.$xoopsDB->prefix('xoopscomments').' where com_uid = '$user->getVar('uid') ); } } else { if ($_REQUEST['level'] == 1) { $message _PROFILE_AM_USER_NOT_ACTIVATED; } else { $message _PROFILE_AM_USER_NOT_DEACTIVATED; } } redirect_header("../userinfo.php?uid=" $user->getVar('uid'), 3$message); ?>


File can be downloaded from here.

http://sourceforge.net/projects/esxoops/files/XOOPS%20Scripts/antispam.zip/download




32
aitor
Re: Review & Bugs - Xoops 2.5 Alpha
  • 2010/2/7 6:37

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


The problem with block visible or not visible didn´t happen now, it is strange bug i can´t repeat to find.

I have found that installing a new module it didin´t show blocks so i have changed in modules/system/admin/modulesadmin/modulesadmin.php
line 209

from
$sql = 'INSERT INTO ' . $db->prefix('block_module_link') . ' (block_id, module_id) VALUES (' . $newbid . ', -1)';
to
$sql = 'INSERT INTO ' . $db->prefix('block_module_link') . ' (block_id, module_id) VALUES (' . $newbid . ', 0)';


the two blocks xoops_version info is

// Blocks
$modversion['blocks'][1]['file'] = "videotutoriales_blocks.php";
$modversion['blocks'][1]['name'] = _MI_VIDEOTUTORIALES_LATEST;
$modversion['blocks'][1]['description'] = '_MI_VIDEOTUTORIALES_LATEST_DESC';
$modversion['blocks'][1]['show_func'] = "latestvideos";
$modversion['blocks'][1]['template'] = 'videotutoriales_block_latest.html';

$modversion['blocks'][2]['file'] = "videotutoriales_blocks.php";
$modversion['blocks'][2]['name'] = _MI_VIDEOTUTORIALES_TOP;
$modversion['blocks'][2]['description'] = '_MI_VIDEOTUTORIALES_TOP_DESC';
$modversion['blocks'][2]['show_func'] = "topvideos";
$modversion['blocks'][2]['template'] = 'videotutoriales_block_top.html';

Don´t know if something more is needed but if i have to -1 i can´t show the block to activate it.




33
aitor
Re: Review & Bugs - Xoops 2.5 Alpha
  • 2010/2/6 2:58

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


If you make a block not visible in the new block manager with click in the green icon it is disabled, but when you set it visible making click in the red icon it continue hidden and you need to edit the block and set it visible.



34
aitor
Re: Review & Bugs - Xoops 2.5 Alpha
  • 2010/2/1 20:02

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


Image manager

Image manager with db storage


Setting in image manager a category and set it to store in db.

Upload a picture and when trying to see there is a purple message with red text.

phpThumb() v.17.9-200805132119
c:\xampp/htdocs/xoops25/uploads/images/img4b.... does not exist (remember that when creating category i set to store in db)



35
aitor
Re: test this
  • 2002/1/3 20:50

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


I have been in an error it wasn´t a security hole as said me onokaze.

If you put a link tohttp://www.yoursite/modules/visitors2/ then you could see your statistics.

And to make it no visible for out people put change their permisions in group permisions.



36
aitor
Re: test this
  • 2002/1/3 19:32

  • aitor

  • Not too shy to talk

  • Posts: 148

  • Since: 2002/1/2 2


I Have this problem also in my domain server but not in my normal computer.

I find how to see the statistic and they are well recorded in my domain server. But it has a security hole and I am going to say to xooops members first.

But your informatión is well recorded.




TopTop
« 1 2 3 (4)



Login

Who's Online

179 user(s) are online (101 user(s) are browsing Support Forums)


Members: 0


Guests: 179


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits