1 | <?php
|
---|
2 |
|
---|
3 | //this script is called directly by browsers
|
---|
4 | //we need php in this script only to put in the link to the social bookmark directory
|
---|
5 | $directory=preg_replace('/\/[^\/]*$/',"",$_SERVER['REQUEST_URI']);
|
---|
6 |
|
---|
7 | ?>function sbopen(url){
|
---|
8 | sbwin=window.open(url, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no');
|
---|
9 | sbwin.focus();
|
---|
10 | }
|
---|
11 |
|
---|
12 | function replace_link_title(intext, link, thetext) {
|
---|
13 | intext = intext.replace('##THE_LINK##', link);
|
---|
14 | intext = intext.replace('##THE_TITLE##', thetext);
|
---|
15 | intext = intext.replace('%23%23THE_TITLE%23%23', thetext);
|
---|
16 | return intext.replace('%23%23THE_TITLE%23%23', thetext);
|
---|
17 | }
|
---|
18 |
|
---|
19 |
|
---|
20 | function sbbview(divid, sbblink, sbbtitle){
|
---|
21 | var ssbdiv = document.getElementById(divid);
|
---|
22 | if (ssbdiv.style.display != 'block') {
|
---|
23 | ssbdiv.style.display = 'block';
|
---|
24 | }else {
|
---|
25 | if (ssbdiv.style.display == 'block') {
|
---|
26 | ssbdiv.style.display = 'none';
|
---|
27 | }
|
---|
28 | }
|
---|
29 |
|
---|
30 | if(ssbdiv.id != 'sbbpt_id_social_prototype'){
|
---|
31 | var sbbprototype = document.getElementById('sbbpt_id_social_prototype');
|
---|
32 | var numofchilds = sbbprototype.childNodes.length -1;
|
---|
33 | for(var i = 0; numofchilds >= i; i++) {
|
---|
34 | if(!ssbdiv.childNodes[i]){
|
---|
35 | var clonednode = sbbprototype.childNodes[i].cloneNode(true);
|
---|
36 | ssbdiv.appendChild(clonednode);
|
---|
37 | }
|
---|
38 | }
|
---|
39 | }
|
---|
40 |
|
---|
41 | var numofchilds = ssbdiv.childNodes.length -1;
|
---|
42 | for(var i = 0; numofchilds >= i; i++) {
|
---|
43 | if(ssbdiv.childNodes[i].href){
|
---|
44 | ssbdiv.childNodes[i].href=replace_link_title(ssbdiv.childNodes[i].href, sbblink, sbbtitle);
|
---|
45 | }
|
---|
46 | if(ssbdiv.childNodes[i].title){
|
---|
47 | ssbdiv.childNodes[i].title=replace_link_title(ssbdiv.childNodes[i].title, sbblink, sbbtitle);
|
---|
48 | }
|
---|
49 | }
|
---|
50 |
|
---|
51 | return;
|
---|
52 | }
|
---|
53 |
|
---|
54 | function writesbb(link, caption, icon){
|
---|
55 | document.write('<a onclick="sbopen(this.href);return false;" href="' + link + '" title="\'##THE_TITLE##\' bookmarken bei ' + caption + '"><img style="padding:1px; width:18px; height:18px; border-width:0px;" src="<?php echo $directory; ?>' + icon + '" alt="' + caption + '" /></a>');
|
---|
56 | return;
|
---|
57 | }
|
---|
58 |
|
---|
59 |
|
---|
60 | document.write('<div id="sbbpt_id_social_prototype" style="display:none;padding:5px; margin-left:auto; margin-right:auto; text-align:center;">');
|
---|
61 |
|
---|
62 | writesbb('http://www.wikio.de/vote?url=##THE_LINK##', 'Wikio', '/ico/sb/wikio2_18x18.jpg');
|
---|
63 | writesbb('http://www.alltagz.de/bookmarks/?action=add&address=##THE_LINK##&title=%23%23THE_TITLE%23%23', 'Alltagz', '/ico/sb/alltagz.gif');
|
---|
64 | writesbb('http://www.icio.de/add.php?url=##THE_LINK##"', 'icio', '/ico/sb/icio.gif');
|
---|
65 | writesbb('http://infopirat.com/node/add/userlink?edit[url]=##THE_LINK##&edit[title]=%23%23THE_TITLE%23%23"', 'Infopirat', '/ico/sb/infopirat.gif');
|
---|
66 | writesbb('http://linkarena.com/bookmarks/addlink/?url=##THE_LINK##&title=%23%23THE_TITLE%23%23"', 'Linkarena', '/ico/sb/linkarena.gif');
|
---|
67 | writesbb('http://www.mister-wong.de/addurl/?bm_url=##THE_LINK##&bm_description=%23%23THE_TITLE%23%23"', 'Mister Wong', '/ico/sb/mister-wong.gif');
|
---|
68 | writesbb('http://www.oneview.de/quickadd/neu/addBookmark.jsf?URL=##THE_LINK##&title=%23%23THE_TITLE%23%23"', 'Oneview', '/ico/sb/oneview.gif');
|
---|
69 | writesbb('http://tausendreporter.stern.de/submit.php?url=##THE_LINK##&title=%23%23THE_TITLE%23%23"', 'Tausend Reporter', '/ico/sb/tausend-reporter-stern.gif');
|
---|
70 | writesbb('http://www.webnews.de/einstellen?url=##THE_LINK##&title=%23%23THE_TITLE%23%23"', 'Webnews', '/ico/sb/webnews.gif');
|
---|
71 | writesbb('http://yigg.de/neu?exturl=##THE_LINK##"', 'Yigg', '/ico/sb/yigg.gif');
|
---|
72 | writesbb('http://del.icio.us/post?url=##THE_LINK##&title=%23%23THE_TITLE%23%23"', 'Del.icio.us', '/ico/sb/delicious.png');
|
---|
73 | writesbb('http://digg.com/submit?phase=2&url=##THE_LINK##&title=%23%23THE_TITLE%23%23"', 'digg', '/ico/sb/digg.png');
|
---|
74 | writesbb('http://blinklist.com/index.php?Action=Blink/addblink.php&Name=%23%23THE_TITLE%23%23&Description=%23%23THE_TITLE%23%23&Url=##THE_LINK##"', 'blinklist', '/ico/sb/blinklist.png');
|
---|
75 | writesbb('http://www.technorati.com/faves?add=##THE_LINK##"', 'Technorati', '/ico/sb/technorati.png');
|
---|
76 | writesbb('http://myweb2.search.yahoo.com/myresults/bookmarklet?u=##THE_LINK##&t=%23%23THE_TITLE%23%23"', 'Yahoo My Web', '/ico/sb/yahoo_myweb.png');
|
---|
77 | writesbb('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=##THE_LINK##&title=%23%23THE_TITLE%23%23"', 'Google Bookmarks', '/ico/sb/google.png');
|
---|
78 | writesbb('http://co.mments.com/track?url=##THE_LINK##&title=%23%23THE_TITLE%23%23"', 'Co.mments', '/ico/sb/comments.png');
|
---|
79 | writesbb('http://www.bloglines.com/sub/##THE_LINK##"', 'Bloglines', '/ico/sb/bloglines.png');
|
---|
80 |
|
---|
81 | document.write('</div>'); |
---|