Welcome, Guest. Please Login or Register.
April 26, 2024, 08:04:05 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4]Advanced Visual Warning Mod « previous next »
Pages: 1 [2] 3 4 Reply Ignore Print
Author Topic: [beta 1.5.4]Advanced Visual Warning Mod  (Read 32266 times)
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #15 on: August 06, 2003, 08:32:22 AM »
Reply with quote

Everything is done with PHP. It doesn't run percisely every 24 hours as you can't make a php run at a certain time (As far as I'm aware) but instead it has to be triggered (by someone browsing the site)

Basically - Everytime a page loads (ie index.php) it does a quick check if 24 hours have passed since the last time the warning levels were checked and if it has it calls a function to check the warning levels.

You don't need any kind of special server etc and the actual checking of the time should add like no seconds to the page load time (pretty much) - the only thing that takes time is the checking of the levels but alas it only happens once a day :D
Logged
amango
Jr. Member
**
Posts: 89


Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #16 on: August 06, 2003, 11:11:43 AM »
Reply with quote

I have tested this mod.

Everything seems to work - but a "moderated user" (level 2) gets a "Database error" after posting. However, the posting could be seen correctly for the global moderator, so he can approve/delete the posting.

A "muted user" (level 3) will get a correct error message, that the user is muted and can't post.
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #17 on: August 06, 2003, 11:30:49 AM »
Reply with quote

Ah. OK.

Could you please check your error log file for your forum and just c&p the database error message? The error log will give the full error message making it easy for me to sort out.

thanks :)
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #18 on: August 06, 2003, 04:38:16 PM »
Reply with quote

about the auto-check, I think there's a thing named Cron Jobs in Apache that automatically runs a script at the set time, seems to be pretty easy to set up with CPanel... you could take a loot into that

I'll finish some changes I'm doing to my forum and then I'll apply this mod and test it thoroughly... I don't want to install it while in the middle of the other changes before they're working fine first :P

about giving access to moderators and global moderators to this mod, can it be done partially? I mean, basically, I want them able to moderate posts and mute members, but not ban them, not if the ban will be permanent...

I think it's better that the bans applied by them, instead of applied to the account, are submitted as a request to the admin to do it himself
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
amango
Jr. Member
**
Posts: 89


Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #19 on: August 06, 2003, 08:37:03 PM »
Reply with quote

@Grudge

Here is the error message. It's an error in Display.php

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') GROUP BY t.ID_TOPIC' at line 6
File: E:\XXXX\yabbse\Sources\Display.php
Line: 96

And this is the code in Display.php that does the error
Quote      // Check if a log exists, so we can go to next unreaded message page
      $request = mysql_query("
         SELECT GREATEST(IFNULL(lt.logTime, 0), IFNULL(lmr.logTime,0)) AS logtime, COUNT(m.ID_MSG), MAX(m.ID_MSG)
         FROM {$db_prefix}topics AS t
            LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC=t.ID_TOPIC AND lt.ID_MEMBER=$ID_MEMBER)
            LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD=t.ID_BOARD AND lmr.ID_MEMBER=$ID_MEMBER)
            LEFT JOIN {$db_prefix}messages AS m ON (m.ID_TOPIC=t.ID_TOPIC)
         WHERE (t.ID_TOPIC = $viewnum)
         GROUP BY t.ID_TOPIC") or database_error(__FILE__, __LINE__);

This does only happen, if the user postings are moderated = level 2.
« Last Edit: August 06, 2003, 08:52:55 PM by amango » Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #20 on: August 06, 2003, 09:06:29 PM »
Reply with quote

OK. I think I have found the problem but it doesn't throw up the error you gave...

Basically - you must have "return to post" enabled - this I hadn't tested as I forgot about :(

Problem I have is I have updated the mod to a new version with automation which is in beta.... At the moment I have updated the beta to be fixed. If you don't want to test the beta you will need to make the fix manually...

