ClearChat Module/Block problems with 7.0+

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   ClearChat Module/Block problems with 7.0+
stiletto23
CZ Newbie
stiletto23 has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Feb 20, 2006
0.00 posts per day
Posts: 2
Points: 85
   
Has anyone tested ClearChat with phpnuke 7.0+? I cannot get it working. ClearChat is a simple little program but it has built-in username and password checking against the phpnuke database. Essentially its' own authitication. Everything seems to work ok and the database is connecting but when someone enters a comment, it does not post to the database.... Take a look at a code snipet. Any ideas why this might not work in 7.0+ but would for 6.5?

<?php

$timedate = date("d M y - H:i");
$useraddress = $_SERVER['REMOTE_ADDR'];
require "../common/config.php";


if (isset($submit))
{

$db = mysql_connect("$dbaddress", "$dbuser", "$dbpass");

mysql_select_db("$dbname",$db);
$checker = mysql_query("SELECT user_password FROM nuke_users WHERE username = '$username'");
while ($disp = mysql_fetch_array($checker))
{
$realuserpw = $disp["user_password"];
}

if (($userpw == $realuserpw) && ($userpw != "")) {
include "../common/checks.php";

mysql_select_db("$dbname",$db);
$sql = "INSERT INTO nuke_clearchat (username, comment, useraddress, date) VALUES ('$username','$comment','$useraddress','$timedate')";
$result = mysql_query($sql);

} else {


I believe the issue is $username is not being imported correctly....any ideas? icon_question.gif


Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Where is this variable defined?


$userpw




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
stiletto23
CZ Newbie
stiletto23 has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Feb 20, 2006
0.00 posts per day
Posts: 2
Points: 85
   


Originally posted by Telli @ Sat Feb 25, 2006 8:18 am:

Where is this variable defined?


$userpw



Well it's being defined by a lookup of the $username, it grabs the password from that. Now I have figured out a few things since posting the first time. Basically the block is calling two files. input.php and view.php and displays them inside the block as frames. Well no variables get passed from the block to the other two files. This is why it is failing. When I manually set the $username it begins working. Any ideas why the two php files called by $content = from the block aren't picking up the variables? When I echo the $username just in the block, it displays it correctly. I don't get why it isnt transferring into the other two php files. Like I said this worked fine in 6.5 but something has changed as far as maybe security for filese inside blocks that would cause this not to work??

-stiletto


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum