News:

Join the Facebook Fan Page.

Main Menu

vWarn Mod

Started by Valodim, September 12, 2005, 08:30:40 PM

Previous topic - Next topic

Stargater59

Well now I think I just made a stupid mistake. I didn't know how to change the file online to say 1.1.3 instead of 1.1.2, so I downloaded the mod, opened it up and then I changed the number. Well.. then I uploaded it, and installed it. And now I'm getting this

"Fatal error: Cannot redeclare isnotminusone() (previously declared in /home/uowm/public_html/forums/Sources/Load.php:1175) in /home/uowm/public_html/forums/Sources/Load.php on line 1182"

Now what do I do?

redone

For some reason it installs the same function twice. I have attached a copy of the Security.php with the additional function removed.

Try that.


Stargater59

#182
I'm still getting the error.

Edit:

Never mind, the problem has been fixed.

Well, the error has been taken away. But the uninstall link still isn't there.

redone

You would probably have to remove the mod manually for now until its updated.

Stargater59

How do I do that? Even if I put the right URL in to uninstall it, it says there is no uninstaller.

Also profiles aren't working either.  And I think it's because of the mod. I don't think it's installed all the way. Does it add stuff to load.php? Because I uploaded a new load.php and that's what fixed everything else.

redone

To remove it manually you would just overwrite the files it changed with new ones.

And yes, it does make changes to Load.php.


Stargater59

Yes, well as yo know form the other thread, I just reinstalled the forum. So everything is working properly again. Except for my missing mods. But thats ok.

redone

I am glad you got this resolved. If you need more help just let us know.

Gary

Or alternatively you can add

;version_emulate=1.1.2

to the end of the package managers URL.

-ALM
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

okapi

