توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : مشگل در ماژول آخرين مراجعات به سايت
eleir
10-20-2007, 02:58 PM
با سلام
من تازه هاست خريدم
و مامبو 4.6.2p روش نصب كردم
وماژول آخرين مراجعات رو كه روش نصب كردم ماژول خطاي زير رو ميده البته ماژول درست كار ميكنه و اسم سايتهاي ديگه رو نشون ميده زير اين خطاهه حالا چي كارش كنم
Notice: Use of undefined constant host - assumed 'host' in /home/eleir/public_html/modules/mod_referer_extended.php on line 157
Notice: Use of undefined constant host - assumed 'host' in /home/eleir/public_html/modules/mod_referer_extended.php on line 192
Notice: Use of undefined constant host - assumed 'host' in /home/eleir/public_html/modules/mod_referer_extended.php on line 192
Notice: Use of undefined constant host - assumed 'host' in /home/eleir/public_html/modules/mod_referer_extended.php on line 202
Notice: Use of undefined constant host - assumed 'host' in /home/eleir/public_html/modules/mod_referer_extended.php on line 203
Notice: Use of undefined constant host - assumed 'host' in /home/eleir/public_html/modules/mod_referer_extended.php on line 233
Notice: Use of undefined constant host - assumed 'host' in /home/eleir/public_html/modules/mod_referer_extended.php on line 233
Notice: Use of undefined constant host - assumed 'host' in /home/eleir/public_html/modules/mod_referer_extended.php on line 233
Notice: Undefined variable: refererArray in /home/eleir/public_html/modules/mod_referer_extended.php on line 233
با تشكر
اگه ميشه كمك كنيد :-[
alizali
10-20-2007, 03:40 PM
یک فایل تکسی در فولدر همین ماژول هستش
آیا قابلیت نوشتن را روش فعال کردین
777 باید دستریش باشه
eleir
10-20-2007, 08:20 PM
نه درست نشد از اين نبود
تو رو خدا بگين چي كارش كنم
iransbs
10-30-2007, 08:08 AM
فایل mod_referer_extended.php را در شاخه modules باز کنید و تمامی خط ها را جایگزین خط های زیر کنید
<?php
/*
Latest referers, expanded
Ben Jones, 2005, octopod.org
Based on version 1.5 of 'MamboReferer' by Jeffery Fernandez, <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
Changelog:
0.1.2 - Bugfixes for handling of output options in readreferers
0.1.1 - Bugfixes for paramter handling
0.1 - First version - fixed parameter handling, added admin parameters, added 'run hidden'
mode and allowed for multiple runs per page, added output formatting paramters
Tested with mambo 4.5.1a, March 2005
*/
/*
Retained copyrights:
// Project Name: MamboReferer
// For Mambo CMS version 4.5
// Author : Jeffery Fernandez - developer@jefferyfernandez.id.au
// Credit: Chris Burgess of <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> for inspiring me. ;o)
// Version: stable 1.5
// Date Released: 18/07/2004
// Released under GNU/GPL License : <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
// Demo Url: <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
// Download Latest version from here: <b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>
*/
// Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// Check if we're trying to run this module more than once on the same page
if (!defined( '_MOD_REFERRER' )) {
$refererArray = array();
$host = array();
// Grab the module settings else set to default values.
// Number of referers to display: defaults to 12
$refererCount = abs($params->def( 'refererCount', 5 ));
// After which length should the title be cut off... defaults to 22
$maxUrlLENGTH = abs($params->def( 'maxUrlLENGTH', 18 ));
// Get the Ban List of sites. They should be separated by ,
$banList = $params->def( 'banList', '' );
$banList = explode(",",$banList);
// Get the Bad URL List of sites, words, etc
$badURLS = $params->def( 'badURLS', '' );
$badURLS = explode(",",$badURLS);
// Get rid of Bad URL's.
$badWords = array('<','>','192.168.');
$badUrl = array_merge($badURLS, $badWords);
// Are we running in hidden mode, or showing output (default)?
$showOutput = abs($params->def( 'showOutput', 1 ));
// Output in UL list mode?
$listOutput = abs($params->def( 'listOutput', 0 ));
// Trim the output URL from the front?
$trimFront = abs($params->def( 'trimFront', 1 ));
// Setup our constant
define( '_MOD_REFERRER', null );
// Format the URL title for output
function setupOutputTitle($fullURL,$maxUrlLENGTH,$trimFront ) {
if (strlen($fullURL) > $maxUrlLENGTH) {
if ($trimFront==0) {
return substr($fullURL,0,($maxUrlLENGTH-2)) . str_repeat(".", 2);
} else {
return str_repeat(".", 2) . substr($fullURL,-($maxUrlLENGTH-2));
}
} else {
return $fullURL;
}
}
// Clear the content from other modules
$content = "";
function Read_Referers($maxUrlLENGTH, $banList, $badUrl,$trimFront){
global $mosConfig_absolute_path;
$fileName = $mosConfig_absolute_path . "/modules/mod_referer_extended/referer.txt";
if(file_exists($fileName)){// File exists
$fp = fopen($fileName,"r");
if($fp){// File opened
$host = Extract_file($fp, $maxUrlLENGTH, $banList, $badUrl,$trimFront);
$host["address"] = @array_reverse($host["address"]);
$host["output"] = @array_reverse($host["output"]);
$host["domain"] = @array_reverse($host["domain"]);
fclose($fp);
}
return $host;
}
}
function Extract_file($fp, $maxUrlLENGTH, $banList, $badUrl,$trimFront){
while(!feof($fp)){// Loop till End OF File
$line = trim(fgets($fp, 999));
if(!empty($line)){// If the read line is not empty
$url = parse_url($line);
// If the Referer has just been added in the Ban List
if(!@in_array($url['host'], $banList) &&
(Bad_Str_In_Url($line, $badUrl) == false)
){
$host["address"][] = $line;
$host["domain"][] = $url['host'];
$host["output"][] = setupOutputTitle($url['host'],$maxUrlLENGTH,$trimFront);
}
}
}
return $host;
}
function Bad_Str_In_Url($haystack, $needle){
$isBadURL = false;
$url = parse_url($haystack);
if(!isset($url['scheme']) ){ //If the url referer has a scheme
if($url['scheme'] != '<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;){
$isBadURL = true;
return $isBadURL;
}
}
if ( count($needle) > 0 ) {
foreach($needle as $value) { //Loop through the bad url array.
if ( strlen( $value ) > 0 ) {
if(!strpos($haystack, $value) === false){
$isBadURL = true;
break;
}
}
}
}
return $isBadURL;
}
// Makes php3 use $_SERVER as well
//if ( !isset($_SERVER) && (isset($GLOBALS['<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;])) ) $GLOBALS['_SERVER'] = $GLOBALS['<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;];
// Check for XSS and bad url's.
$urlPassed = false;
if(isset($_SERVER['<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;])){
if(Bad_Str_In_Url($_SERVER['<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;], $badUrl) == false)
$urlPassed = true;
}
// Get the Refered Page
if($urlPassed==true){
$referer = $_SERVER['<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;];
$serverHost = $_SERVER['<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>;];
$refererArray = parse_url($referer);
if($refererArray['host'] != $serverHost){//Outside Referer
$fileName = $mosConfig_absolute_path . "/modules/mod_referer_extended/referer.txt";
if(file_exists($fileName)){// File exists
$fp = fopen($fileName,"r");
if($fp){// File opened
$host = Extract_file($fp, ($maxUrlLENGTH-2), $banList, $badUrl,$trimFront);
fclose($fp);
// Clear the cache
clearstatcache();
//If site not recorded before or not in Ban List ;o) or not from localhost
if(!@in_array($refererArray['host'], $host["domain"]) &&
!@in_array($refererArray['host'], $banList) &&
$refererArray['host']!="localhost"
){//Add it to the end of the array
$host["address"][] = $referer;
$host["output"][] = setupOutputTitle($refererArray['host'],$maxUrlLENGTH,$trimFront);
$host["domain"][] = $refererArray['host'];
// Clear the cache
clearstatcache();
if(sizeof($host["address"]) >= $refererCount){
$fp = fopen($fileName,"w");
for($j=((sizeof($host["address"]) - $refererCount)); $j <=$refererCount; $j++){
fwrite($fp, $host["address"][$j] . "\r\n");
}
fclose($fp);
}
else{
$fp = fopen($fileName,"a");
fwrite($fp, $referer . "\r\n");
fclose($fp);
}
}
elseif(@in_array($refererArray['host'], $host["domain"]) ){// If the site already exists on the List
// Remove the old Entry
for($j=0; $j <sizeof($host["domain"]); $j++){
if($host["domain"][$j] != $refererArray['host']){
$tempHost["address"][] = $host["address"][$j];
$tempHost["output"][] = $host["output"][$j];
$tempHost["domain"][] = $host["domain"][$j];
}
}
// Transfer the temp values across
$host = $tempHost;
// Add the new link at the end of the array
$host["address"][] = $referer;
$host["output"][] = setupOutputTitle($refererArray['host'],$maxUrlLENGTH,$trimFront);
$host["domain"][] = $refererArray['host'];
// Write into the Referer List
$fp = fopen($fileName,"w");
for($k=0; $k <sizeof($host["address"]); $k++){
fwrite($fp, $host["address"][$k] . "\r\n");
}
fclose($fp);
}
$host["address"] = @array_reverse($host["address"]);
$host["output"] = @array_reverse($host["output"]);
$host["domain"] = @array_reverse($host["domain"]);
}
}
}
else{// If the Referer is the same as host.... just read the Referer List
$host = Read_Referers( $maxUrlLENGTH, $banList, $badUrl,$trimFront);
}
}
else{// Possibily arrived from a Book-mark or typed in the address of your site
$host = Read_Referers( $maxUrlLENGTH, $banList, $badUrl,$trimFront);
}
// If we're showing output
if ( $showOutput==1) {
// Put the output on screen
if ($listOutput==0) $content .='<table cellpadding="1" cellspacing="0" border="0">';
if ($listOutput==1) $content .= "<ul>";
for($i = 0; $i < $refererCount; $i++){
if(!empty($host["address"][$i])){
if ($listOutput==1) $content .= "<li>";
$highLight = ($refererArray['host'] == $host["domain"][$i])?" class=\"referer\" ":"";
if ($listOutput==0) $content .= "<tr>\n";
if ($listOutput==0) $content .= "<td>\n";
$content .= '<a href="' . $host["address"][$i] . '" title="' . $host["address"][$i] . '"' . $highLight . '>' . $host["output"][$i] . '</a>'. "\n";
if ($listOutput==1) $content .= "</li>";
if ($listOutput==0) $content .= "</td>\n</tr>\n";
}
}
if ($listOutput==1) $content .= "</ul>";
if ($listOutput==0) $content .="</table>\n";
} else {
$moduleclass_sfx="_referer_blank";
$content .= '<style type="text/css">
<!--
.moduletable_referer_blank {
visible: false;
clear: none;
width: 0px;
height: 0px;
}
-->
</style>
';
}
}
?>
موفق و پیروز باشید
یا علی
alizali
10-30-2007, 09:00 AM
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/parantez/public_html/modules/mod_referer_extended.php on line 35
این ارور رو میده
احتمالا با 462 سازگار نیست
eleir
11-01-2007, 06:33 AM
ممنون درست شد خیلی متشکر :D
alizali
11-01-2007, 07:44 AM
شما مشکلت با همین کد جدید بالا حل شد؟
eleir
11-02-2007, 07:51 AM
واي نه بابا هنوز خرابه يعني ديروز كود رو كه عوض كردم درست شد خطا نميداد امروز كه وارد سايت شدم ديدم يكه خطايي داده دو برابر خطاي قبلي ولي متنش همونه
تو رو خدا به دادم برسيد من همين كدو قبلا حدود 6ماه پيش استفاده ميكردم درست بود چي شده چرا كار نميكنه؟؟؟؟؟
developer
11-02-2007, 02:21 PM
اگر کار میکرده و الان یه هو و بدون هیچ دلیلی کار نمیکنه باید به دنبال مشکل در سرورتون باشید
از مدیر سرورتون بپرسید تغییری در سرور اعمال کردند ؟
pctaz
12-16-2007, 01:14 PM
آقا منم کد رو عوض کردم درست شد ولی بعد از اینکه از یه سایت دیگه وارد سایت من میشم خراب میشه
:'(
این ارور رو میده:
Notice: Undefined index: host in /home/kharidec/public_html/modules/mod_referer_extended.php on line 233
Notice: Undefined index: host in /home/kharidec/public_html/modules/mod_referer_extended.php on line 233
Notice: Undefined index: host in /home/kharidec/public_html/modules/mod_referer_extended.php on line 233
** دو پست شما یکی شد
mhadaily
12-16-2007, 01:23 PM
Notice: Undefined index:
جستجو کن
pctaz
12-16-2007, 02:25 PM
مجید جون جستجو کردم 2 تا صفحه بیشتر پیدا نکرد و هیچ چیز ی که با ابن موضوع ربط داشتهباشه رو من نیافتم
pctaz
12-18-2007, 09:05 AM
ماژول آخرین مراجعات! رو نصب کردم
bizimt
07-13-2008, 04:55 PM
بسیار بسیار ممنونم مشکل من هم حل شد. (با دستور العمل اقای سیادتی)
vBulletin® v4.2.5, Copyright ©2000-2026, Jelsoft Enterprises Ltd.