[CakePHP] Build javascript widget for affiliate sites using CakePHP

Recently I had a requirement from client. Additionally, it went on, that the snippet should be very simple like PLAIN TEXT HTML: <script src="http://baseurlhere/test/test"></script> Simple I thought I will just document write an iframe and be done with it but quickly discovered that if you want the CSS of the parent document to get applied [...]

Read full story · Comments { 0 }

[CakePHP] Code Sniff Updates

In an earlier post, Dr.Sani discussed about CodeSniffer and sniffs for CakePHP Standard. In that we saw how to define a new coding standard using the existing sniffs. With the release of PHP_CodeSniffer v1.3, the way we define a new standard has changed. Please read Code sniffs for CakePHP and then some more before going [...]

Read full story · Comments { 0 }

[CakePHP] Tweak translate behavior get belongsTo translations

In one of my earlier posts, I had written about How to fallback to default language while using Translate behavior. This is one more Translate behavior tweak (in continuation with the previous) to get belongsTo data's translations in current locale. By default, Translate behavior only gets current model's translations in current locale and you need [...]

Read full story · Comments { 1 }

[How To] Index merging in Sphinx

In an earlier post, Live index updates in Sphinx, we saw how to use main+delta indexing scheme for almost realtime index updates. In that we created two indexes as follows: main : Which is the archive of all the documents delta : Which holds only the newer documents One minor drawback in the above scheme [...]

Read full story · Comments { 0 }