Welcome, Guest. Please Login or Register.
November 26, 2024, 09:42:49 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

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 34398 times)
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #30 on: August 10, 2003, 05:25:27 PM »
Reply with quote

I'm interested in Enhanced Ban too... could it be possible to make them work together?

maybe if the Ban warning level only notifies the admin to do the ban by hand with the other mod, instead of doing the ban on its own, they won't conflict

can this be done?
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
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #31 on: August 10, 2003, 07:09:22 PM »
Reply with quote

You can tell I have too much time on my hands:

I don't have enhanced ban installed but I downloaded it and had a quick look at the code so this SHOULD make my mod work with it. NOTE: This is ONLY to be changed if you have enhanced ban installed!!! Also I've obviously not been able to test it so tell me if it doesn't work please!!!

open AdvVisualWarning.php and find:

      $request = mysql_query("INSERT INTO {$db_prefix}banned (type, value) VALUES ('username', '" . $user . "')") or database_error(__FILE__, __LINE__);


Replace with:

      $request=mysql_query("INSERT INTO {$db_prefix}banned_enh(ID_MEMBER, Name, Mail, IP, Reason, DateBanned)
VALUES($row[ID_MEMBER], $user,'$row[emailAddress]','$row[memberIP]', '$warningmsg', " . time() . ")") or database_error(__FILE__, __LINE__);


Also, you need to find this:
   $request=mysql_query("SELECT ID_MEMBER, realName, WARNING FROM {$db_prefix}members WHERE memberName='$user' LIMIT 1") or       database_error(__FILE__, __LINE__);


replace with:

   $request=mysql_query("SELECT ID_MEMBER, realName, emailAddress, memberIP, WARNING FROM {$db_prefix}members WHERE memberName='$user' LIMIT 1") or       database_error(__FILE__, __LINE__);


Final note: Obviously this doesn't give the option of banning someone for a certain amount of time - once they are banned its indefinete unless you change it from the enhanced ban menu (assuming there is one!)
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #32 on: August 11, 2003, 03:28:55 AM »
Reply with quote

great!!

you know, I just thought that if the forum has Quick Reply mod installed, then it shouldn't be displayed to muted users...

maybe you can tweak this code a bit to work with Adv Visual Warning
http://www.yabbse.org/community/index.php?action=display;board=158;threadid=11379;start=45#msg80335
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
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #33 on: August 11, 2003, 01:20:17 PM »
Reply with quote


it would be cool, if the status Image is clickable, so that everyone could click on it, and see the Thread because the User get a warning.

The Mod seams to work without any errors  :D
Logged
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #34 on: August 11, 2003, 02:53:28 PM »
Reply with quote


I have installed this Mod on my heavy Modded Board  ;D

The installation works without any error, also the Mod seems to work fine  :-*.

I have only found one little Bug:  :-[

If a User is Post-Moderated he could edit his Post, after someone has approved it. I hope you can fix that.

I have made the German translation, maybee you will add it to your Mod, or someone could use it  ;)


$txt['visual0']='Visual Warning Mod';
$txt['visual1']='Nachricht die gebannten Usern angezeigt wird';
$txt['visual2']='Nachricht die Stummgestellten Usern angezeigt wird';
$txt['visual2b']='Nachricht die Posting-Moderierten Usern angezeigt wird';
$txt['visual3']='Nachricht die für verwarnte User angezeigt wird';
$txt['visual4']='Nachrichtenfarbe für gebannte User';
$txt['visual5']='Nachrichtenfarbe für Stummgestellte User';
$txt['visual5b']='Nachrichtenfarbe für Post-Moderierte User';
$txt['visual6']='Nachrichtenfarbe für verwarnte User';
$txt['visual7']='Bild für gebannte User';
$txt['visual8']='Bild für stummgestellte User';
$txt['visual8b']='Bild für Post-Moderierte User';
$txt['visual9']='Bild für verwarnte User';
$txt['visual10']='Erlaube Globalmoderator die Verwarnungslevel zu ändern';
$txt['visual11']='Erlaube Moderatoren die Verwarnungslevel zu ändern';
$txt['visual12']='Raise Warning Level';
$txt['visual13']='You Do Not Have Permission To Raise Warning Levels';
$txt['visual14']='Der User hat keine aktuellen Verwarnungen!';
$txt['visual15']='Details zu vorherigen Verwarnungen';
$txt['visual16']='Aktueller Verwarnungslevel:';
$txt['visual17']='Thema wieso verwarnt wurde:';
$txt['visual18']='Verwarnt wurde am:';
$txt['visual19']='Begründung zur Verwarnung (Link oder Text):';
$txt['visual20']='Details zum neuen Verwarnungslevel';
$txt['visual21']='Senden';
$txt['visual22']='Neuer Verwarnungs-Level:';
$txt['visual23']='Verwarnungs Management';
$txt['visual24']='Diese Liste zeigt alle User an, die momentan auf Stufe 1 oder 2 verwarnt wurden. Level 3 wird nicht aufgeführt da diese User bereits gebannt sind! Du kannst auswählen, ob alle Member einen Verwarnungslevel zurückgestuft werden sollen, oder nur einzelne Member bearbeiten.';
$txt['visual25']='Member';
$txt['visual26']='Level';
$txt['visual27']='Grund';
$txt['visual28']='Wann';
$txt['visual29']='Verwarnt';
$txt['visual30']='Du hast keine Berechtigung, diese Nachricht zu ändern';
$txt['visual31']='Du hast eine Verwarnung erhalten';
$txt['visual32']='Du wurdest für ein Posting von Dir verwarnt. Folge dem untenstehenden Link für mehr Informationen:';
$txt['visual33']='Du wurdest Stummgestellt, wegen mangelhaftem Verhalten';
$txt['visual34']='Du kannst kein Karma geben, wenn Du verwarnt wurdest';
$txt['visual35']='(0=Keine Verwarnung, 1=Verwarnt, 2=Post Moderiert, 3=Stummgestellt. 4=Gebannt)';
$txt['visual35b']='Moderiert';
$txt['visual36']='Stummgestellt';
$txt['visual37']='Gebannt';
$txt['visual38']='Keine Verwarnung';
$txt['visual39']='Standard Zeit bevor die Verwarnung abläuft (Tage):';
$txt['visual40']='Standard Zeit bevor die Posting Moderation abläuft (Tage):';
$txt['visual41']='Standard Zeit bevor die Stummstellung abläuft (Tage):';
$txt['visual42']='Ich habe Dich zu Benachrichtigen, dass Dein Verwarnungs-Level hochgestuft (verschärft) wurde.';
$txt['visual43']='Ich bin froh Dir mitteilen zu können, dass Dein Verwarnungslevel im Forum reduziert wurde.';
$txt['visual44']='Verwarnungs Level reduziert';
$txt['visual45']='Verwarnungsdauer (Blank=Default)';
$img['visualw']='<img src="' . $imagesdir . '/im_visualw.gif" alt="' . $txt['visual12'] . '" title="' . $txt['visual12'] . '" border="0">';
$txt['postmod0']='Post Moderation Mod';
$txt['postmod1']='Post Moderation Manager';
$txt['postmod2']='Global Moderatoren sollen moderierte Postings freigeben können';
$txt['postmod3']='Moderatoren sollen Moderierte Postings freigeben können';
$txt['postmod4']='Von diesem User werden alle Posts geprüft, bevor sie sichtbar sind.';
$txt['postmod5']='Deine Postings werden momentan vor der Freigabe geprüft';
$txt['postmod6']='Dieser User ist nicht Post-Moderiert';
$txt['postmod7']='Dieser User ist Post-Moderiert';
$txt['postmod8']='Ändere den Verwarn Status dieses User\'s';
$txt['postmod9']='Posting Moderiert';
$txt['postmod10']='Du hast keine Berechtigung für diese Aktion!';
$txt['postmod11']='Du bist auf Verwarnlevel 3 - Deine Postings werden vor der Freigabe überprüft';
$txt['postmod12']='Dies sind alle Nachrichten, die Post- Moderiert werden müssen. Um ein Posting (oder mehrere) Freizugeben markiere die betreffenden Nachrichten and wähle "Freigabe" oder wähle Nachrichten und klicke auf "Löschen"';
$txt['postmod13']='Username';
$txt['postmod14']='Subject/Message';
$txt['postmod15']='Freigabe';
$txt['postmod16']='Löschen';


Also the DB File should be edited! in German: Auch das DB File solltet ihr vor der Installation editieren!


I think you can give this Mod status: done  :D

Thank you!

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 #35 on: August 11, 2003, 04:27:26 PM »
Reply with quote

Anguz:
Quote from: Anguz on August 11, 2003, 03:28:55 AM
great!!

you know, I just thought that if the forum has Quick Reply mod installed, then it shouldn't be displayed to muted users...

maybe you can tweak this code a bit to work with Adv Visual Warning
http://www.yabbse.org/community/index.php?action=display;board=158;threadid=11379;start=45#msg80335

This isn't very efficient but then neither is most of my code at the moment:
Search display.php for:

   echo QuickReply($mstate,$msubthread);


replace with:

   $request = mysql_query("
         SELECT WARNING
         FROM {$db_prefix}members
         WHERE memberName='$username'") or database_error(__FILE__, __LINE__);

      list($level) = mysql_fetch_array($request);
   if($level<3)
      echo QuickReply($mstate,$msubthread);


Surfy:
That's a good idea about the image link. I may add that in future versions. Basically - this version will not be updated again until SMF is out. I have some important speed improvements I can add but due to the way load.php is written in YABBSE it will cause all manner of headaches for modded boards so I'll be waiting for the new improved version :)

As for the german - I've added it to the zip - thank you! I've given you credit in the mod file ;)

