Release 0.2 of BookmarkIt! Sidebar Plugin for Typo

Well, version 0.1 was shortlived. There was a critical difference between running with WEBrick and running in production environment with fastcgi.
The value of env[“REQUEST_URI”] did not contain “http://host”. So I found a quick solution and we’ll see if there is a better solution tomorrow.

Current solution consists of replacing

@article_url = request.env[“REQUEST_URI”]

with

@article_url = ‘http://’+request.env[“HTTP_HOST”]+
  request.env[“REQUEST_URI”]
  if @article_url.eql?(@article_url.gsub(/http:/,”).gsub(/HTTP:/,”))

You live and learn…

bookmarkit-0.2.zip and
bookmarkit-0.2.tgz

Tags: , , ,

20 Responses to “Release 0.2 of BookmarkIt! Sidebar Plugin for Typo”

  1. nemonoid March 10, 2006 at 2:13 am #

    Hi,
    I was just about to try knock together something similar when I came across your post on typeforums. I’d love to try the plugin but your download links seems to be dead!

    nem

  2. Pascal March 10, 2006 at 2:13 am #

    Sorry about that! I guess Capistrano got in the way here. I’ll need to find a solution.
    In any case, the files are back where they belong.

  3. nemonoid March 10, 2006 at 2:13 am #

    Thanks a million, the plugin is excellent, just what I was looking for. I guess I’ll have to find something else for my first foray into Typo plugins :)

    nem

  4. Pascal March 10, 2006 at 2:13 am #

    Thanks!

    How about writing a sidebar plugin to list the most recent articles in a category, or the most recent articles in a tag?
    Or one to list the most popular articles (that one is a bit more tricky because Articles would need to keep track of impressions.
    That was next on my list, but would gladly let you take a stab at it!

  5. Devlin Palmer March 10, 2006 at 2:13 am #

    I just tried installing, and instead of displaying the tiny images, it displays the text in large (22px) text. Is it meant to be like this, or how can I change it to be images, as on this website?

  6. Pascal March 10, 2006 at 2:13 am #

    Devlin,
    when you extract the archive, it will extract everything into a directory named bookmarkit, this directory contains a _public_ directory the content of that should be copied to your own public directory. At runtime, it will expect to have the images under [root URL]/images/bookmarkit/.
    For example, here, the picture for delicious is under http://blog.nanorails.com/images/bookmarkit/delicious.gif

  7. tanguy:r March 10, 2006 at 2:13 am #

    Hi there,
    Just so that you’re informed, the plugin seems not to work with trunk. I get an infamous “Application error (Rails)” while rendering the sidebar block in the Admin panel. Rails seems to be waiting for a template config ?…

  8. Pascal March 10, 2006 at 2:13 am #

    Tanguy, did you try the version attached to [Upgraded to typo 4](http://blog.nanorails.com/articles/2006/08/08/upgraded-to-typo-4-0)

  9. tanguy:r March 10, 2006 at 2:13 am #

    Thanks for the update :)
    Unfortunately, it won’t work neither. I’d probably better upgrade my rails first…

  10. Pascal March 10, 2006 at 2:13 am #

    :(

    What revision of typo are you using? Typo has its won version of rails. They recently changed the sidebars, so that may be why.

  11. tanguy:r March 10, 2006 at 2:13 am #

    You’re right, it would probably not help.
    I’m using Typo 4.0.3, installed from svn trunk.
    As a matter of fact, reading through the logs won’t help, as it just tells of an “unimplemented” error :/
    I’ll try to find out what happened exactly and let you know ;)

  12. Joe Rosenblum March 10, 2006 at 2:13 am #

    Hi, I updated the code to work with typo 4.0. Down load this tar file and unpack it into your components/plugins/sidebar directory. It’s just two files now (instead of three):

    * bookmarkit_controller.rb
    * bookmarkit/content.rhtml

    You’ll still need the images from Pascal’s original code. Happy bookmarking!

  13. Pascal March 10, 2006 at 2:13 am #

    Excellent, Joe. Thank you!

    Chris, you should try Joe’s version.

  14. Jesse March 10, 2006 at 2:13 am #

    Not showing up for me either – applied the 2 files above for 4.0. My version is 4.0.3.

  15. Pascal March 10, 2006 at 2:13 am #

    Jesse, did you try the [version for 4.0](http://blog.nanorails.com/articles/2006/08/08/upgraded-to-typo-4-0)

  16. Jesse March 10, 2006 at 2:13 am #

    Yes – I replaced the files in the version above with the version for 4 (there were 2 of them).

  17. Pascal March 10, 2006 at 2:13 am #

    I see. I haven’t upgraded to the latest version. It usually is quite a bit of work with some of the custom stuff I have.

    I’ll take a look this coming week and may use a different approach like I did for the TextLinkAds plugin (which is just a basic rails plugin, and no longer a typo plugin). This will avoid breaking all the time, and be a better approach to integrate it in a post.

  18. Pascal March 10, 2006 at 2:13 am #

    Jesse, there is new (and improved) version of the plugin. Chec it out in this [new post](http://blog.nanorails.com/articles/2006/12/18/bookmark-it-rails-plugin-for-adding-bookmarklets)

  19. Jesse March 10, 2006 at 2:13 am #

    awesome! Thanks – that totally worked, and I have them showing on individual article pages now too!

  20. Pascal March 10, 2006 at 2:13 am #

    :) you are welcome

1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208| buy cheap tenormin buy karela online purchase online without prescription nolvadex proscar uk where to buy no prescription needed secure online purchase risperdal no prescription cheapest accutane pills no prescription antibiotics online purchase indocin generic tablets buy herbal somaeurax and cost buy without a prescription nitroglycerinAccutane Online Doxycycline online Buy Cheap Lexapro Online No Prescription Prednisone Online payday loans online no checking account