[symfony-users] Re: sfguarduser. How to check before login ?

2009-11-19 Thread Avani
Hi Gareth,

thanks verymuch.

It helped.

I added below line code in sfGuardBasicSecurityFilter

//signour if guest user and click on login page
if($this-getContext()-getUser()-getGuardUser()-getIsGuest())
{
$this-getContext()-getUser()-signOut();
}

Thanks Again.

On Nov 19, 1:39 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 What about doing a pre-filter?

 http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Laye...



 On Thu, Nov 19, 2009 at 6:08 AM, Avani avani.v.puj...@gmail.com wrote:
  Hi friends,

  In my before login pages, there are 3 tabs

  1. Register (register page)
  2. Login (login page)
  3. Guest (visit site as guest)

  Now, here, what I have done is.. when user clicks on guest he will
  be automatically logged in as guest user and can access some
  functionality of the site. So, sfguard sessions will be set.

  Now the problem is.. when user click on guest  it will be
  automatically logged in as guest user. Now, if it clicks on login,
  it will be redirected to profile as user is already login... ( I
  want to appear login here only for guest user)

  But I want to put a check.. if guest user.. then click on login page,
  logout guest user and show login form. (instead of going to profile)

  My problem is .. where to write code for it ? I am not able to find
  which file is executing and checking that if already login and click
  on login page, then send to profile page instead of showing login form
  

  Can anybody help me?

  thanks in advance.

  --

  You received this message because you are subscribed to the Google Groups
  symfony users group.
  To post to this group, send email to symfony-us...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=.

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=.




[symfony-users] core.php/ not working

2009-10-28 Thread Avani

Hi friends,

In my application, I am facing some strange problem

I have a link  profile

a href=?php echo url_for('profile/index'); ?
Profile/a

When I run the site, when I click on profile link,

it goes to  myprojecturl/core.php/  and shows blank page.

when I press refresh button, it shows profile page properly.   why
is it so?

Any idea?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: core.php/ not working

2009-10-28 Thread Avani

Hey, this is the problem only with opera, in other browsers, its
working ok.



On Oct 29, 12:12 pm, Avani avani.v.puj...@gmail.com wrote:
 Hi friends,

 In my application, I am facing some strange problem

 I have a link  profile

                         a href=?php echo url_for('profile/index'); ?

 Profile/a

 When I run the site, when I click on profile link,

 it goes to  myprojecturl/core.php/  and shows blank page.

 when I press refresh button, it shows profile page properly.   why
 is it so?

 Any idea?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Help me for writing criteria

2009-10-21 Thread Avani

ya.. it's working

Thanks Gareth..  :)

On Oct 21, 12:12 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 $exploded_query = explode( , $this-query);

 $k-getNewCriterion(
 sfGuardUserProfilePeer::FIRST_NAME,%.$exploded_query[0].%,Criteria::LIK­E)

 $k-getNewCriterion(
 sfGuardUserProfilePeer::LAST_NAME,%.$exploded_query[1].%,Criteria::LIKE­)





 On Wed, Oct 21, 2009 at 5:25 AM, Avani avani.v.puj...@gmail.com wrote:

  Hi

  I have 1 table in my project, called sf_guard_user_profile. In
  which, there are 2 fields,

  1. first_name
  2. last_name

  I m working on search module

  in table, suppose there is 1 entry

  firstname = 'John'
  lastname = 'Lee'

  In search if any body searches for  'john lee', how to match ?

  bcoz query should be like..

  first_name+' '+last_name = 'john lee'

  If user searches for john   or   lee  than I can display records,

  $k-getNewCriterion(sfGuardUserProfilePeer::FIRST_NAME,%.$this-
  query.%,Criteria::LIKE)

  $k-getNewCriterion(sfGuardUserProfilePeer::LAST_NAME,%.$this-
  query.%,Criteria::LIKE)

  but I dont know how to write for 'first_name' + ' ' + 'last_name'

  Pls help me...

  Thanks.

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Help me for writing criteria

2009-10-21 Thread Avani

yes.

I did like this

$exploded_query = explode( , $this-query);

if(count($exploded_query)  1)
{
$k3=$k-getNewCriterion(sfGuardUserProfilePeer::FIRST_NAME,%.
$exploded_query[0].%,Criteria::LIKE);
$k3-addOr($k-getNewCriterion(sfGuardUserProfilePeer::LAST_NAME,%.
$exploded_query[1].%,Criteria::LIKE));
$k1-addOr($k3);
}



