Jump to content

Dextro Energy

Clients
  • Posts

    30
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by Dextro Energy

  1. 18 hours ago, Adriano Faria said:

    It's easy to test. Perform any action in ModCP logged in as an admin. The action will show up in Moderator Logs, not in Administrators logs.

    My issue is that when signed in as an Admin, there is no log generated at all; nothing in Mod Logs or Admin logs. Sorry if that was not communicated well. 

    18 hours ago, Adriano Faria said:

    I’ll take a look when I have to release a new version. 

    Thank you! For the time being I'm going to use a hook that overwrites logging to include the logging functionality I asked for - if you would like the hook, let me know! (It's not made right now, though).

  2. 8 hours ago, opentype said:

    The best option is to look at the corresponding file which sets these functions. In this case, this would be: system → Member → Member.php

    Thanks for letting me know. I wish some type of easier to search system existed though. Even just a PDF, lol.

     

    8 hours ago, Daniel F said:

    You could use IPS\Member::loggedIn()->modPermission() to see if the member has any mod permissions 

    This will do the job! Thank you.

  3. Question 1: How would I check if a user is in a Moderator group?
    I understand that the below exists:

    \IPS\Member::loggedIn()->isAdmin()

    Is there an equivalent for Moderator? What is it? - I understand I could just check all Group IDs that I know are Moderators but that means hardcoding and it isn't very elegant, I put an example below of that:

    {{if \IPS\Member::loggedIn()->inGroup( array( 28, 15, 6 ) )}}
    	Groups 28, 15 and 6 can view this. (All of which are Moderator groups)
    {{endif}}

    But... I don't really want to do this. I would much rather something like an "isMod" check that would update itself, rather than needing me to put IDs every time a moderator group is added, or removed.

    Question 2: How can I check all of the things available for me to use for an object in IPS such as \IPS\Member::loggedIn()? What documentation exists to show me all the methods, etc. if any?

    Thank you!

  4. Hey! This plugin does log to mod logs, but the logs aren't very helpful.

    Will the logs ever be improved to show what was changed? It also seems that if you are an Administrator, no logs are recorded from ModCP. Is this a bug for everyone or just me?

×
×
  • Create New...