Archive | HowTo RSS feed for this section

[CakePHP] Tweak translate behavior get belongsTo translations

TweetIn 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

TweetIn 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 }

How to track SQL errors in CakePHP on production site

TweetIn a CakePHP application, if there is any SQL error and debug level is set to greater than 0, then the complete error message from the database is displayed on the screen, but if the debug is set to 0 it just gives something like "unable to add" or worse a blank page. This can [...]

Read full story · Comments { 3 }

[How To] Implement Facebook Like button on web page

TweetThis post is more a note to myself than a blog post. There are two Like button implementations: XFBML and Iframe. The XFBML version is more versatile, but requires use of the JavaScript SDK We can use one of the following codes to display a Facebook Like button on our site. Iframe : PLAIN TEXT [...]

Read full story · Comments { 0 }