On Oct 21, 4:21 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 You will of course need to have checks to make sure that $exploded_query[1]
 exists before using it, my example was just a quick way to point you in the
 right direction





 On Wed, Oct 21, 2009 at 9:45 AM, Avani avani.v.puj...@gmail.com wrote:

  ya.. it's working

  Thanks Gareth..  :)

  On Oct 21, 12:12 pm, Gareth McCumskey gmccums...@gmail.com wrote:
   $exploded_query = explode( , $this-query);

   $k-getNewCriterion(

  sfGuardUserProfilePeer::FIRST_NAME,%.$exploded_query[0].%,Criteria::LIK­­E)

   $k-getNewCriterion(

  sfGuardUserProfilePeer::LAST_NAME,%.$exploded_query[1].%,Criteria::LIKE­­)

   On Wed, Oct 21, 2009 at 5:25 AM, Avani avani.v.puj...@gmail.com wrote:

Hi

I have 1 table in my project, called sf_guard_user_profile. In
which, there are 2 fields,

1. first_name
2. last_name

I m working on search module

in table, suppose there is 1 entry

firstname = 'John'
lastname = 'Lee'

In search if any body searches for  'john lee', how to match ?

bcoz query should be like..

first_name+' '+last_name = 'john lee'

If user searches for john   or   lee  than I can display records,

$k-getNewCriterion(sfGuardUserProfilePeer::FIRST_NAME,%.$this-
query.%,Criteria::LIKE)

$k-getNewCriterion(sfGuardUserProfilePeer::LAST_NAME,%.$this-
query.%,Criteria::LIKE)

but I dont know how to write for 'first_name' + ' ' + 'last_name'

Pls help me...

Thanks.

   --
   Gareth McCumskeyhttp://garethmccumskey.blogspot.com
   twitter: @garethmcc- Hide quoted text -

   - Show quoted text -

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Help me for writing criteria

2009-10-20 Thread Avani

Hi

I have 1 table in my project, called sf_guard_user_profile. In
which, there are 2 fields,

1. first_name
2. last_name

I m working on search module

in table, suppose there is 1 entry

firstname = 'John'
lastname = 'Lee'

In search if any body searches for  'john lee', how to match ?

bcoz query should be like..

first_name+' '+last_name = 'john lee'


If user searches for john   or   lee  than I can display records,


$k-getNewCriterion(sfGuardUserProfilePeer::FIRST_NAME,%.$this-
query.%,Criteria::LIKE)

$k-getNewCriterion(sfGuardUserProfilePeer::LAST_NAME,%.$this-
query.%,Criteria::LIKE)


but I dont know how to write for 'first_name' + ' ' + 'last_name'

Pls help me...

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Can not rotate image resized by sfThumbnail Plugin

2009-10-14 Thread Avani

Hi all,

I have module of photolibrary  in my project.

In which, when user upload photo, I have resized the photo using
sfThumbnail Plugin.

Now, I have a link for rotating photo. For that, I have used code
below:


$image = sfConfig::get('sf_web_dir').'/images/photo_3_147.jpg.png';

//How many degrees you wish to rotate
$degrees = 90;

// Create the canvas
$source = imagecreatefromjpeg($image) ;

// Rotates the image
$rotate = imagerotate($source, $degrees, 0) ;

//generate random code for image postfix
$random = md5(uniqid(rand()));
$random_code = substr($random, 0, 8);

// Outputs a jpg image, you could change this to gif or png if needed
imagejpeg($rotate,sfConfig::get('sf_web_dir').'/images/rotate'.
$random_code.'.jpg');



I saw that this code works only for images which I have not processed.
It does not rotate the image resized by sfThumbnail plugin.

What should I do now?

Should I do resize without plugin? or is there any plugin for
rotating image?

Pls help me.

Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Join query problem

2009-10-09 Thread Avani

Hi All,

I am confused about 1 query in my symfony project.

I have 2 tables as shown below.

1. photo
   -photoid
   -photoname
   -userid
   -tripid  (either 0 or  related tripid  if trip is
assigned)

2. Trip
   -id
   -tripname
   -isactive

Here, for photo-tripid   it can be 0 if no trip assigned.  Else
corresponding tripid value.

Now, I dont want to display photos for inactive trips. (trip-isactive
= false)

If I write

$c = new Criteria();
$c-add(PhotoPeer::USERID, $u-getProfile()-getUserId());
$c-addJoin (PhotoPeer::TRIPID, TripPeer::ID);
$c-add(TripPeer::IS_ACTIVE,'1');


