Facebook fb:multi-friend-selector In Page Tab

To those spending days and hours searching for a solution on putting an fb:multi-friend-selector inside a Page Tab, well, sadly you won't find anything out there. The challenge is to make it work inside a page tab. Note that page tab is restricted to 520 pixels wide only. So no matter what you do, you'd still get this dialog box cut off since it's stuck at 580px wide.

In our case, we tried a different approach. We went using window popups. This way we could still display the multi-friend-selector preview dialog in its entirety.

I think fb:multi-friend-selector is only intended in Canvas Page. But that doesn't hinder us now.

Grab the Picture of a Facebook Graph Object

Here's what you need to do to get to the actual location of a Facebook profile picture using PHP cURL (this comes in handy if you plan to store the picture somewhere else). In particular, we can grab the pictures of People, Events, Groups, Pages, Applications, and Photo Albums (these are called objects in Graph API).

A note on GIT's .gitignore

Here's an excerpt from Nick Quaranto's "Ignoring Files" article. I tend to forget this all the time.

Convert text URLs or Hyperlinks to clickable links

Here's a PHP code that can parse text URLs or Hyperlinks into a clickable link. This is useful when displaying text contents with inline links written along.

Tips on Developing Silverstripe Applications

Here's a handful of tips dedicated to all Silverstripe CMS developers out there (because I myself develop SilverStripe applications too).

Tips on Upgrading to Silverstripe CMS version 2.4

I just switched to Silverstripe 2.4+ and came accross several changes in contrast with SS2.3+. I'm gonna list here few of those changes so you guys will be aware of them. And I pledge to update this from time to time. Hopefully, this will guide you when you finally decide to upgrade your old version. Or this might as well motivate you to upgrade like me.

Drupal 6: How to determine if User is Logged In or not

In Drupal, data for the current user is stored in the global variable $user. To determine if the user is logged in, use the following code:

Drupal 6: Custom Online Members Block

With the help of some PHP codes, showing a block that contains a list of your site's online members can be achieved (with a left floating picture beside each member name). The code was adopted from the Drupal 6 core, User Module. We all know that there is already a bundled block for this with Block name Who's-Online. But if you really want to do more about it, like adding a user picture, then you can do so with Blocks (I'm pretty sure you can do this with Views as well). And don't forget to enable PHP-Filter module. This can be found at admin/build/modules/list under Core-Optional modules. Then select PHP Code option among the list of Input Formats available when creating the new block.

Drupal 6: Random content using Views

Retrieving database content in Drupal 6 has never been easier with Views Module. But, what if you wanted to get the results in random order? Well this is so simple.
  • open your Views for editing. Create one if you haven't done so.
  • in the Sort Criteria section, click the Add button then select Global:Random.

With the rest of this particular Views configurations all set, go hit the Preview button. Seeing the results in Random, hit Preview once again.

And there you have it.




Bookmark and Share