Hi everyone. I want to create a module for Categories. Every category
has 1 or more images. The i18n fields are: title and description.
Basically, I have in CategoriesForm.class.php (I won't put the exact
script, but the essencial things just to show you my point. It would
be too long if I put the
I have another quick question about what I've posted. In the model of
de record, let's say the model Image following my last post.. I need
to override the save function to add the logic to generate
thumbnails and to delete files if needed. Let's say that my function
is the one that posted before:
After a little research on Google for this topic I've found certain
posts that talk about situations like this (but not the same) so I
thought on posting this.
I have a typical relation between two models, Item and Attachment,
making a One-to-Many relationship. On my Attachment model I tried to
mydomain.com is not a folder. You should have something like
$this-setWebDir( $this-getRootDir() . DIRECTORY_SEPARATOR .
'myPublicFolder' ); And I would check with the check_configuration.php
script.
The directory structure should be something like this (I use what I did on
Linux shared hostings
In my opinion, if you need the app almost ready for september.. use a
lightweight framework like Codeigniter or ,as you said, with CakePHP (if
you've worked with them). You can do a lot of things fast enough with the
admin generator of Symfony and the development of the frontend with its
template
Are you using include_javascripts(); and include_stylesheets() functions
on the head tag of the layout?
On Tue, Jul 20, 2010 at 7:15 AM, comb sa...@gmx.net wrote:
Symfony 1.4 + Doctrine 1.2
Any ideas? :-)
On 20 Jul., 11:58, Tom Ptacnik to...@tomor.cz wrote:
Which version of Symfony do you
too, not a
beautiful solution, but it works.
On 20 juil, 15:05, Gustavo Adrian comfortablynum...@gmail.com wrote:
After a little research on Google for this topic I've found certain
posts that talk about situations like this (but not the same) so I
thought on posting this.
I have
If I'm wrong, please, correct me, but didn't the routing framework take the
action index by default, so you can avoid tu put it on the URL?
BTW, Why do you think is not clean to put the rules on the routing.yml?
On Wed, Jul 21, 2010 at 6:51 AM, snoop mehdi.ha...@gmail.com wrote:
Hi all,
I
I managed to do whay you mention by changing some templates of the module
autogenerated for the backend. In _form_fieldset.php you have the loop that
iterates over the fields. You could then check the name of the field and, if
it's the name of the embedded form, you could then surround it by a div
Hi,
Did you try to disable local caching on the action with headers
Cache-control and Pragma to see what happens?
$this-getResponse()-setHttpHeader(Cache-Control, no-cache);
$this-getResponse()-setHttpHeader(Pragma, no-cache);
$this-getResponse()-setHttpHeader(Expires, 0);
On Thu, Jul 22, 2010
I've recently upgraded sfDoctrineGuardUser from 4.0.1 to 5.0.0 but when
doing the rebuild of the db, models, forms... etc, it throws this error:
SQLSTATE[HY000]: General error: 1005 Can't create table
'estudio_development.#sql-29d0_228a' (errno: 150). Failing Query: ALTER
TABLE comment ADD
I've just seen prestaPaypalPlugin (
http://www.symfony-project.org/plugins/prestaPaypalPlugin) but I didn't try
it.
I'd like to know about this topic too. Any comment about it will be much
appreciated.
On Wed, Jul 21, 2010 at 5:53 PM, f1gm3nt f1gm...@gmail.com wrote:
Has anyone used any type
mkkp...@gmail.com
Hi,
2010/7/23 Gustavo Adrian comfortablynum...@gmail.com:
I've recently upgraded sfDoctrineGuardUser from 4.0.1 to 5.0.0 but when
doing the rebuild of the db, models, forms... etc, it throws this error:
SQLSTATE[HY000]: General error: 1005 Can't create table
Don't matter. I forgot to enable the plugin again in
projectConfiguration.class.php
Thanks!
On Fri, Jul 23, 2010 at 5:44 PM, Gustavo Adrian comfortablynum...@gmail.com
wrote:
First of all, thanks for the quick response!
I've just installed from trunk of the svn repository the plugin as you
Look at the answer of Michal. You have to use the SVN trunk version
On Sat, Jul 24, 2010 at 5:57 AM, Sela Yair tzi...@gmail.com wrote:
anyone has tried to upgrade from 4.0.x to 5.0.0 of sfGuardDoctrine ? as i
get an erro
On 23 July 2010 21:47, Gustavo Adrian comfortablynum...@gmail.com wrote
Check the path of that class to see if it exists. If that's so, try to
remove the cache manually (not with ./symfony cc)
On Mon, Jul 26, 2010 at 11:23 AM, Tristan tristan.bessou...@gmail.comwrote:
When i rebuild my model, it outputs the same error at a different
line.
php symfony cc as many
Also, double check that the plugin is enabled on
ProjectConfiguration.class.php
On Mon, Jul 26, 2010 at 11:33 AM, Gustavo Adrian
comfortablynum...@gmail.com wrote:
Check the path of that class to see if it exists. If that's so, try to
remove the cache manually (not with ./symfony cc
Hi,
I've found a way to do this in the BaseForm class. I just set the default
message of each validator on the setup method, like:
// I use the __() function because I enabled the I18N helper by default
sfValidatorBase::setDefaultMessage( 'required', __( 'Required field' ) );
of
sfDoctrineGuard.
Do you know why does this happen?
Thanks.
On Wed, Jul 28, 2010 at 4:42 AM, Tom Ptacnik to...@tomor.cz wrote:
I think that just sfValidatorBase::setDefaultMessage( 'required',
'Required field' ); is enough and the __() helper will be used
automaticly.
On 27 čnc, 04:23, Gustavo
Did you set the signin redirect url in file app.yml?
all:
sf_guard_plugin:
success_signin_url: @my_route?param=value # the plugin use
the referer as default
success_signout_url: module/action # the plugin use
the referer as default
On Wed, Jul 28, 2010 at 5:10 PM,
What about including a slot and then, depending on the template, use the
class accordingly?
body ?php include_slot( 'body_attributes' ) ?
And then in the template:
!-- Full width template --
*?php slot( 'body_attributes', 'class=full-width-body-class' ) ?*
and in other template:
!-- Half
Maybe I'm wrong but.. isn't $comment set already on this line by 'getValue'?
(saveEmbeddedForms of ExpenseForm)
*$comment** **=** **$this**-**getValue**(**'**comment**'**);*So the line:
*unset**(**$forms**[**'**comment**'**]);*
doesn't execute never?
On Wed, Jul 28, 2010 at 11:22 PM,
Sorry, the last line I was talking about is:
*if** (**!**isset**(**$comment**))
{
**unset**(**$forms**[**'**comment**'**]);
}
The if condition would be always false*
On Wed, Jul 28, 2010 at 11:40 PM, Gustavo Adrian
comfortablynum...@gmail.com wrote:
Maybe I'm wrong but.. isn't $comment
, remove the empty values
if (!$values['comment']['body'])
{
unset($values['comment']);
}
return $values;
}
}
Or perhaps I'm having a logic failure :(
On Jul 28, 9:42 pm, Gustavo Adrian comfortablynum...@gmail.com
wrote:
Sorry, the last line I was talking about
No, but you can do it on the model, on the preSave method (on your model
inheriting Doctrine_Record class)
On Thu, Jul 29, 2010 at 10:50 AM, Jérémie jeremie.symf...@gmail.com wrote:
Hi all,
Let me explain:
I have a field isPublished in my table, and another publicationDate.
When
Hi all,
This is a topic I've been avoiding for a long time but now I need to deploy
my app on a subdirectory and there's no other option. IMPORTANTE: It's on a
SHARED HOSTING.
The app dir structure now is something like this:
/
/demos
/myAppSymfonyFiles
/app
/cache
/config
If it's just a text email, you could encapsulate the message in a message
object so you don't have to use the template. But, as I said, this would be
just for a text email, With HTML it would be a little cumbersome.
On Mon, Aug 2, 2010 at 12:11 PM, Stephen Melrose step...@sekka.co.ukwrote:
I
Anyone?
On Fri, Jul 30, 2010 at 1:13 PM, Gustavo Adrian comfortablynum...@gmail.com
wrote:
Hi all,
This is a topic I've been avoiding for a long time but now I need to deploy
my app on a subdirectory and there's no other option. IMPORTANTE: It's on a
SHARED HOSTING.
The app dir structure
Adrian comfortablynum...@gmail.com
Anyone?
On Fri, Jul 30, 2010 at 1:13 PM, Gustavo Adrian
comfortablynum...@gmail.com wrote:
Hi all,
This is a topic I've been avoiding for a long time but now I need to
deploy my app on a subdirectory and there's no other option. IMPORTANTE:
It's
I think it depends on your requirements. If you need a backend with simple
CRUD modules.. then you could use the generator to create them in just a few
minutes. Maybe then customize the templates and there you go. You have a
fully CRUD module ready to go in notime. You could of course extend the
On Mon, 2010-08-02 at 19:00 -0300, Gustavo Adrian wrote:
First of all, thanks for your reply!
The problem of creating a symlink comes from the fact that I have a
shared hosting. Is there a way of doing this on a shared hosting without ssh
access?.
Anyway, remember that my app is working
Or you could just check for the code of the response in your jQuery script
that handles the AJAX form. If it's 401, then you redirect the user to the
login page.
On Sun, Aug 1, 2010 at 10:31 AM, Tristan tristan.bessou...@gmail.comwrote:
mmhhh i'm not sure in understand everything here ='(
://pastebin.com/cFQHfKwJ
On Tue, Aug 3, 2010 at 11:39 AM, Anibal Sólon anibalso...@gmail.com wrote:
You can paste (http://pastebin.com/) the .htaccess and
projectConfiguration.class.php file? Dont think that is the .htaccess
On Tue, 2010-08-03 at 00:24 -0300, Gustavo Adrian wrote:
Finally I did
Try to separate the logic of sending mails from the model. You should put it
on the pertinent action. Something like:
public function executeSetIsActivatedAndSendMail( $request )
{
$this-myObject = $this-getRoute()-getObject();
$value= $request-getParameter( 'myValue' );
a simple Alias shuld work out.
Alias /css /demo/myDemoApp/css
but you my not be able to set this on an htaccess file, a redirect my also
work
Redirect /css /demo/myDemoApp/css
2010/8/3 Gustavo Adrian comfortablynum...@gmail.com
Hi,
Here is ProjectConfiguration.class.php: http
A. Andrade
andrade.luci...@gmail.com wrote:
The redirect
Redirect /css /demo/myDemoApp/css
on the htaccess shuld work if the configuration allow redirects on
httacess.
Also the relative form is with out the first /, if it begins with
/ is absolute (to the server)
2010/8/3 Gustavo Adrian
Could you paste your model schema and your form class?
On Tue, Aug 3, 2010 at 5:05 PM, B.O.G germanaolivei...@gmail.com wrote:
Hi!!
I have a ComboBox like this, witch is a embeddedForm into a MainForm=
'Comunicacion':
select name=comunicacion[destinatario][user_profile_id][]
...@gmail.com wrote:
Thanks and knows about open source IDE with the same characteristics
*De:* symfony-users@googlegroups.com [mailto:
symfony-us...@googlegroups.com] *En nombre de *Gustavo Adrian
*Enviado el:* martes, 03 de agosto de 2010 18:31
*Para:* symfony-users@googlegroups.com
*Asunto:* Re
Hi,
I'm using sfDoctrineGuardPlugin. My backend session always ends after 5 or
10 minutes if its idle. I've tried to change on factories.yml:
*user:*
*class: myUser*
*param:*
* timeout: 86400*
And..
* storage:*
*param:*
* session_cookie_lifetime: 86400*
But
You can't access from the outside to anything except an action. You have to
check the validity of the form on the action and, optionally, pass the
result to the component.
Cheers.
On Thu, Aug 5, 2010 at 3:58 AM, Christian Fazzini
christian.fazz...@gmail.com wrote:
I've got a sidebar on my
Could you show us the exact command you are using for generating a project?
include the real arguments too.
On Thu, Aug 5, 2010 at 2:57 AM, yzhastik rigor152...@yandex.ru wrote:
I am trying to generate new project (as in jobeet tutorial), but
symfony says me that project already created in
be other things to consider as
well.
gabriel
On Aug 5, 4:31 am, Gustavo Adrian comfortablynum...@gmail.com wrote:
Hi,
I'm using sfDoctrineGuardPlugin. My backend session always ends after 5
or
10 minutes if its idle. I've tried to change on factories.yml:
*user
Hi,
I guess this is topic was touched a lot of times but It would be great to
see your thoughts and experiences about this.
I started to develop an application that really needs to take care about
concurrency issues. So I was thinking about creating a Doctrine behaviour
for this that puts a
I tried PHPEdit. It's amazing and FAST. Code suggestions out of the box
after parsing your project files. Excellent.
On Fri, Aug 6, 2010 at 8:01 AM, Tom Ptacnik to...@tomor.cz wrote:
I'm using Eclipse too, and I'm happy with it.
On 4 srp, 11:36, Gareth McCumskey gmccums...@gmail.com wrote:
Check in the hosting panel. There has to be an option to choose between PHP
version 4 and 5.
On Fri, Aug 6, 2010 at 2:08 AM, Md Mostafizur Rahman milon cse...@gmail.com
wrote:
dear Symfony user
i am new in Symfony framework. i have a hosting account in Godaddy
Linux Hosting in PHP 5 . but
use ProjectConfiguration::getActive() instead of sfProjectConfiguration.
Although if you're going to use the i18n helper on many forms (like me), you
could put that statement on yourAppnameConfiguration.class.php on the
'config' dir of the app:
//
Maybe adding the username to a subdomain, like username.myDomain.com and
create a new routing class that takes that username into account to filter
items by user?
On the More with Symfony book is a great example of this approach:
I saw a few plugins that seems to do what you're looking for, but I haven't
tried any of them yet. This is one of them:
http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin
Cheers.
On Mon, Aug 9, 2010 at 12:30 AM, Christian Fazzini
christian.fazz...@gmail.com wrote:
for the suggestion Gustavo, but this seems like way too much
complication for what seems like a pretty simple job; involving DNS
into this potentially adds another whole area for complications and
issues.
can anyone shed some light?
cheers
On Aug 9, 2:36 pm, Gustavo Adrian comfortablynum...@gmail.com wrote
Try to change this line:
#RewriteBase /
To:
RewriteBase /
Cheers.
On Mon, Aug 9, 2010 at 5:41 PM, Alexandre Salomé alexandre.sal...@gmail.com
wrote:
Can be rewrite module that is not enabled in your project.
To check it is the missing module, remove the IfModule opening and ending
to filter out the listing of records to just the ones that
have image.user_id = ?. In your idea, where would that be done?
thanks for the help!
On Aug 9, 10:39 pm, Gustavo Adrian comfortablynum...@gmail.com
wrote:
It depends on the options of your hosting I guess. If you have a panel
like
!
Hence the code: $this-form = new UserBookmarksForm($user =
Doctrine::getTable('User')-findOneByName('niko'));
I just figured this out and spent a whole day, thinking this was a
proper solution!!
I need to do create the object from scratch!
On Aug 9, 12:47 pm, Gustavo Adrian comfortablynum
What OS are you developing on? Check permissions on the cache and log dirs.
On Tue, Aug 10, 2010 at 5:11 PM, Alexandre Salomé
alexandre.sal...@gmail.com wrote:
The debug best code is :
die('ok');
Move it toward until it disappear. Some good start points are :
- First line of index.php
The setting of the notice takes place on the action, not on the form. And
it's generated in every module you create with the admin generator. So, as
Alexander said, you'd need to modify the skeleton of the generated actions
to add your functionality.
On the other hand, an easier way would be to
Hi!
Quick question: Is there a way to install and enable a plugin from PHP?
Thanks!
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups symfony users group.
To
ProjectConfiguration.
On Aug 11, 8:49 pm, Gustavo Adrian comfortablynum...@gmail.com
wrote:
Hi!
Quick question: Is there a way to install and enable a plugin from PHP?
Thanks!
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You
');
$enabledPluginsXml = $xml-xpath(...);
$this-enablePlugins($enabledPluginsXml);
}
}
On 12 aug, 22:12, Gustavo Adrian comfortablynum...@gmail.com wrote:
Hi, first of all, thank you both guys for your answers.
@Damon: I couldn't try that yet but, as you said, the only problem I
posting your solution somewhere? A snippet would be nice – along
with a quick explanation on how to do it. :)
That'd be great (but is in no way mandatory, just a suggestion to give
something back to the community)!
Cheers, Daniel
On 13.08.2010, at 17:14, Gustavo Adrian wrote:
@Johannes: That's
()
{
if (file_exists('enablePlugins.xml')) {
$xml = simplexml_load_file('enablePlugins.xml');
$enabledPluginsXml = $xml-xpath(...);
$this-enablePlugins($enabledPluginsXml);
}
}
On 12 aug, 22:12, Gustavo Adrian comfortablynum...@gmail.com
wrote:
Hi
Could you post the code from your form?
On Fri, Aug 13, 2010 at 7:36 PM, Jonotron jonot...@gmail.com wrote:
I have a form that uses a sfWidgetFormDoctrineChoice widget and I pass
a query to it that selects my category records based on another
hidden field. My query has a -where('a.id = ?',
Hi,
I use sfDoctrineGuardPlugin for securing my apps. In my backend I use AJAX
heavily. With a GET request, if the user session is gone, I get a 401
(unauthorized) response, so using Javascript I redirect the user to the
login page correctly. But when a POST request occurs, it gives me a 200 (OK)
Thanks for your answer! I thought on using the way you suggest. I could use
a custom action and then inherit from it on my module actions. In the
preExecute do some check like the one you suggest and just set the response
code to 401 (in my case I just need that). But I was thinking on just
change
{
public function preExecute()
{
parent::preExecute();
$this-getResponse()-setStatusCode( 401 );
}
}
And that's it.
Cheers.
On Sun, Aug 15, 2010 at 6:52 PM, Gustavo Adrian comfortablynum...@gmail.com
wrote:
Thanks for your answer! I
You can add the order type as another parameter to the link (ASC or DESC)
too. Then, at the moment of link generation, you check for the column that
is being used for ordering. In that link you then just change the order type
to the opposite of the actual one (so, if the user is looking at a user
In your fixtures check if you are indeed assigning a valid sfGuardUser to
the user_id field of rank_domain objects
On Tue, Aug 17, 2010 at 2:12 AM, RusAlex interpret...@gmail.com wrote:
Can you explain please:
I've tried to add relation to schema.yml
RankDomain:
columns:
name: { type:
This could help:
http://www.symfony-project.org/plugins/sfDependentSelectPlugin
On Wed, Aug 18, 2010 at 7:18 AM, Andro Fumero fugitive...@yahoo.com wrote:
Good day,
Does any one tried to make a drop down Countries, and when its clicked, it
will display the list of cities based on the
Could you paste your RankDomain fixtures? the problem may be there
On Wed, Aug 18, 2010 at 3:12 AM, RusAlex interpret...@gmail.com wrote:
IT's a standart fixtures:
sfGuardUser:
User_admin:
first_name: John
last_name: Doe
email_address: john@gmail.com
username:
Overriding the view for that special case? or creating your own collection
form, assigning a friendly name instead of the numeric ones. Or you could
simply use jQuery or css, as you said.
On Wed, Aug 18, 2010 at 1:47 PM, Christian Fazzini
christian.fazz...@gmail.com wrote:
At the following
If you have unique = true and notnull = true then you have to assign a
unique filename before you save the object, or you would have an exception.
The better way would be to just assign a random name, as Georg says. If you
really need the ID on the name, then first assign a random name and, after
I forgot to mention: The exception would be thrown if you attempt to insert
(or update) a second object with an empty filename (having a nullable field
you could insert as many objects as you want with NULL assigned to that
field)
On Thu, Aug 19, 2010 at 7:08 PM, Gustavo Adrian comfortablynum
I would create a custom form class that extends from sfForm (sfFormCRM for
example) and put there all the saving logic of the form. Then it would be a
nice idea to have a BaseFormCRM that inherits from your sfFormCRM to have a
place to put common application logic between your CRM forms without
Hi Jochen,
Gareth has answered all your questions, so I just wanted to say: welcome to
the Symfony community!
As Gareth said, A gentle introduction to Symfony is a good start. And if
you didn't use Doctrine or Propel before (I don't know which one you are
using now with Symfony) try to start
Hi,
Please, ask your questions in english so everyone of us can help.
About your problem, are you having problems only on the CLI? if that's so,
maybe you didn't modify the php.ini for the CLI. I don't know which OS
you're using, so try to run phpinfo() on the CLI to check where is the
php.ini
Did you try using the Swift Mailer that comes with Symfony? try sending with
SMTP using the SMTP server of your gmail account (if you don't have your own
email account, of course).
Here says how:
http://www.symfony-project.org/gentle-introduction/1_4/en/11-Emails
You should create a widget and embed the JS needed there. Here is a nice
tutorial about this:
http://www.symfony-project.org/more-with-symfony/1_4/en/05-Custom-Widgets-and-Validators
On Mon, Aug 23, 2010 at 8:49 PM, Jochen Daum jdau...@gmail.com wrote:
Hi,
for my application here I need to
Use the port 465 instead of the 25 for gmail
On Tue, Aug 24, 2010 at 9:48 AM, vero vegoi...@alumni.uv.es wrote:
It's impossible. I don't know how send an email at all.
I have tried everything but no email arrive to inbox.
I will have to decided what to do in that part of my project.
Thanks
Hi everyone,
I have something like this for my schema:
WebGenericElement:
actAs:
I18n:
fields: [title]
columns:
title:
type: string(255)
notnull: true
Product:
inheritance:
extends:WebGenericElement
type:
Maybe because first it's the sfValidatorEmail that throws the required
error?
Although, if you want to change the required field message to every
validator, you could do this:
sfValidatorBase::setDefaultMessage( 'required', 'My required message' );
On Tue, Aug 24, 2010 at 1:53 PM, Javier Garcia
Or course, that line could be on the BaseForm or even in the application
configuration class so every form could use that default message. The same
applies to the 'invalid' message.
On Tue, Aug 24, 2010 at 2:26 PM, Gustavo Adrian comfortablynum...@gmail.com
wrote:
Maybe because first it's
The dropdown must show every available choice, regardless an option is
already selected or not (What would you do if you need to update an item and
you want to change that value?). If you need to show only the option
selected, you could change the table method used by the widget to change the
list
Could you show us your action's code?
On Fri, Aug 27, 2010 at 12:11 PM, ziclo lauren...@gmail.com wrote:
More explanation about this issue :
If the number of objects returned is 10 then objects are displayed.
If number of objects returned 10 then nothing is displayed.
I think there is a
You need to extend your memory_limit for PHP. Check your php.ini (for CLI)
and put 128MB as memory_limit (or something like that).
On Fri, Aug 27, 2010 at 1:26 PM, mjhvc marcvancraesbe...@gmail.com wrote:
first: about memory error:
my command:
./symfony doctrine:data-dump
symfony output:
Hi,
I'm creating my own admin generator with heavy use of AJAX. Every CRUD
action works fine, except with the batch actions. I've tried to use the same
code that is used on the original admin generator but it keeps throwing
CSRF attack detected. I have a form that wraps a table, with each row
I use Symfony with jQuery in my last app where I've made every functionality
available via AJAX and it works perfectly on IE8.
Can you give us more information abour your app so we can help you more?
version of Symfony, jQuery and the code you're using to receive the AJAX
request?
On Wed, Sep 1,
Check the value of the *session*.gc_maxlifetime config on your php.ini.
On Fri, Sep 3, 2010 at 10:34 AM, pghoratiu pghora...@gmail.com wrote:
Check the sessions settings in php.ini as well.
What operating system do you use? For instance on Ubuntu there is a
cron job that deletes the session
I tried PHPEdit and I must say is the best I used so far. It's FAST and it
has a lot of features. It's not free, but is the best I tried.
On Thu, Sep 2, 2010 at 9:45 PM, |-|@|\/|||) hamidrezaa...@gmail.com wrote:
I need IDE for symfony. please introduce IDE for symfony.
--
If you want to
Hi everyone,
Could you tell me where can I get a code example of the validator
sfValidatorFromDescription on the Symfony Framework, or show me a little
example of its use? I'm reading the API description of this class but I'd
like to know how can I use it (and see if it's in fact what I'm looking
Hi,
This is not a Symfony / Doctrine specific question but well.. I'm sure you
can help me with this.
I have to instantiate a doctrine table dynamically:
*$table = 'MyDoctrineTable';
$instance= $table::getInstance();*
In my dev server (PHP v5.3.2) it works fine. In my production
You could create a custom layout for mobile sites. Then, in the action:
$this-setLayout( 'myMobileLayout' );
You could create a custom base action that extends from sfActions, where
you check for the sf_format value for the request in the preExecute
method. Then, based on that value, set the
)
On Sep 8, 1:48 pm, Gustavo Adrian comfortablynum...@gmail.com wrote:
You could create a custom layout for mobile sites. Then, in the action:
$this-setLayout( 'myMobileLayout' );
You could create a custom base action that extends from sfActions,
where
you check for the sf_format value
Create a base action with a preExecute method. Check in that method for
the user's group and change the layout accordingly. Then extend your actions
from this base action. This would be a way of doing it. Another way would be
maybe with a filter, but I like to have a baseAction and your
Create a baseAction with a preExecute method where you check which user is
logged in, and change the layout accordingly. Then, extend your own actions
from this baseAction:
// myApp/lib/actions/baseAction.class.php
class baseAction extends sfActions
{
public function preExecute()
{
Hi,
I tried a few IDE's like Eclipse, netbeans and PHPEdit. Eclipse was good but
a little slow for me. PHPEdit is the best in my opinion, but it's not free.
About your second question, I'm running a couple of projects on shared
hosting and it runs nice. You should run the check_configuration.php
Could you show us your DB schema? how do you want to save your multiple
extensions on the DB? if you want to save the extensions in only one field
then you could override the doSave method on your form, take the array of
extensions and make a string with pipe separated values ( like: JPG|GIF|PNG
)
Hi,
I thinkg you should override the doUpdateObject method on the form and
change the value of the extension field there. Remember to put a pipe or
comma to separate the values on the string.Try this (not tested) on the
doUpdateObject method of your form:
public function doUpdateObject( $values
I think that in your case would be faster to just hardcode the CSS/JS on
every layout, but If you don't want to do this you could use the methods
from the response addStylesheet and addJavascript to change the CSS/JS
at the time you choose and set your layout.. but you'll need to do it
Hi,
If I understand correctly, you want to put a checkbox on a table, like the
one generated on the admin generator, where you select items to make a
particular action? If that's so and you're not using the admin generator,
just add your own checkbox to the table and create an action to receive
Selecting one or more elements, which is the value shown in $values[
'extension' ] ? do a quick var_dump to see it, and call
parent::doUpdateObject at the end of your method, passing to it your
modified $values array.
I didn't notice that you're using sfWidgetFormChoice. Use
Hi,
Suppose you have this schema:
TextElement:
actAs:
I18n:
fields:
- title
- short_description
- content
columns:
title:
type: string(255)
notnull: true
short_description:
type: string(255)
content:
I mean this:
User:
columns:
username:
type:string(255)
relations:
Filetype:
class:Filetype
local: user_id
foreign: filetype_id
refClass:UserFiletype
Filetype:
columns:
extension:
type: string(10)
1 - 100 of 243 matches
Mail list logo