Then it displays only matching records which are active. It doesn't
display records from photo with tripid = 0.

How to write condition here?

Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: if (condition): endif: not working

2009-10-07 Thread Avani

Oh... Thanks a lot Georg,

You guessed correct. 

Thanks everyone :)

On Oct 7, 2:09 pm, Georg Gell geor...@have2.com wrote:
 Guessing: you have short_open_tag=1 in php.ini on your pc, but
 short_open_tag=0 on your laptop.

 Avani schrieb:

  Below is my code

  345:                           !-- show only in trip-profile page
  OR   multimedia pages --
  346:                           ?php
  347:                                                               
  if($show_left_sliding_menu == 'yes' || $module ==
  'photolibrary' || $module == 'videolibrary'){ ?
  348:
  349:                                    a ?php if
  ($tab==photolibrary): ? class=current ? endif; ? href=?php
  echo url_for('photolibrary/index'.$multimedia_param); ?img src=/
  images/photo-350:app.png title=Photo Library alt=Photo Library /
  /abr /
  351:
  352:                                    a id=smile ?php if
  ($tab==videolibrary): ? class=current ? endif; ? href=?php
  echo url_for('videolibrary/index'.$multimedia_param); ?img
  353:src=/images/video-app.png title=Video Library alt=Video
  Library //abr /
  354:                            ?php } ?
  355:
  356:
  357:                            ?php
  358:                                                               
  if($show_left_sliding_menu == 'yes') { ?
  359:                                    a href=?php echo url_for
  ('trip/maps?trip_folder_id='.$trip_folder_id_str);?img src=/
  images/map-app.png title=Map alt=map //abr /
  360:                            ?php } ?
  361:
  362:                            /div
  363:                        /div
  364:                               !-- show only in trip-profile page --

  Here, if I delete line 349  to 353, then it is working correctly.

  Dont know why is the problem??

  On Oct 7, 10:05 am, Jeremy Thomerson jeremythomer...@gmail.com
  wrote:
  Please provide lines 345 - 365 of
  C:\xampp\htdocs\td\apps\core\templates\layout.php would be helpful.

  Jeremy

  On Tue, Oct 6, 2009 at 9:03 PM, Avani avani.v.puj...@gmail.com wrote:

  Oh sorry, it was typing mistake.
  whole project is working in my 1 pc. When I copy the same into my
  other pc, it is giving errors
  Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\td\apps
  \core\templates\layout.php on line 354  everywhere where I have
  used
  ?php  if(condition) : ?
  something
  ?php endif; ?
  On Oct 7, 9:59 am, Sid Bachtiar sid.bacht...@gmail.com wrote:
  It should be:
  ?php if (condition): ?
    h1Hola hola hola/h1
  ?php endif; // with semi colon ?
  On Wed, Oct 7, 2009 at 2:58 PM, Avani avani.v.puj...@gmail.com wrote:
  Hi all,
  I am working on symfony since last 1 month. Yday I just installed
  symfony to my other laptop. I dont know why I am getting errors in my
  templates which works for my pc.
  I am gettting errors everywhere when I used
  ?php if(condition):
  endif: ?
  if I have used  ?php if{}  ?  (traditional php syntax)  then it is
  working.
  Can anybody help me?
  Thanks in advance.
  --
  Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] if (condition): endif: not working

2009-10-06 Thread Avani

Hi all,

I am working on symfony since last 1 month. Yday I just installed
symfony to my other laptop. I dont know why I am getting errors in my
templates which works for my pc.

I am gettting errors everywhere when I used

?php if(condition):

endif: ?


if I have used  ?php if{}  ?  (traditional php syntax)  then it is
working.

Can anybody help me?

Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: if (condition): endif: not working

2009-10-06 Thread Avani

Oh sorry, it was typing mistake.

whole project is working in my 1 pc. When I copy the same into my
other pc, it is giving errors

Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\td\apps
\core\templates\layout.php on line 354  everywhere where I have
used

?php  if(condition) : ?
something
?php endif; ?


On Oct 7, 9:59 am, Sid Bachtiar sid.bacht...@gmail.com wrote:
 It should be:

 ?php if (condition): ?
   h1Hola hola hola/h1
 ?php endif; // with semi colon ?



 On Wed, Oct 7, 2009 at 2:58 PM, Avani avani.v.puj...@gmail.com wrote:

  Hi all,

  I am working on symfony since last 1 month. Yday I just installed
  symfony to my other laptop. I dont know why I am getting errors in my
  templates which works for my pc.

  I am gettting errors everywhere when I used

  ?php if(condition):

  endif: ?

  if I have used  ?php if{}  ?  (traditional php syntax)  then it is
  working.

  Can anybody help me?

  Thanks in advance.

 --
 Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Compare date only from date time field using criteria

