Re: Reporting in cake php

2012-05-30 Thread Andraž
For me tcpdf is working fine:  http://www.tcpdf.org/ 

On Wednesday, May 30, 2012 8:02:40 AM UTC+2, DAHAN Mamdouh wrote:

 Hello
 I want to generate pdf reporting with cake php, please advise me

 -- 
 -- 
 Cordialement
 -- 
 Mamdouh DAHAN
 BCS Consultancy Services
 Tel: +212 5 35 94 09 56
 Mobile: +212 6 44 00 19 53
 Website: www.bcs-cs.net
 Email: dahan.mamd...@bcs-cs.net

  

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


JS and position attribute

2012-02-21 Thread Andraž
In AJAX helper is option position, that append returned data to this
element.:


div id=post
/div
?php echo $ajax-link(
'View Post',
array( 'controller' = 'posts', 'action' = 'view', 1),
array( 'update' = 'post', 'position' = 'top'  )
);
?
Is something similar in Js helper? I'm using CakePHP 1.3 and jQuery.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: JS and position attribute

2012-02-21 Thread Andraž
Here is the solution:

script
$(#myLink).click(function()
{
$.get('?php echo $this-Html-url(array('controller' =
'posts', 'action' = 'add')); ?',function(data)
{
$(data).appendTo('#posts');
});
});
/script

On 21 feb., 17:08, Andraž andraz.prin...@gmail.com wrote:
 In AJAX helper is option position, that append returned data to this
 element.:

 div id=post
 /div
 ?php echo $ajax-link(
     'View Post',
     array( 'controller' = 'posts', 'action' = 'view', 1),
     array( 'update' = 'post', 'position' = 'top'  )
 );
 ?
 Is something similar in Js helper? I'm using CakePHP 1.3 and jQuery.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: 'Site under maintenance' option

2011-09-15 Thread Andraž
This solution is simple and works fine for me.

http://perishablepress.com/press/2010/05/19/htaccess-redirect-maintenance-page-site-updates/

On Sep 5, 9:45 pm, Xoubaman xouba...@gmail.com wrote:
 I'm trying to implement a system to disable the site temporaly for
 maintenance purposes or whatever. If the site is disabled, only logged users
 can navigate through it, non-logged users are redirected to a Site under
 maintenance layout.

 Currently (o As of now), my approach is to allow a secret url that will
 lead to the login form, check in AppController::beforefilter if the current
 url is the allowed one and, if it isn't, set the maintenance layout. Trying
 to figure out how to allow only one url to log in, I came to define it as a
 constant in bootstrap and add the route in config/routes pointing to
 UsersController::login.

 It would be nice to save the secret url into the database and change it
 without editing bootstrap.php, though.

 Any suggestion?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Displaying checkboxes in li tag

2011-09-15 Thread Andraž
How can generate from From-imput, for multiple checkboxes this kind
of code:

ul class=inputs-list
li
label
input type=checkbox value=option1 name=optionsCheckboxes
spanOption one is this and thatmdash;be sure to include why it’s
great/span
/label
/li
li
label
input type=checkbox value=option2 name=optionsCheckboxes
spanOption two can also be checked and included in form results/
span
/label
/li
/ul

Now I have this code:

echo $this-Form-input('User', array(
   'label' = FALSE,
   'type' = 'select',
   'multiple' = 'checkbox',
   'options' = $users,
   'selected' = $html-value('User.User'),
   'between'   = 'ul class=inlineli',
   'after' = '/li/ul',
   'separator' = '/lili'
   ));

But instead of li tag I get all wrapped in div tag:

ul class=inline
li
input id=UserUser type=hidden value= name=data[User][User]
div class=xlarge
input id=UserUser4 type=checkbox value=4 checked=checked
name=data[User][User][]
label class=selected for=UserUser4Andraž/label
/div
div class=xlarge
input id=UserUser5 type=checkbox value=5 checked=checked
name=data[User][User][]
label class=selected for=UserUser5Pinko/label
/div
/li
/ul

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Strange problem with auth

2009-08-06 Thread Andraž

