Permalink
Browse files

new file: MIT-LICENSE

  • Loading branch information...
1 parent 52c83e6 commit 1eca3bfd32971f0e7b3b906d7c385642013e0a1f Thiyagarajan Veluchamy committed Feb 10, 2009
Showing with 397 additions and 0 deletions.
  1. +20 −0 MIT-LICENSE
  2. +141 −0 README
  3. BIN assets/images/Thumbs.db
  4. BIN assets/images/blinkbits.png
  5. BIN assets/images/blinklist.png
  6. BIN assets/images/blogmarks.png
  7. BIN assets/images/blogmemes.png
  8. BIN assets/images/bluedot.png
  9. BIN assets/images/bumpzee.png
  10. BIN assets/images/comments.png
  11. BIN assets/images/connotea.png
  12. BIN assets/images/delicious.png
  13. BIN assets/images/delirious.png
  14. BIN assets/images/digg.png
  15. BIN assets/images/diigo.png
  16. BIN assets/images/dotnetkicks.png
  17. BIN assets/images/dzone.png
  18. BIN assets/images/facebook.png
  19. BIN assets/images/fark.png
  20. BIN assets/images/favorites.png
  21. BIN assets/images/feedmelinks.png
  22. BIN assets/images/fleck.png
  23. BIN assets/images/friendsite.png
  24. BIN assets/images/furl.png
  25. BIN assets/images/google.png
  26. BIN assets/images/icerocket.png
  27. BIN assets/images/kaboodle.png
  28. BIN assets/images/linkagogo.png
  29. BIN assets/images/live.png
  30. BIN assets/images/magnolia.png
  31. BIN assets/images/mailto.png
  32. BIN assets/images/maple.png
  33. BIN assets/images/misterwong.png
  34. BIN assets/images/myspace.png
  35. BIN assets/images/netscape.png
  36. BIN assets/images/netvouz.png
  37. BIN assets/images/newsvine.png
  38. BIN assets/images/plugim.png
  39. BIN assets/images/popcurrent.png
  40. BIN assets/images/propeller.png
  41. BIN assets/images/rawsugar.png
  42. BIN assets/images/reddit.png
  43. BIN assets/images/rojo.png
  44. BIN assets/images/shoutwire.png
  45. BIN assets/images/simpy.png
  46. BIN assets/images/skirt.png
  47. BIN assets/images/slashdot.png
  48. BIN assets/images/sphere.png
  49. BIN assets/images/spurl.png
  50. BIN assets/images/squidoo.png
  51. BIN assets/images/stumbleupon.png
  52. BIN assets/images/taggly.png
  53. BIN assets/images/tailrank.png
  54. BIN assets/images/technorati.png
  55. BIN assets/images/thisnext.png
  56. BIN assets/images/twitter.png
  57. BIN assets/images/vigillar.png
  58. BIN assets/images/webride.png
  59. BIN assets/images/wists.png
  60. BIN assets/images/yahoo.png
  61. +31 −0 assets/stylesheets/bookmark_url_to.css
  62. +10 −0 init.rb
  63. +28 −0 install_assets.rb
  64. +159 −0 lib/bookmark_url_to.rb
  65. +8 −0 test/bookmark_url_to_test.rb