2009-09-28 Thread Avani

Hi all,

I want your help for comparing date.

In my database, I have 1 column named start_time and it's type is
datetime.

Now, I want to display records by comparing date only. Time need to be
ignored while comparing. I dont know how to do this using criteria.

$c_iti  = new Criteria();
$c_iti-add(ItineraryPeer::START_TIME,$start_time);
$itinerary_list = ItineraryPeer::doSelect($c_iti);

Can anybody help me?

Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Compare date only from date time field using criteria

2009-09-28 Thread Avani

Hey Garath,

Thanks a lot..  this is exactly what I wanted.  

On Sep 28, 3:16 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 There are a few ways you can do this. One way is to create a criterion to
 AND between the same date and two different times like:

 $c = new Criteria();
 $criterion = $c-getNewCriterion(ItineraryPeer::START_TIME, $date.
 00:00:00, Criteria::GREATER_EQUAL);
 $criterion-addAnd($c-getNewCriterion(ItineraryPeer::START_TIME, $date.
 23:59:59, Criteria::LESS_EQUAL));
 $c-add($criterion);

 Another way is to do a bit of a custom query:

 $c = new Criteria();
 $c-add(ItineraryPeer::START_TIME, DATE(.ItineraryPeer::START_TIME . ) =
 .$start_time, Criteria::CUSTOM);

 Custom is a little frowned on because then you are breaking the nice
 abstractedness of an ORM, but the criterion example I just gave might seem a
 bit kludgy. Both will work however and in my opinion keeping abstraction
 is more important than cleanliness so the first option is probably better.





 On Mon, Sep 28, 2009 at 8:48 AM, Avani avani.v.puj...@gmail.com wrote:

  Hi all,

  I want your help for comparing date.

  In my database, I have 1 column named start_time and it's type is
  datetime.

  Now, I want to display records by comparing date only. Time need to be
  ignored while comparing. I dont know how to do this using criteria.

  $c_iti  = new Criteria();
  $c_iti-add(ItineraryPeer::START_TIME,$start_time);
  $itinerary_list = ItineraryPeer::doSelect($c_iti);

  Can anybody help me?

  Thanks in advance.

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Is sfWeatherPlugin Unreliable?

2009-09-18 Thread Avani

Ohk Thanks Casey for your feedback.  I ll try this one.  !!!

On Sep 18, 3:08 pm, Casey casey.cam...@gmail.com wrote:
 I dont know anything about the sfWeatherPlugin, but I use the weather
 channel xml api from time to time and I have found it easy to use and
 reliable.  It even comes with its own icon sets/codes so you can
 provide nice little icons with the weather should you choose.  The url
 ishttps://registration.weather.com/ursa/xmloap/step1.  They don't
 give a ton of information on the site about it, but when you sign up
 there is a fairly informative pdf that you can download.
 Good luck.

 On Sep 17, 8:01 pm, avani pujara avani.v.puj...@gmail.com wrote:



  Hey Frieds,

  I want to add weather information to my site. I want to use sfWeatherPlugin.
  But I heard that it's unreliable? is it so?

  What is good solution to show weather information?

  Thanks in advance !!!- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Is sfWeatherPlugin Unreliable?

2009-09-17 Thread avani pujara
Hey Frieds,

I want to add weather information to my site. I want to use sfWeatherPlugin.
But I heard that it's unreliable? is it so?

What is good solution to show weather information?

Thanks in advance !!!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: how to get current login user id in my commonclass??

2009-09-15 Thread Avani

Hi Olly,

Thanks a lot.. It's working  :)



On Sep 15, 4:29 pm, Oliver Jackson ojack...@valleyt.co.uk wrote:
 Avani wrote:
  Hello Everyone,

  I have one common class for my own functions and I have stored it in
  lib/common.class.php

  My problem is, how to get current login userid from that class?

  I tried
  1. $this-getUser()-getProfile()-getUserId();
  2. $sf_user-getProfile()-getUserId();

 Try:

 sfContext::getInstance()-getUser()-getProfile()-getUserId();

 Olly

 --
 Oliver Jackson - Senior Developer
 Valley Technology - +44 (0)131 553 0412
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Disable create button from backend

