Sociable - Version 2.5

Version Description

Download this release

Release Info

Developer joostdevalk
Plugin Icon wp plugin Sociable
Version 2.5
Comparing to
See all releases

Version 2.5

Files changed (83) hide show
  1. description_selection.js +16 -0
  2. i18n/sociable-de_DE.mo +0 -0
  3. i18n/sociable-de_DE.po +133 -0
  4. i18n/sociable-fr_FR.mo +0 -0
  5. i18n/sociable-fr_FR.po +133 -0
  6. i18n/sociable-hu_HU.mo +0 -0
  7. i18n/sociable-hu_HU.po +134 -0
  8. i18n/sociable-it_IT.mo +0 -0
  9. i18n/sociable-it_IT.po +133 -0
  10. images/blinkbits.png +0 -0
  11. images/blinklist.png +0 -0
  12. images/blogmarks.png +0 -0
  13. images/blogmemes.png +0 -0
  14. images/blogter.png +0 -0
  15. images/bluedot.png +0 -0
  16. images/bookmarkhu.png +0 -0
  17. images/bumpzee.png +0 -0
  18. images/co.mments.gif +0 -0
  19. images/connotea.png +0 -0
  20. images/delicious.png +0 -0
  21. images/delirious.png +0 -0
  22. images/digg.png +0 -0
  23. images/dotnetkicks.png +0 -0
  24. images/dzone.png +0 -0
  25. images/facebook.png +0 -0
  26. images/fark.png +0 -0
  27. images/feedmelinks.png +0 -0
  28. images/fleck.gif +0 -0
  29. images/furl.png +0 -0
  30. images/googlebookmark.png +0 -0
  31. images/gwar.gif +0 -0
  32. images/haohao.png +0 -0
  33. images/hemidemi.png +0 -0
  34. images/im.png +0 -0
  35. images/indiagram.png +0 -0
  36. images/indianpad.png +0 -0
  37. images/kickit.png +0 -0
  38. images/linkagogo.png +0 -0
  39. images/linkter.png +0 -0
  40. images/live.png +0 -0
  41. images/magnolia.png +0 -0
  42. images/misterwong.gif +0 -0
  43. images/mixx.png +0 -0
  44. images/myshare.png +0 -0
  45. images/netscape.gif +0 -0
  46. images/netvouz.png +0 -0
  47. images/newsvine.png +0 -0
  48. images/plugim.png +0 -0
  49. images/popcurrent.png +0 -0
  50. images/ppnow.png +0 -0
  51. images/rawsugar.png +0 -0
  52. images/rec6.gif +0 -0
  53. images/reddit.png +0 -0
  54. images/scoopeo.png +0 -0
  55. images/scuttle.png +0 -0
  56. images/shadows.png +0 -0
  57. images/simpy.png +0 -0
  58. images/slashdot.png +0 -0
  59. images/smarking.png +0 -0
  60. images/sphere.png +0 -0
  61. images/sphinn.png +0 -0
  62. images/spurl.png +0 -0
  63. images/stumbleupon.png +0 -0
  64. images/taggly.png +0 -0
  65. images/tailrank.png +0 -0
  66. images/technorati.png +0 -0
  67. images/thisnext.png +0 -0
  68. images/twitter.png +0 -0
  69. images/webride.png +0 -0
  70. images/wists.png +0 -0
  71. images/wykop.gif +0 -0
  72. images/yahoomyweb.png +0 -0
  73. readme.txt +45 -0
  74. sociable-admin.css +40 -0
  75. sociable.css +48 -0
  76. sociable.php +821 -0
  77. tool-man/coordinates.js +154 -0
  78. tool-man/core.js +172 -0
  79. tool-man/css.js +17 -0
  80. tool-man/drag.js +235 -0
  81. tool-man/dragsort.js +87 -0
  82. tool-man/events.js +43 -0
  83. wists.js +205 -0
