/** * @author UNKNOWN * @author Krzysztof Krzyżaniak (eloy) * * replace PLACEHOLDER with domain data */ function wsinfo($parser, $thetext) { global $wgOut, $wgTitle, $wswErotik, $wgRTEParserEnabled; $forsale = ""; /** * do not touch placeholder in RTE */ if ($wgRTEParserEnabled) { return true; } /** * back off when there's no placeholder in article */ if (strpos($thetext, WSINFO_PLACEHOLDER) === false) { return true; } else { $thetext = str_replace(WSINFO_PLACEHOLDER, '', $thetext); } $title = $wgTitle->getText(); /** * debug message per rt#46876 */ Wikia::log(__METHOD__, "info", "Title of article: {$title}", true); $wswErotik = 0; $hour = date("H"); $day = 0; $erolink = "http://www.privatelivecams.de/?WMID=5143&CTRLID=Jlc9Mg%3D%3D7&WMEC=5&PID=1"; if ($hour > 6 && $hour < 22) { $day = 1; // $erolink = "http://www.affaire.com/?WMID=5143&CTRLID=&PID=1&WMEC=5&pop=0"; $erolink = "http://www.dates4you.net/?WMID=5143&CTRLID=&PID=1&WMEC=5&pop=0"; } if (strstr($thetext, "Die Website dieses Artikels entspricht nicht den Bedingungen der deutschen Jugendschutzbestimmungen.")) { $wswErotik = 1; } if (array_key_exists("Erotik", $parser->mOutput->mCategories) || array_key_exists("Adult", $parser->mOutput->mCategories) || array_key_exists("Pornografie", $parser->mOutput->mCategories)) { $wswErotik = 1; } $dom = strtolower($title); if (!Wikia::isValidDomain($dom)) { return true; } if (array_key_exists("Geparkt", $parser->mOutput->mCategories) || array_key_exists("Baustelle", $parser->mOutput->mCategories) || array_key_exists("Fehlerseiten", $parser->mOutput->mCategories)) { $forsale = "<a href=\"http://www.sedo.de/checkdomainoffer.php4?partnerid=13318&domain={$dom}\" class=\"external text\" target=\"_new\">" . wfMsgForContent('websiteinfo-buy') . "</a><br>\n"; } if ($wswErotik) { $issex = "sex"; } else { $issex = "no"; } $armor = substr(md5($dom), 0, 16) . 'WsWImG=' . $dom . "={$issex}=Ws3ik1Ju5ch=" . substr(md5($dom), 16); $crypt = strtr(trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, 'WsImgS33CCrret', $armor, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))), '+/', '-!'); $img = "http://thumbs.websitewiki.de/{$crypt}"; if (substr_count($dom, ".") > 1) { if (substr_count($dom, ".") == 2 && (strstr($dom, "or.at") || strstr($dom, "co.at"))) { $domlink = "http://www.{$dom}/"; } else { $domlink = "http://{$dom}/"; } $domtext = "{$dom}"; } else { $domlink = "http://www.{$dom}/"; $domtext = "www.{$dom}"; } $result = ""; $checksiteUrl = Title::newFromText("Checksite", NS_SPECIAL)->getLocalUrl(array("param" => $dom)); if ($day && $wswErotik) { $result .= "\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"float:right; margin:0 0 .5em 1em;\n width:260px; background:#fff; border-collapse:collapse; border:1px solid #999;\n font-size:smaller; line-height:1.5; \" summary=\"" . wfMsgForContent('websiteinfo-title', $title) . "\">\n <tr><td style=\"text-align:center; background:#c0c0c0;\"><b>" . wfMsgForContent('websiteinfo-summary-link', $title) . "</b></td></tr>\n <tr><td style=\"text-align:center; background:#f0f0f0;\"><img src=\"{$img}\"\n\t width=\"250\" height=\"188\" alt=\"" . wfMsgForContent('websiteinfo-screenshot-alt', $domtext) . "\" border=\"0\" /></td></tr>\n <tr>{$forsale}<td style=\"text-align:center; background:#f0f0f0;\"><a href=\"{$checksiteUrl}\" rel=\"nofollow\">" . wfMsgForContent('websiteinfo-verify') . "</a>\n\t </td></tr>\n\t \n"; } else { $result .= "\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"float:right; margin:0 0 .5em 1em;\n width:260px; background:#fff; border-collapse:collapse; border:1px solid #999;\n font-size:smaller; line-height:1.5; \" summary=\"" . wfMsgForContent('websiteinfo-title', $title) . "\">\n <tr><td style=\"text-align:center; background:#c0c0c0;\"><b>" . wfMsgForContent('websiteinfo-summary-link', $title) . "</b></td></tr>\n <tr><td style=\"text-align:center; background:#f0f0f0;\"><a href=\"{$domlink}\"\n title=\"{$domtext}\" rel=\"nofollow\" target=\"_new\"><img src=\"{$img}\"\n\t width=\"250\" height=\"188\" alt=\"" . wfMsgForContent('websiteinfo-screenshot-alt', $domtext) . "\" border=\"0\" /></a></td></tr>\n <tr><td style=\"text-align:center; background:#f0f0f0;\"><a href=\"{$domlink}\"\n title=\"{$domtext}\" class=\"external text\" target=\"_new\">{$domtext}</a><br>\n\t {$forsale}<a href=\"{$checksiteUrl}\" rel=\"nofollow\">" . wfMsgForContent('websiteinfo-verify') . "</a>\n\t </td></tr>\n\t \n"; } global $wgUploadDirectory, $wgUploadPath; $rev = Revision::newFromTitle($parser->getTitle()); if (is_object($rev)) { $wikitext = $rev->getText(); $regs = array(); if (preg_match('{{PLZ\\|(D|A|CH)-([0-9]{4,5})}}', $wikitext, $regs) && ($regs[1] == 'D' && strlen($regs[2]) == 5 || $regs[1] != 'D' && strlen($regs[2]) == 4)) { $country = $regs[1]; $myplz = $regs[2]; $imgurl = '/plzmap/' . strtolower($country[0]) . $myplz[0] . '/' . strtolower($country[0]) . $myplz . '.png'; $imgfile = $wgUploadDirectory . $imgurl; if (file_exists($imgfile)) { $result .= <<<EOI \t<tr><td align="center" style="background:#ffffff;"><div style="position:relative; top:6px; width:250px; \t height:0px; text-align:center;"><strong><a href="/Kategorie:{$country}-{$myplz}" style="background-color:white;"> {$country}-{$myplz} </a></strong></div> \t<img src="{$wgUploadPath}{$imgurl}" width="250" height="200" alt="{$country}-{$myplz}"> \t<div style="position:relative; bottom:15px; left:3px; width:250px; height:0px; text-align:left;"><a href="/Landkarten_Copyright_OpenStreetMap" title="© OpenStreetMap contributors">© OSM</a></div> \t </td></tr> EOI; } } } /* $result .= "<tr><td align=\"center\" style=\"background:#ffffff;\"><strong><a href=\"/Spezial:Bewertungen\">Website-Bewertung</a></strong><br />\n"; $result .= rating_bar($dom, 5); $result .= "</td></tr>\n"; */ global $wgTitle; $bookurl = $wgTitle->getFullURL(); $bookdesc = "WebsiteWiki+{$title}"; $result .= "<tr><td align=\"center\" style=\"background:#ffffff;\"><strong>" . wfMsgForContent('websiteinfo-bookmarks') . "</strong><br />\n"; $result .= "<a href=\"http://www.mister-wong.de/index.php?action=addurl&bm_url={$bookurl}&bm_description={$bookdesc}\" target=\"_new\" rel=\"nofollow\"><img src=\"{$wgUploadPath}/social/mrwong.gif\" border=\"0\" width=\"20\" height=\"20\" title=\"Mr. Wong\" alt=\"Mr. Wong\"></a>\n"; $result .= "<a href=\"http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk={$bookurl}&title={$bookdesc}\" target=\"_new\" rel=\"nofollow\"><img src=\"{$wgUploadPath}/social/google.gif\" border=\"0\" width=\"20\" height=\"20\" title=\"Google\" alt=\"Google\"></a>\n"; $result .= "<a href=\"http://del.icio.us/post?url={$bookurl}&title={$bookdesc}\" target=\"_new\" rel=\"nofollow\"><img src=\"{$wgUploadPath}/social/delicious.gif\" border=\"0\" width=\"20\" height=\"20\" title=\"del.icio.us\" alt=\"del.icio.us\"></a>\n"; $result .= "<a href=\"http://linkarena.com/bookmarks/addlink/?url={$bookurl}'&title={$bookdesc}&desc=&tags=\" target=\"_new\" rel=\"nofollow\"><img src=\"{$wgUploadPath}/social/linkarena.gif\" border=\"0\" width=\"20\" height=\"20\" title=\"Linkarena\" alt=\"Linkarena\"></a>\n"; $result .= "<a href=\"http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url={$bookurl}&Title={$bookdesc}\" target=\"_new\" rel=\"nofollow\"><img src=\"{$wgUploadPath}/social/blinklist.gif\" border=\"0\" width=\"20\" height=\"20\" title=\"Blinklist\" alt=\"Blinklist\"></a>\n"; $result .= "<a href=\"http://myweb2.search.yahoo.com/myresults/bookmarklet?u={$bookurl}&t={$bookdesc}\" target=\"_new\" rel=\"nofollow\"><img src=\"{$wgUploadPath}/social/yahoo.gif\" border=\"0\" width=\"20\" height=\"20\" title=\"Yahoo\" alt=\"Yahoo\"></a>\n"; $result .= "<a href=\"http://twitter.com/home/?source=WebsiteWiki&status={$bookdesc} - {$bookurl}\" target=\"_new\" rel=\"nofollow\"><img src=\"{$wgUploadPath}/social/twitter.gif\" border=\"0\" width=\"20\" height=\"20\" title=\"Twitter\" alt=\"Twitter\"></a>\n"; $result .= "</td></tr>\n"; if ($wswErotik) { $result .= "<tr><td align=\"center\" style=\"background:#ffffff;\">" . wfMsgForContent('websiteinfo-advert') . "<p>\n <a href=\"{$erolink}\" rel=\"nofollow\" target=\"_new\"><img\n src=\"http://www.sexnutz.de/images/soft_200x200.jpg\" alt=\"" . wfMsgForContent('websiteinfo-erotik-alt') . "\" width=\"200\" height=\"200\" border=\"0\">\n </td></tr>\n"; } /**** no wellness and bilder else if(stristr($thetext, "wellness")) { $result .= <<<EOI <tr><td align="center" height="250" style="background:#ffffff"> <table width="100%" height="100%" style="font-size:larger; line-height:1.4; font-family:arial,sans-serif;"> <tr><td align="left" height="250" style="margin:2px; background-color:#f0f0f0; "> <a href="http://www.wellness-wochenende.com/" style="text-decoration:none; font-family:arial,sans-serif;"><span style="font-weight:bold; color:#002bb8; text-decoration:underline;">Wellness-Wochenende</span><br> <span style="color:black; text-decoration:none;}">Kurzurlaub? - Entspannen beim Wellness-Wochenende</span><br> <span style="color:#002bb8; text-decoration:underline;">www.wellness-wochenende.com</span></a> </td></tr> </table> </td></tr> EOI; } else if(stristr($thetext, "bilder")) { $result .= <<<EOI <tr><td align="center" height="250" style="background:#ffffff"> <table width="100%" height="100%" style="font-size:larger; line-height:1.4; font-family:arial,sans-serif;"> <tr><td align="left" height="250" style="margin:2px; background-color:#f0f0f0; "> <a href="http://www.luftbilder.aero/" style="text-decoration:none; font-family:arial,sans-serif;"><span style="font-weight:bold; color:#002bb8; text-decoration:underline;">Luftbilder.aero</span><br> <span style="color:black; text-decoration:none;}">Tolle Luftbilder aus Deutschland und der ganzen Welt.</span><br> <span style="color:#002bb8; text-decoration:underline;">www.Luftbilder.aero</span></a> </td></tr> </table> </td></tr> EOI; } ********** end wellness ***/ /*** fb:3114 else { global $wgUser; if( $wgUser->isAnon() ) { $result .= AdEngine::getInstance()->getAd( 'WEBSITEWIKI_INFOBOX' ); } } ***/ $result .= "</table>\n"; $thetext = "\n<!-- wsinfo -->{$result}<!-- /wsinfo -->\n" . $thetext; return true; }