Explore
Gaia Soulmates
 Advertising keeps Gaia free! Interested in sponsoring us?

Did you know, Part III (How to 'roll' your own prayer wheel)

Posted on Aug 25th, 2006 by Mila : the unquiet one Mila
I've had several requests about Zaadz' 'digital prayer wheel' and how to implement it on others' web sites. There are a lot of ways to do it -- you could simply add it in the HTML of each page of your site if you have access to that, for example. The way we do it at Zaadz is by adding an HTTP header. In Rails, that's done like so:
class ApplicationController < ActionController::Base
  before_filter :powered_by

  .. mysterious and wonderful Zaadz code snipped for brevity ...

  def powered_by
    @headers["X-Powered-By"] = "Zaadz"
    @headers["X-Mantra"] = "Om Mani Padme Hum"
  end
end
This tells the server to send X-Mantra: Om Mani Padme Hum to your browser as part of the response when you load our page. You never actually see this, since request and response headers are part of the way our server and your browser 'talk'. The X in X-mantra serves only to tell both server and browser that this is an extra header that it both can safely ignore. In PHP, you can do the same with the header() command, and most other web languages have some method for doing the same thing. Anyway, last geeky/techy post from me for a little bit. I want to return to other topics that've been on my mind lately.
Access_public Access: Public 3 Comments Print views (1,351)  
iam : iam reborn in every moment
37 minutes later
iam said

Thank you Jake,

You are a friend and a wonder. It will be great to participate in just one more way. I am in your dept.

iam

about 5 hours later
Peggy J said

Always enjoying your geeky/techy posting!

~C4Chaos : (hyper)linker
2 days later
~C4Chaos said

thanks Jake! you inspire me! :)

You have to be a Gaia member to post comments.
Login or Join now!