[use select+SQL query] New custom plugin like create_by

5 years 1 week ago #40701 by LEHBC-EHY
Hello team,

I'd like to create a plugin with the same result of create_by plugin. The objective is to read and display a value dynamically from a specific table based on the user id.

I tried to copy and modify core plugin but without result :(

Thanks for your help.

Regards,

Ehy

Please Log in or Create an account to join the conversation.

5 years 1 week ago #40705 by micker

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

5 years 1 week ago #40710 by ggppdk
Hello

1. may you do not need to create a new field type

-- you can create a FLEXIcontent field of type "select" and enable parameter "Use SQL query"
and inside fields enter (to use username):
"SELECT id AS value, username AS text FROM #__users"

OR enter (to use user's full name)

"SELECT id AS value, name AS text FROM #__users"


2. but after that what do you need to do?
only display in frontend a username?
if you want to do more complex things then yes you may need to create a new field type, this is not difficult for a developer:
(you will need to duplicate the TEXT or WEBLINK field type and the alter it to make the SQL query and other stuff that you will need)
How to Duplicate a Flexicontent Field to create a new Field Type


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

5 years 1 week ago #40732 by LEHBC-EHY
Hello team,

Thank you for your feedback.

I found a solution based on core.php. ;)

Everything works fine.

Regards,

Ehy.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.