In post.php find:
      $idtostore=$threadid;
   if($mgroup!='Administrator' && $mgroup!='Global Moderator' && $mwarning==2){


A few lines below is a line starting
if ($modSettings['returnToPost']

Replace this line and the three below with:
if ($modSettings['returnToPost'] == '1' && $threadid!= ''){
      $yySetLocation = "$cgi;board=$board;action=display;threadid=$threadid;start=new";
   }
   else{
      $yySetLocation = $cgi;
   }


The same should be done in poll.php looking for the same lines. Hopefully this shall fix it...
Logged
amango
Jr. Member
**
Posts: 89


Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #21 on: August 07, 2003, 08:01:24 AM »
Reply with quote

Now it works! Thanks!  :D
Logged
amango
Jr. Member
**
Posts: 89


Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #22 on: August 08, 2003, 10:45:27 AM »
Reply with quote

No, it don't work. After installing the mod I can't delete any postings anymore....

You have an error in your SQL syntax near 'LIMIT 1' at line 1
Datei: /yabbse/Sources/ModifyMessage.php
Zeile: 223
Logged
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #23 on: August 08, 2003, 11:40:56 AM »
Reply with quote


Grudge, do i have to wait, or have you done the changes?


Surfy

Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #24 on: August 08, 2003, 04:04:37 PM »
Reply with quote

Quote from: amango on August 08, 2003, 10:45:27 AM
No, it don't work. After installing the mod I can't delete any postings anymore....

You have an error in your SQL syntax near 'LIMIT 1' at line 1
Datei: /yabbse/Sources/ModifyMessage.php
Zeile: 223


Sorry - another bug that crept in due to the changes :(

You can either redownload the zip (which is the new version with auto stuff) or the suggested fix which is, open modifymessage.php and search for:

$request = mysql_query("SELECT WARNINGTEXT FROM {$db_prefix}vwarnings WHERE MEMBERID=$ID_MEMBER AND MESSAGEID=$postid LIMIT 1;") or database_error(__FILE__, __LINE__);


and change it to:

$request = mysql_query("SELECT WARNINGTEXT FROM {$db_prefix}vwarnings WHERE MEMBERID=$ID_MEMBER AND MESSAGEID=$msg LIMIT 1;") or database_error(__FILE__, __LINE__);


The latter option is much quicker and is the fix you needed.

Surfy, if you download this mod now it has beta code in it which *should* lower warnings of members automatically over time. If you want to try this out you will need to uninstall your current mod file and run the new one AND run the new db file. As you can see there are still a few bugs in the mod but they are getting ironed out as soon as I read them :)
Logged
puntingzone
Noobie
*
Posts: 19


WWW
Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #25 on: August 09, 2003, 09:42:32 AM »
Reply with quote

I believe I found another small bug, I was getting an error when trying to bring down a warning from 1 to 0.

It  said sql syntax error in AdvVisualWarning.php at line 163 near "

I look and this was the line involved  
Quotemysql_query("UPDATE {$db_prefix}messages SET body='$message' WHERE ID_MSG=$tid") or database_error(__FILE__, __LINE__);

All I did was where it says $tid" I placed '  ' around the $tid

The error message went and managed to take member off warning. Hope this was right as I said before know nothing of php but learning I think

   
Logged

When I'm right I'm right, but when I'm wrong, I really goof up
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #26 on: August 09, 2003, 10:36:35 AM »
Reply with quote

^ If it worked then it sounds good enough to me :D

I'll update the zip for that too - not quite sure how that bug got passed me...  :-[
Logged
amango
Jr. Member
**
Posts: 89


Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #27 on: August 09, 2003, 06:18:19 PM »
Reply with quote

I made some tests with a "dummy" user to test all warning levels. If I choose "bann" the user still can log in, but then he gets the message "You have been muted" like in level 3. Is this a bug?
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #28 on: August 09, 2003, 07:16:48 PM »
Reply with quote

Ummm... I just tested this and most certainly got banned. Questions:

Are you definetly inputing level 4 and not any other number?

Is it a user with a different display name than their real name? (Not that it should matter)

Do you have cookies enabled? (Not that it should matter)

Finally - can you check your BANNED table for you forum using phpmyadmin (or even just look in the admin section) and see if the username is there or anything similar?

Also - I am assuming that if you upgraded you remembered to update all the files (in particular index.php and advvisualwarning.php)


Logged
amango
Jr. Member
**
Posts: 89


Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #29 on: August 10, 2003, 10:21:28 AM »
Reply with quote

Oh I just see! Your mod has a conflict with an already installed mod on my board: "Enhanced Ban mod". After deinstalling this mod yours work fine.  :)
Logged
Pages: 1 [2] 3 4 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [beta 1.5.4]Advanced Visual Warning Mod « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.050 seconds with 20 queries.