CakePHP 3.2: Plugins inside plugins?

2016-02-12 Thread Salines
I work at a large application that contains two groups of users. Each group will have a different type of profile. for easy to track and organize the code idea is to create these groups as separate plugins. But each of these groups should have its own settings plugin. So, the question is it wis

CakePHP 3: How to save model and field name in associated table?

2015-10-13 Thread Salines
I need a hint. I have to develop a number of centralized models, which will be in relation to other models. Examples of such models are Timelines and Images, which secound have fields: id, model, // Model name, ex Users field, // field name, from where upload foreign_key, // User Id descript

CakePHP 3: Override Modell::save()

2015-10-02 Thread Salines
Hello, I need to store multiple rows of the same model, in CakePHP 2x we had saveMany() model, but since version 3, the method is omitted. How to save data? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message be

CakePHP 3.1: Login with Username or Email?

2015-09-25 Thread Salines
Can any of the core CakePHP developers explain to us in what manner we can perform user authentication with username or email plus password. Thank you. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because y

Re: Notification same like facebook with using cakephp

2015-09-16 Thread Salines
On CakePHP side you need output data as json, and on frontend use some jquery plugins like http://ned.im/noty/#/about http://notifyjs.com/ etc -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are

CakePHP 3: Translation behavoir, how to access original data?

2015-09-16 Thread Salines
debug($attachment); object(App\Model\Entity\Attachment) { 'id' => (int) 73, 'apartment_id' => (int) 1, 'name' => 'bla bla bla', 'caption' => 'bla bla', 'position' => (int) 1, '_locale' => 'eng', '[new]' => false, '[accessible]' => [ '*' => true ],

Re: 3.1-rc1 utf-8 special chars problem

2015-09-16 Thread Salines
db connection, and now I have the same problem there, how far out? – Salines yesterday http://stackoverflow.com/questions/32562023/cakephp-3-1-rc1-utf-8-special-chars-output?noredirect=1#comment52995592_32562023 -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter

Translate behaviour need better turorial

2015-09-14 Thread Salines
I try to implement translate behavior, and I got lost in the code following the documentation. I have CakePHP 2 application that works in three languages, I try them migrate to CakePHP 3.x, but unlike 2.x documentation that I quickly realize, here in CakePHP 3 documents there are many ambigu

3.1-rc1 utf-8 special chars problem

2015-09-14 Thread Salines
During the migration from 2.6 to 3.1 may encounter problems with the display of special characters in the Croatian language, the content is taken from the database. Content is stored in a database via CakePHP 2.x applications, and can be displayed properly. but when I connect a new application

Re: htacess to demo folder with new cakephp3 app

2015-09-03 Thread Salines
This working RewriteEngine on RewriteRule^demo$demo/[L] RewriteRule^demo/(.*) demo/$1[L] RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] Thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://tw

Re: htacess to demo folder with new cakephp3 app

2015-09-03 Thread Salines
I need to update first .htacess ind the cakephp 2 to skip rewrite rules if user type mydomainname.com/demo/, not to change RewriteBase RewriteEngine on RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] current (cakephp 2) app .htacess index.php /app /lib /p

htacess to demo folder with new cakephp3 app

2015-09-03 Thread Salines
Hello, can somebody help me, I have a CakePHP 2.x web application located on the server in the public_html folder. Now I need to upgrade the app to CakePHP version 3, including a new design, but the client requires installing the demo applications on the live server, in addition to current. I

Re: CakePHP 3: How to Bake template from vendor/authorname/pluginname?

2015-04-07 Thread Salines
Resolved, I forgot to load plugin in the bootstrap. -- 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 recei

CakePHP 3: How to Bake template from vendor/authorname/pluginname?

2015-04-07 Thread Salines
If you want to create a package / plugin in vendor folder, which will be used for development eg Admin plugin, how do you set up the structure of the folders and where you will put the template files? I try the following: myapp/ vendor/ salines/ admintheme/ src

Re: DRY - flash message i18n

2015-04-06 Thread Salines
OK, But what if you first time create post? -- 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 receiving ema

DRY - flash message i18n