Quote from: okapi on March 15, 2007, 05:46:29 PM
Another bug, when a alert ends, the denied permissions of a user group (mute can't reply for example) continues.

...hello?

Martin-22

Hi, could somebody update the mod to work with SMF 1.1.3 ? please..

After installing the SMF 1.1.3, it works, but except the properties  "muted", and "moderate". The user can still post anything, where could be the problem ?

Coldfx

Quote from: Martin-22 on August 18, 2007, 10:15:07 AM
Hi, could somebody update the mod to work with SMF 1.1.3 ? please..

After installing the SMF 1.1.3, it works, but except the properties  "muted", and "moderate". The user can still post anything, where could be the problem ?

Edit the "muted" membergroup permission so they cannot post.

Martin-22

It's not function, i can't assign the user to this group
Quote from: Coldfx on August 18, 2007, 10:17:38 AM
Quote from: Martin-22 on August 18, 2007, 10:15:07 AM
Hi, could somebody update the mod to work with SMF 1.1.3 ? please..

After installing the SMF 1.1.3, it works, but except the properties  "muted", and "moderate". The user can still post anything, where could be the problem ?

Edit the "muted" membergroup permission so they cannot post.
Doesn't work it :(

askepott

is it possible to hide the warning level below the user post count? it'll be great if we can hide it.

askepott

not working with 1.1.3 :(

SONSiVRi

I installed on 1.1.4, "warning" works so far so good.
The problem is user count isnt showing on membergroup listing, I need to sleep before check 10 page of posts.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Yellowrose

I agree with askepott. I would like to see a function added to this mod that allows only admins and moderators to see the warn levels and hide them from users. Having them visable can be detrimental to some broads with younger users. I think if we all think back to when we were young we can remember how cruel kids can be to one another in this type of situation. They have enough to worry about in todays age and most that I have seen use the net to get away from the ridicule and harassment in real life but this mods can very well create it on the net as well.

Hiding the levels from members would help to solve the possability of this happening on boards with younger users.

SONSiVRi

Quote from: Yellowrose on November 13, 2007, 01:16:56 AM
I agree with askepott. I would like to see a function added to this mod that allows only admins and moderators to see the warn levels and hide them from users. Having them visable can be detrimental to some broads with younger users. I think if we all think back to when we were young we can remember how cruel kids can be to one another in this type of situation. They have enough to worry about in todays age and most that I have seen use the net to get away from the ridicule and harassment in real life but this mods can very well create it on the net as well.

Hiding the levels from members would help to solve the possability of this happening on boards with younger users.

In fact its easy to done I think.
I implemented permission control to another mod that checking user rights to showing some links.
I can prepare it for you but I have to resolve my problem first.
I cant un-warn (un-mute...) user, when I set them zero it seems ok but some random later its going back where it left to counting.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

SONSiVRi

#198
I found where the error happens. (error: forum keeps warning if you unwarn members before time is over)
Its for unwarn process isnt delete / disable previous warning entries Expires / Expired and first occurring of autoWarn() is keep warning people untill its expire itself.



edit:



I found the bug, wrong column name choosed to disable previous warnings when we adding new ones. Code disables administrator's (ID_MEMBER) warnings instead of user's (ID_WARNED) warnings.

$sourcedir/Profile.php should be corrected.

Find:
                  UPDATE {$db_prefix}log_warnings
                    SET valid = 0
                    WHERE ID_MEMBER = $memID", __FILE__, __LINE__);


Replace:
                  UPDATE {$db_prefix}log_warnings
                    SET valid = 0
                    WHERE ID_WARNED = $memID", __FILE__, __LINE__);



Btw I wonder why nodoby complained for this bug, except 2-3 guys.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

SONSiVRi

#199
Quote from: okapi on March 15, 2007, 05:46:29 PM
Another bug, when a alert ends, the denied permissions of a user group (mute can't reply for example) continues.
Quote from: JohnnyMcKinney on March 16, 2007, 04:25:58 PM
Yea that happens to me also.
Quote from: tensop on March 20, 2007, 08:43:38 AM
yeah, im having a problem where the users warn isnt actually expiring, sometimes they remain in the group, or their 'warned' message sticks etc
Quote from: preddy25 on April 30, 2007, 11:57:40 AM
any updates? i thought the after the warnings expired , the user would be move out of the group automatically...guess not , but is  a great mod in the first place!
thanks val! keep up the good work! ...just more work for my moderators now..ehhe

I cant believe only these guys told the problem they have.
I deep traced the code and I saw same "column name" problem in autoWarn section also.
And Valodim, I dunno how you say your code working perfectly, am I missing something?
I am not blaming who is published a mod but I am confused. You obviously coded wrong column name.

I am still working on the code, I hope I make it clean.
I will add permission control to it, only selected membergroups can see the warnings.



EDIT 1



Here are the modifications list to resolve this issue.

$sourcedir/Security.php
Search
SELECT ID_WARNING, ID_MEMBER, time, data

Replace
SELECT ID_WARNING, ID_WARNED, time, data

$sourcedir/Security.php
Search
$expiredmembers[$row['ID_MEMBER']] = array_keys($expired);

Replace
$expiredmembers[$row['ID_WARNED']] = array_keys($expired);


(If your "Manage Membergroups" background and table headers are not straight make this modification too)
$themedir/ManageMembergroups.template.php
Search
<tr class="catbg"><td colspan="4" style="padding: 4px;">', $txt['membergroups_warning'], '</td></tr>
<tr class="titlebg">
<td width="42%">', $txt['membergroups_name'], '</td>
<td width="12%" align="center">', $txt['membergroups_stars'], '</td>
<td width="10%" align="center">', $txt['membergroups_members_top'], '</td>
<td width="10%" align="center">', $txt[17], '</td>
</tr>';
foreach ($context['groups']['warning'] as $group) {
echo '
<tr>
<td class="windowbg2">', empty($group['color']) ? $group['name'] : '<span style="color: ' . $group['color'] . '">' . $group['name'] . '</span>', '</td>
<td class="windowbg2" align="left">', $group['stars'], '</td>
<td class="windowbg" align="center">', $group['can_search'] ? $group['link'] : $group['num_members'], '</td>
<td class="windowbg2" align="center"><a href="' . $scripturl . '?action=membergroups;sa=edit;group=' . $group['id'] . '">' . $txt['membergroups_modify'] . '</a></td>


Replace
<tr class="titlebg"><td colspan="4" style="padding: 4px;">', $txt['membergroups_warning'], '</td></tr>
<tr class="catbg3">
<td width="42%">', $txt['membergroups_name'], '</td>
<td width="12%" align="center">', $txt['membergroups_stars'], '</td>
<td width="22%" align="center">', $txt['membergroups_members_top'], '</td>
<td width="10%" align="center">', $txt[17], '</td>
</tr>';
foreach ($context['groups']['warning'] as $group) {
echo '
<tr>
<td class="windowbg">', $group['can_search'] ? $group['link'] : $group['num_members'], '</td>
<td class="windowbg2" align="left">', $group['stars'], '</td>
<td class="windowbg2" align="center">', empty($group['color']) ? $group['name'] : '<span style="color: ' . $group['color'] . '">' . $group['name'] . '</span>', '</td>
<td class="windowbg2" align="center"><a href="' . $scripturl . '?action=membergroups;sa=edit;group=' . $group['id'] . '">' . $txt['membergroups_modify'] . '</a></td>





EDIT 2



Sorry to say that but still problems exist.
I found another bug. If you have 2 or more active warned members, autoWarn doesnt unwarn them when time is over.
Because autoWarn collects the users those who will be deleted from warning groups (when warning time is over) and then execute the SQL command to delete user in that group.
The error on implode function, thats why users cannot be deleted from warning group.
Valodim its working on your side cause you only warning 1 person at a time.
No need to implode function to seperate usernames.

I am not PHP coder, maybe I am wrong on those error stuff ?


Search
WHERE ID_MEMBER IN (" . implode(array_keys($expiredmembers)) . ")", __FILE__, __LINE__);


Replace
WHERE ID_MEMBER IN (" . implode(',', array_keys($expiredmembers)) . ")", __FILE__, __LINE__);
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Advertisement: