Modules Anywhere

Can show module with parameter {module userlist is_active = "0" } ?

1 year 8 months ago #66524

fion's Avatar fion

Dear Sirs,

Since most of the modules are newly developed and show in article liek

{loadmodule userlist}
which will display a userlist which a parameter "is_active" show 0 or 1 two values

Once apply module anywhere can I put the same module into two different is_active like

{tab active user}

{module userlist is_active = "1"}

{tab inactive user}

{module userlist is_active ="0"}

{/tabs}


Meanwhile can we apply multiple parameteres like
{module userlist is_active ="0" country="Hong Kong"}

Finally, once the module created by join tables should we add alias on the parameter
{module userlist abc_users.is_active ="0" abc_users_countrylist.country="Hong Kong"}


Thanks

1 year 8 months ago #66531

Peter van Westen's Avatar Peter van Westen Admin

As described here:
www.regularlabs.com/extensions/modulesanywhere#extra-parameters
When using multiple attributes in the tag, you need to place the module title in an attribute too, like:

{module title="userlist" is_active="0"}

1 year 8 months ago #66638

fion's Avatar fion

Failure : 1

{tab courses}

{module 10394 is_active = "1"}

{tab inactive courses}

{module id="10394" is_active="-1"}

{/tabs}

Failure : 2
{tab courses}

{module title="aa_course" is_active = "1"}

{tab inactive courses}

{module title="aa_course" is_active="-1"}

{/tabs}

Question 1 : the page is keeping on loading until ask me "Kill" or "Wait"
Question 2: should I need to add any code in aa_course to receive module anywhere is_active= 1
Please hep

1 year 8 months ago #66642

Peter van Westen's Avatar Peter van Westen Admin

Get rid of the spaces.
So not:

is_active = "1"
but:
is_active="1"

Is the 'is_active' a parameter in that module?

1 year 8 months ago #66777

fion's Avatar fion

{tab no student id}

{module id="647" be_student="1"}

{tab shopper}

{module id="657" be_student="-1"}

{/tabs}

above still cannot used

my module name mod_aa_stud_no_id as below
from where I use be_student as a parmeter which either be "1" or "-1"

->where( 'aasfp_users.be_student','1','=' )

<?php
/*
 * Example PHP implementation used for the index.html example
 */

// DataTables PHP library
include( $_SERVER['DOCUMENT_ROOT']."/modules/Editor-PHP-1.5.3/php/DataTables.php" );

// Alias Editor classes so they are easy to use
use
	DataTables\Editor,
	DataTables\Editor\Field,
	DataTables\Editor\Format,
	DataTables\Editor\Join,
	DataTables\Editor\Upload,
	DataTables\Editor\Validate;

$db->sql( "SET NAMES 'utf8'" );
/*
 * Example PHP implementation used for the join.html example
 */
 
Editor::inst( $db, 'aasfp_users', 'id' )
	->fields(
		Field::inst( 'aasfp_users.block' ) ,        
 		Field::inst( 'aasfp_users.id' ) ,  	  
		Field::inst( 'aasfp_users.username' ),
		Field::inst( 'aasfp_users.name' ),		
		Field::inst( 'aasfp_users.name_en' ),			
		
		Field::inst( 'aasfp_users.name_hk' ),	
		Field::inst( 'aasfp_users.identify_card' ),	
		Field::inst( 'aasfp_users.phone_1' ),	
		Field::inst( 'aasfp_users.phone_2' ),	
		Field::inst( 'aasfp_users.email' ),	
			
		Field::inst( 'aasfp_users.address_1' ),
		Field::inst( 'aasfp_users.be_student' ),
		Field::inst( 'aasfp_users.remark' )						

		
	)
	->where( 'aasfp_users.id','14000','>=' )
	[b]->where( 'aasfp_users.be_student','1','=' )[/b]
	->where( 'aasfp_users.block','0','=' )
	->where( 'aasfp_users.username','%E0%','NOT LIKE' )
	->where( 'aasfp_users.username','%E1%','NOT LIKE' )	
	->where( 'aasfp_users.username','%H0%','NOT LIKE' )
	->where( 'aasfp_users.username','%H1%','NOT LIKE' )
	->where( 'aasfp_users.username','%S0%','NOT LIKE' )
	->where( 'aasfp_users.username','%S1%','NOT LIKE' )	
	->where( 'aasfp_users.username','%T0%','NOT LIKE' )
	->where( 'aasfp_users.username','%T1%','NOT LIKE' )		
	->where( 'aasfp_users.username','%M0%','NOT LIKE' )
	->where( 'aasfp_users.username','%M1%','NOT LIKE' )	
	->where( 'aasfp_users.username','%TH0%','NOT LIKE' )		
	->where( 'aasfp_users.username','%TH1%','NOT LIKE' )		
	
	
	->process( $_POST )
	->json();

1 year 8 months ago #66779

Peter van Westen's Avatar Peter van Westen Admin

Is the 'be_student' a valid option name in the module settings?

1 year 8 months ago #66782

fion's Avatar fion

would you mind show me your module and see how you set your parameter ?

1 year 8 months ago #66784

Peter van Westen's Avatar Peter van Westen Admin

Can you give me (super) admin access so I can take a look?
And tell me what module this concerns.
You can use the 'Hidden text' button in the forum editor to hide the confidential information.

10 months 1 week ago #76077

fion's Avatar fion

Dear Sirs,

Would you mind send me an email
it is better to pass your the login method personally

Thanks

10 months 1 week ago #76081

Peter van Westen's Avatar Peter van Westen Admin

You can reach me at the email address mentioned on www.regularlabs.com/contact