2009-09-15 Thread Avani

Hi All,

I have one functionality in backend for edit contents of static pages.
In which, pages are fixed. Admin no need to create new pages. He can
only change content of the existing pages. But I dont know how to
disable create button on listing page.

Can anybody help me please?

Thanks in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] how to get current login user id in my commonclass??

2009-09-14 Thread Avani

Hello Everyone,

I have one common class for my own functions and I have stored it in
lib/common.class.php

My problem is, how to get current login userid from that class?

I tried
1. $this-getUser()-getProfile()-getUserId();
2. $sf_user-getProfile()-getUserId();

Both not working.   Wht to do?

Thanks in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] drag drop do not auto scroll

2009-09-08 Thread avani pujara
Hi everyone,

I have implemented symfony ajax drag drop code into my project.

Everything wokrs fine. But my project is not shopping cart. It is to drag
details to calender from left side to right side.
In my page, left side shows details  and right side there are added details
of different dates. You can see it below:


Details

Calender

1.detail 1

2.detail 2

3.detail 3

4.detail 4

   1. Date 1

-detail  added 1

-detail  added 2

-detail  added 3

-detail  added 4

-detail  added 5



   1. Date 1

-detail  added 1

-detail  added 2

-detail  added 3

-detail  added 4

-detail  added 5

   1. Date 1

-detail  added 1

-detail  added 2

-detail  added 3

-detail  added 4

-detail  added 5

   1. Date 1

-detail  added 1

-detail  added 2

-detail  added 3

-detail  added 4

-detail  added 5




So, user can drag detail from left side and drop to the perticular date.
This works fine but I have problem when right side have more dates. If I
drag my detail to the right.. page do not auto scroll, so can not add to the
dates at bottom..


Can any one help me?

Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] display form error message

2009-09-04 Thread avani pujara
HI All,

I have done with Registration form.

I want to check duplicate. for this, I have done like:

Actions.class.php

//check for duplicate username
 $c_checkduplicate = new Criteria();
 $c_checkduplicate-add(sfGuardUserPeer::USERNAME, $this-email);
 $isduplicate = sfGuardUserPeer::doSelect($c_checkduplicate);

 if(count($isduplicate) 0)
 {
  //user is duplicate show error message.

  $this-getRequest()-setError('email',The username is already taken.
Please enter a different username.);
$error = true;
   return sfView::SUCCESS;
 }


But now, my problem is how to show this error in template.

B'coz when I write

indexSuccess.php

?php echo form_error('email') ?


It displays error


*Fatal error*: Call to undefined function form_error() in *
C:\xampp\htdocs\td\apps\guest\modules\signup\templates\indexSuccess.php* on
line *18*
**
**
I added
**
use_helper('Validation');


Now it is showing error


 Call to undefined method sfWebRequest::hasError.



Wht is wrong with me???

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: display form error message

2009-09-04 Thread Avani

Hey Eno,

I m using 1.1 !!!

So, wht should I do for displaying my error message??

On Sep 4, 3:27 pm, Eno symb...@gmail.com wrote:
 On Fri, 4 Sep 2009, avani pujara wrote:
    $this-getRequest()-setError('email',The username is already taken.

 There is no setError method in sfRequest unless you are using the 1.0
 plugin -  which version of symfony are you using?

 --
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] sfcryptocaptcha plugin problem.

2009-09-04 Thread Avani

Hi All,

I have registration form in my project.

For that, I have used sfcryptocaptcha plugin  for captcha.

Everything works fine in my local machine. But when I upload files, it
is not working in live.

It is not displaying captcha image. also not giving any erros.

My url is  guest.php/signup/index.

But when I do  guest_dev.php/signup/index...  then it displays
captcha...

Wht is wrong with this?

Is ther any permission problem?

Pls help me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Check duplicate for registration

2009-09-03 Thread avani pujara
Hi Everyone,

I m very new to symfony.

I have created Registration form in my project. But how can I *check for
duplicate username*? Can I use any *SFVALIDATOR* for this?   OR  if I am
checking from my action page, after submitting the details, then I want to
redirect again to my registration page. *How I make* *all the data filled in
the textboxes?*. Is there any easy way to do this?  Pls help me.

Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Plugin for Multiple Upload

2009-09-02 Thread Avani

Hi all,

Anyone know any plugin available in symfony for multiple upload?  I
want to do that for multiple upload of pics for creating photo album
like orkut and facebook..

Any Idea?  Pls help me.

Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---