How To Create custom plugin field for flexi content

More
12 years 6 months ago #39185 by foyougilles
hi,
I'm new to FLEXIcontent for joomla 2.5. and I have a little problem.

In fact, I would like to know where to find a tutorial for creating plugin FLEXIcontent.
to be precise, I would like to create a version of the plugin "relation", but, I want that in the front end, the filed showns only items posted by the current user.

For example, I have a category called FLEXI with contennant articles posted by user1, user2 and user3. I want if user1 logs in and accesses the submission form item that the field "relation" only shows items sent by User1.

Thank you for your help, I hope I'm clear enough.
Sorry for my bad English "googletrad!"!

Kaaah méééhhh Haah Mééhh Haaaaaaaaaaaaa

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

More
12 years 6 months ago #39188 by ggppdk
Hello,

It is better to avoid duplicating an existing field for minor changes, since you will be missing new features

what you ask can be done without duplciating the field type, but if want to duplicate the field type then please see this FAQ article for duplicating an exist field type:

How to Duplicate a Flexicontent Field to create a new Field Type

-- After creating a new custom field type "myrelation", then edit your existing field e.g. field15 and set it's type to be of field type "myrelation" instead of "relation"

NOTE: about custom coding on the new field type, this will require time on your part
[/list]

Regards


-- 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.

More
12 years 6 months ago #39189 by foyougilles
OK, I could not have imagined such a quick response. thank you.
since I'm new, and before I started the creation of a field "myrelation" (which will take me much longer I guess)
How can I do so without creating new field, with the current plugin "relation"?

Kaaah méééhhh Haah Mééhh Haaaaaaaaaaaaa

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

More
12 years 6 months ago #39190 by ggppdk
Hello,
this is interesting/useful and is trivial to add

-- you can download latest version of relation field from here:
code.google.com/p/flexicontent/s ... 2Frelation

Click on each file, then click view "raw file" and save it on disk)
files:
en-GB.plg_flexicontent_fields_relation.ini
relation.php
relation.xml


-- 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.

More
12 years 6 months ago #39191 by foyougilles
if i don't make a mistake, i should modify this in relation.php line 215


$query = "SELECT i.title, i.id, i.catid, i.state, GROUP_CONCAT(rel.catid SEPARATOR ',') as catlist, i.alias FROM #__content AS i "
. (($samelangonly || $method_types>1) ? " LEFT JOIN #__flexicontent_items_ext AS ie on i.id=ie.item_id " : "")
. ' LEFT JOIN #__flexicontent_cats_item_relations AS rel on i.id=rel.itemid '
. ' LEFT JOIN #__users AS u ON u.id = i.created_by'
. $where
. " GROUP BY rel.itemid "
. $orderby
;

but i don't know how ton continue

Kaaah méééhhh Haah Mééhh Haaaaaaaaaaaaa

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

More
12 years 6 months ago #39192 by ggppdk
Hello,

please do not modify any files,

just download files and backup/replace the originals files of relation field

otherwise you can wait for next public downloadable package


-- 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.

More
12 years 6 months ago #39193 by foyougilles
sorry, I had not seen the previous post.
I'll test it right away and tell what's going on

Kaaah méééhhh Haah Mééhh Haaaaaaaaaaaaa

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

More
12 years 6 months ago #39194 by foyougilles
coooool, it works.
But I feel that there's errors to display. Ini.
in the backend I still have the following entries:
    FLEXI_RIFLD_OWNED_BY
    FLEXI_RIFLD_OWNED_BY_DESC
    FLEXI_RIFLD_ANY_USER
    FLEXI_RIFLD_EDITOR
    FLEXI_RIFLD_ITEM_OWNER

instead of
    Item owned by
    Items owned by (a) any user or (b) by user editting Currently owning the item by item the current item
    Any user
    editing user
    item owner

thank you very much for taking the time with me to solve my problems
eng googletrad!!!!

Kaaah méééhhh Haah Mééhh Haaaaaaaaaaaaa

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

More
12 years 6 months ago #39200 by ggppdk
Hello,

of course you understand that free custom development is not possible :D neither is possible free help for customizing sites (but bug support is free here)

-- this was added for 2 reasons

1. it was a good suggestion and will be useful to many other users (so i took time for many other users)

2. it was trivial to implement
(it took more time to add parameter and language string and test that it was to implement)

You may consider posting a 5-star review at JED, please mention features that you liked in FLEXIcontent and not just support.

(about language strings, i have filling you did not place file at correct place but anyway you will get correct language strings once you update to next public package)

Regards


-- 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.

More
12 years 6 months ago #39219 by foyougilles
OK, joomla component is easy to use, FLEXIcontent is also easy to use. So install component, insert templates, configure plugins and modules that I can do, but as soon as you touch the code, I lost. lol
But it's a weird feeling, I seem to have brought a small stone to the development of Flexicontent and I'm glad Mouhahahahawa.
Now I will recommend to all my friends .... loooooool

Kaaah méééhhh Haah Mééhh Haaaaaaaaaaaaa

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

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save