Form dropdown multiple selected array not working

2011-10-11 Thread MetZ
Hi all. I am having trouble setting the selected to the options when selected is an array. (This is a edit content view) Dropdown display all categories (using generatetreelist to list my categories) echo $form->input('Content.category_id',array('selected'=>array($this- >data['Content'] ['catego

Re: Form dropdown multiple selected array not working

2011-10-12 Thread MetZ
echo $this->data['Content']['category_id'] it output: 1,3,7 so the array contains the ids that where selected when the content was created. Any and all help on this will be appreciated!! Thanks all. -Tom On 11 Okt, 13:36, euromark wrote: > why not > 'options'

element vs controller vs component vs helper Best Practice suggestions

2011-10-14 Thread MetZ
Hi all. I am not sure how to proceed. I want to display google analytics chart in my dashboard. I have in my user_controller.php admin_dashboard function: all google analytics blablabla to retrieve the data for the view trough GA api. I am calling a config file (uname + pass), and a model + datas

Limit output from DB based on user_id

2011-10-17 Thread MetZ
Hi. I am wondering how I can go about to limit/lock the db requests to ONLY allow db rows that have the user_id = session user_id ? Example: if a table row has another user_id than Session logged in id, then the controller will not touch this row at all. I have several controllers that I want to

Re: Limit output from DB based on user_id

2011-10-18 Thread MetZ
Hi and thanks for replies Ok, that was what I was thinking. Now, perhaps you could give me a hand on the best practice on a more advanced ownership of rows!?! I am looking to "lock" down the db queries as much as possible, only displaying the results that belongs to a user. My app is built

Retrieve extra field with generatetreelist

2011-10-19 Thread MetZ
Hi all. I am wondering how I can retrieve an extra field from my rows using generatetreelist? $this->data = $this->Category->generatetreelist(null, null, null, '   '); The field I am looking for is "status", to display if the category is active or not. And,, btw.. I am using generatetreelist to l

Re: Retrieve extra field with generatetreelist

2011-10-23 Thread MetZ
array('action' => 'delete', $key), array('valign'=>'center','class'=>'delete_trigger','rel'=>'#error','title'=>'Slett','escape' => false)); ?> N

Re: Form dropdown multiple selected array not working

2011-10-24 Thread MetZ
'=>'select', > 'multiple'=>'checkbox', 'options'=>$categories)); > > This will give you a data[Category][Category] type array. > > Book entry:http://book.cakephp.org/view/1034/Saving-Related-Model-Data-HABTM > > HTH, Paul. &

Returning new value from private function

2011-10-27 Thread MetZ
Hi all.. I am not sure if I am doing this correct, but I am trying to return a private function from my app_controller.php to posts_controller.php App_controller.php function __utfConvertChar($tempurl) { $j = mb_strlen($tempurl); for ($k = 0; $k < mb_strlen($tempu

Please give me some suggestions on this

2011-10-29 Thread MetZ
Hi all.. I am looking to implement a wysiwyg editor with a media library plugin of some kind.. Have been looking at Tinymce and elfinder for library, but I am not sure if I should go this way, or if there are any other solutions that meets my requirements. Requirements: - Simple wysiwyg (only sim

Looking to hire cake, ajax, jquery expert

2011-10-31 Thread MetZ
Hi. First off, I am really sorry if this is the wrong place to post such a request, but I could not find anywhere else!?! I am looking to hire a cake developer that have excellent ajax + jquery skills. This is for a project I am working on, and I am looking to have a FILTER content function that

Best approach to use GAPI class

2011-11-03 Thread MetZ
Hi. I am looking to have a google analytics display in my admin panel.. So I was thinking; http://code.google.com/p/gapi-google-analytics-php-interface/ Now, since I have never added other classes to cake, I am wondering how I should approach this, and how to use the gapi_class in my controller(

Send Email problem with multiple receivers

2011-11-30 Thread MetZ
Hi all! I am having a problem, when sending email with multiple reveivers in $this->Email->to It will only send to one adress (the first one => email_numb...@gmail.com), why is that? any suggestions!?! $this->Email->to = 'email_numb...@gmail.com, email_numb...@gmail.com'; $this->Email->subject =

Re: Send Email problem with multiple receivers

2011-11-30 Thread MetZ
;); > > Cheers, > Graham Weldonhttp://grahamweldon.com > e. gra...@grahamweldon.com > p. (+61) 0407 017 293 > Skype: grahamweldon > > > > > > > > On Thursday, 1 December 2011 at 4:02 PM, MetZ wrote: > > Hi all! > > > I am having a problem, when

Re: Send Email problem with multiple receivers

2011-12-01 Thread MetZ
> > > > > > What CakePHP version are you on? > > > Cheers, > > Graham Weldonhttp://grahamweldon.com > > e. gra...@grahamweldon.com > > p. (+61) 0407 017 293 > > Skype: grahamweldon > > > On Thursday, 1 December 2011 at 4:20 PM, MetZ

Re: Send Email problem with multiple receivers

2011-12-02 Thread MetZ
1 Des, 17:49, MetZ wrote: > ooh.. sorry... Cake 1.3.13 ;) > > Thanks for your time this far! > > -Tom > > On 1 Des, 10:19, euromark wrote: > > > > > > > > > if you are using the new EmailLib in 2.0 you should be using the > > setter methods:

Best practice output a Dynamic menu

2011-12-08 Thread MetZ
Hi all! I am looking for a couple of suggestions. I am currently working on a tree menu part of my app, where administrators can create menues, add links to the menues and move the links up and down in the tree. Now, I am looking how to output this menu with links on the frontend. Any suggestio

Re: Best practice output a Dynamic menu

2011-12-11 Thread MetZ
base? why not just treat it as a > data and output it directly in layout? > > > > > > > > > > On Fri, Dec 9, 2011 at 9:31 AM, MetZ wrote: > > Hi all! > > > I am looking for a couple of suggestions. > > > I am currently working on a tree me

Re: Best practice output a Dynamic menu

2011-12-12 Thread MetZ
member cakephp doesn't > suggest get data in components neither( i cant' find the refer), why not > get menu data in AppController's beforeRender method? > > > > > > > > > > On Sun, Dec 11, 2011 at 8:16 PM, MetZ wrote: > > > Hi. >

Building a support ticket system

2011-12-13 Thread MetZ
Hi all! I am in the process of building a simple support ticket system for my web application, and I would like some input and/or suggestions on how to get the functionality I am looking for. 1) Add Email adresses (example: supp...@domain.com) 2) Retrieve emails via pop3 from mailserver (I do not

Cake 1.3 and localization of time and date

2012-01-02 Thread MetZ
Hi all. I am currently "struggling" with localizing my created and modified values from db. I am using the Time helper, and have tried to get it to output real nice. echo $time->niceShort($post['Post']['created']); This gived me the Today, Yesterday, and Dec 29th 2011, 23:33 Translating of the

Cakephp 2.x best practice when adding/editing content?

2012-08-03 Thread MetZ
Hi all.. I am in the process of migrate one of my apps fra 1.3 to cakephp 2.x and I am wondering, what are the best practices for the new framework? AND YES, I have read the documents/book :) I am just wondering how you do it, so I can compare my work and see if I am heading in the right direc

Re: Cakephp 2.x best practice when adding/editing content?

2012-08-03 Thread MetZ
gle method, add/edit even if is user or admin, > the difference between add/edit is that on edit you have the ID set, or in > parameter or in $this->data > > admin_editpost($id = null){ >if(is_null($id){ >//something >} > } > > i guess you und

Re: Cakephp 2.x best practice when adding/editing content?

2012-08-03 Thread MetZ
ings) > > why dont you use baking? it would display a better output than you > currently have > > > > Am Freitag, 3. August 2012 17:43:52 UTC+2 schrieb MetZ: >> >> Yes, I understand what you are doing :) >> Have a couple of those myself.. >> >> Bu

Re: Problems with ajax and security component.

2012-08-08 Thread MetZ
I am struggling with the exact same problem.. If anyone have a suggestion??? see: http://stackoverflow.com/questions/11869336/cakephp-2-1-making-a-jquery-ajax-call-with-security-component-activated -Tom kl. 21:41:18 UTC+1 torsdag 8. desember 2011 skrev porangi.chris følgende: > > Hi, > > I'm h

cake_sessions in DB and how do I use the data?

2012-08-09 Thread MetZ
Okei,, so I am trying out the save sessions to DB and make use of them in my views. My cake_sessions table are been updated just fine with my sessions data, but now I am wondering how to access this data. Couple things I want to to is: 1) Display current logged in users => There are 3 logged i

Re: Cakephp 2.1 Submit Data with ajax

2012-08-09 Thread MetZ
Here is the solution: http://whatswhat.no/development/framework/cakephp-2/465-making-a-jquery-ajax-call-with-security-component-activated-in-cakephp-2 kl. 09:46:05 UTC+2 torsdag 9. august 2012 skrev Mr. Manager følgende: > > Dear All, > > I have problem with submit data using ajax because I wou

Re: How to call css with ie6 or ie7

2012-08-09 Thread MetZ
kl. 14:48:37 UTC+2 tirsdag 7. august 2012 skrev suttipong Pratum følgende: > > How to coding css with cakePHP > > > > > > > > > thank you > > sodaZa > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email

Re: Ajax submit Data

2012-08-10 Thread MetZ
Here you are: http://whatswhat.no/development/framework/cakephp-2/468-jquery-twitter-bootstrap-typeahead-ajax-user-search-with-onselect-in-cakephp-2 Modify to your needs. -Tom kl. 09:49:08 UTC+2 fredag 10. august 2012 skrev Mr. Manager følgende: > > Dear All, > > I hope that anyone can help me I

Re: Ajax submit Data

2012-08-10 Thread MetZ
Oh sorry.. Did not see you double posted :/ What are you wondering about? just ask and I will try to help you out.. -Tom PS! show me what you got this far.. (your code). kl. 11:53:16 UTC+2 fredag 10. august 2012 skrev MetZ følgende: > > Here you are: > > http://whatswhat.no

Re: gebo admin template

2012-08-10 Thread MetZ
http://whatswhat.no/development/framework/cakephp-2/451-how-to-create-admin-panel-with-own-theme-in-cakephp Have fun :) kl. 15:17:32 UTC+2 torsdag 9. august 2012 skrev Rahul følgende: > > Hi, > > I am looking for some help to setup gebo admin template for my project, > please share any useful li

Elfinder 2.x integration with cakephp 2.x ?

2012-08-10 Thread MetZ
Hi all.. I have been using the old Elfinder as my filemanager in my admin panel (the v.1.somthing). Now, I am trying to implement the new Elfinder 2 to my admin panel, and are experiencing some trouble. mainly, I can not seem to get the connector going. I have created an helper to load all J

Re: gebo admin template

2012-08-11 Thread MetZ
Just a blog site.. and I did not have the time to build an app for it... =) -Tom kl. 05:36:48 UTC+2 lørdag 11. august 2012 skrev rchavik følgende: > > why is it running wordpress? :p > > On Saturday, August 11, 2012 7:03:24 AM UTC+7, MetZ wrote: >> >> >> h

Re: Elfinder 2.x integration with cakephp 2.x ?

2012-08-11 Thread MetZ
php-2-x Also, If anyone have some imporvements to add, let me know.. Thanks anyway! -Tom kl. 02:07:21 UTC+2 lørdag 11. august 2012 skrev MetZ følgende: > > Hi all.. > > I have been using the old Elfinder as my filemanager in my admin panel > (the v.1.somthing). > > Now,

I want to find records during last 24 hours

2012-08-21 Thread MetZ
How can I find the Users that are "last_seen" the last 24hours? [User][last_seen] => 2012-08-18 08:10:31 last_seen is updated each time a logged in user browse the website with current timestamp This is what I have tried this far: $users = $this->User->find('all',array('conditions'=>array('U

Re: I want to find records during last 24 hours

2012-08-21 Thread MetZ
array('User.last_seen BETWEEN NOW() AND NOW() -INTERVAL 1 DAY'), > 'recursive' => -2); > > -- > Murgan, Alexis Germán > Desarrollador & Diseñador > Web: german.murgan.com.ar > Email: ger...@murgan.com.ar > MSN: ger...@murgan.com.ar > Móvil:

Re: I want to find records during last 24 hours

2012-08-21 Thread MetZ
YES!! You are totally awesome! Looks like it returns the correct users now. I will do some testing.. Thanks alot! Regards! -Tom kl. 20:25:11 UTC+2 tirsdag 21. august 2012 skrev MetZ følgende: > > Hi.. > > No,, that one also return empty array :( > > Thanks anyway! an

Auth allow for shared functions in Appcontroller

2012-11-22 Thread MetZ
Hi. Anyone know how I can auth allow shared functions in appcontroller? Appcontroller: public function beforeFilter() { $this->Auth->allow('SharedFunction'); OtherController.php public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('ControllerSpesificFunction', 'Controlle

Re: Auth allow for shared functions in Appcontroller

2012-11-22 Thread MetZ
functions just put and allow them in app controller and call them > > from any other controller like so: $this->myFunctionName(). > > > > On 22 Nov 2012, at 16:04, MetZ > wrote: > > > > Hi. > > > > Anyone know how I can auth allow sha

Re: Auth allow for shared functions in Appcontroller

2012-11-23 Thread MetZ
; > action might in turn call parent::TellAFriend() which is a method in > > AppController, but Auth won't care about that. The only thing that > > matters in terms of whether you can call it is that it's not a private > > method. Auth only handles actions that Di

Re: Auth allow for shared functions in Appcontroller

2012-11-23 Thread MetZ
and running cake 2.3 kl. 11:37:21 UTC+1 fredag 23. november 2012 skrev MetZ følgende: > > Hey Cricket.. > > Yes I am loading auth like you said in AppController :) > > So, what to put where? > > eg: PageController > $this->allowedActions = array_merg

Re: Auth allow for shared functions in Appcontroller

2012-11-23 Thread MetZ
), 'authError' => 'No access', ), 'Session', 'Security', 'Cookie' ); public function beforeFilter() { // unquoting this line will cause App to crash // $this->Auth->allow('TellaFriend') } *PageCon

Re: User login after register does not work

2012-11-25 Thread MetZ
Hey.. Try this: if ($this->User->save($this->request->data)) { if ($this->Auth->login($this->request->data['User'])) { $this->redirect($this->Auth->redirect()); Or you can find the user and log him in after the save: $user = $this->User->findById($this->User->g

Re: send emails

2012-11-25 Thread MetZ
Emails: http://book.cakephp.org/2.0/en/core-utility-libraries/email.html Google Maps: http://stackoverflow.com/questions/8795104/google-map-v3-cakephp-helper-and-multiple-markers -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You recei

Cake and paypal subscription/reccuring payment plans

2012-12-01 Thread MetZ
Hi. Anyone with any experience with cakephp and paypal recurring/subscription payments? Tried google and reading alot about subject, but if anyone know of any good guides, or know how to do it (have experience with similar setups) I will appreciate all help and suggestions on this :) I have a

Need some HABTM help retrieving related posts

2012-12-16 Thread MetZ
Okei, so I have a HABTM setup: - posts - tags - posts_tags When creating posts => select multiple tags: example: Tag1, Tag2, Tag3 Each selected tag is saved to posts_tags: id:1, post_id: 44, tag_id: 3 (and so on). Now, displaying my posts, and listing the selected tags, is no problem. Everyth

How can I render an element after pageload?

2013-01-13 Thread MetZ
Okei. here goes. I have an element (test_element.ctp), that perform an API call. I use a regular: echo $this->element('test_element', array("limit" => 2)); to load it: element('test_element', array("limit" => 2)); ?> So far so good. The element load API call and display data as it should.

Advanced find with mulitple OR/WHERE/AND conditions

2013-01-16 Thread MetZ
Hi all.. I am looking to do a search for ITEMS with mulitple conditions. 1 = location_start 2= location_end 3=start_date 4=end_date Here is what I have this far: $start_date = date("Y-m-d 00:00"); $end_date = date("Y-m-d 23:59"); $conditions = array( 'Item.published' => 1,

Re: Advanced find with mulitple OR/WHERE/AND conditions

2013-01-16 Thread MetZ
SELECT COUNT(*) AS `count` FROM `DATABASE`.`app_items` AS `Item` WHERE `Item`.`published` = '1' AND ((`Item`.`start_date` BETWEEN '2013-01-16 00:00' AND '2013-01-16 23:59') OR (`Item`.`end_date` BETWEEN '2013-01-16 00:00' AND '2013-01-16 23:59') OR (FIND_IN_SET('search_word',`Item`.`location_st

Load different config file

2013-01-18 Thread MetZ
Hi.. I am wondering the best approach to load different config files according to TLD? domain.TLD1 domain.TLD2 domain.TLD3 config/config_TLD1.php config/config_TLD2.php config/config_TLD3.php Today I am using only the config_TLD1.php (loaded in bootstrap). Any suggestions? Thanks! -Tom --

Re: Load different config file

2013-01-19 Thread MetZ
tions on a better approach? kl. 18:19:07 UTC+1 fredag 18. januar 2013 skrev Andras Kende følgende: > > I guess you could do something like: > > bootstrap.php > > $tld = strrchr($_SERVER['SERVER_NAME'], '.'); > Configure::load('conf

Using variable from controller in model

2013-01-29 Thread MetZ
Hi all. I am struggling passing a variable to my before save function in my User model. Controller: $this->User->read(null, $data['user_id']); $this->User->set(array( 'noslug' => 1, 'TEST' => 'sdfsd' )); $this->User-

Saving geolocation data to session with timeout or better approach?

2013-08-17 Thread MetZ
Hi all. I have a script that retrieves some location data from google api, and store the retrieved data in a Session (Location). All this is working just fine :) (if someone have a better way, better approach to store this data for my website visitors, let me know). The data is saved to sessi

Re: Saving geolocation data to session with timeout or better approach?

2013-08-17 Thread MetZ
oh, and using latest cake 2.3.8 or soemting like that :) -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop

Loading element on-the-fly in article/posts with bbcode

2013-11-22 Thread MetZ
Hi all. I am wondering, does anyone have a suggestion on how to approach loading of element in regular posts? I am looking at "BBCODE style" loading of element to display example a slideshow. example; I need to load slideshow with id=1 in my post. I have an element, load-slideshow.ctp where I

Re: Loading element on-the-fly in article/posts with bbcode

2013-11-22 Thread MetZ
> > Small update, I did some coding here, not sure if I am moving in the right > direction.. Suggestions on how to return the element > Shortcodehelper.php: App::import('Helper', 'Html', 'Router'); class ShortcodeHelper extends AppHelper { public $shortcodes = array( 'slideshow' => '/(\[sli