I'm gonna leave this in beta for a bit until no-one reports any more errors!
Logged
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #36 on: August 11, 2003, 05:55:39 PM »
Reply with quote


it works great  :-*

One Question: Is it a great Job, to disable "edit" Post for Moderated Users?

If i approve a Post, a moderated User could edit his approved Message  ;)

thx for the Credits, it isnt nessesary  :)


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 #37 on: August 11, 2003, 06:29:20 PM »
Reply with quote

Very quick job
Open modifymessage.php - search for:
   if ($username == 'Guest')
      fatal_error($txt[223]);
   if ($currentboard == '')
      fatal_error($txt[1]);


Add after:

   $request = mysql_query("
         SELECT WARNING
         FROM {$db_prefix}members
         WHERE memberName='$username'") or database_error(__FILE__, __LINE__);

      list($level) = mysql_fetch_array($request);
   if($level>1)
      fatal_error($txt[visual33]);


AGain it's not efficient but it should work. It won't let a moderated user modify any messages which seems fair enough. This is sometihng I'll add to the next version too!
Logged
GWP
Sr. Member
****
Posts: 252


A total PHP MySQL Novice :) - but getting better!

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #38 on: August 13, 2003, 06:44:54 PM »
Reply with quote

Hi Grudge
I have been following this post with obvious interest.
As i now use SM, I have converted it to work on my board (almost). I just have a few problems.

