This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Today's Messages (OFF)  | Unanswered Messages (ON)

Forum: Feature requests
 Topic: [Closed] [Admin Gen] Wish: String fields in filter match partially instead of wholly
[Closed] [Admin Gen] Wish: String fields in filter match partially instead of wholly [message #31904] Fri, 20 July 2007 21:33
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
Hi,

I notice that string fields in filter only returns those records that match exactly as typed. I.e., the underlying algorithm uses '=' or 'like match_str'. However,

I'd like that string fields in filter match only partially, i.e.,
the underlying algorithm uses 'like %match_str%'

EDIT:
wildcards (*) is supported.

[Updated on: Thu, 26 July 2007 19:40]


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
 Topic: [Admin Gen] Multiple views
[Admin Gen] Multiple views [message #31913] Fri, 20 July 2007 22:48
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
Hi,

After reviewing more than 10 PHP Frameworks, I pick symfony as my web-base RAD tool. I am not going to list all its advantages here, but of all of them, I found the automatic code generation (Admin Gen) and its MVC model is most important for me for the RAD task. So far all my symfony projects are based on Admin Gen.

But one thing I found symfony could use some improvements is its MVC model, well not the MVC model itself but the view part. The gist of the MVC model is that all business logics are handled at the M&C level, the view is just a thin presentation layer. The beauty of this is that we can have multiple views to the same module.

But so far the symfony AdminGen interface lacks the possibility to have multiple views to the same module. I think this is a very important concept of MVC model, and should be reflected in the symfony AdminGen design as well.

I wish that soon Admin Gen can allow more than one view (ie., generator.yml) for a table. So that we can tweak the fields shown, the themes etc.

[Edit] Solved:

http://www.symfony-project.com/forum/index.php?t=msg&&am p;th=8214&goto=34355#msg_34355

[Updated on: Tue, 28 August 2007 21:33]


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
 Topic: case sensitive action names
case sensitive action names [message #32442] Sat, 28 July 2007 16:54
lajkonik86  is currently offline lajkonik86
Messages: 190
Registered: June 2007
Location: The Netherlands
Senior Member
currently action names are case sensitive

so you an type

myproject/IndexMine
in your browser and it is not the same as
myproject/Indexmine

now as long as users are clicking around this is fine, but as soon as someone attempts to type something intro the address bar this becomes a usability nightmare.

action names should not be sensitive to case, by default in symfony.
 Topic: Input_date_tag - Leading Zero
Input_date_tag - Leading Zero [message #32956] Mon, 06 August 2007 22:31
gubartz  is currently offline gubartz
Messages: 4
Registered: August 2007
Location: Brasil
Junior Member
I was testing the input_date_tag WITHOUT rich text, and I noticed that the values generated for the html select for months and days go without a leading zero.

For exemple (1 => January, 2 => February, etc). Instead of 01 => January, 02 => February...

I'm currently using sqlite and there's a major problem with it. Because for Sqlite a date like 2007-01-01 is different from 2007-1-1. In fact the second form does not work at all, apparently sqlite does not support date data type.

Botton line, I think it would be nice to have an option for the input_date tag called 'leading_zero', which would put the leading zeros for values from 1-9.

Thanks.

[Updated on: Mon, 06 August 2007 22:33]

 Topic: sfSQLiteCache cannot take "cacheDir" as an option
icon13.gif  sfSQLiteCache cannot take "cacheDir" as an option [message #33441] Wed, 15 August 2007 14:04
rihad  is currently offline rihad
Messages: 223
Registered: May 2007
Faithful Member
%SF_DATA_DIR%/config/factories.yml has
default:
 view_cache:
    class: sfFileCache
    param:
      automaticCleaningFactor: 0
      cacheDir:                %SF_TEMPLATE_CACHE_DIR%


my config/factories.yml has
all:
  view_cache:
    class: sfSQLiteCache
    param:
      automaticCleaningFactor: 0
#      cacheDir:                %SF_TEMPLATE_CACHE_DIR%


Quote:


Error: sfSQLiteCache cannot take "cacheDir" as an option



This, and all other configuration bugs, are embarrassing! Why not
first take Symfony out of its pre-alpha stage, and _then_ start
advertising its support of numerous unrivaled features!! Sad((
 Topic: input sanitization with sfRequest:setParameter(...) not working with the cache on
input sanitization with sfRequest:setParameter(...) not working with the cache on [message #33505] Thu, 16 August 2007 11:07
rihad  is currently offline rihad
Messages: 223
Registered: May 2007
Faithful Member
Hi, in my app I have an action displaying a list of items, and a validateList() action that goes something like:


<?php
public function validateList()
{
    if (!
in_array($this->getRequestParameter('sort-by'), array('field1''field2')))
        
$this->getRequest()->setParameter('sort-by''field1');
    return 
true;
}
?>

So far so good. The dreaded E_NOTICE

Quote:


Notice: Undefined index: mymodule/list?sort-by=field1 in /usr/local/share/pear/symfony/filter/sfCacheFilter.class.php on line 118



appears as soon as I turn caching on in settings.yml:
Quote:


cache: on



See also Ticket #2102
 Topic: Integration of Google Gears
icon7.gif  Integration of Google Gears [message #34645] Fri, 31 August 2007 09:44
julianstricker  is currently offline julianstricker
Messages: 11
Registered: August 2007
Location: Italy
Junior Member

Are there plans to integrate Google Gears ( http://code.google.com/apis/gears/ ) into Symfony?
Or is someone writing a Plugin for Google Gears?
I think that the ability to work with a Symfony application even if there is no connection to the net would be a great feature!
 Topic: zoop framework's forms2 for symfony
zoop framework's forms2 for symfony [message #36351] Wed, 26 September 2007 17:22
excessivedemon  is currently offline excessivedemon
Messages: 49
Registered: March 2007
Member
hi guys.. wouldn't it be nice to incorporate something similar to this for symfony's forms helper??? http://zoopframework.com/ss.4/7020/From%20A%20to%20Zoop%20:% 20Forms2.html
 Topic: object_select_tag -> set a own default value
object_select_tag -> set a own default value [message #36394] Thu, 27 September 2007 12:10
JackJones  is currently offline JackJones
Messages: 67
Registered: February 2007
Member
I search for a possibility to set a own default selected value:

Now, i have to write this one:
<?php echo select_tag('contact_id', objects_for_select(ContactPeer::getClientContacts(),'getId','__toString',$calendar->getContact() != '' ? $calendar->getContact() : $sf_user->getAttribute('historyContactId'))) ?>


i like to write something like this:
<?php echo object_select_tag($calendar, 'getContactId', 'default_selected_value' = $sf_user->getAttribute('historyContactId')) ?>


I hope, you will understand my problem. (sorry for my english)

[Updated on: Thu, 27 September 2007 12:14]

 Topic: tie data in admin generator with specific users/groups
tie data in admin generator with specific users/groups [message #36982] Mon, 08 October 2007 17:33
mozey  is currently offline mozey
Messages: 19
Registered: September 2007
Junior Member
Hello symfony,

The admin generator is a truly powerful tool. I would like to be able to administer the data which belongs to a given user/group. This could be specified in generator.yml as such:

generator:
  class:              sfPropelAdminGenerator
  param:
    model_class:      Post
    theme:            default
    css:              admin/admin.css

    tie:              user_id, current_session_user_id
    # Where user_id is a tuple in our model_class 
    # and current_session_user_id is a getter that 
    # i specified.  



Or

generator:
  class:              sfPropelAdminGenerator
  param:
    model_class:      GeoLocalPost
    theme:            default
    css:              admin/admin.css

    tie:              group_id, session_ip_group_id
    # Where user_id is a tuple in our model_class 
    # and session_ip_user_id determins what geo
    # group the current visitor is from!



thanks for your consideration, and for the excellent product. Cool
 Topic: input_in_place_editor_tag with form_error
icon6.gif  input_in_place_editor_tag with form_error [message #37806] Sat, 20 October 2007 15:13
enigma
Messages: 94
Registered: March 2007
Location: Poland
Member
Hi Smile
Have somebody idea to create helper input_in_place_editor_tag which also will add form_error


PaweĊ‚ Ryznar - programista JAVA :: Love IT - devBlog
 Topic: Functional Tests - Nested Tests & Folders
icon4.gif  Functional Tests - Nested Tests & Folders [message #38999] Wed, 07 November 2007 22:13
kylerclarke  is currently offline kylerclarke
Messages: 3
Registered: November 2007
Location: New Zealand
Junior Member
Currently when running functional tests, the process ignores any form of file structure. So running

symfony test-functional folderBar/fooTest.php

is identical to

symfony test-functional fooTest.php

The file system will obviously allow same named files as they're in different folders, however the lime views the test as one. Incidentally, if you try to run this test, the output error is that of output headers already (even with output buffering on/off) sent so I presume it chains the 2 together.

There's some easy gains in having a folder structure. As much as I can create unique unweilding test names, I'd much prefer to have these grouped in folders etc.

This has come about due to the number of tests in our current app & to follow DRY principles, I want to nest tests inside tests (which I can still do with unique names) & make our test suite a lot easier to manage.

Are there any plans to implement this?
Thanks
K
 Topic: accesskeys for actionButtons
accesskeys for actionButtons [message #39584] Thu, 15 November 2007 17:09
master_p  is currently offline master_p
Messages: 16
Registered: April 2007
Location: Hamburg, Germany
Junior Member
Hi,

the "getButtonToAction" accepts various numbers of options. But unfortunately no 'accesskey'-option. That would be very useful, if one could do that.

Greetings from Hamburg
 Topic: Have an helper managing links in i18n sentences?
Have an helper managing links in i18n sentences? [message #40218] Sat, 24 November 2007 13:15
mlier  is currently offline mlier
Messages: 101
Registered: May 2006
Senior Member
What about to have an helper managing links inside an i18n sentence?

For instance : 5 livres sont visibles pour cet auteur

In the message.fr.xml
<trans-unit id="1">
<source>[a-link1]%1% books are visible[/a-link1] for this [a-link2]author[/a-link2]</source>
<target>[a-link1]%1% livres sont visibles[/a-link1] pour cet [a-link2]auteur[/a-link2]</target>
</trans-unit>


In PHP
echo format_with_links('[[a-link1]%1% books are visible[/a-link1] for this [a-link2]author[/a-link2]', 
array('%1%' => count_books(),
'[a-link1]' => 'http://myserver.com/tovisiblebooks'
'[a-link2]' => 'http://myserver.com/toauthor'
))


 Topic: Try to add performance website ideas of Yahoo in Symfony
Try to add performance website ideas of Yahoo in Symfony [message #40480] Wed, 28 November 2007 15:21
mlier  is currently offline mlier
Messages: 101
Registered: May 2006
Senior Member
In http://developer.yahoo.com/performance/ Steve Souders,
Chief Performance Yahoo! explains how to make website work better.

What about takes some ideas inside Symfony :
For instance :
* Move Scripts to the Bottom (to be able to define where to put js)
* Minify JavaScript (have a plugin with jsmin to minify js in prod)
 Topic: [sfWebBrowserPlugin] Vote for New Autoreferer Function (code included)
[sfWebBrowserPlugin] Vote for New Autoreferer Function (code included) [message #43411] Tue, 15 January 2008 05:06
upandhigh  is currently offline upandhigh
Messages: 22
Registered: January 2008
Junior Member

Do you think sfWebBrowser must officially include Referer headers support?[ 1 vote(s) ]
1.Yes, ofcourse it must be there! 1 / 100%
2.Nope, just another bytes will waste my space on server 0 / 0%

Hello guys, some hours ago I began to use sfBrowserPlugin - it's really not bad - but I found that it doesn't include any ability to change/follow Referer header. Ofcourse you can set it with additional headers on each request, but what about autoreferering?

Here is my implementation - but I know it can be better, maybe manual setReferer method also must be included - so waiting for your ideas how to improve that. (Or maybe it's already done? Confused )

Also your votes for including this patch into official release - will be great.

P.S.: Here is my code example - how it could be in my opinion http://trac.symfony-project.com/ticket/2794

 Topic: RESTful support!
RESTful support! [message #45961] Wed, 20 February 2008 17:17
stork  is currently offline stork
Messages: 3
Registered: February 2008
Junior Member
For instance, map a "user" resource to get the following behaviour:

METHOD			HTTP VERB	PATH		ACTION
-------------------------------------------------------------------
users_path		GET		users		index
user_path(id)		GET		user/1		show
new_user_path		GET		user/new	new
users_path		POST		users		create
edit_user_path		GET		user/1/edit	edit
user_path(id)		PUT		user/1		update
user_path		DELETE		user/1		destroy


this kind of feature is a must-have, can't understand why it is not already possible..


 Topic: Two minor things..
Two minor things.. [message #46002] Thu, 21 February 2008 09:32
skyblaze  is currently offline skyblaze
Messages: 205
Registered: January 2008
Faithful Member
I think actions class file that is generated when we use the symfony command to generate a module, should use our actions class file name (that is named after the module name) as always, but should inherit not directly from sfActions but from another empty class where we could put our own private methods for internal use....than this class will inherit from sfActions.
Another thing is the possibility to abilitate a custom filter only for certain actions of a module/actions class file as it works for the built in security filter.
 Topic: format_date $inputFormat
format_date $inputFormat [message #46156] Fri, 22 February 2008 17:38
dwin  is currently offline dwin
Messages: 7
Registered: February 2008
Junior Member
Today I modified my local copy of symfony. I modified the format_date function :

* added a $inputFormat parameter
* added this parameter to the format(...) method call

I saw that the format() method already accepted that parameter but in format_date it was set to null.

This was useful for me to format rich date input component which seems to not accept formatted input date.

echo input_date_tag('date', '22/02/2008')

return something like :

<input ... value="2008/02/2022">

so I made this hack :

echo input_date_tag('date', format_date('22/02/2008', 's', null, null, 'd'))

function format_date($date, $format = 'd', $culture = null, $charset = null, $inputFormat = null)
{

  ... some code ...

  return $dateFormats[$culture]->format($date, $format, $inputFormat, $charset);
}


Dunno the "rightfulness" of this.
Please comment and correct me ! Smile
 Topic: Bacticks quoting around mysql identifiers...
Bacticks quoting around mysql identifiers... [message #46513] Wed, 27 February 2008 09:33
skyblaze  is currently offline skyblaze
Messages: 205
Registered: January 2008
Faithful Member
This is an issue coming from propel and it is unresolved. When we try to name our mysql tables and/or columns with a mysql keyword, if this identifier is not "backticked" mysql generate an error! We need backticks around these identifiers in generated sql.
 Topic: Creating a custom filter
Creating a custom filter [message #48915] Tue, 01 April 2008 09:14
shobha.solanki  is currently offline shobha.solanki
Messages: 2
Registered: April 2008
Junior Member
I want to create an application level filter that will store certain values like searchIds , search Parameters in a table when a url is clicked or when a search form is submitted .This has to be done across many modules not only for search.Please let me know how to do the same using filters.If some body has done something of this nature , i need help.

[Updated on: Tue, 01 April 2008 09:15]

 Topic: plugins installation... My wishes !
icon3.gif  plugins installation... My wishes ! [message #49206] Fri, 04 April 2008 14:51
jugjug  is currently offline jugjug
Messages: 8
Registered: June 2007
Junior Member
Hi,

Sum up of my idea :

I would found better to have a main plugins directory for all my projects. Then, in each projects/application, I could activate a plugin through a plugins.yml config file.

The problem :
Let say I have the following directory structure:
# symfony lib dir
/usr/share/php5/symfony

# my projects dir
/var/www/project1
/var/www/project2
/var/www/project3
/var/www/project4


Actually, when I want to install a plugin in my project, I have to go in its directory (/var/www/project1) and use the plugin-install command. (symfony plugin-install a_plugin)

If I want to use the AGAIN plugin in my second project, I have to use go in its directory (/var/www/project2) and install it AGAIN ! (symfony plugin-install a_plugin)


That's working fine, no pb...


I receive the weekly news letter from symfony. Read it an notice that "a_plugin" has been updated ! So now, I have to go through all my project's directories in order to execute the command plugin-upgrade... Again, and again!


What I do actually :
I created a fake projects in /var/www/fake
Each time I install a new plugin, I go in /var/www/fake to execute the plugin-install command.
If I want to use this plugin in a "real" project, I create a symbolic link to it in the project plugins directory : ln -s /var/www/fake/plugins/a_plugin /var/www/project3/plugins/a_plugin... Of course this a Linux only way to do !
The good thing with that is that I just need to upload a plugin once and it will be applied to all the projects that use it!

What could be great :
Why not installing plugins in a /usr/share/php5/symfony/plugins directory !
Then, I activate this plugin per project in a plugins.yml file...
plugins:
  - sfGuardPlugin
  - actasnested
  - sfPropelActAsSluggablePlugin   



Starting from this point, we can imagine the following features :

* keeping the ability to install plugin localy. The plugins.yml file would look like :
plugins:
  local:
    - sfGuardPlugin
  global:
    - actasnested
    - sfPropelActAsSluggablePlugin   


* Having the possibilities to have a centralised configuration point for plugins
plugins:
  local:
    sfGuardPlugin:
      routes_register: false
      profile_class:      sfGuardUserProfile
      profile_field_name: user_id

  global:
    sfPropelActAsNestedSetBehaviorPlugin: {}
    sfPropelActAsSluggableBehaviorPlugin: 
      separator: '_'
      permalink: true

    sfPropelActAsApprovableBehaviorPlugin: { disabled_application: [backend] }   


* And for Linux users... Using packages would make plugin installation/updates easy and logical :
apt-get install php5-symfony-sfGuardPlugin
apt-get upgrade

For others : symfony plugin-upgrade x


What do you think about it ?


Bye
Julien

 Topic: Roadmaps for Propel1.3 / Doctrine
Roadmaps for Propel1.3 / Doctrine [message #49649] Thu, 10 April 2008 14:35
rickb  is currently offline rickb
Messages: 61
Registered: July 2007
Location: Hampshire, UK
Member
Hi all,

Both Propel 1.3 and Doctrine offer significantly improved performance over Propel 1.2. But both are at beta release.

There's a very useful comparison page here
http://trac.symfony-project.com/wiki/ComparingPropelAndDoctr ine
for anyone not familiar with the issues.

My website is using Propel 1.2 and I am trying to decide how long this will remain so.

My questions:

* do you know what the release roadmaps are for Propel 1.3 and Doctrine?

* how long are they likely to remain at beta?

* is there widespread take-up of the existing beta versions on production websites or are people holding back for the full releases?


Rick
 Topic: Is there any plugins for Server to Server database syncronization
Is there any plugins for Server to Server database syncronization [message #50060] Wed, 16 April 2008 08:14
arunet  is currently offline arunet
Messages: 3
Registered: April 2008
Location: Kadampanad , Adoor
Junior Member

Is there any plugins for Server to Server database syncronization ?
 Topic: What symfony will be...?
What symfony will be...? [message #50248] Fri, 18 April 2008 08:46
cysin  is currently offline cysin
Messages: 30
Registered: July 2007
Member
I've been using symfony for a long time and what I can say...is..uh...symfony is great. It helps me a lot in my work.
I've just tried the new form in symfony 1.1 and I can see that it is a big change from 1.0 to 1.1. Though 1.1 is compatiable with 1.0, I do not think upgrading old projects is necessary in order to avoid compatibility issues. I really wonder what the blueprint of symfony is, what it will be in 1.2, 2.0...? Very Happy
 Topic: input_date_tag doesn't localize??
input_date_tag doesn't localize?? [message #50380] Sun, 20 April 2008 01:56
omoratin  is currently offline omoratin
Messages: 144
Registered: December 2005
Senior Member
Hi,

The documentation says input_date_tag automatically ouputs a date or a format according to the culture. However I can only see a SQL-like data and have to force the formatting?
http://www.symfony-project.org/book/1_0/13-I18n-and-L10n

Is it a bug or am I doing something wrong?

Thanks
 Topic: sfView::success with GET datas
sfView::success with GET datas [message #51779] Sun, 11 May 2008 17:38
julien_iz  is currently offline julien_iz
Messages: 2
Registered: May 2008
Junior Member
PROBLEM SOLVED (it came form somewhere else)thank you, closed topic


Hi!

I'mon the page [...]user/edit/id/2

I type incorrect datas in some field, so I want to be redirected on the same page with the error messages.

I use
public function handleErrorLogin
{
 return sfView::SUCCESS;
}


Instead of being redirected on the same page (user/edit/id/2), i'mredirected on user/edit only, wich isa problem. How can I solve that?

Thanks a lot for your help (I didn't find this information in documentation)

Julien_iz

Edit:

$this->redirect doesn't display errors form the validate, so it's not a solution

[Updated on: Mon, 12 May 2008 21:28]

 Topic: better exception catching in sfGenerator
better exception catching in sfGenerator [message #52537] Thu, 22 May 2008 15:54
saitta  is currently offline saitta
Messages: 4
Registered: July 2007
Junior Member
The Generated code deals only with problem about deleting something:

  public function executeDelete()
  {
    $this->permessi = PermessiPeer::retrieveByPk($this->getRequestParameter('id_user'),
                        $this->getRequestParameter('id_app'));
    $this->forward404Unless($this->permessi);

    try
    {
      $this->deletePermessi($this->permessi);
    }
    catch (PropelException $e)
    {
      $this->getRequest()->setError('delete', 'Could not delete the selected Permessi. Make sure it does not have any associated items.');
      return $this->forward('adm_grant', 'list');
    }

    return $this->redirect('adm_grant/list');
  }


but no catch in save (insert/update)

public function executeEdit()
  {
    $this->permessi = $this->getPermessiOrCreate();

    if ($this->getRequest()->getMethod() == sfRequest::POST)
    {
      $this->updatePermessiFromRequest();

      $this->savePermessi($this->permessi);
      
      $this->setFlash('notice', 'Your modifications have been saved');

      if ($this->getRequestParameter('save_and_add'))
      {
        return $this->redirect('adm_grant/create');
      }
      else if ($this->getRequestParameter('save_and_list'))
      {
        return $this->redirect('adm_grant/list');
      }
      else
      {
        return $this->redirect('adm_grant/edit?id_user='.$this->permessi->getIdUser().'&id_app='.$this->permessi->getIdApp());
      }
    }
    else
    {
      $this->labels = $this->getLabels();
    }
  }



But you can have a lot of problem with key duplication or foreign keys, so probably is better to deal also with save.

public function executeEdit()
  {
    $this->permessi = $this->getPermessiOrCreate();

    if ($this->getRequest()->getMethod() == sfRequest::POST)
    {
      $this->updatePermessiFromRequest();

      try
      {
	  $this->savePermessi($this->permessi);
      $this->setFlash('notice', 'Your modifications have been saved');
      }
      catch (PropelException $e)
      {
      $this->getRequest()->setError('save', 'Could not save.');
      return $this->forward('adm_grant', 'list');
      }

      if ($this->getRequestParameter('save_and_add'))
      {
        return $this->redirect('adm_grant/create');
      }
      else if ($this->getRequestParameter('save_and_list'))
      {
        return $this->redirect('adm_grant/list');
      }
      else
      {
        return $this->redirect('adm_grant/edit?id_user='.$this->permessi->getIdUser().'&id_app='.$this->permessi->getIdApp());
      }
    }
    else
    {
      $this->labels = $this->getLabels();
    }
  }



_list_messages.php
<?php
// auto-generated by sfPropelAdmin
// date: 2008/05/22 14:30:29
?>
<?php if ($sf_request->getError('delete')): ?>
<div class="form-errors">
  <h2><?php echo __('Could not delete the selected %name%', array('%name%' => 'Permessi')) ?></h2>
</div>
<?php endif; ?>
<?php if ($sf_request->getError('save')): ?>
<div class="form-errors">
  <h2><?php echo __('Could not save %name%', array('%name%' => 'Permessi')) ?></h2>
</div>
<?php endif; ?>

 Topic: textarea_tag enhancement
textarea_tag enhancement [message #55125] Mon, 30 June 2008 01:03
JMarkMurphy  is currently offline JMarkMurphy
Messages: 21
Registered: June 2008
Junior Member
In order for forms with a textarea to validate properly, I always have to add the cols and rows attributes to the testarea_tag helper. How about you add these by default? Seems to me that I shouldn't have to do anything special to make a page validate properly, particularly when using helpers.

[Updated on: Mon, 30 June 2008 01:04]

 Topic: Widget description rendering
Widget description rendering [message #55182] Mon, 30 June 2008 15:40
gEndelf  is currently offline gEndelf
Messages: 9
Registered: June 2008
Junior Member
It will be better to add description to controls (form framework)

for example

$this->setWidgets(array(
      ...
      'version' => new sfWidgetFormSelect(..., array("description" => "Choose the version(s) which best applies to your post.")),
      ...
    ));


by default - description will be empty, otherwise description will be rendered under control

index.php/fa/807/0/

[Updated on: Tue, 01 July 2008 07:56]

 Topic: validator set
validator set [message #56722] Tue, 22 July 2008 14:38
swapo  is currently offline swapo
Messages: 50
Registered: July 2008
Location: Germany
Member
I think it'd be nice to have more abilities with set validators (sfValidatorAnd and sfValidatorOr so far).

I started with having to validate that one of two fields has to be filled in, but not both, so basically a classic xor operation. You can do this with the existing validators but it gets very complex with more fields.

So I wrote a xor validator, which is basically a slightly modified and/or validator.

But then I thought a little further and might find it useful to be more specific about how many validators have to pass. Or are allowed to fail. And so on.

So I thought of a second validator (called sfValidatorSet for now), which allows you to specify:

  • How many validators have to pass
  • How many validators may pass
  • How many validators may fail
  • How many validators have to fail


E.g.
<?php
$validators 
= array(new SomeValidator(), new AnotherValidator());


$andValidator = new sfValidatorSet($validators, array('max_errors' => 0));
// same as
$andValidator = new sfValidatorAnd($validators);


$orValidator = new sfValidatorSet($validators, array('min_passes' => 1));
// same as
$orValidator = new sfValidatorOr($validators);


$xorValidator = new sfValidatorSet($validators, array('min_passes' => 1'max_passes' => 1));
// same as
$xorValidator = new sfValidatorOr(array(
  new 
sfValidatorAnd(array(
    new 
SomeValidator(),
    new 
AnotherValidatorFail()
  )),
  new 
sfValidatorAnd(array(
    new 
SomeValidatorFail(),
    new 
AnotherValidator()
  ))
));
// or
$xorValidator = new sfValidatorXor($validators);
?>


This isn't meant to replace sfValidatorAnd or sfValidatorOr but to give you an extra option. I guess the last example speaks for itself.

I'd love to see something like this in the symfony core.

What do you think?

 Topic: Make i18n lighter in admin module.
icon3.gif  Make i18n lighter in admin module. [message #56967] Thu, 24 July 2008 21:11
whalexis  is currently offline whalexis
Messages: 207
Registered: July 2008
Faithful Member
Hi all,

I18n work fine in Symfony, and is very easy.
But i saw that in an admin generated module, I have to translate twice the fields name. I have to translate the raw field name (ex: myColumnName) and the field name with a colon(ex: myColumnName:).

It should be nice to translate the field once and have the colon outside the translation function. And add translation to the colon to handle if it should have (or not) a space before and/or after according to the selected language.

Maybe it's not a good idea for speed. Let me know.

Thanks

Alexis
 Topic: Feed OutSide display only latin symbol http://feeds.feedburner.com/symfony/planet
Feed OutSide display only latin symbol http://feeds.feedburner.com/symfony/planet [message #57642] Sat, 02 August 2008 10:07
ingvar  is currently offline ingvar
Messages: 21
Registered: July 2008
Location: Ukraine
Junior Member
I wrote message in Russian language.

On page http://www.symfony-project.org/community I see text is correct UTF-8.

If look the http://feeds.feedburner.com/symfony/planet I see error:

<entry>
  <title>Symfony, ?? ???????????????? ???????????????? ?????????? ??????!</title>
  <link rel="alternate" href="http://tigor.com.ua/blog/2008/08/01/symfony-plugins-have-a-new-home/"></link>
  <updated>2008-08-01T21:38:14Z</updated>
  <author>
    <name>Igor</name>
  </author>
  <id>http://tigor.com.ua/blog/?p=287</id>
 Topic: FirePHP for debugging
FirePHP for debugging [message #60669] Wed, 10 September 2008 17:58
MrMoins  is currently offline MrMoins
Messages: 8
Registered: May 2008
Location: Marseille, France
Junior Member

Hello,
what about integrating FirePHP for debugging with FireBug (firefox plugin) ?

http://www.firephp.org/

I think it was pretty cool fonction, what do you think about?

EDIT: Shame on me !!! http://www.firephp.org/Wiki/Libraries/Symfony

[Updated on: Wed, 10 September 2008 18:00]

 Topic: i18n:extract gettext
i18n:extract gettext [message #66983] Sat, 06 December 2008 13:53
Murena  is currently offline Murena
Messages: 41
Registered: October 2008
Member
WOuld be great if i18n:extract task could also save strings in gettext po files.
 Topic: Return Types in Model Class Generation
Return Types in Model Class Generation [message #68302] Sun, 21 December 2008 01:45
someone1  is currently offline someone1
Messages: 16
Registered: August 2008
Location: New Jersey
Junior Member
Why aren't return type comments generated with the propel:build-model call? For instance, the <class>Peer::doSelectOne(...) should return a type <class>, and if a simple comment such as:

/**
*@return <class>
*/

was included, it would enable easier auto-completion with Eclipse..


Or did i do something wrong and auto complete can be used for that?

Thanks!
 Topic: Plugins Feature Request
Plugins Feature Request [message #69436] Thu, 08 January 2009 07:20
scott_dev  is currently offline scott_dev
Messages: 40
Registered: August 2008
Member
Hello Friends,
I am requesting some of the plugin requests.

1] Rating
2] Admin can see number of downloads. Download details.
3] Admin can not change it's role to developer if there are no developer or packager. It makes big problem.Which changing it's role it should display error message.

Suggestions are welcome from all symfonians.

 Topic: Bug to fix in symfony 1.1.6, propel-build-sql + oracle => CREATE INDEX x2
icon4.gif  Bug to fix in symfony 1.1.6, propel-build-sql + oracle => CREATE INDEX x2 [message #70943] Wed, 28 January 2009 15:12
spipu  is currently offline spipu
Messages: 5
Registered: January 2009
Location: Paris, France
Junior Member
see here : http://forum.symfony-project.org/index.php/t/18437/
 Topic: Insert onsubmit code with form_remote_tag
Insert onsubmit code with form_remote_tag [message #71272] Mon, 02 February 2009 20:04
maxmil  is currently offline maxmil
Messages: 2
Registered: January 2009
Junior Member
For client side validation using Ajax it would be very handy if the form_remote_tag took notice of the onsubmit html option in order for code to be inserted before the "new Ajax.Updater(...." in the resulting form tag.
 Topic: adding LDAP back-end as RDBMS in symfony
icon5.gif  adding LDAP back-end as RDBMS in symfony [message #71467] Wed, 04 February 2009 17:50
gully  is currently offline gully
Messages: 1
Registered: February 2009
Location: France
Junior Member
Hi,

Is it possible adding an LDAP backend to store data ? It could be a propel-ldap or a doctrine_ldap.
This work has done in the ruby community (activeLDAP). But your framework is more interested than rails.

regards,
Pages (169): [ «  <  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  >  »]

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software