X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-wernis_portal.php;h=9a680e8bf575f6a8c5d9a0d6215aec953e925323;hb=15883a02201e92f03f474bf71816667bd0a8f3f8;hp=c7039a03a8cefabe1c30d9959a96ce5296cfee3c;hpb=97dbb1a1f2f9e582132bb81c12895503e78e7a59;p=mailer.git diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index c7039a03a8..9a680e8bf5 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -1,7 +1,7 @@ "); -$rdf = new fase4_rdf; -$rdf->use_dynamic_display(false); -$rdf->set_CacheDir(PATH."inc/cache/"); -$rdf->set_salt(SITE_KEY); +if ((!isExtensionActive('wernis')) && (!isAdmin())) { + displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=wernis%}'); + return; +} // END - if + +// Init PDF/RDF parser class +$rdf = new fase4_rdf(); +$rdf->_use_nl2br = FALSE; +$rdf->_finishCallback = 'compactContent'; +$rdf->use_dynamic_display(FALSE); +$rdf->set_CacheDir(getCachePath() . ''); +$rdf->set_salt(md5(getSiteKey())); $rdf->set_max_item(10); $rdf->set_Options( array( - 'textinput' => "hidden", - 'sitelink' => "http://www.wds66.com", - 'refid' => bigintval($_CONFIG['wernis_refid']), - 'reflink' => "/ref.php?refid=", + 'textinput' => 'hidden', + 'sitelink' => 'http://www.wds66.com', + 'refid' => getWernisRefid(), + 'reflink' => '/ref.php?refid=', ) ); // Use proxy? -if ((!empty($_CONFIG['proxy_host'])) && (!empty($_CONFIG['proxy_port']))) { +if (isProxyUsed()) { // Set proxy data - $rdf->set_proxy($_CONFIG['proxy_host'], $_CONFIG['proxy_port']); + $rdf->set_proxy(getProxyHost(), getProxyPort()); // Use auth? - if (!empty($_CONFIG['proxy_username'])) { + if (getProxyUsername() != '') { // Set auth data - $rdf->set_proxy_auth($_CONFIG['proxy_username'], $_CONFIG['proxy_password']); + $rdf->set_proxy_auth(getProxyUsername(), getProxyPassword()); } // END - if } // END - if -$rdf->parse_RDF("http://www.wds66.com/rss.xml"); -$rdf->finish(); -// DISABLED: $rdf->clear_cache(); -OUTPUT_HTML(""); +$rdf->parse_RDF('http://www.wds66.com/rss.xml'); + +// Load template +loadTemplate('guest_wernis_news', FALSE, $rdf->finish(TRUE)); -// +// [EOF] ?>