If in controller in beforeFilter I add the Auth-allow('*') this
doesn't work, but if I add with the name of the function, then it
works fine... Auth-allow('aSearch')

Code, that doesn't work
function beforeFilter()
{
parent::beforeFilter();
$this-Auth-allow('*');
}


Code, that works perfectly.
function beforeFilter()
{
parent::beforeFilter();
Auth-allow('aSearch');
}


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



Problem with HBTM and ACL

2009-07-28 Thread Andraž

If I add in User model
var $actsAs = array('Acl'='requester');

Then I get this errors.

Warning (512): Callback parentNode() not defined in Mrartist [CORE/
cake/libs/model/behaviors/acl.php, line 62]
Warning (512): Callback parentNode() not defined in Mrcompany [CORE/
cake/libs/model/behaviors/acl.php, line 62]
Warning (512): Callback parentNode() not defined in Songwriter [CORE/
cake/libs/model/behaviors/acl.php, line 62]

This is defined as

var $hasAndBelongsToMany = array(
'Songwriter' = array(
'className' = 'Song',
'joinTable' = 'songwriters',
'foreignKey'= 'user_id',
'associationForeignKey'= 'song_id',
'unique'= true),
'Songpublisher' = array(
'className' = 'Song',
'joinTable' = 'songpublishers',
'foreignKey'= 'user_id',
'associationForeignKey'= 'song_id',
'unique'= true),
'Mrartist' = array(
'className' = 'MasterRecording',
'joinTable' = 'mrartists',
'foreignKey'= 'user_id',
'associationForeignKey'= 'mr_id',
'unique'= true),
'Mrcompany' = array(
'className' = 'MasterRecording',
'joinTable' = 'mrcompanies',
'foreignKey'= 'user_id',
'associationForeignKey'= 'mr_id',
'unique'= true),
'Affiliate' = array(
'className' = 'User',
'joinTable' = 'affiliations',
'foreignKey'= 'user_id',
'associationForeignKey'= 'affiliate_id',
'unique'= true)
);

Strange is, because for some definitions I get errors and for othes
there isn't any errors.

Any hint how to resolve this isue?

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



Problem with form type get

2009-07-16 Thread Andraž

Hello,

so if I write this in view

?php
echo $form-create('User', array('url' = array('controller' =
'users', 'action' ='login')));
echo $form-input('User.username', array('label' = 'E-mail:', 'style'
= 'width: 138px;'));
echo $form-input('User.password', array('label' = 'Geslo:', 'style'
= 'width: 138px;'));
echo brcenter . $form-end('Prijava') . /center;
?

I get the input field ok name=data[User][username]
input id=UserUsername type=text value= maxlength=255
style=width: 138px; name=data[User][username]/

But if I would like to use form type get

?php
echo $form-create('User', array('type' = 'get', 'url' = array
('controller' = 'users', 'action' ='login')));
echo $form-input('User.username', array('label' = 'E-mail:', 'style'
= 'width: 138px;'));
echo $form-input('User.password', array('label' = 'Geslo:', 'style'
= 'width: 138px;'));
echo brcenter . $form-end('Prijava') . /center;
?

then I get a wrong name of inpuf field name=username

input id=UserUsername type=text value= maxlength=255
style=width: 138px; name=username/

So, this is a bug or I'm doing something wrong?

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



Embed image in HTML mail tgrought Email component

2009-05-18 Thread Andraž

Hello!

How can I embed image in HTML mail send trough Email component?

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



Return a script and execute it

2009-02-26 Thread Andraž

Here is written that we can return a script and execute it.

This was just one way of doing it, we could return JSON, XML or a
script that'll get executed

http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-using-ajax

Where can I find some example, how to return a script and execute it.

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



Re: Recursive decrypt

2008-12-03 Thread Andraž

Any hint?

