sfDoctrineActAsTaggablePlugin and csDoctrineActAsSortablePlu

Ask help about existing plugins, or find advice about the way to build up your own.

Moderators: dwhittle, Ian

sfDoctrineActAsTaggablePlugin and csDoctrineActAsSortablePlu

Postby Dvir » Sat Feb 05, 2011 9:53 pm

Hello,
I have started a big project and i have started to use plugins.

I have problems with the following:
sfDoctrineActAsTaggablePlugin
can't decide if this is a plugin,widghet,module or what.
there is some long document in the read me file but no basic explanation about what it do ?
it's not creating auto tags, you don't know if you need to embed some form or add some widget that you need to guess his name like "Tags" "Tag" or what.
this is the single doc' that i have found:
http://n8v.enteuxis.org/2010/05/adding- ... ator-form/
it looks super cool but still, I don't know where to start. can someone give me a direction? I have already installed the plugin and can see the tables and created admin gen for Tag
Image

csDoctrineActAsSortablePlugin
I'm getting this error when I try to batchDelete items, i guess it's because when i delete "2" and "1" and there are only 3 records.
Integrity constraint violation: 1062 _sortable_idx
http://www.vise.co.il
my symfony project:http://www.ablades.com
Dvir Levanon Programmer
User avatar
Dvir
Member
 
Posts: 51
Joined: Tue Jan 06, 2009 11:15 am
Location: Israel

Re: sfDoctrineActAsTaggablePlugin and csDoctrineActAsSortabl

Postby Dvir » Sat Feb 12, 2011 5:16 pm

if anyone want to know more about sfDoctrineActAsTaggablePlugin :
you need to set up a new widget in your lib->form->doctrine->TABLENAMEForm.class
and add this code inside configure() function

Code: Select all
$options['default'] = implode(', ', $this->getObject()->getTags());
if (sfConfig::get('app_a_all_tags', true))
{
  $options['all-tags'] = PluginTagTable::getAllTagNameWithCount();
}
else
{
  sfContext::getInstance()->getConfiguration()->loadHelpers('Url');
  $options['typeahead-url'] = url_for('taggableComplete/complete');
}

$options['popular-tags'] = PluginTagTable::getPopulars(null, array(),
false);
$this->setWidget('tags', new pkWidgetFormJQueryTaggable($options,
array('class' => 'tags-input')));
$this->setValidator('tags', new sfValidatorString(array('required' =>
false)));


after this if you are using admin generator you need to able this widget by editing genrator.yml file of the TABLENAME module.
and add "tags" inside form: display...
http://www.vise.co.il
my symfony project:http://www.ablades.com
Dvir Levanon Programmer
User avatar
Dvir
Member
 
Posts: 51
Joined: Tue Jan 06, 2009 11:15 am
Location: Israel


Return to General plug-ins

Who is online

Users browsing this forum: No registered users and 2 guests