Where to put fixtures in custom plugins? - plugins

I have a custom plugin in Symfony 1.4 and I want to add some fixtures to database. Where shall I put the file fixtures.yml ?
Or shall I put it in ROOTPROJECT/data/fixtures/fixtures.yml ? Actually I want to keep data in the plugin as far as possible.

you can also put them in ROOT/plugins/yourPlugin/data/fixtures/fixtures.yml.

Related

How to use pagination for the asset publisher custom application display template in Liferay?

I have created one ADT for asset publisher and here im fetching all the documents from a specific folder ,here my problem is that we want to use existing pagination,we have configured the simple pagination, but still the result not coming properly.so is there any alternate way to use the existing pagination with our custom ADT.
Thanks & Regards,
P.v.B.Raju.
As far as I know, there is no way to paginate in Freemarker by default. For custom pagination, you have to override Liferay's core JSP here, which is very unfortunate. If you've found another solution, please share it here.

How to put multiple forms in the same page using joomla?

I'm using CKForms to create 3 forms, so far, they are independent components, I would like to put them in the same page.
This manual could help :
http://joomlacode.org/gf/download/frsrelease/12021/48586/manual_ckforms-EN-1.3.4.pdf
In order to use multiple instances of the same component in a joomla page, you have to check if there is a module or a plugin available.
If there is an option for a module you could publish each instance in a module position.
If there is a plugin, you could create an article (or a module in some cases) and add plugin code to load plugin instance.
Checking CKForms site I could see that there are both options.
Hope this helps

How to extend Alfresco Share existing activity list dashlet with my own activity type?

In Community 4.0.a, I'm posting my custom activities in the repo following this: http://wiki.alfresco.com/wiki/3.0_Activities_Developer_Guide
I have defined my own activity type, with custom bundles and pagelink to display custom needs in the activity dashlet.
But I face an issue, I need to specialize the output based on the activity-type in a similar way of what is done already in activity-list.get.js in the specialize() function.
I can't hack the js cause I'm packaging things in my own amp for Share.
What is the best way to do it? Is there some kind of extension point or do I need to override completely the dashlet?
The old way (3.x) to change the behaviour of a webscript controller is to copy the code and overwrite the Javascript by placing it under web-extension: alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/activity-list.get.js. There you can modify the specialize() function or whatever you need to do.
All files you place in the alfresco/web-extension/site-webscripts folder will replace original files in the share.war WEB-INF/classes/alfresco/site-webscripts classpath. Best practice is to place your customizations in the tomcat/shared/classes/alfresco/web-extension folder so you don't need to modify the WAR file.
Alfresco 4.0 provides a new way to change the javascript controllers of a webscript. You can add additional Javascript code that will run after the original code. This is preferable because you don't need to change original code and you can upgrade more easily later. To use it you need to get familiar with the new Share extension modules concept. See David Draper's Blog for more info on that.

Modify programmatically plugin parameters joomla

I would like to make a plugin that lets you use the google fonts. But I want the user to be able to choose from all fonts available. To do this I cannot use a static xml manifest for the menu but I need to create a updated list of the fonts in real time.
So how can I modify the plugin parameters programmatically? Is it also possible to use javascript to add some behavior to the menus for some ajax work?
Thanks
You need to create a custom element and add it to the plugin's xml file.
The following doc will let you know how to add custom element to a form.
You just need to change it according to your needs.
http://docs.joomla.org/Adding_a_multiple_item_select_list_parameter_type
This doc is just for example, you should be able to use this exact code, for example, you need not worry about saving the params. Joomla automatically saves the params of any plugin.

How to extract labels from Symfony forms I18n Extract Task

I am quite aware that the extract task accepts application as a parameter, and thus one can't expect it too look into the forms folder.
However, I referred the link (below) and tried a couple of ways:
1. defining my proxy __() method
2. including the I18n helper in App Configuration
However, both aren't working.
Can anyone tell me how to extract these from the form classes?
Thanks
http://groups.google.com/group/symfony-devs/browse_thread/thread/1d034f5f7367fe0c
You need to use the i18n helper and add the translated strings manually to your XML/XLIFF files. The translations themselves work, it's just the i18n:extract task that doesn't look inside form classes so it has to be done manually. I hope they add this feature in Symfony 2.0.
See the first few paragraphs here: http://www.symfony-project.org/forms/1_4/en/08-Internationalisation-and-Localisation
There's a way to extract it altough it's not recommended by the developers:
In lib/i18n/extract/sfI18nApplicationExtract.class.php add:
$this->extractFromPhpFiles(sfConfig::get('sf_lib_dir').'/form');
to function extract()
In your form class's configure method add:
sfLoader::loadHelpers('I18N');
This way you can use the __() function in your form class.
I'm currently testing it. Will share my findings.