View
20 MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2009 Heurion Consulting
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
141 README
@@ -0,0 +1,141 @@
+================================================================
+Bookmark Url To
+================================================================
+
+Allows users to Bookmark their pages to standard websites
+
+Currently we support about 57 types as listed
+
+1. BlinkBits (:blinkbits)
+2. BlinkList (:blinklist)
+3. BlogMarks (:blogmarks)
+4. BlogMemes (:blogmemes)
+5. BlueDot (:bluedot)
+6. Bumpzee (:bumpzee)
+7. Co.mments (:comments)
+8. Connotea (:connotea)
+9. Del.icio.us (:delicious)
+10. De.lirio.us (:delirious)
+11. Digg (:digg)
+12. Diigo (:diigo)
+13. DotNetKicks (:dotnetkicks)
+14. Dzone (:dzone)
+15. Fark (:fark)
+16. Facebook (:facebook)
+17. Favorites (:favorites) -- (Add Favorites in Browser)
+18. FeedmeLinks (:feedmelinks)
+19. Fleck (:fleck)
+20. FriendSite (:friendsite)
+21. Furl (:furl)
+22. Google (:google)
+23. IceRocket(:icerocket)
+24. Kaboodle (:kaboodle)
+25. LinkAGoGo (:linkagogo)
+26. Ma.gnolia (:magnolia)
+27. MailTo (:mailto) -- open e-mail editor(outlook)
+28. Maple (:maple)
+29. MisterWong :misterwong)
+30. MySpace (:myspace)
+31. Netscape (:netscape)
+32. NetVouz (:netvouz)
+33. Newsvine (:newsvine)
+34. PlugIm (:plugim)
+35. PopCurrent (:popcurrent)
+36. Propeller (:propeller)
+37. RawSugar (:rawsugar)
+38. Reddit (:reddit)
+39. Rojo (:rojo)
+40. ShoutWire (:shoutwire)
+41. Simpy (:simpy)
+42. Sk*rt (:skirt)
+43. SlashDot (:slashdot)
+44. SphereIt (:sphere)
+45. Spurl (:spurl)
+46. Squidoo (:squidoo)
+47. StumbleUpon (:stumbleupon)
+48. Taggly (:taggly)
+49. TailRank (:tailrank)
+50. Technorati (:technorati)
+51. ThisNext (:thisnext)
+52. Twitter (:twitter)
+53. WebRide (:webride)
+54. Wists (:wists)
+55. Vigillar (:vigillar)
+56. Yahoo (:yahoo)
+57. WindowsLive (:live)
+---------------------------------------------------------------
+ Installation
+----------------------------------------------------------------
+
+Install
+ * Run the following command:
+ go to vendors/plugins folder and run the following command
+ git clone git://github.com/heurionconsulting/bookmark_url_to.git
+
+--------------------------------------------------------------
+ Usage
+---------------------------------------------------------------
+
+ * Once installation is doneall you have to do is to call the below 2 lines of code in your Views i.e. where you want to show the url links
+
+<%= stylesheet_link_tag "bookmark_url_to" %>
+<%= apply_bookmark_url_to(url,title,sites,options) %>
+
+ where
+ url -> URL of that page which you want to bookmark e.g. http://localhost:3000/product/show/1 or http://localhost:3000/product/my_product_item
+ title -> title in which the url has to be bookmarked e.g. my_product_item
+ sites -> Collection of all the sites to which you want to associate your url and title to.
+ conditions-> [:all] -- Associate this to allow all the 58 links to be added to the list
+ [:google, :facebook, :myspace,....] -- Show only google, facebook, myspace elements in the list
+ options -> There are 2 options that could be added to execute this plugin
+ :text --> In this Option you can give the text that you want to show to the viewers before you
+ see the site links (generally it is "share"). By default this options is set to empty
+ :visibility_type --> This option is used to control the visibility type. There are only 3 types listed
+ "image" --> Show only image of the sites
+ "text" --> Show only the site names
+ "both" --> Show both image and text
+ :site_text --> This option is to replace any of the standard text that you want to show to the user instead of the standard text.
+ If you use this option then the text will be replaced in the text as visible to the user and in the alt section
+ of the image element.
+ * styling the application
+ When ever you install the plugin and run the server after installation, some of the files get loaded into the system. One of these are
+ bookmark_url_to.css which has necessary divs and classes can be styled. The styled elements are
+
+ #bookmark_url_to{..put your styling code here } this is the outer div
+which you can style to set width
+
+ .bookmark_url_to_element{...put your styling code here} this is the div for each
+of the div where each type of site is selected.
+
+ .bookmark_url_to_text{...put your styling code here} this div is for the div where you want to add you text.
+
+------------------------------------------------------------------------------------------
+ Examples
+-------------------------------------------------------------------------------------------
+
+example method call for all sites would look like
+<%= apply_bookmark_url_to("http://localhost:3000/","TEST",[:all],{:text=>"share : ",:visibility_type=>"text"}) %>
+
+example method call for all sites to show both image and text
+<%= apply_bookmark_url_to("http://localhost:3000/","TEST",[:all],{:text=>"share : ",:visibility_type=>"both"}) %>
+
+example method call for a few set of sites to show only image
+<%= apply_bookmark_url_to("http://localhost:3000/","TEST",[:google,:facebook,:myspace, :favorites,:digg,:technorati],{:text=>"share : ",:visibility_type=>"image"}) %>
+
+example method call for all sites to show text in required format
+<%= apply_bookmark_url_to("http://localhost:3000/","TEST",[:all],{:text=>"share : ",:visibility_type=>"both",:site_text=>{:delicious=>"del.icio.us",:delirious=>"de.lirio.us",:comments=>"co.mments"}}) %>
+
+
+--------------------------------------------------------------------
+ Credits
+---------------------------------------------------------------------
+
+1. Satish N Kota - Heurion Consutling
+2. http://dahrjamailiraq.com/wp-content/plugins/social_bookmarks/sites_EN.xml
+3. Drupal CMS - Service Links module
+
+---------------------------------------------------------------------
+ License
+---------------------------------------------------------------------
+
+Refer to MIT License file
View
BIN assets/images/Thumbs.db
Binary file not shown.
View
BIN assets/images/blinkbits.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/blinklist.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/blogmarks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/blogmemes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/bluedot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/bumpzee.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/comments.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/connotea.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/delicious.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/delirious.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/digg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/diigo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/dotnetkicks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/dzone.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/facebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/fark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/favorites.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/feedmelinks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/fleck.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/friendsite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/furl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/google.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/icerocket.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/kaboodle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/linkagogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN assets/images/live.png
Diff not rendered.
View
BIN assets/images/magnolia.png
Diff not rendered.
View
BIN assets/images/mailto.png
Diff not rendered.
View
BIN assets/images/maple.png
Diff not rendered.
View
BIN assets/images/misterwong.png
Diff not rendered.
View
BIN assets/images/myspace.png
Diff not rendered.
View
BIN assets/images/netscape.png
Diff not rendered.
View
BIN assets/images/netvouz.png
Diff not rendered.
View
BIN assets/images/newsvine.png
Diff not rendered.
View
BIN assets/images/plugim.png
Diff not rendered.
View
BIN assets/images/popcurrent.png
Diff not rendered.
View
BIN assets/images/propeller.png
Diff not rendered.
View
BIN assets/images/rawsugar.png
Diff not rendered.
View
BIN assets/images/reddit.png
Diff not rendered.
View
BIN assets/images/rojo.png
Diff not rendered.
View
BIN assets/images/shoutwire.png
Diff not rendered.
View
BIN assets/images/simpy.png
Diff not rendered.
View
BIN assets/images/skirt.png
Diff not rendered.
View
BIN assets/images/slashdot.png
Diff not rendered.
View
BIN assets/images/sphere.png
Diff not rendered.
View
BIN assets/images/spurl.png
Diff not rendered.
View
BIN assets/images/squidoo.png
Diff not rendered.
View
BIN assets/images/stumbleupon.png
Diff not rendered.
View
BIN assets/images/taggly.png
Diff not rendered.
View
BIN assets/images/tailrank.png
Diff not rendered.
View
BIN assets/images/technorati.png
Diff not rendered.
View
BIN assets/images/thisnext.png
Diff not rendered.
View
BIN assets/images/twitter.png
Diff not rendered.
View
BIN assets/images/vigillar.png
Diff not rendered.
View
BIN assets/images/webride.png
Diff not rendered.
View
BIN assets/images/wists.png
Diff not rendered.
View
BIN assets/images/yahoo.png
Diff not rendered.
View
31 assets/stylesheets/bookmark_url_to.css
@@ -0,0 +1,31 @@
+#bookmark_url_to
+{
+ width:100%;
+ float:left;
+ text-align:left;
+}
+
+#bookmark_url_to_text
+{
+ font-weight:bold;
+ font-size:12px;
+ float:left;
+}
+
+.bookmark_url_to_element
+{
+ width:100%;
+ margin:2px;
+ float:left;
+}
+
+.bookmark_url_to_element a
+{
+ text-decoration:none;
+ color: #000000;
+}
+
+.bookmark_url_to_element a img
+{
+ border:none
+}
View
10 init.rb
@@ -0,0 +1,10 @@
+# Add any initiallizable activities
+require 'bookmark_url_to'
+require 'ftools'
+ActionController::Base.helper BookmarkUrlTo
+
+begin
+ require File.dirname(__FILE__) + '/install_assets'
+rescue
+ raise $! unless RAILS_ENV == 'production'
+end
View
28 install_assets.rb
@@ -0,0 +1,28 @@
+Dir.chdir(Dir.getwd.sub(/vendor.*/, '')) do
+
+ def copy_files(source_path, destination_path, directory)
+ source, destination = File.join(directory, source_path), File.join(RAILS_ROOT, destination_path)
+ FileUtils.mkdir(destination) unless File.exist?(destination)
+ files = Dir.glob(source+'/*.*')
+ for file in files
+ filename= file.split("/").last
+ unless(File.exist?(destination+"/#{filename}"))
+ FileUtils.cp(file,destination+"/#{filename}")
+ end
+ end
+end
+
+directory = File.dirname(__FILE__)
+
+ #copy images
+ srcpath="/assets/images"
+ destpath="/public/images/bookmark_url_to"
+
+ copy_files(srcpath,destpath,directory)
+
+ #copy stylesheets
+ srcpath="/assets/stylesheets"
+ destpath="/public/stylesheets"
+ copy_files(srcpath,destpath,directory)
+
+end
View
159 lib/bookmark_url_to.rb
@@ -0,0 +1,159 @@
+# BookmarkUrlTo
+ module BookmarkUrlTo
+ def apply_bookmark_url_to(url,title,sites=[:all],options = {})
+ visibility_text=""
+ unless options[:text].nil?
+ visibility_text =options[:text]
+ end
+ visibility_type="image"
+ unless options[:visibility_type].nil?
+ visibility_type=options[:visibility_type].downcase
+ end
+ if sites.size == 1 && sites[0]==:all
+ sites = [:blinkbits,:blinklist,:blogmarks,:blogmemes,:bluedot,:bumpzee,:comments,:connotea,:delicious,:delirious,:digg,:diigo,:dotnetkicks,:dzone,:fark,:facebook,:favorites,:feedmelinks,:fleck,:friendsite,:furl,:google,:icerocket,:kaboodle,:linkagogo,:live,:magnolia,:mailto,:maple,:misterwong,:myspace,:netscape,:netvouz,:newsvine,:plugim,:popcurrent,:propeller,:rawsugar,:reddit,:rojo,:shoutwire,:simpy,:skirt,:slashdot,:sphere,:spurl,:squidoo,:stumbleupon,:taggly,:tailrank,:technorati,:thisnext,:twitter,:webride,:wists,:vigillar,:yahoo]
+ end
+ output = "<div id='bookmark_url_to'><div id='bookmark_url_to_text'>#{visibility_text}</div>"
+ for type in sites
+ href = ""
+ case type
+ when :mailto
+ href = "mailto:?subject=#{title}-#{url}"
+ when :digg
+ href = "http://digg.com/submit?phase=2&url=#{url}&title=#{title}"
+ when :delicious
+ href = "http://del.icio.us/post?url=#{url}&title=#{title}"
+ when :facebook
+ href="http://www.facebook.com/sharer.php?u=#{url}&t=#{title}"
+ when :google
+ href="http://www.google.com/bookmarks/mark?op=add&bkmk=#{url}&title=#{title}"
+ when :stumbleupon
+ href = "http://www.stumbleupon.com/submit?url=#{url}&title=#{title}"
+ when :propeller
+ href="http://www.propeller.com/submit/?U=#{url}&T=#{title}"
+ when :vigillar
+ href = "http://vigillar.se/submit?edit[url]=#{url}&edit[title]=#{title}"
+ when :reddit
+ href="http://reddit.com/submit?url=#{url}&title=#{title}"
+ when :magnolia
+ href = "http://ma.gnolia.com/bookmarklet/add?url=#{url}&title=#{title}"
+ when :newsvine
+ href="http://www.newsvine.com/_tools/seed&save?u=#{url}&h=#{title}"
+ when :furl
+ href="http://www.furl.net/storeIt.jsp?u=#{url}&t=#{title}"
+ when :yahoo
+ href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=#{url}&t=#{title}"
+ when :technorati
+ href="http://technorati.com/cosmos/search.html?url=#{url}"
+ when :icerocket
+ href="http://blogs.icerocket.com/search?q=#{url}"
+ when :blinkbits
+ href="http://blinkbits.com/bookmarklets/save.php?v=1&source_url=#{url}&title=#{title}"
+ when :blinklist
+ href="http://blinklist.com/index.php?Action=Blink/addblink.php&Name=#{title}&Description=#{title}&Url=#{url}"
+ when :blogmarks
+ href="http://blogmarks.net/my/new.php?mini=1&simple=1&url=#{url}&title=#{title}"
+ when :blogmemes
+ href="http://www.blogmemes.net/post.php?url=#{url}&title=#{title}"
+ when :bluedot
+ href="http://bluedot.us/Authoring.aspx?u=#{url}&t=#{title}"
+ when :bumpzee
+ href="http://www.bumpzee.com/bump.php?u=#{url}"
+ when :comments
+ href="http://co.mments.com/track?url=#{url}&title=#{title}"
+ when :connotea
+ href="http://www.connotea.org/addpopup?continue=confirm&uri=#{url}&title=#{title}"
+ when :delirious
+ href="http://de.lirio.us/login/?action=add&address=#{url}&title=#{title}"
+ when :diigo
+ href="http://www.diigo.com/post?url=#{url}&title=#{title}"
+ when :dotnetkicks
+ href="http://www.dotnetkicks.com/kick/?url=#{url}&title=#{title}"
+ when :dzone
+ href="http://www.dzone.com/links/add.html?description=#{title}&url=#{url}&title=#{title}"
+ when :fark
+ href="http://cgi.fark.com/cgi/fark/edit.pl?new_url=#{url}&new_comment=#{title}&new_comment=#{title}&linktype=Misc"
+ when :feedmelinks
+ href="http://feedmelinks.com/categorize?from=toolbar&op=submit&name=#{title}&url=#{url}&version=0.7"
+ when :fleck
+ href="http://extension.fleck.com/?v=b.0.804&url=#{url}"
+ when :friendsite
+ href="http://FriendSite.com/users/bookmarks/?u=#{url}&t=#{title}"
+ when :kaboodle
+ href="http://www.kaboodle.com/za/selectpage?p_pop=false&pa=url&u=#{url}"
+ when :linkagogo
+ href="http://www.linkagogo.com/go/AddNoPopup?url=#{url}&title=#{title}"
+ when :maple
+ href="http://www.maple.nu/submit.php?url=#{url}"
+ when :misterwong
+ href="http://www.mister-wong.com/index.php?action=addurl&bm_url=#{url}&bm_description=#{title}"
+ when :netscape
+ href="http://www.netscape.com/submit/?U=#{url}&T=#{title}"
+ when :netvouz
+ href="http://netvouz.com/action/submitBookmark?url=#{url}&title=#{title}&popup=no"
+ when :plugim
+ href="http://www.plugim.com/submit?url=#{url}&title=#{title}"
+ when :popcurrent
+ href="http://popcurrent.com/submit?url=#{url}&title=#{title}"
+ when :rawsugar
+ href="http://www.rawsugar.com/tagger/?turl=#{url}&tttl=#{title}"
+ when :rojo
+ href="http://www.rojo.com/add-subscription/?resource=#{url}</"
+ when :simpy
+ href="http://www.simpy.com/simpy/LinkAdd.do?href=#{url}&title=#{title}"
+ when :skirt
+ href="http://www.sk-rt.com/submit.php?url=#{url}"
+ when :slashdot
+ href="http://slashdot.org/bookmark.pl?url=#{url}&title=#{title}"
+ when :shoutwire
+ href="http://www.shoutwire.com/?p=submit&link=#{url}"
+ when :squidoo
+ href="http://www.squidoo.com/lensmaster/bookmark?#{url}"
+ when :sphere
+ href="http://www.sphere.com/search?q=sphereit:#{url}&title=#{title}"
+ when :spurl
+ href="http://www.spurl.net/spurl.php?url=#{url}&title=#{title}"
+ when :taggly
+ href="http://taggly.com/bookmarks.php/pass?action=add&address=#{url}"
+ when :tailrank
+ href="http://tailrank.com/share/?title=#{title}&link_href=#{url}"
+ when :thisnext
+ href="http://www.thisnext.com/pick/new/submit/sociable/?url=#{url}&name=#{title}"
+ when :webride
+ href="http://webride.org/discuss/split.php?uri=#{url}&title=#{title}"
+ when :wists
+ href="http://www.wists.com/t.php?c=null&r=#{url}&u=#{url}&title=#{title}"
+ when :favorites
+ href="javascript:window.external.AddFavorite(\"#{url}\",\"#{title}\");"
+ when :live
+ href="http://favorites.live.com/"
+ when :myspace
+ href="http://www.myspace.com/Modules/PostTo/Pages/?u=#{url}&t=#{title}"
+ when :twitter
+ href="http://twitter.com/home?status=Add+This:+#{url}"
+ end
+
+ site_text = type
+ unless options[:site_text].nil?
+ unless options[:site_text][type].nil?
+ site_text =options[:site_text][type]
+ end
+ end
+ unless href.empty?
+ output << "<div class='bookmark_url_to_element'><a href='#{href}'>"
+ case visibility_type
+ when "image"
+ output << "<img src='/images/bookmark_url_to/#{type}.png' alt='submit to #{site_text}' />"
+ when "text"
+ output << "#{site_text}"
+ when "both"
+ output << "<img src='/images/bookmark_url_to/#{type}.png' alt='submit to #{site_text}' />#{site_text}"
+ else
+ output << "<img src='/images/bookmark_url_to/#{type}.png' alt='submit to #{site_text}' />"
+ end
+ output << "</a></div>"
+ end
+ end
+ output << "</div>"
+ output
+ end
+ end
View
8 test/bookmark_url_to_test.rb
@@ -0,0 +1,8 @@
+require 'test/unit'
+
+class BookmarkUrlToTest << Test::Unit::TestCase
+
+ def first_test
+ #no tests to be done
+ end
+end

0 comments on commit 1eca3bf

Please sign in to comment.