1. When I warn a user on level 1 (warned), at the top it says current level "warned". Thats fine. However when i raise it to level 2 , at the top it gives me Current Level: 2 (Muted) ??, this should be moderated. then when i go to level 3 it bans the user!

2. I seem to have two warnings displayed in the info box, just to the left of these posts, under the flag etc. where would i find the code for that.

3. I hope you dont mind but you have some text hard-coded in Subs.php
Quote$yyim=" <br><font size=\"2\" color=\"red\"><a href=\"$cgi;action=pmman\"><b>$modmsg</b> messages require moderation</a></font>";
I have added
Quote$txt['visual34b']=' messages require moderation';
to the english.lng file and have changed the code to:
Quote$yyim=" <br><font size=\"2\" color=\"red\"><a href=\"$cgi;action=pmman\"><b>$modmsg</b>$txt['visual34b']</a></font>";

I plan to get this working then ask your permission to let SM use it as you have already let them use the original mod (V1). Is that OK with you?
Logged

YabbSE 1.5.1rc Mods:AdvIm, Member Map, Password Prompt, Report to mod, Smilies SE 2.0, Bio, collapsable_yabb, Ignore user, Name, allowed user, search member, enchanced ban, posts per day, Mute User, Memberlist Plus,Who,ExactPostLink. Remove_Clicklog,mc_BoldOwnThreads.QuickReply, UserEnableDisableCensor, RefererMod, lastlogin_profile,PostBasedImRestrict, ExactPostLink, UserBrowsing,
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #39 on: August 13, 2003, 08:17:40 PM »
Reply with quote

1) Are you *sure* that with this new mod you have copied over the php file AND uploaded the new index.php file. If you forgot to upload the new modified index.php file it will still execute the old php file (I know you are upgrading to this). This is the only thing I can think of here as no-one else has this problem - it must be still executing visualwarning.php and not advvisualwarning.php (the new one)

2) Do you mean info box on the thread display view? Sounds like a duplication of code. Just check the mod file - it is in display.php , search for $finalstar (I think) in the modified display.php file and you'll probably find it duplicated

3) That is fine - bad practice by me :)

Hope you get somewhere with this! I'm almost certain the problem you are having is with index.php - it MUST point to the new php file or you will be in real trouble!
Logged
GWP
Sr. Member
****
Posts: 252


A total PHP MySQL Novice :) - but getting better!

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #40 on: August 13, 2003, 08:33:19 PM »
Reply with quote

Hi Grudge :)

1. I did upload the new advvisualwarning.php file along with the zip i DL'ed. As i was using the index.php from the SM server, there were some changes that had been done in the meantime. I also added the code changes you suggested for having the "enchanced ban" to the advvisualwarning.php file .

2. My fault, forgot to take the hand-coded stuff I had done earlier :)

I still cannot get it to put a user on moderation. Is there a switch somewhere that i need to click? in the admin panel? I see text in English.lng for "Post moderation mod", but cannot find it anywhere?
Logged

YabbSE 1.5.1rc Mods:AdvIm, Member Map, Password Prompt, Report to mod, Smilies SE 2.0, Bio, collapsable_yabb, Ignore user, Name, allowed user, search member, enchanced ban, posts per day, Mute User, Memberlist Plus,Who,ExactPostLink. Remove_Clicklog,mc_BoldOwnThreads.QuickReply, UserEnableDisableCensor, RefererMod, lastlogin_profile,PostBasedImRestrict, ExactPostLink, UserBrowsing,
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #41 on: August 13, 2003, 08:43:08 PM »
Reply with quote

The script runs via php - it is independant of the web server... trust me you have no fears there!

Install it as you wish GWP! You just need to uninstall the old one and insall the new one - don't really need a clean install. I'm now a member of the SMF development team so unforutantly I'm not going to have much time to update this but I will try and sort out any bugs you may have
Logged
GWP
Sr. Member
****
Posts: 252


A total PHP MySQL Novice :) - but getting better!

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #42 on: August 13, 2003, 09:01:18 PM »
Reply with quote

Congrats on the SMF, You deserve it.
All the other things I can sort out myself, just need a quick hand to see if what i have is the way it should work, any bugs with SM code, i will sort.

Is it Ok to let SM have it after i have done it, credit to you of course :)
Logged

YabbSE 1.5.1rc Mods:AdvIm, Member Map, Password Prompt, Report to mod, Smilies SE 2.0, Bio, collapsable_yabb, Ignore user, Name, allowed user, search member, enchanced ban, posts per day, Mute User, Memberlist Plus,Who,ExactPostLink. Remove_Clicklog,mc_BoldOwnThreads.QuickReply, UserEnableDisableCensor, RefererMod, lastlogin_profile,PostBasedImRestrict, ExactPostLink, UserBrowsing,
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:[beta 1.5.4]Advanced Visual Warning Mod
« Reply #43 on: August 13, 2003, 09:07:30 PM »
Reply with quote

Quote from: GWP on August 13, 2003, 09:01:18 PM
Congrats on the SMF, You deserve it.
All the other things I can sort out myself, just need a quick hand to see if what i have is the way it should work, any bugs with SM code, i will sort.

Is it Ok to let SM have it after i have done it, credit to you of course :)

Basically - if you download the zip file in my first post I know that works - if oyu have any trouble getting it to work it's probably just that you have forgot to upload a file that was modified. As far as working the way it should work it obviously shouldn't have mute as level 2 and ban as level 3 - I'm almost certain that's because it is accessing the old php file - try deleting visualwarning.php off your server and see whether it still works at all - if not it's because your index.php is out of date (maybe you have duplicate entries in there?!)

As far as supermod goes - I have no problem with my mod being included - as long as some credit is notified somewhere. In fact if it is that is probably a good thing as it will make your life much easier!!

Hope it goes well and any questions just PM me!
Logged
GWP
Sr. Member
****
Posts: 252


A total PHP MySQL Novice :) - but getting better!

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

Damm

just had a quick look in index.php
is this right?
Quote'warnadd' => array("$sourcedir/VisualWarning.php", 'AddWarning'),
      'warnadd2' => array("$sourcedir/VisualWarning.php", 'AddWarning2'),
      'warnlist' => array("$sourcedir/VisualWarning.php", 'ListWarnings'),
      'warnlist2' => array("$sourcedir/VisualWarning.phpr]", 'ListWarnings2'),
      'pmman' => array("$sourcedir/AdvVisualWarning.php", 'Manager'),
      'pmman2' => array("$sourcedir/AdvVisualWarning.php", 'Manager2'),
would that have something to do with it? :) :)
I have now changed it
Onto my next problem.....
Logged

YabbSE 1.5.1rc Mods:AdvIm, Member Map, Password Prompt, Report to mod, Smilies SE 2.0, Bio, collapsable_yabb, Ignore user, Name, allowed user, search member, enchanced ban, posts per day, Mute User, Memberlist Plus,Who,ExactPostLink. Remove_Clicklog,mc_BoldOwnThreads.QuickReply, UserEnableDisableCensor, RefererMod, lastlogin_profile,PostBasedImRestrict, ExactPostLink, UserBrowsing,
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.073 seconds with 20 queries.