On 2 dec., 23:31, Andraž [EMAIL PROTECTED] wrote:
 Hello!

 I'm playing with Cipher behavior (http://bakery.cakephp.org/articles/
 view/cipher-behavior), but I have problems with recursive decrypt.

 What I must change in this function, that will work with recursive
 also?

 /** Model hook to decrypt model data if auto decipher is turned on in
 the
     * model behavior configuration. Only primary model data are
 decrypted. */
   function afterFind($model, $result, $primary = false) {
     if (!$result || !isset($this-config[$model-name]['cipher']))
       return $result;

     if ($primary  $this-config[$model-name]['autoDecrypt']) {
       // check for single of multiple model
       $keys = array_keys($result);
       if (!is_numeric($keys[0])) {
         $this-decrypt($model, $result);
       } else {
         foreach($keys as $index) {
           $this-decrypt($model, $result[$index]);
         }
       }
     }
     return $result;
   }

 Regards Andraz - Open source specialist
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recursive decrypt

2008-12-03 Thread Andraž

Does cake trigger callbacks on associated models?

On 3 dec., 10:56, Andraž [EMAIL PROTECTED] wrote:
 Any hint?

 On 2 dec., 23:31, Andraž [EMAIL PROTECTED] wrote:

  Hello!

  I'm playing with Cipher behavior (http://bakery.cakephp.org/articles/
  view/cipher-behavior), but I have problems with recursive decrypt.

  What I must change in this function, that will work with recursive
  also?

  /** Model hook to decrypt model data if auto decipher is turned on in
  the
      * model behavior configuration. Only primary model data are
  decrypted. */
    function afterFind($model, $result, $primary = false) {
      if (!$result || !isset($this-config[$model-name]['cipher']))
        return $result;

      if ($primary  $this-config[$model-name]['autoDecrypt']) {
        // check for single of multiple model
        $keys = array_keys($result);
        if (!is_numeric($keys[0])) {
          $this-decrypt($model, $result);
        } else {
          foreach($keys as $index) {
            $this-decrypt($model, $result[$index]);
          }
        }
      }
      return $result;
    }

  Regards Andraz - Open source specialist


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Recursive decrypt

2008-12-03 Thread Andraž

Yes.

So, any hit, how can with cipher behavior solve this thing? Or I must
do this manual?

On 3 dec., 21:17, Joel Perras [EMAIL PROTECTED] wrote:
 If you mean on the behaviors of associated models, then 
 no.https://trac.cakephp.org/ticket/2056

 -J.

 On Dec 3, 9:00 am, Andraž [EMAIL PROTECTED] wrote:

  Does cake trigger callbacks on associated models?

  On 3 dec., 10:56, Andraž [EMAIL PROTECTED] wrote:

   Any hint?

   On 2 dec., 23:31, Andraž [EMAIL PROTECTED] wrote:

Hello!

I'm playing with Cipher behavior (http://bakery.cakephp.org/articles/
view/cipher-behavior), but I have problems with recursive decrypt.

What I must change in this function, that will work with recursive
also?

/** Model hook to decrypt model data if auto decipher is turned on in
the
    * model behavior configuration. Only primary model data are
decrypted. */
  function afterFind($model, $result, $primary = false) {
    if (!$result || !isset($this-config[$model-name]['cipher']))
      return $result;

    if ($primary  $this-config[$model-name]['autoDecrypt']) {
      // check for single of multiple model
      $keys = array_keys($result);
      if (!is_numeric($keys[0])) {
        $this-decrypt($model, $result);
      } else {
        foreach($keys as $index) {
          $this-decrypt($model, $result[$index]);
        }
      }
    }
    return $result;
  }

Regards Andraz - Open source specialist


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Recursive decrypt

2008-12-02 Thread Andraž

Hello!

I'm playing with Cipher behavior (http://bakery.cakephp.org/articles/
view/cipher-behavior), but I have problems with recursive decrypt.

What I must change in this function, that will work with recursive
also?

/** Model hook to decrypt model data if auto decipher is turned on in
the
* model behavior configuration. Only primary model data are
decrypted. */
  function afterFind($model, $result, $primary = false) {
if (!$result || !isset($this-config[$model-name]['cipher']))
  return $result;

if ($primary  $this-config[$model-name]['autoDecrypt']) {
  // check for single of multiple model
  $keys = array_keys($result);
  if (!is_numeric($keys[0])) {
$this-decrypt($model, $result);
  } else {
foreach($keys as $index) {
  $this-decrypt($model, $result[$index]);
}
  }
}
return $result;
  }

Regards Andraz - Open source specialist
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Administration tutorials

2008-07-20 Thread Andraž

Did you see the admin routing screencast?

http://www.cakephp.org/screencasts/view/5

On Jul 18, 11:20 pm, Jeebs24 [EMAIL PROTECTED] wrote:
 I've been using CakePHP for a few months now (love it, praise it and
 preaching it to co-workers) and am getting quite proficient with it
 (or so I think).  Now what I am wanting to create an administration
 section of a application the proper way.  For example I have a forum/
 blog.  How do I create a proper administration Controller, Model ...
 etc.  Do I put all the models I need in var $uses =array()?  Is there
 a tutorial somewhere that tells you best practice?  Call me a total
 noob if you want, but I want to learn best practice.

 Any links to tutorials sites will be greatly appreciated!  And yes I
 did try to do a search and found nothing useful.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: One to many forms with ajax

2008-07-12 Thread Andraž

Did you find the solution?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



TortoiseCVS

2008-05-23 Thread Andraž

Hello!

How can I checkout from SVN with TortoiseCVS. I'm never did this. Whic
password, username and protocol I must use?

Regards Andraz

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: TortoiseCVS

2008-05-23 Thread Andraž

Tnx.

On May 23, 10:02 pm, majna [EMAIL PROTECTED] wrote:
 Look for Tortoise SVN.

 On May 23, 9:26 am, Andraž [EMAIL PROTECTED] wrote:

  Hello!

  How can I checkout from SVN with TortoiseCVS. I'm never did this. Whic
  password, username and protocol I must use?

  Regards Andraz

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



jquery-impromptu plugin and $html-link problems

2007-09-30 Thread Andraž

Hi!

I'm learning jQuery and i have some problems. I'm using this plugin
(http://trentrichardson.com/Impromptu/) in this function
li?php echo $html-link('Delete', '/admin/users/delete/' .
$user['User']['id'], array('onClick'='$.prompt('Realy?',{ buttons:
{ Yes: true, No: false }})')) ? /li

The problem is, how to use impromptu plugin with $html-link?

Sory for my bad english.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: jquery-impromptu plugin and $html-link problems

2007-09-30 Thread Andraž

I ound the solution for my problem. :)

On Sep 30, 7:48 pm, Andraž [EMAIL PROTECTED] wrote:
 Hi!

 I'm learning jQuery and i have some problems. I'm using this plugin
 (http://trentrichardson.com/Impromptu/) in this function
 li?php echo $html-link('Delete', '/admin/users/delete/' .
 $user['User']['id'], array('onClick'='$.prompt('Realy?',{ buttons:
 { Yes: true, No: false }})')) ? /li

 The problem is, how to use impromptu plugin with $html-link?

 Sory for my bad english.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: jquery-impromptu plugin and $html-link problems

2007-09-30 Thread Andraž

So, i resolved the problem, but now i have another problem. When i
click on the link the action is executed, but i would to show the
prompt to the user. When user click to yes, must delete user, but if
click to no, then the user isnn.'t deletet.

Here is the code:
li?php echo $html-link('Delete', '/admin/users/view/' .
$user['User']['id'], array('onClick'='$.prompt(\'Are you sure?\',
{ buttons: { Yes: true, No: false }})')) ? /li


On Sep 30, 7:48 pm, Andraž [EMAIL PROTECTED] wrote:
 Hi!

 I'm learning jQuery and i have some problems. I'm using this plugin
 (http://trentrichardson.com/Impromptu/) in this function
 li?php echo $html-link('Delete', '/admin/users/delete/' .
 $user['User']['id'], array('onClick'='$.prompt('Realy?',{ buttons:
 { Yes: true, No: false }})')) ? /li

 The problem is, how to use impromptu plugin with $html-link?

 Sory for my bad english.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---