2015-04-04 Thread Salines
Hi, as a person who works mostly non-English web applications, usually frustrating me bake generated flash messages, where each model has its own success and error messages. If you build an application with dozens of models, the process of translation is time-consuming, repetitive sentences wh

Re: CakePHP 3 - Where is custom datasource ?

2015-04-03 Thread Salines
Ok, thank you. -- 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 receiving emails from it, send an email t

CakePHP 3 Plugin & Routing

2015-04-03 Thread Salines
Hello, for the purpose of migration to cakephp3 and mastering the skills of making applications to this version of the framework, I just baked app and plugin. I want to separate the Web application in plugins, Admin, Customers, etc. I'm fine to access locations within the plugin, for example m

CakePHP 3 - Where is custom datasource ?

2015-04-02 Thread Salines
Hi, I have a large number of CakePHP 2 web applications, many of them use remote data over the DataSource. I'm reading the documentation of CakePHP 3, but I can not find instructions for remote datesource. My next project also requires a custom DataSource (ArangoDB), so I planned to build it w

Re: CakePHP-Upload Plugin > FileImportBehavior: How to use ?

2015-01-17 Thread Salines
I ask the same question here http://stackoverflow.com/questions/27999313/cakephp-upload-plugin-programmatic-file-retrieval-without-a-form -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscr

Re: CakePHP-Upload Plugin > FileImportBehavior: How to use ?

2015-01-17 Thread Salines
Programmatic File Retrieval without a Form http://cakephp-upload.readthedocs.org/en/latest/examples.html#programmatic-file-retrieval-without-a-form Can someone tell me what it means and how to set up $image_url, whether it is a local file or from a remote server? When I save the article, at th

CakePHP-Upload Plugin > FileImportBehavior: How to use ?

