Quantcast

[Tiki-devel] profile references [was Re: [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki:[62332] branches/17.x/lib/wiki-plugins/ wikiplugin_img.php]

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Tiki-devel] profile references [was Re: [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki:[62332] branches/17.x/lib/wiki-plugins/ wikiplugin_img.php]

Jonny Bradley-4
Hi all

Good question, and it's not entirely obvious, i agree.

These were initially introduced (by LPH) as a way for the profiles exporter (console commands) to be able to know what various numbers in plugin parameters, tracker fields and preferences are referring to, so that these can then be properly linked to the objects they refer to in a new install where the id's of everything may be different.

At some point this was then extended so that object selectors can be displayed in prefs and tracker fields so you get a pretty list of category names, tracker fields, or file galleries etc instead of having to type in the comma separated list of id's, and following the recent plugin edit revamp i deployed this for wiki plugin params.

One small hiccup i just found was that the other uses had a parent and parentkey option (so for instance, a tracker field selector could know which tracker to list the fields from for ItemLinks etc), however in plugins we already had a parent property for params so this was causing trouble until recently (i renamed the plugin ones parentval, still need to change the prefs and tracker usages to suit if we think it's worth it? or maybe i should do it the other way round - rename the current parent to parentparam or something and revert r62330? hmmm...)

So anyway, wherever you see a plugin parameter that should be an object selector, just add the object type as the profile_reference on the param definition and it should magically appear in the edit form! (hopefully).

HTH

jb

p.s. This could really do with a doc page on dev... i can't find anything like this there


> On 25 Apr 2017, at 22:09, luciash <[hidden email]> wrote:
>
> Hi Jonny,
>
> just curious, what does it mean? profile_reference (now they work)?
>
> Thanks,
>
> luci
>
>
> On 04/25/2017 02:12 PM, [hidden email] wrote:
>> Revision: 62332
>>           http://sourceforge.net/p/tikiwiki/code/62332
>> Author:   jonnybradley
>> Date:     2017-04-25 12:12:57 +0000 (Tue, 25 Apr 2017)
>> Log Message:
>> -----------
>> [FIX] img: Missing file gallery profile_reference (now they work)
>>
>> Modified Paths:
>> --------------
>>     branches/17.x/lib/wiki-plugins/wikiplugin_img.php
>>
>> Modified: branches/17.x/lib/wiki-plugins/wikiplugin_img.php
>> ===================================================================
>> --- branches/17.x/lib/wiki-plugins/wikiplugin_img.php 2017-04-25 12:07:32 UTC (rev 62331)
>> +++ branches/17.x/lib/wiki-plugins/wikiplugin_img.php 2017-04-25 12:12:57 UTC (rev 62332)
>> @@ -82,6 +82,7 @@
>>   'advanced' => true,
>>   'default' => '',
>>   'parent' => array('name' => 'type', 'value' => 'randomGalleryId'),
>> + 'profile_reference' => 'file_gallery',
>>   ),
>>   'fgalId' => array(
>>   'required' => true,
>>
>> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Tikiwiki-cvs mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Tikiwiki-cvs mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Tiki-devel] profile references [was Re: [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki:[62332] branches/17.x/lib/wiki-plugins/ wikiplugin_img.php]

Victor Emanouilov
Just a small addition that profile_references are really useful when
exporting profiles and applying them on another tiki. We already started
some work to make more and more of tiki exportable with Xavi which is
quite helpful, for example, when you move configuration between dev site
and live site. Thus, whatever is exportable via profiles do actually
have a profile_reference which is kind of a clue how exporter should do
its job.

Regards,
Victor


On 04/26/2017 01:56 PM, Jonny Bradley wrote:

> Hi all
>
> Good question, and it's not entirely obvious, i agree.
>
> These were initially introduced (by LPH) as a way for the profiles exporter (console commands) to be able to know what various numbers in plugin parameters, tracker fields and preferences are referring to, so that these can then be properly linked to the objects they refer to in a new install where the id's of everything may be different.
>
> At some point this was then extended so that object selectors can be displayed in prefs and tracker fields so you get a pretty list of category names, tracker fields, or file galleries etc instead of having to type in the comma separated list of id's, and following the recent plugin edit revamp i deployed this for wiki plugin params.
>
> One small hiccup i just found was that the other uses had a parent and parentkey option (so for instance, a tracker field selector could know which tracker to list the fields from for ItemLinks etc), however in plugins we already had a parent property for params so this was causing trouble until recently (i renamed the plugin ones parentval, still need to change the prefs and tracker usages to suit if we think it's worth it? or maybe i should do it the other way round - rename the current parent to parentparam or something and revert r62330? hmmm...)
>
> So anyway, wherever you see a plugin parameter that should be an object selector, just add the object type as the profile_reference on the param definition and it should magically appear in the edit form! (hopefully).
>
> HTH
>
> jb
>
> p.s. This could really do with a doc page on dev... i can't find anything like this there
>
>
>> On 25 Apr 2017, at 22:09, luciash <[hidden email]> wrote:
>>
>> Hi Jonny,
>>
>> just curious, what does it mean? profile_reference (now they work)?
>>
>> Thanks,
>>
>> luci
>>
>>
>> On 04/25/2017 02:12 PM, [hidden email] wrote:
>>> Revision: 62332
>>>            http://sourceforge.net/p/tikiwiki/code/62332
>>> Author:   jonnybradley
>>> Date:     2017-04-25 12:12:57 +0000 (Tue, 25 Apr 2017)
>>> Log Message:
>>> -----------
>>> [FIX] img: Missing file gallery profile_reference (now they work)
>>>
>>> Modified Paths:
>>> --------------
>>>      branches/17.x/lib/wiki-plugins/wikiplugin_img.php
>>>
>>> Modified: branches/17.x/lib/wiki-plugins/wikiplugin_img.php
>>> ===================================================================
>>> --- branches/17.x/lib/wiki-plugins/wikiplugin_img.php 2017-04-25 12:07:32 UTC (rev 62331)
>>> +++ branches/17.x/lib/wiki-plugins/wikiplugin_img.php 2017-04-25 12:12:57 UTC (rev 62332)
>>> @@ -82,6 +82,7 @@
>>>   'advanced' => true,
>>>   'default' => '',
>>>   'parent' => array('name' => 'type', 'value' => 'randomGalleryId'),
>>> + 'profile_reference' => 'file_gallery',
>>>   ),
>>>   'fgalId' => array(
>>>   'required' => true,
>>>
>>> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Tikiwiki-cvs mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Tikiwiki-cvs mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> TikiWiki-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
TikiWiki-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
Loading...