Jump to content

Recommended Posts

Posted (edited)

Hello,I tried to add a text in ACP> Memebrs on the column with members name (where are the red rectangle)
through a hook (for an application), but somehow I fail.
here is my attemp:
 

//<?php
if ( !\defined('\IPS\SUITE_UNIQUE_KEY') ) { exit; }

/** @mixin \IPS\Theme\class_core_admin_tables */
class sharedstats_hook_list_tables extends _HOOK_CLASS_
{
    public static function hookData()
    {
        return array_merge_recursive( array(
            'rows' => array(
                0 => array(
                    'selector' => 'td.ipsTable_wrap.ipsTable_primary > a',
                    'type'     => 'add_after',
                    'content'  => '&nbsp;&bull;&nbsp;TEST',
                ),

            ),
        ), parent::hookData() );
    }
}


 


image.png.6ea44069b0f07a90b2ea3efb26a770fa.png
Thansk for any advices  👍

Edited by Hagiali
  • Management
Posted

That won't work because the code is inside a foreach cycle, if I remember correctly. I think you may need a code hook on the table parser function to add additional output. 🤔

 

I'm on my phone, so I can't check right now, though.

Board Rules - Available Products - Need a Custom Work?

 

< Don't PM me for support, post in the forum or submit a ticket from the client area instead! >

Posted

Can you check please if is inside of a foreach cycle ? When you have time, ofc 🙏 
I think the theme hook is cleareast method (in my newbie opinion).

If is it
foreach cycle , what kind of  code hook i should use? 
i tried like this: 
\IPS\core\modules\admin\members\members
but I am not sure is a healty hook 🤔 , 
image.thumb.png.acb9f95a43e53a68c4e858c7c31a4d31.png





Really thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.