Author |
Message |
tweaker
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/41be0895440c3ab5585cc.gif)
Joined: Jan 20, 2006
Posts: 84
|
Posted:
Fri Jun 02, 2006 4:37 pm |
|
I've setup a client for banner advertisements on our website. I've given him a Username and Password and he gets the following error:
Fatal error: Call to undefined function: filter() in /var/www/html/html/modules/Advertising/index.php on line 305
The function for this code is as follows:
Code:
function client_valid($login, $pass) {
global $prefix, $db, $module_name, $sitename;
$login = filter($login, "nohtml"); <------ line 305
$login = filter($pass, "nohtml");
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner_clients WHERE login='$login' AND passwd='$pass'"));
if ($numrows != 1) {
include("header.php");
title("$sitename: "._ADSYSTEM."");
OpenTable();
echo "<center>"._LOGININCORRECT."<br><br>"._GOBACK."</center>";
CloseTable();
themenu();
include("footer.php");
die();
} else {
$row = $db->sql_fetchrow($db->sql_query("SELECT cid FROM ".$prefix."_banner_clients WHERE login='$login' AND passwd='$pass'"));
$cid = $row['cid'];
$info = base64_encode("$cid:$login:$pass");
setcookie("client","$info",time()+3600);
Header("Location: modules.php?name=$module_name&op=client_home");
}
}
|
Any idea why he can't get through? |
|
|
![ICQ Number ICQ Number](themes/RavenIce/forums/images/lang_english/icon_icq_add.gif) |
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Jun 02, 2006 8:36 pm |
|
I will PM Evaders99 on this one. I have a feeling this is a carry-over from some 7.8 code... hang tight for a "few"... |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tweaker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 3:16 am |
|
I'm using rnv2.02.02 according to my notes.
Here's the funny thing.
In IE 6, you can't see it.
IE 7, you can.
FireFox, you can.
Hope this helps. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sat Jun 03, 2006 4:42 am |
|
RN v2.02.02 does not have a module called Advertising in it so I would concur with Montego that this is some left of code from a previous installation or a module you have added after installing RN.
In the event this is a module you installed after installing RN you may want to double check all files were uploaded - at least until Evaders can offer some feedback.
The function filter() resides in mainfile.php on phpnuke v7.8+ but is not present in RN because it is not required. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tweaker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 6:07 am |
|
So the best thing I can do (which works great BTW) is use the block-Advertisement and put the banners in it rather than the "Normal". It's the Normal that doesn't work afterall (Hmmp, go figure on the normal). |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 7:36 am |
|
You should be able to use the Banners module that came with RN.
FB dropped the Banners module in phpNuke 7.8+ and replaced it with the Advetising module (which has bugs). |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 7:43 am |
|
My concern is really that I thought the filter function did not come in until the later nukes. That is what I have asked Evaders99 about, because I see it in the RN code... ![Sad](modules/Forums/images/smiles/icon_sad.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 8:09 am |
|
You had me worried then M.
You are correct in that in mainfile.php RN uses function filter_text()
but nuke 7.8+ seems to use both function filter_text() and function filter() |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tweaker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 8:32 am |
|
So how come it works in IE7 and FireFox but not IE6 then? I'm not getting outta RN at any time. I love his distro and he knows his stuff. Plus the suppose staff like yourself and montego are incredibly generous with your time to help people like myself out figuring problems like this out. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 8:35 am |
|
Quote: |
So how come it works in IE7 and FireFox but not IE6 then?
|
That is a good point! We'd have to see how function client_valid is getting called, but unfortunately I have to dash off in a few minutes and won't be able to get back until the morning... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tweaker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 8:39 am |
|
No problem. Have a safe trip. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 9:40 am |
|
I don't have an answer for the IE7/FF v IE6 problem but assume that is down to some code error - Advertising module had additional functionality for handling flash I believe so it may possible be lated - just guessing. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tweaker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 10:05 am |
|
But line 305 has nothing to do with flash, it's that function routeen you said that doesn't present itself until 7.8.
Now I did start out with 7.9, heard there were tooooo many issues and everyone was going with rn so I converted. Should Advertisement just be removed then? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jun 03, 2006 10:35 am |
|
That is your decision. You caould add the extra function into mainfile but the safest thing would be to remove it and use the Banners module for now - or there are alternative modules you could use.
The chances are that the Advertising module may use different sql tables which you no longer have in any event but you would need to check that. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
evaders99
Former Moderator in Good Standing
![](modules/Forums/images/avatars/803d73f6452557b947721.jpg)
Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Sat Jul 08, 2006 1:31 am |
|
Not sure where this is coming from... did the Patched files have this bug in it?
filter() should not be used in 7.8 at all
Change to
Code:
$login = check_html($login, "nohtml");
$pass = check_html($pass, "nohtml");
|
|
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 08, 2006 5:11 am |
|
Then I must have been in error. I only have a copy of 7.9 on my PC now and that has the function in it.
I suspect the issue is with 'downgrading' from 7.9 without wiping the files of the server first i.e. as RN does not use the Advertising module the files are still on the server (but the table may have gone or are of a diffeent structure to the banners module table). |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|