2015-01-11 Thread Salines
Hi people, How to use cakephp upload plugin, and import behavior ( https://github.com/josegonzalez/cakephp-upload ) to handle the existing images and save their name into database? I have a task to migrate data and images from joomla cms into custom CMS built into CakePHP. In joomla cms many

Re: CakePHP 2.5.*- Find all posts by current month and day (m-d)

2014-12-29 Thread Salines
Thank you. -- 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 receiving emails from it, send an email to ca

Re: CakePHP 2.5.*- Find all posts by current month and day (m-d)

2014-12-29 Thread Salines
$this->Post->find('all',array('conditions' => array(*'Post.event_date' => '12-29*')); // show posts where is Post.event_date like 12-29. event_date fields is date type (Y-m-d), where they are stored dates of significant events. In other words I need to show the anniversary. Except using vir

CakePHP 2.5.*- Find all posts by current month and day (m-d)

2014-12-28 Thread Salines
I need to select all the posts from db posts table that correspond to today's month and day. for example, today is 2014-12-29 Find query return posts that have dates as: 2014-12-29 2012-12-29 2010-12-29 2004-12-29 1999-12-29 1984-12-29 1953-12-29 1911-12-29 Please your advice, thanks -- Lik

Re: CakeDC Search plugin find in hasmany

2014-11-17 Thread Salines
Solved, // @Model Order 'order_date' => array( 'type' => 'subquery', 'method' => 'orderDate', 'field' => 'User.id' ), public function orderDate($data = array()) { } -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received t

CakeDC Search plugin find in hasmany

2014-11-17 Thread Salines
Hi, can someone show me how it looks correct $filterArgs settings if I need to search data in hasmany related model. example, User hasMany Orders. User model: public $filterArgs = array( 'id' => array( 'type' => 'value' ), 'name' => array( 'type' => 'like' ), 'company' => array( 'type' => 'lik

Re: After I change my User.name, can not log in..

2014-10-28 Thread Salines
Ok, I solved my problem. After the admin save user settings without password fields in the User model we have beforesave method, which returns a hash password, in this case the function create a new password from scratch and save it into the database. solution: UsersController :: admin_edit

After I change my User.name, can not log in..

2014-10-28 Thread Salines
Ok friends The situation is as follows: Admin has the ability to change the name, email address and other profile information of users, but this form does not contain the password field. When admin, save the changes, a user can not log in. I looked in the database there is a password unchan

Re: Going back to the page after changes

2014-10-27 Thread Salines
Whoops, I sent the wrong answer, here again public function edit($id = null) { if (!$this->Article->exists($id)) { throw new NotFoundException(__('Invalid article')); } if ($this->request->is(array('post', 'put'))) { if ($this->Article->save($this->request->data)) { $this->Session->setFlash(__('T

Re: Going back to the page after changes

2014-10-27 Thread Salines
$this->redirect(array('action' => 'view',$id)); -- 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 receiving

Re: Virtual fields or other solution

2014-10-27 Thread Salines
I forgot to say, the results should be sorted by periods -- 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

Virtual fields or other solution

2014-10-27 Thread Salines
Hi there, need a little help, I have a simple model where the data is stored in the following format: id | product_id | period | price .. 1 | 1 | 10 | 9.99 2 | 1 | 20 | 18.99 3 | 1 | 30 | 27.99 Each product wi

Re: using cakephp with nginx

2014-10-26 Thread Salines
google nginx wildcard and regular expressions -- 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 receiving

Re: How to check if there is a database (cakephp 2.5.5)

2014-10-26 Thread Salines
I solved the problem, thank you :) == $dbconfig = array( 'datasource'=> $data['Database']['datasource'], 'persistent'=> $data['Database']['persistent'], 'host' => $data['Database']['host'], 'login' => $data['Database']['login'], 'password' => $data['Database']['passwor

How to check if there is a database (cakephp 2.5.5)

2014-10-25 Thread Salines
Hi, I create the form and component script to save the database configuration file. There, in a form have select field with options that allow the end user to select what they want to use (mysql, postgres, ..) This works well, if I select mysql, but if I put another option I have a fatal er

Re: Different languages in one page.

2014-10-24 Thread Salines
I also use 2.5.5, How looks your URL, do you have a language prefix? How do you determine which is the default language? -- 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 Goog

Re: Different languages in one page.

2014-10-24 Thread Salines
here is demo http://screencast-o-matic.com/watch/c26Zime6EZ -- 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 st

Re: Different languages in one page.

2014-10-24 Thread Salines
** -- 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 receiving emails from it, send an email to cake-

Re: Different languages in one page.

2014-10-24 Thread Salines
Hi, I tested it and it works. You still have to put the locale within your view functions, to select a translation from the database. === Controller:view() === Start from these ideas: http://example.com/eng/profile/view/1/translate:esp Then in your view method:

Re: Different languages in one page.

2014-10-23 Thread Salines
Here is solution for example url: example.com/eng/profiles/view/1/translate:esp // view.ctp passedArgs['translate'])) { Configure::write('Config.language', $this->passedArgs['translate']); } ?> params['language'])) { Configure::write('Config.language', $this->params['language']); } ?>

Re: Different languages in one page.

2014-10-23 Thread Salines
Look here http://book.cakephp.org/2.0/en/core-libraries/internationalization-and-localization.html // App Controller Code. public function beforeFilter() { $locale = Configure::read('Config.language'); if ($locale && file_exists(APP . 'View' . DS . $locale . DS . $this->viewPath)) {

Re: Different languages in one page.

2014-10-23 Thread Salines
For example, your default language and layout is in English, but you want to show the translation of dynamic content. Start from these ideas: http://example.com/eng/profile/view/1/translate:esp Then in your view method: public function view($id = null) { if(isset($this->passedArgs['transl

Make a Restful documentation in CakePHP?

2014-10-22 Thread Salines
Is there some way to make automatic documentation for restful service? I can see some of the frameworks have integrated a great tool for creating this type of documentation. Do you have experience and recommendations for a CakePHP based resful api? Thanks -- Like Us on FaceBook https://www.f

CakePHP 2.5, I looking for google analytics plugin

2014-07-24 Thread Salines
I'm looking for google analytics plugin implemented as a datasource. please recommendation Thanks -- 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" grou

Re: CakePHP 2.5, HABTM save data combining selected data and from multiple inputs

2014-07-14 Thread Salines
Sorry, I copied the question from SO. -- 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 receiving emails fr

CakePHP 2.5, HABTM save data combining selected data and from multiple inputs

2014-07-11 Thread Salines
I have habtm relationship between articles and tags. This works correctly. Now in my Articles/admin_add.ctp want beside multiple selection inputs, add fields to add additional tags, and save it all together. echo $this->Form->input('Tag'); // multiple select echo $this->Form->input('Tag.0.name

Re: I need logic to make private user groups

2014-06-20 Thread Salines
Jacob Stevens : > > How about getting someone else to do it for you? Oh wait... never mind. > You're all over this! > > No, you do not need to do some for me, this is a discussion you can take part or not. I use CakePHP since 2008, also helping people in our local forums, when they need the

Re: I need logic to make private user groups

2014-06-20 Thread Salines
e) ways to do this depending on what you > need. > > > http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasmany-through-the-join-model > > > > On 20 June 2014 17:40, Salines > wrote: > >> Okay friends, I need the following: >> >> en

I need logic to make private user groups

2014-06-20 Thread Salines
Okay friends, I need the following: enables registered members to dynamically generate user groups, where only members of the group can access content within that group. This is identical to do facebook group. So I need some logic, how to do it. thanks -- Like Us on FaceBook https://www.fac

How to set up Nginx server & CakePHP for Web Development?

2014-06-13 Thread Salines
Hi everyone, I just switched from Windows 7 XAMPP installation on Ubuntu 14.04 LEMP (Linux, NGINX, MySql, PHP5.5). In xampp I have htdoc following folder structure: C:\xampp\htdocs\cakephp C:\xampp\htdocs\portal C:\xampp\htdocs\farm.ba C:\xampp\htdocs\detas.ba ... where CakePHP folder serve a

Re: Design high performance CakePHP app - How to?

2014-05-13 Thread Salines
Thank you. -- 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 receiving emails from it, send an email to ca

Design high performance CakePHP app - How to?

2014-05-09 Thread Salines
I need some answers related to performance . I made a lot of web applications with low traffic . Now , I need to do one little demanding , it is a prototype for an early stage startup project . Web applications need to serve dynamically generated html and restful ( json ) content . Backend appli

Re: cakephp user login and administration page

2014-04-24 Thread Salines
Can you describe precisely where and what you want to show? Feel free to paste your code on https://gist.github.com/ or other pastebin services. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you ar

I'm looking for a good draft / revision behavior??

2014-02-25 Thread Salines
Can someone recommend a good draft / revision behavior for CakePHP 2.4.5. It is desirable that the primary table does not create a new entry before the user clicks submit. thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You

Re: Restful Api

2014-02-24 Thread Salines
Start from here http://book.cakephp.org/2.0/en/development/rest.html Dana subota, 22. veljače 2014. 21:57:03 UTC+1, korisnik Prabhat Patel napisao je: > > Hi, > > I want to create a restful api using cakephp. I was not able to find > proper tutorial on google for this. > > Is cakephp sutaible f

Parse text / html saved in the database

2014-02-22 Thread Salines
Hi, Can someone tell me the best way to parse the content, which is stored in a database using a WYSIWYG editor? Let's say, I have saved formatted text, which contains photos, lists, quotes, page break marker, etc. On the index page I need to extract one main photo and the first quote for eac

Re: Dynamic menu content in layout

2014-02-22 Thread Salines
hi, You can put the tree menu directly in the layout or in a separate menu elements and include them in a specific place on your layout. If you want to highlight active link in your menu, you can do the following: // menu ..link to contacts views ..link to contacts views ... // in Posts/

Re: jQuery sortable: how to update database?

2014-02-02 Thread Salines
*One additional thing: where in Chrome developer tools can you see those ajax values? Elements, Network, Sources, ...? ;)* Open CDT and select the Network tab, then sort the table and view the query output in the Network tab. Select an output request for more details ;) -- Like Us on FaceBook

Re: jQuery sortable: how to update database?

2014-02-01 Thread Salines
You do it in the wrong way. In your controller create method and then put the code that will save your changes. use chrome developer tools or firefox firebug to see which values ​​are sent via ajax query -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitte

Re: Validate if not between

2013-11-19 Thread Salines
array('OR'=>array('YEAR(estd) <' => 2010, 'YEAR(estd) >' > => 2013)) > > )); > > > Le lundi 18 novembre 2013 23:38:35 UTC+1, Salines a écrit : >> >> Hi, folks >> >> >> Is there any validation

Validate if not between

2013-11-18 Thread Salines
Hi, folks Is there any validation rules that check sent data does not exist between two dates? Or need to make a custom validation method? If there is no data between two dates validation must return TRUE or FALSE if it exists. Syntax as follows SELECT pub_name, country, pub_city, estd FROM p

Related model and translate behavior: How to get the results?

2013-11-17 Thread Salines
I have the 'Post' and 'Attachment' models, through which I need to save and display the results in multiple languages. Model 'Post' hasmany 'Attachment', the latter each have a caption fields, which should be translated into different languages. Saving the translated value of these models work

Re: How to prevent IE 7 browser from viewing site using cakephp 2.0?

2013-11-14 Thread Salines
This is good start point http://stackoverflow.com/questions/14057575/htaccess-redirect-to-specific-webpage-based-on-browser > > -- 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 th

Re: Pagination option url question

2013-11-14 Thread Salines
Question one: Can I overwrite the controller and action with my slugged_url value? To have something like http://domain.com/my_slugged_url/page:2? Yes, in your router put something like: Router::connect('/:slug/*', array('admin'=>false,'controller' => 'posts', 'action' => 'index'),array('pass'=

Re: CakePHP themed + cache + gzip enabled + Avast AV + Chrome == Problem

2013-11-04 Thread Salines
Hi, José Lorenzo thanks for your reply. I removed my code from bootstrap.php and .htaccess file and put in the app controller following: --- public function beforeRender(){ $this->response->compress(); } --- Website is now working correctly, and the server delivers gzipped html. How to enable

Re: CakePHP themed + cache + gzip enabled + Avast AV + Chrome == Problem

2013-11-04 Thread Salines
I forgot to write that I use the latest version of CakePHP Framework 2.4.2 -- 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 th

CakePHP themed + cache + gzip enabled + Avast AV + Chrome == Problem

2013-11-04 Thread Salines
Hi people, I have a problem, wich I can not solve. on page www.detas.ba I have enabled cache and gzip. Views, css, js, are in the themed folder. (App/View/Themed/Detas/...) On my computer I use Chrome browser and Avast antivirus program. When I access a page on eg http://detas.ba/sat/792-Casio

Resource interpreted as Document but transferred with MIME type application/x-gzip

2013-10-26 Thread Salines
In the Chrome browser, if I quickly click on the link just after the page is loaded. my browser instead of html Download gzip file This all happens in the admin section, which has its own theme. Identical site regularly work on localhost without any problem. Also part of the public site works w

Re: how to send the multiple file from one input field only in cakephp

2013-09-18 Thread Salines
html5 cakephp Form->input('img',array('type'=>'file','multiple'=>true); ?> -- 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

Re: Is this the right Framework for me ?

2013-09-12 Thread Salines
Yes, cakephp is for you! https://www.youtube.com/playlist?list=PL9B2E2E37CCB661D6 https://www.youtube.com/playlist?list=PL20D663BEC6319E36 www.youtube.com/results?search_query=cakephp+tutorial -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP

Re: TwitterPlugin

2013-08-03 Thread Salines
Create Twitter datasource https://dev.twitter.com/docs/api/1.1/post/statuses/update -- 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 unsubscri

Re: Website configuration

2013-08-03 Thread Salines
Hi, in your AppController add $this->loadModel('Setting'); $this->set('Settings',$this->Setting->find('all')); -- 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 "C

Upload images via HttpSocket from server to facebook,..?

2013-07-26 Thread Salines
Hi, question for you, can I use CakePHP HttpSocket to upload photos from my server to online services such as facebook, etc? My photos are on the server and want to automatically upload them to social networks. Can not find the documented example. thanks -- Like Us on FaceBook https://www.f

Copula plugin - Help

2013-07-03 Thread Salines
Hi Guys, I'm working on a page where I need to integrate data from several external social networks. I found this interesting plugin https://github.com/CakePHP-Copula/Copula , that we may be able to help, but lack the precise integration guide and documentation. Specifically, there are two gu

Re: How to use Cache Helper and execute UPDATE query on every URL request?

2013-05-17 Thread Salines
$this->viewClass = 'Media'; > render a 1x1px image. > } > > hth, > > AD > > On Friday, 17 May 2013 00:33:24 UTC+2, Salines wrote: >> >> Hi, >> I use the Cache Helper, to cache my views, but now I need to implement a >>

How to use Cache Helper and execute UPDATE query on every URL request?

2013-05-16 Thread Salines
Hi, I use the Cache Helper, to cache my views, but now I need to implement a simple UPDATE query in my view() action. When I use the cached views, CakePHP skip actions in the the controller? I want to record the number of hits on each article! Can someone point me in the right direction? Thanks

Re: Html helper generate invalid code: No space between attributes!

2013-05-15 Thread Salines
*Sorry, html helpers working correctly.* bugs make twitter bootstrap helper. Dana četvrtak, 16. svibnja 2013. 01:43:11 UTC+2, korisnik Salines napisao je: > > *Hello * > * > * > I noticed that htmlhelper generated errors and creates not valid html code. > > Html -> ch

Html helper generate invalid code: No space between attributes!

2013-05-15 Thread Salines
*Hello * * * I noticed that htmlhelper generated errors and creates not valid html code. Html -> charset(); ?> generate: with missing quote // other errors generated by html helper http://validator.w3.org/check?uri=http%3A%2F%2Ffarm.ba%2F&charset=%28detect+automatically%29&doctype=Inline&gr

Re: Confused about routing

2013-04-17 Thread Salines
Hi, You need to organize a database in different way to achieve what you want. Create the following table: nodes - to save the name of categories or products, content types, full path as a slug. id parent_id lft rght title path published (0,1) type closure - to save deep linking associat

Re: Confused about routing

2013-04-17 Thread Salines
Hi, You need to organize a database in different way to achieve what you want. Create the following table: nodes - to save the name or category of products, content types, full path as a slug. id parent_id lft rght title path published (0,1) type closure - to save deep linking association

Re: CakePHP delayed job like this ror example???

2013-04-09 Thread Salines
Thanks -- 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 receiving emails from it, send an email to cake-p

CakePHP delayed job like this ror example???

2013-04-08 Thread Salines
Hello bakers, i'm looking for cakephp solution to make delayed / backround jobs in my new app. Here its similar RoR example what i'm looking http://www.youtube.com/watch?v=O8-9daG8cz8 What i need: 1. User submit form 2. app proccesing data 3. after save, run *delayed jobs as backrou

Re: How to perform a find with HABTM relationship?

2013-04-03 Thread Salines
I do not understand, What do you want to store in languages table? Look here: http://book.cakephp.org/2.0/en/core-libraries/behaviors/translate.html Dana srijeda, 3. travnja 2013. 15:06:49 UTC+2, korisnik Leonhart napisao je: > > How can I perform a find call if I've a Model linked to another on

Re: Product / Category Tree Help

2013-03-30 Thread Salines
Create the following db tables: table nodes, where you will have a minimum of the following fields: id, title, path, parent_id, lft, rght, type In the field: path, save the full path on which you will find your posts. Field: type, is reserved for storing content types, eg '1 '. categories, '2 '

Re: Product / Category Tree Help

2013-03-30 Thread Salines
Hi, You need to build and implement closure table, look at this excellent presentation http://www.slideshare.net/billkarwin/models-for-hierarchical-data (page 40), I have recently implemented similar to www.farm.ba , where I now have the ability to create "unlimited" number of levels. Save yo

Re: Using translate behavior and receive associated data via paginate???

2013-02-05 Thread Salines
Thanks -- 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 receiving emails from it, send an email to cake-p

Re: Using translate behavior and receive associated data via paginate???

2013-02-05 Thread Salines
EDIT Now in PricePeriodController :: index should return results in the default language. Everything works except that I can not get the localized * Apartment.name*. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received thi

Using translate behavior and receive associated data via paginate???

2013-02-05 Thread Salines
Hi, I ask for advice, how to return a translated result from a related model, where we have the following relationship: PricePeriod belongsTo Apartment Now in PricePeriodController :: index should return results in the default language. Everything works except that I can not get the localized n

Re: Help! Complex tree model pagination and paginateCount with wrong results

2013-01-07 Thread Salines
Hi, Marek I have not found the right way to use 'Containable behavior' Dana ponedjeljak, 7. siječnja 2013. 15:49:50 UTC+1, korisnik marcus33cz napisao je: > > Hi Nikola, > > have you tried using 'contain' (Containable behavior) instead of the > 'joins' you mention? > > Marek > -- Like Us on

Help! Complex tree model pagination and paginateCount with wrong results

2013-01-07 Thread Salines
Hi there, I'm working on a complex site, where the model 'post' has a tree structure. This structure allows me to organize the cascading content. Table posts has a field 'type' by which a content type, 0 tells us that the order is a group of articles, and 1 represents article. I also have anot

Re: Different columns for different languages?

2013-01-02 Thread Salines
Hi, all you need is to use TranslateBehavior http://book.cakephp.org/2.0/en/core-libraries/behaviors/translate.html -- 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 Group

Re: Please help, How to find nested posts...

2012-12-10 Thread Salines
I solved the problem of finding articles in a deep tree subordinate levels! In itself habtm tables store id of all parental level. -- 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 t

Re: Please help, How to find nested posts...

2012-12-10 Thread Salines
Thanks for the reply, this approach is ok, if you want to show child categories or articles. I am in a situation where I have a *n-level taxonomy*. Clicking on any category will have to find all child articles, skipping child categories. -- Like Us on FaceBook https://www.facebook.com/CakePHP

Please help, How to find nested posts...

2012-12-09 Thread Salines
Hello, Let me explain my problem table 'posts' was organized as a tree, where the parents are a different topic content. While the last child in the branches of the tree is always an article. As you can guess the path between the root and the last child is at different depths depending on how

Re: Category HABTM Post, find results by selected category and show related posts and paginate by posts?

2012-12-07 Thread Salines
Solved public function show($slug = null) { $this->Category->recursive = 0; $this->paginate = array( 'joins' => array( array( 'table'=> 'categories_posts', 'alias'=> 'CategoriesPost', 'type' => 'inner', 'conditions'=> array( 'Category.id = CategoriesPost.category_id' ) ), array

Re: Category HABTM Post, find results by selected category and show related posts and paginate by posts?

2012-12-07 Thread Salines
I'm lost in the code and reading documents :/ * public function show($slug = null) {* * $this->Category->Behaviors->attach('Containable');* * * * $this->paginate = array(* * 'contain' => array('Post'=>array('fields'=>array('Post.title'))),* * 'fields' => array('Category.id', 'Category.name','Categ

Category HABTM Post, find results by selected category and show related posts and paginate by posts?

2012-12-07 Thread Salines
*Category HABTM Post, find results by selected category and show related posts and paginate by posts?* Another day, another problem. When Selecting one category, output will show properly related posts. But the post results need to use pagination. How? Thanks -- Like Us on FaceBook https://w

Re: Custom routing : /parent-slug/parent-slug/title-of-my-post ?

2012-12-06 Thread Salines
The morning is wiser than the night :) Router::connect('/:path/*', array('admin'=>false,'controller' => 'posts', 'action' => 'show'),array('pass'=>array('path'))); $this -> Html -> link($post['Post']['title'], array('plugin'=>false,'admin'=>false,'controller' => 'posts', 'action' => 'show','pa

Custom routing : /parent-slug/parent-slug/title-of-my-post ?

2012-12-05 Thread Salines
Hi, there, I ask for your help, as you can see in the name of a theme, I need to implement routing with slug parent levels. How to do this? I have one tip for each post to save the full path of the table was, eg 'root-slug/parent-parent-slug/parent-slug/my-post-slug-title' but html helper does

  1   2   3   >