Hello
I'm using CMSMS 2.1.3 and 1.2.1.1 Lise
My web has 1 Administrator and and 6 users as Editors
My question is:
How to show in each publication (entry) of Lise the author of it?
Sorry for my poor English.
Thank you!
Author in LISE
Re: Author in LISE
Currently LISE doesn't have a way to automatically do that. You have a few alternatives depending on your level of knowledge of PHP/CMSMS/LISE...
On it's simplest form you would have to rely on each user to select itself from a dropdown or multiselect field.
As a proof of concept you can:
This was not tested too extensively but should work fine.
On it's simplest form you would have to rely on each user to select itself from a dropdown or multiselect field.
As a proof of concept you can:
- create an UDT called LISEUsersList;
- Paste:
Code: Select all
$user = \UserOperations::get_instance()->LoadUserByID($params['value']); foreach( $users as $user ) $params[$user->id] = $user->username; return $params; - create an UDT called LISEUsersAdminListing;
- Paste:
Code: Select all
$user = \UserOperations::get_instance()->LoadUserByID($params['value']); return $user->username; - create a FieldDef in the LISE instance module and make it a Custom Field From UDT;
- select the type to fit your needs (I used multiselect but should work we any of them);
- select Source UDT: LISEUsersList;
- select the Admistrator Listing UDT:: LISEUsersAdminListing;
- save and have fun;
This was not tested too extensively but should work fine.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Author in LISE
Thank you very much for the contribution.
But I can not make it work.
The result is an empty field on the form.
I can solve it with a workaround using "{$ item->owner}" in the template and a cycle of "{if} like this in it.
The "{$item->owner}" I think it is the "id" of user
This is only useful for sites with few users. My situation.
Thanks!
Again I apologize for my bad English.
mon
But I can not make it work.
The result is an empty field on the form.
I can solve it with a workaround using "{$ item->owner}" in the template and a cycle of "{if} like this in it.
Code: Select all
{if $item->owner == '1'}
name of user 1
{elseif $item->owner == '2'}
name of user 2
{elseif $item->owner == '3'}
name of user 3
---
{/if}This is only useful for sites with few users. My situation.
Thanks!
Again I apologize for my bad English.
mon


