[ Index ] |
PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2010 Oliver Georgi (oliver@phpwcms.de) // All rights reserved. 6 7 This script is part of PHPWCMS. The PHPWCMS web content management system is 8 free software; you can redistribute it and/or modify it under the terms of 9 the GNU General Public License as published by the Free Software Foundation; 10 either version 2 of the License, or (at your option) any later version. 11 12 The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html 13 A copy is found in the textfile GPL.txt and important notices to the license 14 from the author is found in LICENSE.txt distributed with these scripts. 15 16 This script is distributed in the hope that it will be useful, but WITHOUT ANY 17 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 18 PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 20 This copyright notice MUST APPEAR in all copies of the script! 21 *************************************************************************************/ 22 23 // Social Bookmarking = bookmark buttons 24 // [LINK_IT]<tag>{WONG} {DIGG} {DEL}</tag>[/LINK_IT] 25 26 $content['all'] = preg_replace_callback('/\[LINK_IT\](.*?)\[\/LINK_IT\]/is', 'createSocialBookmark', $content['all']); 27 28 function createSocialBookmark($matches) { 29 30 if(empty($matches[1])) return ''; 31 32 if(strpos($matches[1], '<!--DETAIL_ONLY-->') === false) { 33 34 if(empty($GLOBALS['aktion'][1])) { 35 $bm['url'] = PHPWCMS_URL.'index.php?id='.$GLOBALS['aktion'][0]; 36 } else { 37 $bm['url'] = PHPWCMS_URL.'index.php?aid='.$GLOBALS['aktion'][1]; 38 } 39 40 } else { 41 42 if(empty($GLOBALS['aktion'][1])) return ''; 43 $bm['url'] = PHPWCMS_URL.'index.php?aid='.$GLOBALS['aktion'][1]; 44 $matches[1] = str_replace('<!--DETAIL_ONLY-->', '', $matches[1]); 45 46 } 47 48 $bm['uurl'] = $bm['url']; 49 $bm['url'] = rawurlencode($bm['url']); 50 51 $bm['title'] = clean_replacement_tags(empty($GLOBALS['content']['article_title']) ? $GLOBALS['content']["pagetitle"] : $GLOBALS['content']['article_title'], ''); 52 $bm['title'] = cleanUpSpecialHtmlEntities($bm['title']); 53 $bm['title'] = rawurlencode($bm['title']); 54 55 $bm['bodytext'] = empty($GLOBALS['content']['article_summary']) ? '' : clean_replacement_tags($GLOBALS['content']['article_summary'], ''); 56 $bm['bodytext'] = cleanUpSpecialHtmlEntities($bm['bodytext']); 57 $bm['bodytext'] = getCleanSubString($bm['bodytext'], 25, '…', 'word'); 58 $bm['bodytext'] = rawurlencode($bm['bodytext']); 59 60 $bm['topic'] = rawurlencode($GLOBALS['content']['struct'][ $GLOBALS['aktion'][0] ]['acat_name']); 61 62 // now set all sepcific data 63 $bm['service']['wong']['url'] = 'http://www.mister-wong.de/index.php?action=addurl'; 64 $bm['service']['wong']['url'] .= '&bm_url='.$bm['url']; 65 $bm['service']['wong']['url'] .= '&bm_description='.$bm['title']; 66 $bm['service']['wong']['alt'] = 'Wong It!'; 67 68 $bm['service']['furl']['url'] = 'http://www.furl.net/savedialog.jsp?p=1&t='.$bm['title'].'&u='.$bm['url'].'&c=&r='; 69 $bm['service']['furl']['alt'] = 'Furl It'; 70 71 $bm['service']['spurl']['url'] = 'http://www.spurl.net/spurl.php?title='.$bm['title'].'&url='.$bm['url']; //&blocked=__tags__s'; 72 $bm['service']['spurl']['alt'] = 'Spurl!'; 73 74 $bm['service']['technorati']['url'] = 'http://technorati.com/faves?add='.rawurlencode(PHPWCMS_URL); 75 $bm['service']['technorati']['alt'] = 'TechnoratiFaves'; 76 77 $bm['service']['delicious']['url'] = 'http://del.icio.us/post?url='.$bm['url'].'&title='.$bm['title'].'&jump=no'; 78 $bm['service']['delicious']['alt'] = 'Del.icio.us'; 79 80 $bm['service']['digg']['url'] = 'http://digg.com/submit?phase=2&url='.$bm['url'].'&title='.$bm['title']; 81 $bm['service']['digg']['url'] .= '&bodytext='.$bm['bodytext'].'&topic='; 82 $bm['service']['digg']['alt'] = 'DiggIt!'; 83 84 $bm['service']['yahoo']['url'] = 'http://myweb2.search.yahoo.com/myresults/bookmarklet?t='.$bm['title'].'&u='.$bm['url'].'&d='.$bm['bodytext'].'&ei='.PHPWCMS_CHARSET; 85 $bm['service']['yahoo']['alt'] = 'Save to Yahoo! My Web'; 86 87 $bm['service']['google']['url'] = 'http://www.google.com/bookmarks/mark?op=add&bkmk='.$bm['url'].'&title='.$bm['title'].'&annotation='.$bm['bodytext']; 88 $bm['service']['google']['alt'] = 'Google Bookmark'; 89 90 $bm['service']['magnolia']['url'] = 'http://ma.gnolia.com/bookmarklet/add?url='.$bm['url'].'&title='.$bm['title'].'&description='.$bm['bodytext']; 91 $bm['service']['magnolia']['alt'] = 'Ma.gnolia'; 92 93 $bm['service']['newsvine']['url'] = 'http://www.newsvine.com/_tools/seed&save?url='.$bm['url'].'&title='.$bm['title']; 94 $bm['service']['newsvine']['alt'] = 'Newsvine'; 95 96 $bm['service']['reddit']['url'] = 'http://reddit.com/submit?url='.$bm['url'].'&title='.$bm['title']; 97 $bm['service']['reddit']['alt'] = 'Reddit'; 98 99 $bm['service']['webnews']['url'] = 'http://www.webnews.de/einstellen?url='.$bm['url'].'&title='.$bm['title'].'&desc='.$bm['bodytext']; 100 $bm['service']['webnews']['alt'] = 'Diese Nachricht bei Webnews einstellen'; 101 102 $bm['service']['wikio']['url'] = 'http://www.wikio.com/vote?url='.$bm['url']; 103 $bm['service']['wikio']['alt'] = 'Wikio'; 104 105 $bm['service']['yigg']['url'] = 'http://yigg.de/neu?exturl='.$bm['url'].'&exttitle='.$bm['title'].'&extdesc='.$bm['bodytext']; 106 $bm['service']['yigg']['alt'] = 'YiGG it'; 107 108 $bm['service']['facebook']['url'] = 'http://www.facebook.com/sharer.php?u='.$bm['url'].'&t='.$bm['title']; 109 $bm['service']['facebook']['alt'] = 'Share on Facebook'; 110 111 $bm['service']['folkd']['url'] = 'http://www.folkd.com/submit/'.$bm['uurl']; 112 $bm['service']['folkd']['alt'] = 'folk it!'; 113 114 $bm['service']['oneview']['url'] = 'http://www.oneview.de/quickadd/neu/addBookmark.jsf?URL='.$bm['url'].'&title='.$bm['title']; 115 $bm['service']['oneview']['alt'] = 'oneview - das merk ich mir!'; 116 117 118 foreach($bm['service'] as $key => $value) { 119 120 $bmt = '<a href="'.$bm['service'][$key]['url'].'" title="'.$bm['service'][$key]['alt'].'" '; 121 $bmt .= 'target="_blank" rel="nofollow"><img src="'.TEMPLATE_PATH.'img/bookmarklets/'.$key.'.gif" '; 122 $bmt .= 'alt="'.$bm['service'][$key]['alt'].'" border="0" /></a>'; 123 $matches[1] = str_replace('{'.strtoupper($key).'}', $bmt, $matches[1]); 124 125 } 126 127 return $matches[1]; 128 129 } 130 131 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Nov 16 22:51:00 2010 | Cross-referenced by PHPXref 0.7 |