description_selection.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // http://www.quirksmode.org/js/selected.html
2
+ function sociable_get_selection() {
3
+ if (window.getSelection)
4
+ return "" + window.getSelection();
5
+ else if (document.getSelection)
6
+ return "" + document.getSelection();
7
+ else if (document.selection)
8
+ return "" + document.selection.createRange().text;
9
+ }
10
+
11
+ function sociable_description_link(link, attribute) {
12
+ if (typeof(link.original_link) == "undefined")
13
+ link.original_link = link.href;
14
+ link.href = link.original_link + "&" + attribute + "=" + sociable_get_selection();
15
+ return false;
16
+ }
i18n/sociable-de_DE.mo ADDED
Binary file
i18n/sociable-de_DE.po ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: sociable\n"
4
+ "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-01-31 22:10-0600\n"
6
+ "Last-Translator: Peter Harkins <ph@push.cx>\n"
7
+ "Language-Team: Thomas Schoessow <posteingang@tschoessow.org>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-Language: German\n"
12
+ "X-Poedit-Country: GERMANY\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: __;_e\n"
15
+ "X-Poedit-Basepath: /home/malaprop/proj/sociable\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+
18
+ #: sociable.php:387
19
+ msgid "These icons link to social bookmarking sites where readers can share and discover new web pages."
20
+ msgstr "Diese Icons verzweigen auf soziale Netzwerke bei denen Nutzer neue Inhalte finden und mit anderen teilen können."
21
+
22
+ #: sociable.php:482
23
+ msgid "Share and Enjoy:"
24
+ msgstr "Teile und genieße"
25
+
26
+ #: sociable.php:565
27
+ msgid "Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href=\"http://push.cx/sociable\">visit the Sociable website</a> to update manually if needed."
28
+ msgstr "Sociable versuchte auf ein Update zu prüfen, dabei trat ein Fehler auf. Das kann durch Netzwerkprobleme verursacht sein, kann aber auch an Einstellungen von PHP liegen. Bitte besuchen Sie die <a href=\"http://push.cx/sociable\">Webseite von Sociable</a> um auf ein mögliches Update zu prüfen."
29
+
30
+ #: sociable.php:586
31
+ msgid "A <a href=\"http://push.cx/sociable\">new version of Sociable is available</a>"
32
+ msgstr "Eine <a href=\"http://push.cx/sociable\">neue Version</a> von Sociable ist verfügbar."
33
+
34
+ #: sociable.php:586
35
+ msgid "as of "
36
+ msgstr "vom"
37
+
38
+ #: sociable.php:595
39
+ msgid "Couldn't find wp-content/plugins folder. Please make sure WordPress is installed correctly."
40
+ msgstr "Konnte den wp-content/plugins Ordner nicht finden. Bitte stellen Sie sicher das Wordpress korrekt installiert ist. "
41
+
42
+ #: sociable.php:597
43
+ msgid "Can't find sociable folder."
44
+ msgstr "Konnte den Sociable Ordner nicht finden."
45
+
46
+ #: sociable.php:603
47
+ msgid "Can't find folder:"
48
+ msgstr "Ordner fehlt:"
49
+
50
+ #: sociable.php:605
51
+ msgid "Can't find file:"
52
+ msgstr "Datei fehlt: "
53
+
54
+ #: sociable.php:619
55
+ msgid "Restored all settings to defaults."
56
+ msgstr "Alle Voreinstellungen wurden auf den Standard zurückgesetzt."
57
+
58
+ #: sociable.php:646
59
+ msgid "Saved changes."
60
+ msgstr "Änderungen wurden gespeichert."
61
+
62
+ #: sociable.php:650
63
+ msgid "In your plugins/sociable folder, you must have these files:"
64
+ msgstr "In ihrem plugins/sociable Ordner müssen sich folgende Dateien befinden:"
65
+
66
+ #: sociable.php:674
67
+ msgid "Sociable Options"
68
+ msgstr "Optionen von Sociable"
69
+
70
+ #: sociable.php:676
71
+ msgid "Drag and drop sites to reorder them. Only the sites you check will appear publicly."
72
+ msgstr "Nur die ausgewählten Seiten werden angezeigt. Mit Drag und Drop können Sie diese sortieren."
73
+
74
+ #: sociable.php:708
75
+ msgid "Change the text displayed in front of the icons below. For complete customization, edit <kbd>sociable.css</kbd> in the Sociable plugin directory."
76
+ msgstr "Change the text displayed in front of the icons below. For complete customization, edit <kbd>sociable.css</kbd> in the Sociable plugin directory."
77
+
78
+ #: sociable.php:715
79
+ msgid "The icons appear at the end of each blog post, and posts may show on many different types of pages. Depending on your theme and audience, it may be tacky to display icons on all types of pages."
80
+ msgstr "Diese Icons erscheinen am Ende eines jeden Artikels und Artikel können auf verschiedenen Seitentypen erscheinen. Abhängig vom Design kann es schweirig sein diese Icons auf allen Seitentypen darzustellen."
81
+
82
+ #: sociable.php:718
83
+ msgid "Front page of the blog"
84
+ msgstr "Startseite des Blogs"
85
+
86
+ #: sociable.php:719
87
+ msgid "Individual blog posts"
88
+ msgstr "Einzelner Blogeintrag"
89
+
90
+ #: sociable.php:720
91
+ msgid "Individual WordPress \"Pages\""
92
+ msgstr "Individuelle Wordpress-\"Seite\" "
93
+
94
+ #: sociable.php:721
95
+ msgid "Category archives"
96
+ msgstr "Archivkategorien"
97
+
98
+ #: sociable.php:722
99
+ msgid "Date-based archives"
100
+ msgstr "Datum-basiertes Archiv"
101
+
102
+ #: sociable.php:723
103
+ msgid "Search results"
104
+ msgstr "Suchergebnis(se)"
105
+
106
+ #: sociable.php:727
107
+ msgid "Save Changes"
108
+ msgstr "Änderungen speichern"
109
+
110
+ #: sociable.php:728
111
+ msgid "Restore Built-in Defaults"
112
+ msgstr "Stelle auf die eingebauten Einstellungen zurück."
113
+
114
+ #: sociable.php:733
115
+ msgid "Automatic Updates"
116
+ msgstr "Automatische Updates"
117
+
118
+ #: sociable.php:735
119
+ msgid "Sociable checks for new versions when you bring up this page. (At most once per week.)"
120
+ msgstr "Sociable prüft auf eine neue Version wenn Sie diese Seite aufrufen. (Normalerweise wöchentlich)"
121
+
122
+ #: sociable.php:738
123
+ msgid "This copy of Sociable is from"
124
+ msgstr "Diese Kopie von Sociable ist von "
125
+
126
+ #: sociable.php:739
127
+ msgid "Last checked on"
128
+ msgstr "Zuletzt überprüft am"
129
+
130
+ #: sociable.php:744
131
+ msgid "<a href=\"http://push.cx/sociable\">Sociable</a> is copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href=\"mailto:ph@malaprop.org\">mail me</a>."
132
+ msgstr "<a href=\"http://push.cx/sociable\">Sociable</a> Copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, veröffentlicht unter der GNU GPL Version 2. Wenn Sie Sociable mögen, dann informieren Sie andere über Sociable. Bei Problemen oder auch bei guten Ideen würde ich mich über eine <a href=\"mailto:ph@malaprop.org\">Nachricht </a>freuen."
133
+
i18n/sociable-fr_FR.mo ADDED
Binary file
i18n/sociable-fr_FR.po ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: sociable\n"
4
+ "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-02-02 21:38-0600\n"
6
+ "Last-Translator: Peter Harkins <ph@push.cx>\n"
7
+ "Language-Team: <soc-dev@lists.sourceforge.net>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-Language: French\n"
12
+ "X-Poedit-Country: FRANCE\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: __;_e\n"
15
+ "X-Poedit-Basepath: /home/malaprop/proj/sociable\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+
18
+ #: sociable.php:302
19
+ msgid "These icons link to social bookmarking sites where readers can share and discover new web pages."
20
+ msgstr "Ces icônes sont des liens vers des sites de partage de signet sociaux où les lecteurs peuvent partager et découvrir de nouveaux liens."
21
+
22
+ #: sociable.php:385
23
+ msgid "Share and Enjoy:"
24
+ msgstr "Partager et découvrir :"
25
+
26
+ #: sociable.php:460
27
+ msgid "Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href=\"http://push.cx/sociable\">visit the Sociable website</a> to update manually if needed."
28
+ msgstr "Sociable a essayé de vérifier les mises à jour mais a échoué. Cela est sans doute dû à la configuration PHP. Allez sur le site de <a href=\"http://push.cx/sociable\">Sociable</a> pour faire une mise à jour manuelle."
29
+
30
+ #: sociable.php:481
31
+ msgid "A <a href=\"http://push.cx/sociable\">new version of Sociable is available</a>"
32
+ msgstr "Un nouvelle version de <a href=\"http://push.cx/sociable\"> sociable est disponible</a>"
33
+
34
+ #: sociable.php:481
35
+ msgid "as of "
36
+ msgstr "en date de"
37
+
38
+ #: sociable.php:490
39
+ msgid "Couldn't find wp-admin/plugins folder. Please make sure WordPress is installed correctly."
40
+ msgstr "Impossible de trouver le répertoire wp-admin/plugins. Vérifiez si Wordpress est installé correctement."
41
+
42
+ #: sociable.php:492
43
+ msgid "Can't find sociable folder."
44
+ msgstr "Impossible de trouver le répertoire SOCIABLE."
45
+
46
+ #: sociable.php:498
47
+ msgid "Can't find folder:"
48
+ msgstr "Impossible de trouver le répertoire:"
49
+
50
+ #: sociable.php:500
51
+ msgid "Can't find file:"
52
+ msgstr "Impossible de trouver le fichier:"
53
+
54
+ #: sociable.php:514
55
+ msgid "Restored all settings to defaults."
56
+ msgstr "Restaurer la configuration par defaut"
57
+
58
+ #: sociable.php:550
59
+ msgid "Saved changes."
60
+ msgstr "Sauvez les modifications."
61
+
62
+ #: sociable.php:554
63
+ msgid "In your plugins/sociable folder, you must have these files:"
64
+ msgstr "Dans le répertoire plugins/sociable, vous devez avoir ces fichiers :"
65
+
66
+ #: sociable.php:571
67
+ msgid "Sociable Options"
68
+ msgstr "Options de Sociable"
69
+
70
+ #: sociable.php:573
71
+ msgid "Drag and drop sites to reorder them. Only the sites you check will appear publicly."
72
+ msgstr "Clissez déposez les sites pour les remettre en ordre. Seuls les sites sélectionnés apparaitront publiquement."
73
+
74
+ #: sociable.php:591
75
+ msgid "Change the text displayed in front of the icons below. For complete customization, edit <i>sociable.css</i> in the Sociable plugin directory."
76
+ msgstr "Changer le texte affiché devant les icones. Pour une customization complète, éditez le fichier <i>sociable.css</i> dans le répertoire plugins/sociable."
77
+
78
+ #: sociable.php:598
79
+ msgid "The icons appear at the end of each blog post, and posts may show on many different types of pages. Depending on your theme and audience, it may be tacky to display icons on all types of pages."
80
+ msgstr "Les icônes apparaissent à la fin de chaque article, et sur plusieurs types de pages. Selon votre thème et son audience, il peut être interessant d'afficher les icones sur toutes les pages."
81
+
82
+ #: sociable.php:601
83
+ msgid "Front page of the blog"
84
+ msgstr "Page principale du blog"
85
+
86
+ #: sociable.php:602
87
+ msgid "Individual blog posts"
88
+ msgstr "Articles individuels"
89
+
90
+ #: sociable.php:603
91
+ msgid "Individual WordPress \"Pages\""
92
+ msgstr "\"Pages\" individuelle de WordPress"
93
+
94
+ #: sociable.php:604
95
+ msgid "Category archives"
96
+ msgstr "Catégories d'archives"
97
+
98
+ #: sociable.php:605
99
+ msgid "Date-based archives"
100
+ msgstr "Archives par date"
101
+
102
+ #: sociable.php:606
103
+ msgid "Search results"
104
+ msgstr "Résultats de recherche"
105
+
106
+ #: sociable.php:610
107
+ msgid "Save Changes"
108
+ msgstr "Sauvegarder les modifications"
109
+
110
+ #: sociable.php:611
111
+ msgid "Restore Built-in Defaults"
112
+ msgstr "Restaurer la configuration par defaut"
113
+
114
+ #: sociable.php:616
115
+ msgid "Automatic Updates"
116
+ msgstr "Mise à jour automatique"
117
+
118
+ #: sociable.php:618
119
+ msgid "Sociable checks for new versions when you bring up this page. (At most once per week.)"
120
+ msgstr "Sociable vérifie la disponibilité d'une nouvelle version lorsque vous appelez cette page. (Au moins 1 fois par semaine)"
121
+
122
+ #: sociable.php:621
123
+ msgid "This copy of Sociable is from"
124
+ msgstr "Cette copie de Sociable provient de"
125
+
126
+ #: sociable.php:622
127
+ msgid "Last checked on"
128
+ msgstr "Dernière mise à jour, le"
129
+
130
+ #: sociable.php:627
131
+ msgid "<a href=\"http://push.cx/sociable\">Sociable</a> is copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href=\"mailto:ph@malaprop.org\">mail me</a>."
132
+ msgstr "<a href=\"http://push.cx/sociable\">Sociable</a> est copyright 2006 par <a href=\"http://push.cx/\">Peter Harkins</a>, libéré sous licence GNU GPL version 2 ou supérieure. Si vous aimez Sociable, renvoyez un lien vers mon site pour que d'autre personnes puisse le découvrir. Pour signaler un bug, une remarques, une idée, <a href=\"mailto:ph@malaprop.org\">écrivez moi</a>."
133
+
i18n/sociable-hu_HU.mo ADDED
Binary file
i18n/sociable-hu_HU.po ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Sociable\n"
4
+ "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-01-31 22:20-0600\n"
6
+ "Last-Translator: Peter Harkins <ph@push.cx>\n"
7
+ "Language-Team: Sociable <sociable-devel@lists.sourceforge.net>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-Language: Hungarian\n"
12
+ "X-Poedit-Country: HUNGARY\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: __;_e\n"
15
+ "X-Poedit-Basepath: /home/harkins/proj/sociable/trunk\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+
18
+ #: sociable.php:387
19
+ msgid "These icons link to social bookmarking sites where readers can share and discover new web pages."
20
+ msgstr "Ezek az ikonok ún. közösségi könyvjelző oldalakra mutatnak, ahol meg lehet osztani másokkal is amit fontosnak találsz."
21
+
22
+ #: sociable.php:482
23
+ msgid "Share and Enjoy:"
24
+ msgstr "Oszd meg ezt a bejegyzést : "
25
+
26
+ #: sociable.php:565
27
+ msgid "Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href=\"http://push.cx/sociable\">visit the Sociable website</a> to update manually if needed."
28
+ msgstr "Sociable megpróbált frissítéseket keresni, de valami miatt ez nem sikerült. Lehet, hogy a PHP beállítások az oka, de az is lehet, hogy egyszerű hálózati gond lépett fel. Ha továbbra is fennáll a probléba, akkor a <a href=\"http://push.cx/sociable\">Sociable oldalán</a> meg tudod nézni, hogy van-e esetleg új verzió."
29
+
30
+ #: sociable.php:586
31
+ msgid "A <a href=\"http://push.cx/sociable\">new version of Sociable is available</a>"
32
+ msgstr "Elérhető egy új <a href=\"http://push.cx/sociable\">új Sociable verzió</a>"
33
+
34
+ #: sociable.php:586
35
+ msgid "as of "
36
+ msgstr ""
37
+
38
+ #: sociable.php:595
39
+ #, fuzzy
40
+ msgid "Couldn't find wp-content/plugins folder. Please make sure WordPress is installed correctly."
41
+ msgstr "Nem találtam a wp-content/plugins mappát. Kérlek ellenőrízd, hogy rendben van-e a Wordpress telepítésed!"
42
+
43
+ #: sociable.php:597
44
+ msgid "Can't find sociable folder."
45
+ msgstr "Nincs meg a sociable mappa."
46
+
47
+ #: sociable.php:603
48
+ msgid "Can't find folder:"
49
+ msgstr "Nincs meg a következő mappa: "
50
+
51
+ #: sociable.php:605
52
+ msgid "Can't find file:"
53
+ msgstr "Nincs meg a következő fájl: "
54
+
55
+ #: sociable.php:619
56
+ msgid "Restored all settings to defaults."
57
+ msgstr "Minden beállítás visszaállítása az eredetire."
58
+
59
+ #: sociable.php:646
60
+ msgid "Saved changes."
61
+ msgstr "Változások elmentve."
62
+
63
+ #: sociable.php:650
64
+ msgid "In your plugins/sociable folder, you must have these files:"
65
+ msgstr "A plugins/sociable mappában a következő fájloknak kell lennie: "
66
+
67
+ #: sociable.php:674
68
+ msgid "Sociable Options"
69
+ msgstr "Sociable beállítások"
70
+
71
+ #: sociable.php:676
72
+ msgid "Drag and drop sites to reorder them. Only the sites you check will appear publicly."
73
+ msgstr "Pakold tetszésednek megfelelő sorrendbe az ikonokat. Csak a kipipált elemek fognak majd megjelenni az oldaladon."
74
+
75
+ #: sociable.php:708
76
+ msgid "Change the text displayed in front of the icons below. For complete customization, edit <kbd>sociable.css</kbd> in the Sociable plugin directory."
77
+ msgstr "Itt tudod beállítani, hogy milyen szöveg jelenjen meg az ikonok előtt. Teljes testreszabáshoz a <kbd>sociable.css</kbd> fájlt is át tudod írni."
78
+
79
+ #: sociable.php:715
80
+ msgid "The icons appear at the end of each blog post, and posts may show on many different types of pages. Depending on your theme and audience, it may be tacky to display icons on all types of pages."
81
+ msgstr "Az ikonok minden bejegyzés után jelennek meg. Itt meg tudod adni, hogy mely oldalakon, aloldalakon, stb. szeretnéd, hogy látszódjanak."
82
+
83
+ #: sociable.php:718
84
+ msgid "Front page of the blog"
85
+ msgstr "Blog főoldalán"
86
+
87
+ #: sociable.php:719
88
+ msgid "Individual blog posts"
89
+ msgstr "Minden blog bejegyzés végén"
90
+
91
+ #: sociable.php:720
92
+ msgid "Individual WordPress \"Pages\""
93
+ msgstr "Minden wordpress \"Oldal\" alján "
94
+
95
+ #: sociable.php:721
96
+ msgid "Category archives"
97
+ msgstr "Kategória archívumnál"
98
+
99
+ #: sociable.php:722
100
+ msgid "Date-based archives"
101
+ msgstr "Időrendi archívumnál"
102
+
103
+ #: sociable.php:723
104
+ msgid "Search results"
105
+ msgstr "Keresési eredményeknél"
106
+
107
+ #: sociable.php:727
108
+ msgid "Save Changes"
109
+ msgstr "Változások mentése"
110
+
111
+ #: sociable.php:728
112
+ msgid "Restore Built-in Defaults"
113
+ msgstr "Eredeti beállítások visszaállítása"
114
+
115
+ #: sociable.php:733
116
+ msgid "Automatic Updates"
117
+ msgstr "Automatikus frissítés"
118
+
119
+ #: sociable.php:735
120
+ msgid "Sociable checks for new versions when you bring up this page. (At most once per week.)"
121
+ msgstr "Sociable minden alkalommal, amikor ezt az oldalt betöltöd ellenőrzi, hogy van-e frissebb verzó, mint az általad használt."
122
+
123
+ #: sociable.php:738
124
+ msgid "This copy of Sociable is from"
125
+ msgstr "A jelenleg használt verzó dátuma "
126
+
127
+ #: sociable.php:739
128
+ msgid "Last checked on"
129
+ msgstr "Utolsó ellenőrzés"
130
+
131
+ #: sociable.php:744
132
+ msgid "<a href=\"http://push.cx/sociable\">Sociable</a> is copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href=\"mailto:ph@malaprop.org\">mail me</a>."
133
+ msgstr "A <a href=\"http://push.cx/sociable\">Sociable</a> plugin <a href=\"http://push.cx/\">Peter Harkins</a> védjegye. GNU GPL 2, vagy annál újabb licenc alatt lett közzétéve. Ha tetszik a plugin, vagy kérdésed, ötleted van, akkor írj <a href=\"mailto:ph@malaprop.org\">levelet</a>! <br />Ha a magyar fordítással van valami probléma, akkor keress meg <a href=\"http://kobak.org/kontakt/\">engem</a>"
134
+
i18n/sociable-it_IT.mo ADDED
Binary file
i18n/sociable-it_IT.po ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: sociable\n"
4
+ "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-01-31 22:11-0600\n"
6
+ "Last-Translator: Peter Harkins <ph@push.cx>\n"
7
+ "Language-Team: \n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-Language: Italian\n"
12
+ "X-Poedit-Country: ITALY\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: __;_e\n"
15
+ "X-Poedit-Basepath: /home/malaprop/proj/sociable\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+
18
+ #: sociable.php:387
19
+ msgid "These icons link to social bookmarking sites where readers can share and discover new web pages."
20
+ msgstr "Queste icone linkano i siti di social bookmarking sui quali i lettori possono condividere e trovare nuove pagine web."
21
+
22
+ #: sociable.php:482
23
+ msgid "Share and Enjoy:"
24
+ msgstr "Condividi :"
25
+
26
+ #: sociable.php:565
27
+ msgid "Sociable tried to check for updates but failed. This might be the way PHP is set up, or just random network issues. Please <a href=\"http://push.cx/sociable\">visit the Sociable website</a> to update manually if needed."
28
+ msgstr "Sociable ha provato a cercare un aggiornamento senza successo. Questo errore puo' essere dovuto al modo in cui PHP e' configurato o ad un semplice errore di rete. Visita <a href=\"http://push.cx/sociable\">il sito web di Sociable</a> per un aggiornamento manuale se necessario."
29
+
30
+ #: sociable.php:586
31
+ msgid "A <a href=\"http://push.cx/sociable\">new version of Sociable is available</a>"
32
+ msgstr "A <a href=\"http://push.cx/sociable\">Un nuova versione di Sociable e' disponibile</a>"
33
+
34
+ #: sociable.php:586
35
+ msgid "as of "
36
+ msgstr "in data"
37
+
38
+ #: sociable.php:595
39
+ msgid "Couldn't find wp-content/plugins folder. Please make sure WordPress is installed correctly."
40
+ msgstr "Impossibile trovare la cartella wp-content/plugins folder. Per favore, verifica che WordPress sia installato correttamente."
41
+
42
+ #: sociable.php:597
43
+ msgid "Can't find sociable folder."
44
+ msgstr "Impossibile trovare la cartella sociable."
45
+
46
+ #: sociable.php:603
47
+ msgid "Can't find folder:"
48
+ msgstr "Impossibile trovare la cartella:"
49
+
50
+ #: sociable.php:605
51
+ msgid "Can't find file:"
52
+ msgstr "Impossibile trovare il file:"
53
+
54
+ #: sociable.php:619
55
+ msgid "Restored all settings to defaults."
56
+ msgstr "Le impostazioni di default sono state ripristinate."
57
+
58
+ #: sociable.php:646
59
+ msgid "Saved changes."
60
+ msgstr "Modifiche salvate."
61
+
62
+ #: sociable.php:650
63
+ msgid "In your plugins/sociable folder, you must have these files:"
64
+ msgstr "Interno della cartella plugins/sociable, devi avere questi files:"
65
+
66
+ #: sociable.php:674
67
+ msgid "Sociable Options"
68
+ msgstr "Opzioni di Sociable"
69
+
70
+ #: sociable.php:676
71
+ msgid "Drag and drop sites to reorder them. Only the sites you check will appear publicly."
72
+ msgstr "Trascina con il mouse le immagini dei siti per cambiare l'ordine in cui questi appariranno. Solo i siti selezionati appariranno sulle tue pagine pubbliche. Ricordati di salvare le modifiche perche' queste abbiano effetto."
73
+
74
+ #: sociable.php:708
75
+ msgid "Change the text displayed in front of the icons below. For complete customization, edit <kbd>sociable.css</kbd> in the Sociable plugin directory."
76
+ msgstr "Cambia il testo che verra' visualizzato prima delle icone. Per una personalizzazione piu' spinta modifica il file <kbd>sociable.css</kbd> che trovi nella cartella di installazione del plugin Sociable."
77
+
78
+ #: sociable.php:715
79
+ msgid "The icons appear at the end of each blog post, and posts may show on many different types of pages. Depending on your theme and audience, it may be tacky to display icons on all types of pages."
80
+ msgstr "Le icone vengono visualizzate alla fine di ogni post e, dal momento che questi possono essere visualizzati su differenti tipi di pagine, puoi decidere dove rendere disponibile la feature di social bookmarking."
81
+
82
+ #: sociable.php:718
83
+ msgid "Front page of the blog"
84
+ msgstr "Pagina principale del blog"
85
+
86
+ #: sociable.php:719
87
+ msgid "Individual blog posts"
88
+ msgstr "Singoli post"
89
+
90
+ #: sociable.php:720
91
+ msgid "Individual WordPress \"Pages\""
92
+ msgstr "\"Pagine\" di WordPress"
93
+
94
+ #: sociable.php:721
95
+ msgid "Category archives"
96
+ msgstr "Archivi categorie"
97
+
98
+ #: sociable.php:722
99
+ msgid "Date-based archives"
100
+ msgstr "Archivi basati su data"
101
+
102
+ #: sociable.php:723
103
+ msgid "Search results"
104
+ msgstr "Risultati di una ricerca"
105
+
106
+ #: sociable.php:727
107
+ msgid "Save Changes"
108
+ msgstr "Salva le modifiche"
109
+
110
+ #: sociable.php:728
111
+ msgid "Restore Built-in Defaults"
112
+ msgstr "Ripristina i valori di default"
113
+
114
+ #: sociable.php:733
115
+ msgid "Automatic Updates"
116
+ msgstr "Aggiornamenti Automatici"
117
+
118
+ #: sociable.php:735
119
+ msgid "Sociable checks for new versions when you bring up this page. (At most once per week.)"
120
+ msgstr "Sociable verifica automaticamente la disponibilita' di aggiornamenti nel momenti in cui questa pagina viene visualizzata. (Al massimo una volta alla settimana.)"
121
+
122
+ #: sociable.php:738
123
+ msgid "This copy of Sociable is from"
124
+ msgstr "Questa copia di Sociable e' stata rilasciata il"
125
+
126
+ #: sociable.php:739
127
+ msgid "Last checked on"
128
+ msgstr "Ultima verifica della disponibilita' di aggiornamenti il"
129
+
130
+ #: sociable.php:744
131
+ msgid "<a href=\"http://push.cx/sociable\">Sociable</a> is copyright 2006 by <a href=\"http://push.cx/\">Peter Harkins</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href=\"mailto:ph@malaprop.org\">mail me</a>."
132
+ msgstr "<a href=\"http://push.cx/sociable\">Sociable</a> e' copyright 2006 di <a href=\"http://push.cx/\">Peter Harkins</a>, e viene distribuito sotto licenza GNU GPL versione 2 o successiva. Se Sociable ti piace, per cortesia, inserisci un link al sito dell'autore cosi' che altre persone possano venire a conoscenza di questo plugin. Se hai dei problemi nell'uso o delle buone idee da suggerire, <a href=\"mailto:ph@malaprop.org\">scrivimi</a>."
133
+
images/blinkbits.png ADDED
Binary file
images/blinklist.png ADDED
Binary file
images/blogmarks.png ADDED
Binary file
images/blogmemes.png ADDED
Binary file
images/blogter.png ADDED
Binary file
images/bluedot.png ADDED
Binary file
images/bookmarkhu.png ADDED
Binary file
images/bumpzee.png ADDED
Binary file
images/co.mments.gif ADDED
Binary file
images/connotea.png ADDED
Binary file
images/delicious.png ADDED
Binary file
images/delirious.png ADDED
Binary file
images/digg.png ADDED
Binary file
images/dotnetkicks.png ADDED
Binary file
images/dzone.png ADDED
Binary file
images/facebook.png ADDED
Binary file
images/fark.png ADDED
Binary file
images/feedmelinks.png ADDED
Binary file
images/fleck.gif ADDED
Binary file
images/furl.png ADDED
Binary file
images/googlebookmark.png ADDED
Binary file
images/gwar.gif ADDED
Binary file
images/haohao.png ADDED
Binary file
images/hemidemi.png ADDED
Binary file
images/im.png ADDED
Binary file
images/indiagram.png ADDED
Binary file
images/indianpad.png ADDED
Binary file
images/kickit.png ADDED
Binary file
images/linkagogo.png ADDED
Binary file
images/linkter.png ADDED
Binary file
images/live.png ADDED
Binary file
images/magnolia.png ADDED
Binary file
images/misterwong.gif ADDED
Binary file
images/mixx.png ADDED
Binary file
images/myshare.png ADDED
Binary file
images/netscape.gif ADDED
Binary file
images/netvouz.png ADDED
Binary file
images/newsvine.png ADDED
Binary file
images/plugim.png ADDED
Binary file
images/popcurrent.png ADDED
Binary file
images/ppnow.png ADDED
Binary file
images/rawsugar.png ADDED
Binary file
images/rec6.gif ADDED
Binary file
images/reddit.png ADDED
Binary file
images/scoopeo.png ADDED
Binary file
images/scuttle.png ADDED
Binary file
images/shadows.png ADDED
Binary file
images/simpy.png ADDED
Binary file
images/slashdot.png ADDED
Binary file
images/smarking.png ADDED
Binary file
images/sphere.png ADDED
Binary file
images/sphinn.png ADDED
Binary file
images/spurl.png ADDED
Binary file
images/stumbleupon.png ADDED
Binary file
images/taggly.png ADDED
Binary file
images/tailrank.png ADDED
Binary file
images/technorati.png ADDED
Binary file
images/thisnext.png ADDED
Binary file
images/twitter.png ADDED
Binary file
images/webride.png ADDED
Binary file
images/wists.png ADDED
Binary file
images/wykop.gif ADDED
Binary file
images/yahoomyweb.png ADDED
Binary file
readme.txt ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Sociable ===
2
+ Contributors: joostdevalk
3
+ Donate link: http://www.joostdevalk.nl/donate/
4
+ Tags: social, bookmark, bookmarks, bookmarking, social bookmarking, social bookmarks
5
+ Requires at least: 2.2
6
+ Tested up to: 2.3.2
7
+ stable tag: 2.5
8
+
9
+ Automatically add links on your posts to popular social bookmarking sites.
10
+
11
+ == Description ==
12
+ Automatically add links on your posts to popular social bookmarking sites like Facebook, Mixx, StumbleUpon, Digg and many many others.
13
+
14
+ More info:
15
+
16
+ * [Sociable](http://www.joostdevalk.nl/wordpress/sociable/).
17
+ * Read more about [WordPress SEO](http://www.joostdevalk.nl/wordpress-seo/) so you can get the most out of this plugin.
18
+ * Check out the other [Wordpress plugins](http://www.joostdevalk.nl/wordpress/) by the same author.
19
+
20
+ == Installation ==
21
+
22
+ Download, Upgrading, Installation:
23
+
24
+ === Upgrade ===
25
+ 1. First deactivate Sociable
26
+ 1. Remove the `sociable` directory
27
+
28
+ === Install ===
29
+ 1. Unzip the `sociable.zip` file.
30
+ 1. Upload the the `sociable` folder (not just the files in it!) to your `wp-contents/plugins` folder. If you're using FTP, use 'binary' mode.
31
+
32
+ === Activate ===
33
+ 1. In your WordPress administration, go to the Plugins page
34
+ 1. Activate the Sociable plugin and a subpage for Sociable will appear
35
+ in your Options menu.
36
+
37
+ If you find any bugs or have any ideas, please mail me.
38
+
39
+ === Advanced Users ===
40
+
41
+ Sociable hooks the_content() and the_excerpt() to display without requiring theme editing. To heavily customize the display, use the admin panel to turn off the display on all pages, then add calls to your theme files:
42
+
43
+ This is optional extra customization for advanced users:
44
+ `<?php if (function_exists('sociable_html')) { print sociable_html(); } ?> // all active sites`
45
+ `<?php if (function_exists('sociable_html')) { print sociable_html(Array("Reddit", "del.icio.us")); } ?> // only these sites if they are active`
sociable-admin.css ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #sociable_options fieldset {
2
+ margin: 1em;
3
+ }
4
+
5
+ #sociable_site_list {
6
+ list-style-type: none;
7
+ margin: 0;
8
+ padding: 0;
9
+ font-size: 80%;
10
+ }
11
+ #sociable_site_list li {
12
+ cursor: move;
13
+ float: left;
14
+ margin: 2px 2px 0 0;
15
+ width: 12em;
16
+ height: 20px;
17
+ text-align: left;
18
+ padding: 4px;
19
+ -moz-border-radius: 5px;
20
+ border-radius: 5px;
21
+ }
22
+ #sociable_site_list li.active { background-color: #6da6d1; }
23
+ #sociable_site_list li.active img {
24
+ opacity: 1;
25
+ -moz-opacity: 1;
26
+ filter:alpha(opacity=100);
27
+ }
28
+ #sociable_site_list li.inactive { background-color: #dddddd; }
29
+ #sociable_site_list li.inactive img {
30
+ opacity: .4;
31
+ -moz-opacity: .4;
32
+ filter:alpha(opacity=40);
33
+ }
34
+ #sociable_site_list li input {
35
+ margin: 2px;
36
+ }
37
+
38
+ #sociable_tagline input {
39
+ width: 30em;
40
+ }
sociable.css ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ div.sociable { margin: 16px 0; }
2
+
3
+ span.sociable_tagline { position: relative; }
4
+ span.sociable_tagline span { display: none; width: 14em; }
5
+ span.sociable_tagline:hover span {
6
+ position: absolute;
7
+ display: block;
8
+ top: -5em;
9
+ background: #ffe;
10
+ border: 1px solid #ccc;
11
+ color: black;
12
+ line-height: 1.25em;
13
+ }
14
+ .sociable span {
15
+ display: block;
16
+ }
17
+ .sociable ul {
18
+ display: inline;
19
+ margin: 0 !important;
20
+ padding: 0 !important;
21
+ }
22
+ .sociable li {
23
+ background: none;
24
+ display: inline;
25
+ list-style-type: none;
26
+ margin: 0;
27
+ padding: 1px;
28
+ }
29
+ .sociable ul li:before { content: ""; }
30
+ .sociable img {
31
+ float: none;
32
+ width: 16px;
33
+ height: 16px;
34
+ border: 0;
35
+ margin: 0;
36
+ padding: 0;
37
+ }
38
+
39
+ .sociable-hovers {
40
+ opacity: .4;
41
+ -moz-opacity: .4;
42
+ filter: alpha(opacity=40);
43
+ }
44
+ .sociable-hovers:hover {
45
+ opacity: 1;
46
+ -moz-opacity: 1;
47
+ filter: alpha(opacity=100);
48
+ }
sociable.php ADDED
@@ -0,0 +1,821 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Sociable
4
+ Plugin URI: http://www.joostdevalk.nl/wordpress/sociable/
5
+ Description: Automatically add links on your posts to popular <a href="http://www.maxpower.ca/bookmarking">social bookmarking sites</a>. Go to Options -> Sociable for setup.
6
+ Version: 2.5
7
+ Author: Joost de Valk
8
+ Author URI: http://www.joostdevalk.nl/
9
+ */
10
+
11
+ /*
12
+ Copyright 2006 Peter Harkins (ph@malaprop.org)
13
+ Copyright 2008 Joost de Valk (joost@joostdevalk.nl)
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License as published by
17
+ the Free Software Foundation; either version 2 of the License, or
18
+ (at your option) any later version.
19
+
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
+
25
+ You should have received a copy of the GNU General Public License
26
+ along with this program; if not, write to the Free Software
27
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
+ */
29
+
30
+ load_plugin_textdomain('sociable', 'wp-content/plugins/sociable/i18n');
31
+
32
+ $sociable_known_sites = Array(
33
+
34
+ 'blinkbits' => Array(
35
+ 'favicon' => 'blinkbits.png',
36
+ 'url' => 'http://www.blinkbits.com/bookmarklets/save.php?v=1&amp;source_url=PERMALINK&amp;title=TITLE&amp;body=TITLE',
37
+ ),
38
+
39
+ 'BlinkList' => Array(
40
+ 'favicon' => 'blinklist.png',
41
+ 'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=PERMALINK&amp;Title=TITLE',
42
+ ),
43
+
44
+ 'BlogMemes' => Array(
45
+ 'favicon' => 'blogmemes.png',
46
+ 'url' => 'http://www.blogmemes.net/post.php?url=PERMALINK&amp;title=TITLE',
47
+ ),
48
+
49
+ 'BlogMemes Fr' => Array(
50
+ 'favicon' => 'blogmemes.png',
51
+ 'url' => 'http://www.blogmemes.fr/post.php?url=PERMALINK&amp;title=TITLE',
52
+ ),
53
+
54
+ 'BlogMemes Sp' => Array(
55
+ 'favicon' => 'blogmemes.png',
56
+ 'url' => 'http://www.blogmemes.com/post.php?url=PERMALINK&amp;title=TITLE',
57
+ ),
58
+
59
+ 'BlogMemes Cn' => Array(
60
+ 'favicon' => 'blogmemes.png',
61
+ 'url' => 'http://www.blogmemes.cn/post.php?url=PERMALINK&amp;title=TITLE',
62
+ ),
63
+
64
+ 'BlogMemes Jp' => Array(
65
+ 'favicon' => 'blogmemes.png',
66
+ 'url' => 'http://www.blogmemes.jp/post.php?url=PERMALINK&amp;title=TITLE',
67
+ ),
68
+
69
+ 'blogmarks' => Array(
70
+ 'favicon' => 'blogmarks.png',
71
+ 'url' => 'http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=PERMALINK&amp;title=TITLE',
72
+ ),
73
+
74
+ 'blogtercimlap' => Array(
75
+ 'favicon' => 'blogter.png',
76
+ 'url' => 'http://cimlap.blogter.hu/index.php?action=suggest_link&title=TITLE&amp;url=PERMALINK',
77
+ ),
78
+
79
+ 'Blue Dot' => Array(
80
+ 'favicon' => 'bluedot.png',
81
+ 'url' => 'http://bluedot.us/Authoring.aspx?>u=PERMALINK&amp;title=TITLE',
82
+ ),
83
+
84
+ 'Book.mark.hu' => Array(
85
+ 'favicon' => 'bookmarkhu.png',
86
+ 'url' => 'http://book.mark.hu/bookmarks.php/?action=add&amp;address=PERMALINK%2F&amp;title=TITLE',
87
+ 'description' => 'description',
88
+ ),
89
+
90
+ 'Bumpzee' => Array(
91
+ 'favicon' => 'bumpzee.png',
92
+ 'url' => 'http://www.bumpzee.com/bump.php?u=PERMALINK',
93
+ ),
94
+
95
+ 'co.mments' => Array(
96
+ 'favicon' => 'co.mments.gif',
97
+ 'url' => 'http://co.mments.com/track?url=PERMALINK&amp;title=TITLE',
98
+ ),
99
+
100
+ 'connotea' => Array(
101
+ 'favicon' => 'connotea.png',
102
+ 'url' => 'http://www.connotea.org/addpopup?continue=confirm&amp;uri=PERMALINK&amp;title=TITLE',
103
+ ),
104
+
105
+
106
+ 'del.icio.us' => Array(
107
+ 'favicon' => 'delicious.png',
108
+ 'url' => 'http://del.icio.us/post?url=PERMALINK&amp;title=TITLE',
109
+ ),
110
+
111
+ 'De.lirio.us' => Array(
112
+ 'favicon' => 'delirious.png',
113
+ 'url' => 'http://de.lirio.us/rubric/post?uri=PERMALINK;title=TITLE;when_done=go_back',
114
+ ),
115
+
116
+ 'Digg' => Array(
117
+ 'favicon' => 'digg.png',
118
+ 'url' => 'http://digg.com/submit?phase=2&amp;url=PERMALINK&amp;title=TITLE',
119
+ 'description' => 'bodytext',
120
+ ),
121
+
122
+ 'DotNetKicks' => Array(
123
+ 'favicon' => 'dotnetkicks.png',
124
+ 'url' => 'http://www.dotnetkicks.com/kick/?url=PERMALINK&amp;title=TITLE',
125
+ 'description' => 'description',
126
+ ),
127
+
128
+ 'DZone' => Array(
129
+ 'favicon' => 'dzone.png',
130
+ 'url' => 'http://www.dzone.com/links/add.html?url=PERMALINK&amp;title=TITLE',
131
+ 'description' => 'description',
132
+ ),
133
+
134
+ 'Facebook' => Array(
135
+ 'favicon' => 'facebook.png',
136
+ 'url' => 'http://www.facebook.com/sharer.php?u=PERMALINK&amp;t=TITLE',
137
+ ),
138
+
139
+ 'Fark' => Array(
140
+ 'favicon' => 'fark.png',
141
+ 'url' => 'http://cgi.fark.com/cgi/fark/edit.pl?new_url=PERMALINK&amp;new_comment=TITLE&amp;new_comment=BLOGNAME&amp;linktype=Misc',
142
+ // To post to a different category, see the drop-down box labeled "Link Type" at
143
+ // http://cgi.fark.com/cgi/fark/submit.pl for a complete list
144
+ ),
145
+
146
+ 'feedmelinks' => Array(
147
+ 'favicon' => 'feedmelinks.png',
148
+ 'url' => 'http://feedmelinks.com/categorize?from=toolbar&amp;op=submit&amp;url=PERMALINK&amp;name=TITLE',
149
+ ),
150
+
151
+ 'Furl' => Array(
152
+ 'favicon' => 'furl.png',
153
+ 'url' => 'http://www.furl.net/storeIt.jsp?u=PERMALINK&amp;t=TITLE',
154
+ ),
155
+
156
+ 'Fleck' => Array(
157
+ 'favicon' => 'fleck.gif',
158
+ 'url' => 'http://extension.fleck.com/?v=b.0.804&amp;url=PERMALINK',
159
+ ),
160
+
161
+ 'Google' => Array (
162
+ 'favicon' => 'googlebookmark.png',
163
+ 'url' => 'http://www.google.com/bookmarks/mark?op=edit&bkmk=PERMALINK&amp;title=TITLE'
164
+ ),
165
+
166
+ 'Gwar' => Array(
167
+ 'favicon' => 'gwar.gif',
168
+ 'url' => 'http://www.gwar.pl/DodajGwar.html?u=PERMALINK',
169
+ ),
170
+
171
+ 'Haohao' => Array(
172
+ 'favicon' => 'haohao.png',
173
+ 'url' => 'http://www.haohaoreport.com/submit.php?url=PERMALINK&amp;title=TITLE',
174
+ ),
175
+
176
+ 'Hemidemi' => Array(
177
+ 'favicon' => 'hemidemi.png',
178
+ 'url' => 'http://www.hemidemi.com/user_bookmark/new?title=TITLE&amp;url=PERMALINK',
179
+ ),
180
+
181
+ 'IndiaGram' => Array(
182
+ 'favicon' => 'indiagram.png',
183
+ 'url' => 'http://www.indiagram.com/mock/bookmarks/desitrain?action=add&amp;address=PERMALINK&amp;title=TITLE',
184
+ ),
185
+
186
+ 'IndianPad' => Array(
187
+ 'favicon' => 'indianpad.png',
188
+ 'url' => 'http://www.indianpad.com/submit.php?url=PERMALINK',
189
+ ),
190
+
191
+ 'Internetmedia' => Array(
192
+ 'favicon' => 'im.png',
193
+ 'url' => 'http://internetmedia.hu/submit.php?url=PERMALINK'
194
+ ),
195
+
196
+ 'kick.ie' => Array(
197
+ 'favicon' => 'kickit.png',
198
+ 'url' => 'http://kick.ie/submit/?url=PERMALINK&amp;title=TITLE',
199
+ ),
200
+
201
+ 'LinkaGoGo' => Array(
202
+ 'favicon' => 'linkagogo.png',
203
+ 'url' => 'http://www.linkagogo.com/go/AddNoPopup?url=PERMALINK&amp;title=TITLE',
204
+ ),
205
+
206
+ 'Linkter' => Array(
207
+ 'favicon' => 'linkter.png',
208
+ 'url' => 'http://www.linkter.hu/index.php?action=suggest_link&amp;url=PERMALINK&amp;title=TITLE',
209
+ ),
210
+
211
+ 'Live' => Array(
212
+ 'favicon' => 'live.png',
213
+ 'url' => 'https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=PERMALINK&amp;title=TITLE',
214
+ ),
215
+
216
+ 'Ma.gnolia' => Array(
217
+ 'favicon' => 'magnolia.png',
218
+ 'url' => 'http://ma.gnolia.com/bookmarklet/add?url=PERMALINK&amp;title=TITLE',
219
+ ),
220
+
221
+ 'MisterWong' => Array(
222
+ 'favicon' => 'misterwong.gif',
223
+ 'url' => 'http://www.mister-wong.com/addurl/?bm_url=PERMALINK&amp;bm_description=TITLE&amp;plugin=soc',
224
+ ),
225
+
226
+ 'Mixx' => Array(
227
+ 'favicon' => 'mixx.png',
228
+ 'url' => 'http://www.mixx.com/submit?page_url=PERMALINK&amp;title=TITLE',
229
+ ),
230
+
231
+ 'MyShare' => Array(
232
+ 'favicon' => 'myshare.png',
233
+ 'url' => 'http://myshare.url.com.tw/index.php?func=newurl&amp;url=PERMALINK&amp;desc=TITLE',
234
+ ),
235
+
236
+ 'NewsVine' => Array(
237
+ 'favicon' => 'newsvine.png',
238
+ 'url' => 'http://www.newsvine.com/_tools/seed&amp;save?u=PERMALINK&amp;h=TITLE',
239
+ ),
240
+
241
+ 'Netscape' => Array(
242
+ 'favicon' => 'netscape.gif',
243
+ 'url' => 'http://www.netscape.com/submit/?U=PERMALINK&amp;T=TITLE',
244
+ ),
245
+
246
+ 'Netvouz' => Array(
247
+ 'favicon' => 'netvouz.png',
248
+ 'url' => 'http://www.netvouz.com/action/submitBookmark?url=PERMALINK&amp;title=TITLE&amp;popup=no',
249
+ ),
250
+
251
+ 'PlugIM' => Array(
252
+ 'favicon' => 'plugim.png',
253
+ 'url' => 'http://www.plugim.com/submit?url=PERMALINK&amp;title=TITLE',
254
+ ),
255
+
256
+ 'PopCurrent' => Array(
257
+ 'favicon' => 'popcurrent.png',
258
+ 'url' => 'http://popcurrent.com/submit?url=PERMALINK&amp;title=TITLE&amp;rss=RSS',
259
+ 'description' => 'description',
260
+ ),
261
+
262
+ 'ppnow' => Array(
263
+ 'favicon' => 'ppnow.png',
264
+ 'url' => 'http://www.ppnow.net/submit.php?url=PERMALINK',
265
+ ),
266
+
267
+ 'RawSugar' => Array(
268
+ 'favicon' => 'rawsugar.png',
269
+ 'url' => 'http://www.rawsugar.com/tagger/?turl=PERMALINK&amp;tttl=TITLE',
270
+ ),
271
+
272
+ 'Rec6' => Array(
273
+ 'favicon' => 'rec6.gif',
274
+ 'url' => 'http://www.syxt.com.br/rec6/link.php?url=PERMALINK&amp;=TITLE',
275
+ ),
276
+
277
+ 'Reddit' => Array(
278
+ 'favicon' => 'reddit.png',
279
+ 'url' => 'http://reddit.com/submit?url=PERMALINK&amp;title=TITLE',
280
+ ),
281
+
282
+ 'Scoopeo' => Array(
283
+ 'favicon' => 'scoopeo.png',
284
+ 'url' => 'http://www.scoopeo.com/scoop/new?newurl=PERMALINK&amp;title=TITLE',
285
+ ),
286
+
287
+ 'scuttle' => Array(
288
+ 'favicon' => 'scuttle.png',
289
+ 'url' => 'http://www.scuttle.org/bookmarks.php/maxpower?action=add&amp;address=PERMALINK&amp;title=TITLE',
290
+ 'description' => 'description',
291
+ ),
292
+
293
+ 'Shadows' => Array(
294
+ 'favicon' => 'shadows.png',
295
+ 'url' => 'http://www.shadows.com/features/tcr.htm?url=PERMALINK&amp;title=TITLE',
296
+ ),
297
+
298
+ 'Simpy' => Array(
299
+ 'favicon' => 'simpy.png',
300
+ 'url' => 'http://www.simpy.com/simpy/LinkAdd.do?href=PERMALINK&amp;title=TITLE',
301
+ ),
302
+
303
+ 'Slashdot' => Array(
304
+ 'favicon' => 'slashdot.png',
305
+ 'url' => 'http://slashdot.org/bookmark.pl?title=TITLE&amp;url=PERMALINK',
306
+ ),
307
+
308
+ 'Smarking' => Array(
309
+ 'favicon' => 'smarking.png',
310
+ 'url' => 'http://smarking.com/editbookmark/?url=PERMALINK&amp;title=TITLE',
311
+ ),
312
+
313
+ 'Spurl' => Array(
314
+ 'favicon' => 'spurl.png',
315
+ 'url' => 'http://www.spurl.net/spurl.php?url=PERMALINK&amp;title=TITLE',
316
+ ),
317
+
318
+ 'SphereIt' => Array(
319
+ 'favicon' => 'sphere.png',
320
+ 'url' => 'http://www.sphere.com/search?q=sphereit:PERMALINK&amp;title=TITLE',
321
+ ),
322
+
323
+ 'Sphinn' => Array(
324
+ 'favicon' => 'sphinn.png',
325
+ 'url' => 'http://sphinn.com/submit.php?url=PERMALINK&title=TITLE',
326
+ ),
327
+
328
+ 'StumbleUpon' => Array(
329
+ 'favicon' => 'stumbleupon.png',
330
+ 'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&amp;title=TITLE',
331
+ ),
332
+
333
+ 'Taggly' => Array(
334
+ 'favicon' => 'taggly.png',
335
+ 'url' => 'http://taggly.com/bookmarks.php/pass?action=add&amp;address=',
336
+ ),
337
+
338
+ 'Technorati' => Array(
339
+ 'favicon' => 'technorati.png',
340
+ 'url' => 'http://technorati.com/faves?add=PERMALINK',
341
+ ),
342
+
343
+ 'TailRank' => Array(
344
+ 'favicon' => 'tailrank.png',
345
+ 'url' => 'http://tailrank.com/share/?text=&amp;link_href=PERMALINK&amp;title=TITLE',
346
+ ),
347
+
348
+ 'ThisNext' => Array(
349
+ 'favicon' => 'thisnext.png',
350
+ 'url' => 'http://www.thisnext.com/pick/new/submit/sociable/?url=PERMALINK&amp;name=TITLE',
351
+ ),
352
+
353
+ 'TwitThis' => Array(
354
+ 'favicon' => 'twitter.png',
355
+ 'url' => 'http://twitthis.com/twit?url=PERMALINK',
356
+ ),
357
+
358
+ 'Webride' => Array(
359
+ 'favicon' => 'webride.png',
360
+ 'url' => 'http://webride.org/discuss/split.php?uri=PERMALINK&amp;title=TITLE',
361
+ ),
362
+
363
+ 'Wists' => Array(
364
+ 'favicon' => 'wists.png',
365
+ 'url' => 'http://wists.com/s.php?c=&amp;r=PERMALINK&amp;title=TITLE',
366
+ 'class' => 'wists',
367
+ ),
368
+
369
+ 'Wykop' => Array(
370
+ 'favicon' => 'wykop.gif',
371
+ 'url' => 'http://www.wykop.pl/dodaj?url=PERMALINK',
372
+ ),
373
+
374
+ 'YahooMyWeb' => Array(
375
+ 'favicon' => 'yahoomyweb.png',
376
+ 'url' => 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u=PERMALINK&amp;=TITLE',
377
+ ),
378
+
379
+ );
380
+
381
+ $sociable_files = Array(
382
+ 'description_selection.js',
383
+ 'sociable-admin.css',
384
+ 'sociable.css',
385
+ 'sociable.php',
386
+ 'sociable.css',
387
+ 'sociable-admin.css',
388
+ 'wists.js',
389
+ 'images/',
390
+ 'images/blinkbits.png',
391
+ 'images/blinklist.png',
392
+ 'images/blogmarks.png',
393
+ 'images/blogmemes.png',
394
+ 'images/blogter.png',
395
+ 'images/bluedot.png',
396
+ 'images/bookmarkhu.png',
397
+ 'images/bumpzee.png',
398
+ 'images/co.mments.gif',
399
+ 'images/connotea.png',
400
+ 'images/delicious.png',
401
+ 'images/delirious.png',
402
+ 'images/digg.png',
403
+ 'images/dotnetkicks.png',
404
+ 'images/dzone.png',
405
+ 'images/facebook.png',
406
+ 'images/fark.png',
407
+ 'images/feedmelinks.png',
408
+ 'images/fleck.gif',
409
+ 'images/furl.png',
410
+ 'images/googlebookmark.png',
411
+ 'images/gwar.gif',
412
+ 'images/haohao.png',
413
+ 'images/hemidemi.png',
414
+ 'images/im.png',
415
+ 'images/indiagram.png',
416
+ 'images/indianpad.png',
417
+ 'images/kickit.png',
418
+ 'images/linkagogo.png',
419
+ 'images/linkter.png',
420
+ 'images/linkter.png',
421
+ 'images/live.png',
422
+ 'images/magnolia.png',
423
+ 'images/misterwong.gif',
424
+ 'images/mixx.png',
425
+ 'images/myshare.png',
426
+ 'images/netscape.gif',
427
+ 'images/netvouz.png',
428
+ 'images/newsvine.png',
429
+ 'images/plugim.png',
430
+ 'images/popcurrent.png',
431
+ 'images/ppnow.png',
432
+ 'images/rawsugar.png',
433
+ 'images/rec6.gif',
434
+ 'images/reddit.png',
435
+ 'images/scoopeo.png',
436
+ 'images/scuttle.png',
437
+ 'images/shadows.png',
438
+ 'images/simpy.png',
439
+ 'images/slashdot.png',
440
+ 'images/smarking.png',
441
+ 'images/sphere.png',
442
+ 'images/sphinn.png',
443
+ 'images/spurl.png',
444
+ 'images/stumbleupon.png',
445
+ 'images/taggly.png',
446
+ 'images/tailrank.png',
447
+ 'images/technorati.png',
448
+ 'images/twitter.png',
449
+ 'images/webride.png',
450
+ 'images/wists.png',
451
+ 'images/wykop.gif',
452
+ 'images/yahoomyweb.png',
453
+ 'tool-man/',
454
+ 'tool-man/coordinates.js',
455
+ 'tool-man/core.js',
456
+ 'tool-man/css.js',
457
+ 'tool-man/drag.js',
458
+ 'tool-man/dragsort.js',
459
+ 'tool-man/events.js',
460
+ );
461
+
462
+
463
+ function sociable_html($display=Array()) {
464
+ global $sociable_known_sites;
465
+ $active_sites = get_option('sociable_active_sites');
466
+
467
+ $html = "";
468
+
469
+ $imagepath = get_bloginfo('wpurl') . '/wp-content/plugins/sociable/images/';
470
+
471
+ // if no sites are specified, display all active
472
+ // have to check $active_sites has content because WP
473
+ // won't save an empty array as an option
474
+ if (empty($display) and $active_sites)
475
+ $display = $active_sites;
476
+ // if no sites are active, display nothing
477
+ if (empty($display))
478
+ return "";
479
+
480
+ // Load the post's data
481
+ $blogname = urlencode(get_bloginfo('wpurl'));
482
+ global $wp_query;
483
+ $post = $wp_query->post;
484
+ $permalink = urlencode(get_permalink($post->ID));
485
+ $title = urlencode($post->post_title);
486
+ $rss = urlencode(get_bloginfo('ref_url'));
487
+
488
+ $html .= "\n<div class=\"sociable\">\n<span class=\"sociable_tagline\">\n";
489
+ $html .= stripslashes(get_option("sociable_tagline"));
490
+ $html .= "\n\t<span>" . __("These icons link to social bookmarking sites where readers can share and discover new web pages.", 'sociable') . "</span>";
491
+ $html .= "\n</span>\n<ul>\n";
492
+
493
+ foreach($display as $sitename) {
494
+ // if they specify an unknown or inactive site, ignore it
495
+ if (!in_array($sitename, $active_sites))
496
+ continue;
497
+
498
+ $site = $sociable_known_sites[$sitename];
499
+ $html .= "\t<li>";
500
+
501
+ $url = $site['url'];
502
+ $url = str_replace('PERMALINK', $permalink, $url);
503
+ $url = str_replace('TITLE', $title, $url);
504
+ $url = str_replace('RSS', $rss, $url);
505
+ $url = str_replace('BLOGNAME', $blogname, $url);
506
+
507
+ $html .= "<a rel=\"nofollow\" target=\"_blank\" href=\"$url\" title=\"$sitename\">";
508
+ $html .= "<img src=\"$imagepath{$site['favicon']}\" title=\"$sitename\" alt=\"$sitename\" class=\"sociable-hovers";
509
+ if ($site['class'])
510
+ $html .= " sociable_{$site['class']}";
511
+ $html .= "\" />";
512
+ $html .= "</a></li>\n";
513
+ }
514
+
515
+ $html .= "</ul>\n</div>\n";
516
+
517
+ return $html;
518
+ }
519
+
520
+ // Hook the_content to output html if we should display on any page
521
+ $sociable_contitionals = get_option('sociable_conditionals');
522
+ if (is_array($sociable_contitionals) and in_array(true, $sociable_contitionals)) {
523
+ add_filter('the_content', 'sociable_display_hook');
524
+ add_filter('the_excerpt', 'sociable_display_hook');
525
+
526
+ function sociable_display_hook($content='') {
527
+ $conditionals = get_option('sociable_conditionals');
528
+ if ((is_home() and $conditionals['is_home']) or
529
+ (is_single() and $conditionals['is_single']) or
530
+ (is_page() and $conditionals['is_page']) or
531
+ (is_category() and $conditionals['is_category']) or
532
+ (is_date() and $conditionals['is_date']) or
533
+ (is_search() and $conditionals['is_search']) or
534
+ 0)
535
+ $content .= sociable_html();
536
+
537
+ return $content;
538
+ }
539
+ }
540
+
541
+ // Hook wp_head to add css
542
+ add_action('wp_head', 'sociable_wp_head');
543
+ function sociable_wp_head() {
544
+ if (in_array('Wists', get_option('sociable_active_sites')))
545
+ echo '<script language="JavaScript" type="text/javascript" src="' . get_bloginfo('wpurl') . '/wp-content/plugins/sociable/wists.js"></script>'."\n";
546
+ echo '<link rel="stylesheet" type="text/css" media="screen" href="' . get_bloginfo('wpurl') . '/wp-content/plugins/sociable/sociable.css" />'."\n";
547
+ }
548
+
549
+ // load wp rss functions for update checking.
550
+ if (!function_exists('parse_w3cdtf')) {
551
+ require_once(ABSPATH . WPINC . '/rss-functions.php');
552
+ }
553
+
554
+ // Plugin config/data setup
555
+ if (function_exists('register_activation_hook')) {
556
+ // for WP 2
557
+ register_activation_hook(__FILE__, 'sociable_activation_hook');
558
+ } else {
559
+ // for WP 1.5, which doesn't have any activation hook
560
+ if (!is_array(get_option('sociable_active_sites')))
561
+ sociable_activation_hook();
562
+ }
563
+ function sociable_activation_hook() {
564
+ return sociable_restore_config(False);
565
+ }
566
+
567
+ // restore built-in defaults, optionally overwriting existing values
568
+ function sociable_restore_config($force=False) {
569
+ // Load defaults, taking care not to smash already-set options
570
+ global $sociable_known_sites;
571
+
572
+ // Used to store sites in the db with the idea users would
573
+ // add sites, but nobody will so I dropped the feature.
574
+ // This should clean up any old installs.
575
+ delete_option('sociable_known_sites');
576
+
577
+ if ($force or !is_array(get_option('sociable_active_sites')))
578
+ update_option('sociable_active_sites', array(
579
+ 'Digg',
580
+ 'Sphinn',
581
+ 'del.icio.us',
582
+ 'Facebook',
583
+ 'Mixx',
584
+ 'Google',
585
+ ));
586
+
587
+ // tagline defaults to a Hitchiker's Guide to the Galaxy reference
588
+ if ($force or !is_string(get_option('sociable_tagline')))
589
+ update_option('sociable_tagline', "<strong>" . __("Share and Enjoy:", 'sociable') . "</strong>");
590
+
591
+ // only display on single posts and pages by default
592
+ if ($force or !is_array(get_option('sociable_conditionals')))
593
+ update_option('sociable_conditionals', array(
594
+ 'is_home' => False,
595
+ 'is_single' => True,
596
+ 'is_page' => True,
597
+ 'is_category' => False,
598
+ 'is_date' => False,
599
+ 'is_search' => False,
600
+ ));
601
+
602
+ // last-updated date defaults to 0000-00-00
603
+ // this is to trigger the update check on first run
604
+ if ($force or !get_option('sociable_updated'))
605
+ update_option('sociable_updated', '0000-00-00');
606
+ }
607
+
608
+ // Hook the admin_menu display to add admin page
609
+ add_action('admin_menu', 'sociable_admin_menu');
610
+ function sociable_admin_menu() {
611
+ add_submenu_page('options-general.php', 'Sociable', 'Sociable', 8, 'Sociable', 'sociable_submenu');
612
+ }
613
+
614
+ // Admin page header
615
+ add_action('admin_head', 'sociable_admin_head');
616
+ function sociable_admin_head() {
617
+ ?>
618
+
619
+ <!-- The ToolMan lib provides drag and drop: http://tool-man.org/examples/sorting.html -->
620
+ <script language="JavaScript" type="text/javascript" src="<?php echo get_bloginfo('wpurl'); ?>/wp-content/plugins/sociable/tool-man/core.js"></script>
621
+ <script language="JavaScript" type="text/javascript" src="<?php echo get_bloginfo('wpurl'); ?>/wp-content/plugins/sociable/tool-man/coordinates.js"></script>
622
+ <script language="JavaScript" type="text/javascript" src="<?php echo get_bloginfo('wpurl'); ?>/wp-content/plugins/sociable/tool-man/css.js"></script>
623
+ <script language="JavaScript" type="text/javascript" src="<?php echo get_bloginfo('wpurl'); ?>/wp-content/plugins/sociable/tool-man/drag.js"></script>
624
+ <script language="JavaScript" type="text/javascript" src="<?php echo get_bloginfo('wpurl'); ?>/wp-content/plugins/sociable/tool-man/dragsort.js"></script>
625
+ <script language="JavaScript" type="text/javascript" src="<?php echo get_bloginfo('wpurl'); ?>/wp-content/plugins/sociable/tool-man/events.js"></script>
626
+ <script language="JavaScript" type="text/javascript"><!--
627
+ var dragsort = ToolMan.dragsort();
628
+ var junkdrawer = ToolMan.junkdrawer();
629
+
630
+ function save_reorder(id) {
631
+ site_order = document.getElementById('site_order');
632
+
633
+ old_order = site_order.value;
634
+ new_order = junkdrawer.serializeList(document.getElementById('sociable_site_list'));
635
+ site_order.value = new_order;
636
+
637
+ if (!site_order.used || new_order == old_order)
638
+ toggle_checkbox(id);
639
+ site_order.used = true;
640
+ }
641
+
642
+ /* make checkbox action prettier */
643
+ function toggle_checkbox(id) {
644
+ var checkbox = document.getElementById(id);
645
+
646
+ checkbox.checked = !checkbox.checked;
647
+ if (checkbox.checked)
648
+ checkbox.parentNode.className = 'active';
649
+ else
650
+ checkbox.parentNode.className = 'inactive';
651
+ }
652
+ --></script>
653
+
654
+ <link rel="stylesheet" type="text/css" media="screen" href="<?php echo get_bloginfo('wpurl'); ?>/wp-content/plugins/sociable/sociable-admin.css" />
655
+ <?php
656
+ }
657
+
658
+ function sociable_message($message) {
659
+ echo "<div id=\"message\" class=\"updated fade\"><p>$message</p></div>\n";
660
+ }
661
+
662
+ // Sanity check the upload worked
663
+ function sociable_upload_errors() {
664
+ global $sociable_files;
665
+
666
+ $cwd = getcwd(); // store current dir for restoration
667
+ if (!@chdir('../wp-content/plugins'))
668
+ return __("Couldn't find wp-content/plugins folder. Please make sure WordPress is installed correctly.", 'sociable');
669
+ if (!is_dir('sociable'))
670
+ return __("Can't find sociable folder.", 'sociable');
671
+ chdir('sociable');
672
+
673
+ foreach($sociable_files as $file) {
674
+ if (substr($file, -1) == '/') {
675
+ if (!is_dir(substr($file, 0, strlen($file) - 1)))
676
+ return __("Can't find folder:", 'sociable') . " <kbd>$file</kbd>";
677
+ } else if (!is_file($file))
678
+ return __("Can't find file:", 'sociable') . " <kbd>$file</kbd>";
679
+ }
680
+
681
+
682
+ $header_filename = '../../themes/' . get_option('template') . '/header.php';
683
+ if (!file_exists($header_filename) or strpos(@file_get_contents($header_filename), 'wp_head()') === false)
684
+ return __("Your theme isn't set up for Sociable to load its style. Please edit <kbd>header.php</kbd> and add a line reading <kbd>&lt?php wp_head(); ?&gt;</kbd> before <kbd>&lt;/head&gt;</kbd> to fix this.", 'sociable');
685
+
686
+ chdir($cwd); // restore cwd
687
+
688
+ return false;
689
+ }
690
+
691
+ // The admin page
692
+ function sociable_submenu() {
693
+ global $sociable_known_sites, $sociable_date, $sociable_files;
694
+
695
+ // update options in db if requested
696
+ if ($_REQUEST['restore']) {
697
+ sociable_restore_config(True);
698
+ sociable_message(__("Restored all settings to defaults.", 'sociable'));
699
+ } else if ($_REQUEST['save']) {
700
+ // update active sites
701
+ $active_sites = Array();
702
+ if (!$_REQUEST['active_sites'])
703
+ $_REQUEST['active_sites'] = Array();
704
+ foreach($_REQUEST['active_sites'] as $sitename=>$dummy)
705
+ $active_sites[] = $sitename;
706
+ update_option('sociable_active_sites', $active_sites);
707
+ // have to delete and re-add because update doesn't hit the db for identical arrays
708
+ // (sorting does not influence associated array equality in PHP)
709
+ delete_option('sociable_active_sites', $active_sites);
710
+ add_option('sociable_active_sites', $active_sites);
711
+
712
+ // update conditional displays
713
+ $conditionals = Array();
714
+ if (!$_REQUEST['conditionals'])
715
+ $_REQUEST['conditionals'] = Array();
716
+ foreach(get_option('sociable_conditionals') as $condition=>$toggled)
717
+ $conditionals[$condition] = array_key_exists($condition, $_REQUEST['conditionals']);
718
+ update_option('sociable_conditionals', $conditionals);
719
+
720
+ // update tagline
721
+ if (!$_REQUEST['tagline'])
722
+ $_REQUEST['tagline'] = "";
723
+ update_option('sociable_tagline', $_REQUEST['tagline']);
724
+
725
+ sociable_message(__("Saved changes.", 'sociable'));
726
+ }
727
+
728
+ if ($str = sociable_upload_errors())
729
+ sociable_message("$str</p><p>" . __("In your plugins/sociable folder, you must have these files:", 'sociable') . ' <pre>' . implode("\n", $sociable_files) );
730
+
731
+ // show active sites first and in order
732
+ $active_sites = get_option('sociable_active_sites');
733
+ $active = Array(); $disabled = $sociable_known_sites;
734
+ foreach($active_sites as $sitename) {
735
+ $active[$sitename] = $disabled[$sitename];
736
+ unset($disabled[$site]);
737
+ }
738
+ uksort($disabled, "strnatcasecmp");
739
+
740
+ // load options from db to display
741
+ $tagline = stripslashes(get_option('sociable_tagline'));
742
+ $conditionals = get_option('sociable_conditionals');
743
+ $updated = get_option('sociable_updated');
744
+
745
+ // display options
746
+ ?>
747
+ <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
748
+
749
+ <div class="wrap" id="sociable_options">
750
+ <fieldset id="sociable_sites">
751
+
752
+ <h3><?php _e("Sociable Options", 'sociable'); ?></h3>
753
+
754
+ <p><?php _e("Drag and drop sites to reorder them. Only the sites you check will appear publicly.", 'sociable'); ?></p>
755
+
756
+ <ul id="sociable_site_list">
757
+ <?php foreach (array_merge($active, $disabled) as $sitename=>$site) { ?>
758
+ <li
759
+ id="<?php echo $sitename; ?>"
760
+ class="sociable_site <?php echo (in_array($sitename, $active_sites)) ? "active" : "inactive"; ?>"
761
+ onmouseup="javascript:save_reorder('cb_<?php echo $sitename; ?>');"
762
+ >
763
+ <input
764
+ type="checkbox"
765
+ id="cb_<?php echo $sitename; ?>"
766
+ class="checkbox"
767
+ name="active_sites[<?php echo $sitename; ?>]"
768
+ onclick="javascript:toggle_checkbox('cb_<?php echo $sitename; ?>');"
769
+ <?php echo (in_array($sitename, $active_sites)) ? ' checked="checked"' : ''; ?>
770
+ />
771
+ <img src="../wp-content/plugins/sociable/images/<?php echo $site['favicon']?>" width="16" height="16" alt="" />
772
+ <?php print $sitename; ?>
773
+ </li>
774
+ <?php } ?>
775
+ </ul>
776
+ <input type="hidden" id="site_order" name="site_order" value="<?php echo join('|', array_keys($sociable_known_sites)) ?>" />
777
+ <script language="JavaScript" type="text/javascript"><!--
778
+ dragsort.makeListSortable(document.getElementById("sociable_site_list"));
779
+ --></script>
780
+
781
+ </fieldset>
782
+ <div style="clear: left; display: none;"><br/></div>
783
+
784
+ <fieldset id="sociable_tagline">
785
+ <p>
786
+ <?php _e("Change the text displayed in front of the icons below. For complete customization, edit <kbd>sociable.css</kbd> in the Sociable plugin directory.", 'sociable'); ?>
787
+ </p>
788
+ <input type="text" name="tagline" value="<?php echo htmlspecialchars($tagline); ?>" />
789
+ </fieldset>
790
+
791
+
792
+ <fieldset id="sociable_conditionals">
793
+ <p><?php _e("The icons appear at the end of each blog post, and posts may show on many different types of pages. Depending on your theme and audience, it may be tacky to display icons on all types of pages.", 'sociable'); ?></p>
794
+
795
+ <ul style="list-style-type: none">
796
+ <li><input type="checkbox" name="conditionals[is_home]"<?php echo ($conditionals['is_home']) ? ' checked="checked"' : ''; ?> /> <?php _e("Front page of the blog", 'sociable'); ?></li>
797
+ <li><input type="checkbox" name="conditionals[is_single]"<?php echo ($conditionals['is_single']) ? ' checked="checked"' : ''; ?> /> <?php _e("Individual blog posts", 'sociable'); ?></li>
798
+ <li><input type="checkbox" name="conditionals[is_page]"<?php echo ($conditionals['is_page']) ? ' checked="checked"' : ''; ?> /> <?php _e('Individual WordPress "Pages"', 'sociable'); ?></li>
799
+ <li><input type="checkbox" name="conditionals[is_category]"<?php echo ($conditionals['is_category']) ? ' checked="checked"' : ''; ?> /> <?php _e("Category archives", 'sociable'); ?></li>
800
+ <li><input type="checkbox" name="conditionals[is_date]"<?php echo ($conditionals['is_date']) ? ' checked="checked"' : ''; ?> /> <?php _e("Date-based archives", 'sociable'); ?></li>
801
+ <li><input type="checkbox" name="conditionals[is_search]"<?php echo ($conditionals['is_search']) ? ' checked="checked"' : ''; ?> /> <?php _e("Search results", 'sociable'); ?></li>
802
+ </ul>
803
+ </fieldset>
804
+
805
+ <p class="submit"><input name="save" id="save" tabindex="3" value="<?php _e("Save Changes", 'sociable'); ?>" type="submit" /></p>
806
+ <p class="submit"><input name="restore" id="restore" tabindex="3" value="<?php _e("Restore Built-in Defaults", 'sociable'); ?>" type="submit" style="border: 2px solid #e00;" /></p>
807
+
808
+ </div>
809
+
810
+ <div class="wrap">
811
+ <p>
812
+ <?php _e('<a href="http://www.joostdevalk.nl/wordpress/sociable/">Sociable</a> is copyright 2006 by <a href="http://push.cx/">Peter Harkins</a> and update to version 2.5 and thus copyright 2008 by <a href="http://www.joostdevalk.nl/">Joost de Valk</a>, released under the GNU GPL version 2 or later. If you like Sociable, please send a link my way so other folks can find out about it. If you have any problems or good ideas, <a href="http://www.joostdevalk.nl/contact/">contact me</a>.', 'sociable'); ?>
813
+ </p>
814
+ </div>
815
+
816
+ </form>
817
+
818
+ <?php
819
+ }
820
+
821
+ ?>
tool-man/coordinates.js ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright (c) 2005 Tim Taylor Consulting (see LICENSE.txt) */
2
+
3
+ /* FIXME: assumes position styles are specified in 'px' */
4
+
5
+ ToolMan._coordinatesFactory = {
6
+
7
+ create : function(x, y) {
8
+ // FIXME: Safari won't parse 'throw' and aborts trying to do anything with this file
9
+ //if (isNaN(x) || isNaN(y)) throw "invalid x,y: " + x + "," + y
10
+ return new _ToolManCoordinate(this, x, y)
11
+ },
12
+
13
+ origin : function() {
14
+ return this.create(0, 0)
15
+ },
16
+
17
+ /*
18
+ * FIXME: Safari 1.2, returns (0,0) on absolutely positioned elements
19
+ */
20
+ topLeftPosition : function(element) {
21
+ var left = parseInt(ToolMan.css().readStyle(element, "left"))
22
+ var left = isNaN(left) ? 0 : left
23
+ var top = parseInt(ToolMan.css().readStyle(element, "top"))
24
+ var top = isNaN(top) ? 0 : top
25
+
26
+ return this.create(left, top)
27
+ },
28
+
29
+ bottomRightPosition : function(element) {
30
+ return this.topLeftPosition(element).plus(this._size(element))
31
+ },
32
+
33
+ topLeftOffset : function(element) {
34
+ var offset = this._offset(element)
35
+
36
+ var parent = element.offsetParent
37
+ while (parent) {
38
+ offset = offset.plus(this._offset(parent))
39
+ parent = parent.offsetParent
40
+ }
41
+ return offset
42
+ },
43
+
44
+ bottomRightOffset : function(element) {
45
+ return this.topLeftOffset(element).plus(
46
+ this.create(element.offsetWidth, element.offsetHeight))
47
+ },
48
+
49
+ scrollOffset : function() {
50
+ if (window.pageXOffset) {
51
+ return this.create(window.pageXOffset, window.pageYOffset)
52
+ } else if (document.documentElement) {
53
+ return this.create(
54
+ document.body.scrollLeft + document.documentElement.scrollLeft,
55
+ document.body.scrollTop + document.documentElement.scrollTop)
56
+ } else if (document.body.scrollLeft >= 0) {
57
+ return this.create(document.body.scrollLeft, document.body.scrollTop)
58
+ } else {
59
+ return this.create(0, 0)
60
+ }
61
+ },
62
+
63
+ clientSize : function() {
64
+ if (window.innerHeight >= 0) {
65
+ return this.create(window.innerWidth, window.innerHeight)
66
+ } else if (document.documentElement) {
67
+ return this.create(document.documentElement.clientWidth,
68
+ document.documentElement.clientHeight)
69
+ } else if (document.body.clientHeight >= 0) {
70
+ return this.create(document.body.clientWidth,
71
+ document.body.clientHeight)
72
+ } else {
73
+ return this.create(0, 0)
74
+ }
75
+ },
76
+
77
+ /**
78
+ * mouse coordinate relative to the window (technically the
79
+ * browser client area) i.e. the part showing your page
80
+ *
81
+ * NOTE: in Safari the coordinate is relative to the document
82
+ */
83
+ mousePosition : function(event) {
84
+ event = ToolMan.events().fix(event)
85
+ return this.create(event.clientX, event.clientY)
86
+ },
87
+
88
+ /**
89
+ * mouse coordinate relative to the document
90
+ */
91
+ mouseOffset : function(event) {
92
+ event = ToolMan.events().fix(event)
93
+ if (event.pageX >= 0 || event.pageX < 0) {
94
+ return this.create(event.pageX, event.pageY)
95
+ } else if (event.clientX >= 0 || event.clientX < 0) {
96
+ return this.mousePosition(event).plus(this.scrollOffset())
97
+ }
98
+ },
99
+
100
+ _size : function(element) {
101
+ /* TODO: move to a Dimension class */
102
+ return this.create(element.offsetWidth, element.offsetHeight)
103
+ },
104
+
105
+ _offset : function(element) {
106
+ return this.create(element.offsetLeft, element.offsetTop)
107
+ }
108
+ }
109
+
110
+ function _ToolManCoordinate(factory, x, y) {
111
+ this.factory = factory
112
+ this.x = isNaN(x) ? 0 : x
113
+ this.y = isNaN(y) ? 0 : y
114
+ }
115
+
116
+ _ToolManCoordinate.prototype = {
117
+ toString : function() {
118
+ return "(" + this.x + "," + this.y + ")"
119
+ },
120
+
121
+ plus : function(that) {
122
+ return this.factory.create(this.x + that.x, this.y + that.y)
123
+ },
124
+
125
+ minus : function(that) {
126
+ return this.factory.create(this.x - that.x, this.y - that.y)
127
+ },
128
+
129
+ min : function(that) {
130
+ return this.factory.create(
131
+ Math.min(this.x , that.x), Math.min(this.y , that.y))
132
+ },
133
+
134
+ max : function(that) {
135
+ return this.factory.create(
136
+ Math.max(this.x , that.x), Math.max(this.y , that.y))
137
+ },
138
+
139
+ constrainTo : function (one, two) {
140
+ var min = one.min(two)
141
+ var max = one.max(two)
142
+
143
+ return this.max(min).min(max)
144
+ },
145
+
146
+ distance : function (that) {
147
+ return Math.sqrt(Math.pow(this.x - that.x, 2) + Math.pow(this.y - that.y, 2))
148
+ },
149
+
150
+ reposition : function(element) {
151
+ element.style["top"] = this.y + "px"
152
+ element.style["left"] = this.x + "px"
153
+ }
154
+ }
tool-man/core.js ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright (c) 2005 Tim Taylor Consulting <http://tool-man.org/>
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a
5
+ copy of this software and associated documentation files (the "Software"),
6
+ to deal in the Software without restriction, including without limitation
7
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
+ and/or sell copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included
12
+ in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20
+ IN THE SOFTWARE.
21
+ */
22
+
23
+ var ToolMan = {
24
+ events : function() {
25
+ if (!ToolMan._eventsFactory) throw "ToolMan Events module isn't loaded";
26
+ return ToolMan._eventsFactory
27
+ },
28
+
29
+ css : function() {
30
+ if (!ToolMan._cssFactory) throw "ToolMan CSS module isn't loaded";
31
+ return ToolMan._cssFactory
32
+ },
33
+
34
+ coordinates : function() {
35
+ if (!ToolMan._coordinatesFactory) throw "ToolMan Coordinates module isn't loaded";
36
+ return ToolMan._coordinatesFactory
37
+ },
38
+
39
+ drag : function() {
40
+ if (!ToolMan._dragFactory) throw "ToolMan Drag module isn't loaded";
41
+ return ToolMan._dragFactory
42
+ },
43
+
44
+ dragsort : function() {
45
+ if (!ToolMan._dragsortFactory) throw "ToolMan DragSort module isn't loaded";
46
+ return ToolMan._dragsortFactory
47
+ },
48
+
49
+ helpers : function() {
50
+ return ToolMan._helpers
51
+ },
52
+
53
+ /* Sociable doesn't need these
54
+ cookies : function() {
55
+ if (!ToolMan._cookieOven) throw "ToolMan Cookie module isn't loaded";
56
+ return ToolMan._cookieOven
57
+ },
58
+ */
59
+
60
+ junkdrawer : function() {
61
+ return ToolMan._junkdrawer
62
+ }
63
+
64
+ }
65
+
66
+ ToolMan._helpers = {
67
+ map : function(array, func) {
68
+ for (var i = 0, n = array.length; i < n; i++) func(array[i])
69
+ },
70
+
71
+ nextItem : function(item, nodeName) {
72
+ if (item == null) return
73
+ var next = item.nextSibling
74
+ while (next != null) {
75
+ if (next.nodeName == nodeName) return next
76
+ next = next.nextSibling
77
+ }
78
+ return null
79
+ },
80
+
81
+ previousItem : function(item, nodeName) {
82
+ var previous = item.previousSibling
83
+ while (previous != null) {
84
+ if (previous.nodeName == nodeName) return previous
85
+ previous = previous.previousSibling
86
+ }
87
+ return null
88
+ },
89
+
90
+ moveBefore : function(item1, item2) {
91
+ var parent = item1.parentNode
92
+ parent.removeChild(item1)
93
+ parent.insertBefore(item1, item2)
94
+ },
95
+
96
+ moveAfter : function(item1, item2) {
97
+ var parent = item1.parentNode
98
+ parent.removeChild(item1)
99
+ parent.insertBefore(item1, item2 ? item2.nextSibling : null)
100
+ }
101
+ }
102
+
103
+ /**
104
+ * scripts without a proper home
105
+ *
106
+ * stuff here is subject to change unapologetically and without warning
107
+ */
108
+ ToolMan._junkdrawer = {
109
+ serializeList : function(list) {
110
+ var items = list.getElementsByTagName("li")
111
+ var array = new Array()
112
+ for (var i = 0, n = items.length; i < n; i++) {
113
+ var item = items[i]
114
+
115
+ array.push(ToolMan.junkdrawer()._identifier(item))
116
+ }
117
+ return array.join('|')
118
+ },
119
+
120
+ inspectListOrder : function(id) {
121
+ alert(ToolMan.junkdrawer().serializeList(document.getElementById(id)))
122
+ },
123
+
124
+ restoreListOrder : function(listID) {
125
+ var list = document.getElementById(listID)
126
+ if (list == null) return
127
+
128
+ var cookie = ToolMan.cookies().get("list-" + listID)
129
+ if (!cookie) return;
130
+
131
+ var IDs = cookie.split('|')
132
+ var items = ToolMan.junkdrawer()._itemsByID(list)
133
+
134
+ for (var i = 0, n = IDs.length; i < n; i++) {
135
+ var itemID = IDs[i]
136
+ if (itemID in items) {
137
+ var item = items[itemID]
138
+ list.removeChild(item)
139
+ list.insertBefore(item, null)
140
+ }
141
+ }
142
+ },
143
+
144
+ _identifier : function(item) {
145
+ var trim = ToolMan.junkdrawer().trim
146
+ var identifier
147
+
148
+ identifier = trim(item.getAttribute("id"))
149
+ if (identifier != null && identifier.length > 0) return identifier;
150
+
151
+ identifier = trim(item.getAttribute("itemID"))
152
+ if (identifier != null && identifier.length > 0) return identifier;
153
+
154
+ // FIXME: strip out special chars or make this an MD5 hash or something
155
+ return trim(item.innerHTML)
156
+ },
157
+
158
+ _itemsByID : function(list) {
159
+ var array = new Array()
160
+ var items = list.getElementsByTagName('li')
161
+ for (var i = 0, n = items.length; i < n; i++) {
162
+ var item = items[i]
163
+ array[ToolMan.junkdrawer()._identifier(item)] = item
164
+ }
165
+ return array
166
+ },
167
+
168
+ trim : function(text) {
169
+ if (text == null) return null
170
+ return text.replace(/^(\s+)?(.*\S)(\s+)?$/, '$2')
171
+ }
172
+ }
tool-man/css.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright (c) 2005 Tim Taylor Consulting (see LICENSE.txt) */
2
+
3
+ // TODO: write unit tests
4
+ ToolMan._cssFactory = {
5
+ readStyle : function(element, property) {
6
+ if (element.style[property]) {
7
+ return element.style[property]
8
+ } else if (element.currentStyle) {
9
+ return element.currentStyle[property]
10
+ } else if (document.defaultView && document.defaultView.getComputedStyle) {
11
+ var style = document.defaultView.getComputedStyle(element, null)
12
+ return style.getPropertyValue(property)
13
+ } else {
14
+ return null
15
+ }
16
+ }
17
+ }
tool-man/drag.js ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright (c) 2005 Tim Taylor Consulting (see LICENSE.txt) */
2
+
3
+ ToolMan._dragFactory = {
4
+ createSimpleGroup : function(element, handle) {
5
+ handle = handle ? handle : element
6
+ var group = this.createGroup(element)
7
+ group.setHandle(handle)
8
+ group.transparentDrag()
9
+ group.onTopWhileDragging()
10
+ return group
11
+ },
12
+
13
+ createGroup : function(element) {
14
+ var group = new _ToolManDragGroup(this, element)
15
+
16
+ var position = ToolMan.css().readStyle(element, 'position')
17
+ if (position == 'static') {
18
+ element.style["position"] = 'relative'
19
+ } else if (position == 'absolute') {
20
+ /* for Safari 1.2 */
21
+ ToolMan.coordinates().topLeftOffset(element).reposition(element)
22
+ }
23
+
24
+ // TODO: only if ToolMan.isDebugging()
25
+ group.register('draginit', this._showDragEventStatus)
26
+ group.register('dragmove', this._showDragEventStatus)
27
+ group.register('dragend', this._showDragEventStatus)
28
+
29
+ return group
30
+ },
31
+
32
+ _showDragEventStatus : function(dragEvent) {
33
+ window.status = dragEvent.toString()
34
+ },
35
+
36
+ constraints : function() {
37
+ return this._constraintFactory
38
+ },
39
+
40
+ _createEvent : function(type, event, group) {
41
+ return new _ToolManDragEvent(type, event, group)
42
+ }
43
+ }
44
+
45
+ function _ToolManDragGroup(factory, element) {
46
+ this.factory = factory
47
+ this.element = element
48
+ this._handle = null
49
+ this._thresholdDistance = 0
50
+ this._transforms = new Array()
51
+ // TODO: refactor into a helper object, move into events.js
52
+ this._listeners = new Array()
53
+ this._listeners['draginit'] = new Array()
54
+ this._listeners['dragstart'] = new Array()
55
+ this._listeners['dragmove'] = new Array()
56
+ this._listeners['dragend'] = new Array()
57
+ }
58
+
59
+ _ToolManDragGroup.prototype = {
60
+ /*
61
+ * TODO:
62
+ * - unregister(type, func)
63
+ * - move custom event listener stuff into Event library
64
+ * - keyboard nudging of "selected" group
65
+ */
66
+
67
+ setHandle : function(handle) {
68
+ var events = ToolMan.events()
69
+
70
+ handle.toolManDragGroup = this
71
+ events.register(handle, 'mousedown', this._dragInit)
72
+ handle.onmousedown = function() { return false }
73
+
74
+ if (this.element != handle)
75
+ events.unregister(this.element, 'mousedown', this._dragInit)
76
+ },
77
+
78
+ register : function(type, func) {
79
+ this._listeners[type].push(func)
80
+ },
81
+
82
+ addTransform : function(transformFunc) {
83
+ this._transforms.push(transformFunc)
84
+ },
85
+
86
+ verticalOnly : function() {
87
+ this.addTransform(this.factory.constraints().vertical())
88
+ },
89
+
90
+ horizontalOnly : function() {
91
+ this.addTransform(this.factory.constraints().horizontal())
92
+ },
93
+
94
+ setThreshold : function(thresholdDistance) {
95
+ this._thresholdDistance = thresholdDistance
96
+ },
97
+
98
+ transparentDrag : function(opacity) {
99
+ var opacity = typeof(opacity) != "undefined" ? opacity : 0.75;
100
+ var originalOpacity = ToolMan.css().readStyle(this.element, "opacity")
101
+
102
+ this.register('dragstart', function(dragEvent) {
103
+ var element = dragEvent.group.element
104
+ element.style.opacity = opacity
105
+ element.style.filter = 'alpha(opacity=' + (opacity * 100) + ')'
106
+ })
107
+ this.register('dragend', function(dragEvent) {
108
+ var element = dragEvent.group.element
109
+ element.style.opacity = originalOpacity
110
+ element.style.filter = 'alpha(opacity=100)'
111
+ })
112
+ },
113
+
114
+ onTopWhileDragging : function(zIndex) {
115
+ var zIndex = typeof(zIndex) != "undefined" ? zIndex : 100000;
116
+ var originalZIndex = ToolMan.css().readStyle(this.element, "z-index")
117
+
118
+ this.register('dragstart', function(dragEvent) {
119
+ dragEvent.group.element.style.zIndex = zIndex
120
+ })
121
+ this.register('dragend', function(dragEvent) {
122
+ dragEvent.group.element.style.zIndex = originalZIndex
123
+ })
124
+ },
125
+
126
+ _dragInit : function(event) {
127
+ event = ToolMan.events().fix(event)
128
+ var group = document.toolManDragGroup = this.toolManDragGroup
129
+ var dragEvent = group.factory._createEvent('draginit', event, group)
130
+
131
+ group._isThresholdExceeded = false
132
+ group._initialMouseOffset = dragEvent.mouseOffset
133
+ group._grabOffset = dragEvent.mouseOffset.minus(dragEvent.topLeftOffset)
134
+ ToolMan.events().register(document, 'mousemove', group._drag)
135
+ document.onmousemove = function() { return false }
136
+ ToolMan.events().register(document, 'mouseup', group._dragEnd)
137
+
138
+ group._notifyListeners(dragEvent)
139
+ },
140
+
141
+ _drag : function(event) {
142
+ event = ToolMan.events().fix(event)
143
+ var coordinates = ToolMan.coordinates()
144
+ var group = this.toolManDragGroup
145
+ if (!group) return
146
+ var dragEvent = group.factory._createEvent('dragmove', event, group)
147
+
148
+ var newTopLeftOffset = dragEvent.mouseOffset.minus(group._grabOffset)
149
+
150
+ // TODO: replace with DragThreshold object
151
+ if (!group._isThresholdExceeded) {
152
+ var distance =
153
+ dragEvent.mouseOffset.distance(group._initialMouseOffset)
154
+ if (distance < group._thresholdDistance) return
155
+ group._isThresholdExceeded = true
156
+ group._notifyListeners(
157
+ group.factory._createEvent('dragstart', event, group))
158
+ }
159
+
160
+ for (i in group._transforms) {
161
+ var transform = group._transforms[i]
162
+ newTopLeftOffset = transform(newTopLeftOffset, dragEvent)
163
+ }
164
+
165
+ var dragDelta = newTopLeftOffset.minus(dragEvent.topLeftOffset)
166
+ var newTopLeftPosition = dragEvent.topLeftPosition.plus(dragDelta)
167
+ newTopLeftPosition.reposition(group.element)
168
+ dragEvent.transformedMouseOffset = newTopLeftOffset.plus(group._grabOffset)
169
+
170
+ group._notifyListeners(dragEvent)
171
+
172
+ var errorDelta = newTopLeftOffset.minus(coordinates.topLeftOffset(group.element))
173
+ if (errorDelta.x != 0 || errorDelta.y != 0) {
174
+ coordinates.topLeftPosition(group.element).plus(errorDelta).reposition(group.element)
175
+ }
176
+ },
177
+
178
+ _dragEnd : function(event) {
179
+ event = ToolMan.events().fix(event)
180
+ var group = this.toolManDragGroup
181
+ var dragEvent = group.factory._createEvent('dragend', event, group)
182
+
183
+ group._notifyListeners(dragEvent)
184
+
185
+ this.toolManDragGroup = null
186
+ ToolMan.events().unregister(document, 'mousemove', group._drag)
187
+ document.onmousemove = null
188
+ ToolMan.events().unregister(document, 'mouseup', group._dragEnd)
189
+ },
190
+
191
+ _notifyListeners : function(dragEvent) {
192
+ var listeners = this._listeners[dragEvent.type]
193
+ for (i in listeners) {
194
+ listeners[i](dragEvent)
195
+ }
196
+ }
197
+ }
198
+
199
+ function _ToolManDragEvent(type, event, group) {
200
+ this.type = type
201
+ this.group = group
202
+ this.mousePosition = ToolMan.coordinates().mousePosition(event)
203
+ this.mouseOffset = ToolMan.coordinates().mouseOffset(event)
204
+ this.transformedMouseOffset = this.mouseOffset
205
+ this.topLeftPosition = ToolMan.coordinates().topLeftPosition(group.element)
206
+ this.topLeftOffset = ToolMan.coordinates().topLeftOffset(group.element)
207
+ }
208
+
209
+ _ToolManDragEvent.prototype = {
210
+ toString : function() {
211
+ return "mouse: " + this.mousePosition + this.mouseOffset + " " +
212
+ "xmouse: " + this.transformedMouseOffset + " " +
213
+ "left,top: " + this.topLeftPosition + this.topLeftOffset
214
+ }
215
+ }
216
+
217
+ ToolMan._dragFactory._constraintFactory = {
218
+ vertical : function() {
219
+ return function(coordinate, dragEvent) {
220
+ var x = dragEvent.topLeftOffset.x
221
+ return coordinate.x != x
222
+ ? coordinate.factory.create(x, coordinate.y)
223
+ : coordinate
224
+ }
225
+ },
226
+
227
+ horizontal : function() {
228
+ return function(coordinate, dragEvent) {
229
+ var y = dragEvent.topLeftOffset.y
230
+ return coordinate.y != y
231
+ ? coordinate.factory.create(coordinate.x, y)
232
+ : coordinate
233
+ }
234
+ }
235
+ }
tool-man/dragsort.js ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright (c) 2005 Tim Taylor Consulting (see LICENSE.txt) */
2
+
3
+ ToolMan._dragsortFactory = {
4
+ makeSortable : function(item) {
5
+ var group = ToolMan.drag().createSimpleGroup(item)
6
+
7
+ group.register('dragstart', this._onDragStart)
8
+ group.register('dragmove', this._onDragMove)
9
+ group.register('dragend', this._onDragEnd)
10
+
11
+ return group
12
+ },
13
+
14
+ /**
15
+ * Iterates over a list's items, making them sortable, applying
16
+ * optional functions to each item.
17
+ *
18
+ * example: makeListSortable(myList, myFunc1, myFunc2, ... , myFuncN)
19
+ */
20
+ makeListSortable : function(list) {
21
+ var helpers = ToolMan.helpers()
22
+ var coordinates = ToolMan.coordinates()
23
+ var items = list.getElementsByTagName("li")
24
+
25
+ helpers.map(items, function(item) {
26
+ var dragGroup = dragsort.makeSortable(item)
27
+ dragGroup.setThreshold(4)
28
+ var min, max
29
+ dragGroup.addTransform(function(coordinate, dragEvent) {
30
+ return coordinate.constrainTo(min, max)
31
+ })
32
+ dragGroup.register('dragstart', function() {
33
+ var items = list.getElementsByTagName("li")
34
+ min = max = coordinates.topLeftOffset(items[0])
35
+ for (var i = 1, n = items.length; i < n; i++) {
36
+ var offset = coordinates.topLeftOffset(items[i])
37
+ min = min.min(offset)
38
+ max = max.max(offset)
39
+ }
40
+ })
41
+ })
42
+ for (var i = 1, n = arguments.length; i < n; i++)
43
+ helpers.map(items, arguments[i])
44
+ },
45
+
46
+ _onDragStart : function(dragEvent) {
47
+ },
48
+
49
+ _onDragMove : function(dragEvent) {
50
+ var helpers = ToolMan.helpers()
51
+ var coordinates = ToolMan.coordinates()
52
+
53
+ var item = dragEvent.group.element
54
+ var xmouse = dragEvent.transformedMouseOffset
55
+ var moveTo = null
56
+
57
+ var previous = helpers.previousItem(item, item.nodeName)
58
+ while (previous != null) {
59
+ var bottomRight = coordinates.bottomRightOffset(previous)
60
+ if (xmouse.y <= bottomRight.y && xmouse.x <= bottomRight.x) {
61
+ moveTo = previous
62
+ }
63
+ previous = helpers.previousItem(previous, item.nodeName)
64
+ }
65
+ if (moveTo != null) {
66
+ helpers.moveBefore(item, moveTo)
67
+ return
68
+ }
69
+
70
+ var next = helpers.nextItem(item, item.nodeName)
71
+ while (next != null) {
72
+ var topLeft = coordinates.topLeftOffset(next)
73
+ if (topLeft.y <= xmouse.y && topLeft.x <= xmouse.x) {
74
+ moveTo = next
75
+ }
76
+ next = helpers.nextItem(next, item.nodeName)
77
+ }
78
+ if (moveTo != null) {
79
+ helpers.moveBefore(item, helpers.nextItem(moveTo, item.nodeName))
80
+ return
81
+ }
82
+ },
83
+
84
+ _onDragEnd : function(dragEvent) {
85
+ ToolMan.coordinates().create(0, 0).reposition(dragEvent.group.element)
86
+ }
87
+ }
tool-man/events.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright (c) 2005 Tim Taylor Consulting (see LICENSE.txt) */
2
+
3
+ ToolMan._eventsFactory = {
4
+ fix : function(event) {
5
+ if (!event) event = window.event
6
+
7
+ if (event.target) {
8
+ if (event.target.nodeType == 3) event.target = event.target.parentNode
9
+ } else if (event.srcElement) {
10
+ event.target = event.srcElement
11
+ }
12
+
13
+ return event
14
+ },
15
+
16
+ register : function(element, type, func) {
17
+ if (element.addEventListener) {
18
+ element.addEventListener(type, func, false)
19
+ } else if (element.attachEvent) {
20
+ if (!element._listeners) element._listeners = new Array()
21
+ if (!element._listeners[type]) element._listeners[type] = new Array()
22
+ var workaroundFunc = function() {
23
+ func.apply(element, new Array())
24
+ }
25
+ element._listeners[type][func] = workaroundFunc
26
+ element.attachEvent('on' + type, workaroundFunc)
27
+ }
28
+ },
29
+
30
+ unregister : function(element, type, func) {
31
+ if (element.removeEventListener) {
32
+ element.removeEventListener(type, func, false)
33
+ } else if (element.detachEvent) {
34
+ if (element._listeners
35
+ && element._listeners[type]
36
+ && element._listeners[type][func]) {
37
+
38
+ element.detachEvent('on' + type,
39
+ element._listeners[type][func])
40
+ }
41
+ }
42
+ }
43
+ }
wists.js ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var Wistlet = {
2
+ init : function () {
3
+ var o = document.getElementsByTagName('body').item(0);
4
+
5
+ //var text = (typeof(document.selection == 'undefined') ) ? getSelection() : document.selection.createRange().text;
6
+
7
+ function getSel() {
8
+ var txt = '';
9
+ if (window.getSelection) {
10
+ txt = window.getSelection();
11
+ } else if (document.getSelection) {
12
+ txt = document.getSelection();
13
+ } else if (document.selection) {
14
+ txt = document.selection.createRange().text;
15
+ } else {
16
+ return;
17
+ }
18
+ return txt;
19
+ }
20
+
21
+
22
+ var s = '' +
23
+ '<form name="f" id="f" action="http://www.wists.com/s.php" method="get">'+
24
+ '<input name="c" id="c" type="hidden" value="null" />'+
25
+ '<input name="r" id="r" type="hidden" value="'+location+'" />'+
26
+ '<input name="u" id="u" type="hidden" value="" />'+
27
+ '<input name="title" id="title" type="hidden" value="'+document.title +'" />'+
28
+ '<input name="m" type="hidden" value="'+getSel()+'" />'+
29
+ '</form>'+
30
+ '<div>'+
31
+ '<a href="http://wists.com/"><img src="http://wists.com/mainimages/logo_top_left.gif" border=0></a><br />'+
32
+ '<p>Click on the most appropriate image below to create a thumbnail image for your bookmark:</a></p>'+
33
+ '<table width=800><tr width=800><td width=800>\n';
34
+
35
+ var x = this.scrape_images();
36
+ if (x == 0)
37
+ {
38
+ location = 'http://www.wists.com/s.php?c=&r='+location+'&title='+document.title;
39
+ return true;
40
+ }
41
+ s += x +
42
+
43
+ '</td></tr></table>\n'+
44
+ '<p>Don\'t like any of these images? <a href="http://www.wists.com/s.php?c=&r='+location+'&title='+document.title +'">Create a thumbnail screenshot</a> instead!</p>'+
45
+ '</div>';
46
+
47
+ o.innerHTML = s;
48
+ this.strip_document();
49
+ this.style_document();
50
+ return true;
51
+ },
52
+ make_thumbnail : function (r) {
53
+ var s = '' +
54
+ '<table style="float:left;"><tr><td width=120 height=90 valign=middle align=center><a href="http://www.wists.com/" onclick="return Wistlet.submit_form(\''+r+'\');">'+
55
+ '<img src="'+r+'" alt="" onload="resizeImage(this);" />'+
56
+ '</a></td></tr></table>\n';
57
+ return s;
58
+ },
59
+ submit_form : function (r) {
60
+ var f = document.getElementById('f'); if (!f) return false;
61
+ var u = document.getElementById('u'); if (!u) return false;
62
+ u.setAttribute("value", r);
63
+ f.submit();
64
+ return false;
65
+ },
66
+ get_background : function (o) {
67
+ var s = '';
68
+ if (window.getComputedStyle) s = window.getComputedStyle(o,null).getPropertyValue("background-image");
69
+ if (o.currentStyle) s = o.currentStyle.backgroundImage;
70
+ if (s == "none") s = "";
71
+ return s;
72
+ },
73
+ scrape_images : function () {
74
+ var a = document.getElementsByTagName('*');
75
+ var s = '';
76
+ var n = 0;
77
+ var l = [];
78
+ for (var i=0; i < a.length; i++)
79
+ {
80
+ var o = a[i];
81
+ if (o.tagName == "IMG" && o.src != "")
82
+ {
83
+ n++;
84
+ if (!l[o.src])
85
+ {
86
+ l[o.src] = "1";
87
+ s += this.make_thumbnail(o.src);
88
+ }
89
+ }
90
+ else
91
+ {
92
+ var x = /url\(["']?(.+[^'"])["']?\)/gi.exec(this.get_background(o));
93
+ if (x && x != "" && x.length > 1)
94
+ {
95
+ n++;
96
+ if (!l[x[1]])
97
+ {
98
+ l[x[1]] = "1";
99
+ s += this.make_thumbnail(x[1]);
100
+ }
101
+ }
102
+ }
103
+ }
104
+ if (n > 0)
105
+ {
106
+ return s
107
+ }
108
+ else {
109
+ return n;
110
+ }
111
+ },
112
+ strip_document : function () {
113
+ var a = document.getElementsByTagName('*');
114
+ for (var i=0; i < a.length; i++)
115
+ {
116
+ var o = a[i];
117
+ if (o.tagName == "LINK" || o.tagName == "STYLE")
118
+ {
119
+ this.destroy_element(o);
120
+ }
121
+ else if (o.tagName == "IMG")
122
+ {
123
+ if (o.offsetWidth <= 10 || o.offsetHeight <= 10)
124
+ {
125
+ // this.destroy_element(o.parentNode);
126
+ }
127
+ }
128
+ }
129
+ return true;
130
+ },
131
+ style_document : function () {
132
+ var x = document.getElementsByTagName('head').item(0);
133
+ var o = document.createElement('link');
134
+ if (typeof o != 'object') o = document.standardCreateElement('link');
135
+ o.setAttribute('href','http://www.wists.com/wistlet.css?x=' + Math.floor(Math.random() * 9999));
136
+ o.setAttribute('rel','stylesheet');
137
+ o.setAttribute('type','text/css');
138
+ x.appendChild(o);
139
+ return true;
140
+ },
141
+ destroy_element : function (o) {
142
+ while (o.childNodes.length > 0)
143
+ {
144
+ o.removeChild(o.childNodes[0]);
145
+ }
146
+ o.parentNode.removeChild(o);
147
+ }
148
+ }
149
+
150
+ function resizeImage(img) {
151
+
152
+ var img_width = img.offsetWidth;
153
+ var img_height = img.offsetHeight;
154
+ var img_aspect_ratio = Math.round((img_width / img_height) * 100) / 100;
155
+
156
+ var max_width = 120;
157
+ var max_height = 90;
158
+ var max_aspect_ratio = Math.round((max_width / max_height) * 100) / 100;
159
+
160
+ // alert("orig image size is " + img_width + "x" + img_height + "\n" + "aspect ratio is " + img_aspect_ratio + "\n\n" + "max image size is " + max_width + "x" + max_height + "\n" + "max aspect ratio is " + max_aspect_ratio);
161
+
162
+ var new_img_width = 0;
163
+ var new_img_height = 0;
164
+ var new_aspect_ratio = 0;
165
+
166
+ // if no resize needed
167
+ if (img_width < 120 && img_height < 90) {
168
+ new_img_width = img_width;
169
+ new_img_height = img_height;
170
+
171
+ // if wider
172
+ } else if (img_aspect_ratio > max_aspect_ratio) {
173
+ new_img_width = max_width;
174
+ new_img_height = Math.round(new_img_width / img_aspect_ratio);
175
+
176
+ // if taller
177
+ } else if (img_aspect_ratio < max_aspect_ratio) {
178
+ new_img_height = max_height;
179
+ new_img_width = Math.round(new_img_height * img_aspect_ratio);
180
+
181
+ // equal
182
+ } else {
183
+ new_img_width = max_width;
184
+ new_img_height = max_height;
185
+ }
186
+
187
+ img.style.width = new_img_width + "px";
188
+ img.style.height = new_img_height + "px";
189
+ new_aspect_ratio = Math.round((new_img_width / new_img_height) * 100) / 100;
190
+
191
+ // alert("new image size is " + new_img_width + "x" + new_img_height + "\n" + "new aspect ratio is " + new_aspect_ratio);
192
+ }
193
+
194
+
195
+ var sociable_old_onload = window.onload;
196
+ window.onload = function () {
197
+ imgs = document.getElementsByTagName("img");
198
+ for(var i = 0; i < imgs.length; i++) {
199
+ var img = imgs[i];
200
+ if (img.className == 'sociable-hovers sociable_wists') {
201
+ img.onclick = function() { Wistlet.init(); return false; }
202
+ }
203
+ }
204
+ if (sociable_old_onload) sociable_old_onload();
205
+ };