81
xsell
Re: Ajax in block
  • 2009/9/30 7:13

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Oh look Who is Here ..!!

To tell you the truth i been looking into debaser before you say that . :) i learned some from it .

The thing with my Block is that only micrsoft Explorer doese not comes up witht he result . Firefox , and Google Grhome have no Problem Come up with the result , So thats tells me Nothing wrong with The code .. do not know whts up with Poor old IE8.. Had to delete the Cash the Cookies , Temp .. then it Work.. Yah it DID ..

So seem was Temp and Cash Problem .. i do not mean XOOPS Cash by my PC..



82
xsell
Ajax in block
  • 2009/9/30 5:44

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


hello
I made small Block with ajax Function , the goal of this block is to bring data from the sql equal to the sumbit word .

I made my module and tested the index . and all looks Good , so i made my block to show the same wht in the index .. the block shows no error but when tyep word it only say to wait.. and will never bring the equal data ..

this is my blok
<?php
function b_ajax_blocks_show() {
global  
$xoopsUser$xoopsConfig$xoopsDB$xoopsModuleConfig$xoopsOption;
$block = array();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
var http = createRequestObject();
function createRequestObject(){
    var request_;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
        request_ = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else{
        request_ = new XMLHttpRequest();
    }
    return request_;
}
function getInfo(){
    http.open('get', 'ajax.php?word='+ document.form1.word.value);
    http.onreadystatechange = handleInfo;
    http.send(null);
}
function handleInfo(){
    if(http.readyState == 1){
        document.getElementById('mydiv').innerHTML = 'Wait.....';
    }
    if(http.readyState == 4){
        var response = http.responseText;
        document.getElementById('mydiv').innerHTML = response;
    }
}
</script>
 <?
$block
['content'] .= "'<center><table dir=rtl width=15% border=0>
<form name='form1' method='post' action=''>
     <input name='word' type='text' id='word' onkeyup='getInfo()' AUTOCOMPLETE='OFF'>
  </form>
</div>
<div align='center' id='mydiv'><font size='2' face='tahoma, arial'></font></div>
</form></table>
"
;
//$block['content']  =  "$content";
return $block;
}
?>



83
xsell
Re: uploading avatars error
  • 2009/9/28 22:34

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Ghia .. i updated my post .. my Php.ini seems set to disable uploading .

and i only use 2.4.0 for testing .. that was part of the testing not on my live site



84
xsell
uploading avatars error
  • 2009/9/28 21:41

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello

when try to upload new avatars get this error:
Array
(
[0] => Could not get uploaded file 0
[1] => File not found
)


I use XOOPS 2.4.0 , php5 , MySQL 5

Modules Installed
system
protector
debaser

the cash and the uploads folder are both writeable 777

update : Solved
file_uploads OFF = change to On



85
xsell
xoops_refcheck() is deprecated
  • 2009/9/23 5:57

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello every1

I have this error when Making a post with SHoutbox module (Not tank Module).

Notice: Function xoops_refcheck() is deprecated, use xoopsSecurity::checkReferer instead in file /include/functions.legacy.php line 37


The error after Making this line to Check if the Visitor trys to access the post file direct .

if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;


Is any thing wrong with useing xoops_refcheck ?



86
xsell
Re: ban user from Certin Page
  • 2009/9/14 2:00

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


thx Ghia , it did not work . i dont know why it seem it should have worked. as this i use to ban user by his id and it works Fine.

" WHERE user=" $xoopsUser->getVar('uid');


but to ban user with his user name i thought this should work but it did not.
" WHERE user=" $xoopsUser->getVar('uname');



87
xsell
Re: ban user from Certin Page
  • 2009/9/13 4:31

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Trabis . How the Code looks if we going to replace the user id with his username



88
xsell
Re: ban user from Certin Page
  • 2009/9/13 3:10

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


100% Man Just 100% thats wht i needed .. Thank you Trabis



89
xsell
Re: ban user from Certin Page
  • 2009/9/13 1:28

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Thx , Ghia and you trabis .. Regards of Ya both answer . Can you Help with the Exact thing i need to do , just Need the Function that checks the tabel if the user id there if not the allow him see the page ..

For Some reasons i want it the same way i asked above .
I know the easy way is to put him in new Group i just do not want this way for some personal reasons.

Thx For your Time Guys .. I appreciate all wht u have done for XOOPS Community



90
xsell
ban user from Certin Page
  • 2009/9/12 23:12

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello
I'm trying to ban a user from a certin page not from the whole site this wht i have done to do so .

1- Created MySQL table that will include the user id .
CREATE TABLE `userid` (
`
us_idINT11 NOT NULL AUTO_INCREMENT ,
`
userVARCHAR255 NOT NULL ,
PRIMARY KEY ( `us_id` )
);


2- Make the file that will insert the user id
<?php
if (isset($_POST['submit'])){
 
//userid variable from form
 
$userid $_POST['userid'];
 
//inset userid
 
mysql_query("INSERT INTO userid (user) VALUES('$userid') ")
 or die(
mysql_error());

 echo 
"$userid Added";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Add userid</title>
</head>

<body>
<form action="" method="post" name="userid">
<input name="userid" type="text" /><input name="submit" type="submit" value="Add userid" />
</form>
</body>
</html>


3- I need someone to Show me now How to add code in the Top of the Forbbiden page that i need to keep the user away from Viewing it ..

Code to check if the user id matchs the id inserted in the table to print message for him says he was banned from this page .




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 21 »



Login

Who's Online

297 user(s) are online (206 user(s) are browsing Support Forums)


Members: 0


Guests: 297


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits