Jump to content
xisto Community

iGuest

Members
  • Content Count

    72,093
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by iGuest

  1. iGuest

    My Site

    Yeah same, it looks really proffesional! Nice work :)skyglow1
  2. Yeah, the last one is sooo cluttered I don't know where to start to read.skyglow1
  3. Hey guys I just want you to have a lok at the colour scheme to see if it's ok: http://forums.xisto.com/ skyglow1
  4. l3ladecraft is right. You're meant to make your website like 200 in width maximum or something. I read somewhere how to do it.skyglow1
  5. I don't have the money, and also I have no way of paying, and also my parents wouldn't let me anyway.skyglow1
  6. Wow half people here have said firefox. Shows how much it is getting popular.Personally I use Mozilla only, but I've got all the other browsers to check my website to see if it looks correct [Note:If you guys see that error about incorrect authentication when trying to post, don't worry because your post has been submitted, don't keep trying to post. If you double post by accident like Nazrin then delete one of the posts. I had to delete 3 because I didn't see my post had been submitted :)skyglow1
  7. I always have my doubts for this idea, that posts = reward, its bound to create problems unless we have limited members. skyglow1
  8. Firefox here... :wink: "Hackers,spywares,adwares,etc will be easier to enter via IE" I heard that quote from genius...don't know if it is real... Naz, I deleted your double post -Random
  9. Hope it will be fixed soon.... :wink:
  10. Don't you have the script, Admin?(I mean the script that you were using on the last site..)
  11. I´m using Opera & Internet Explorer SP 2 I have plans to use Firefox too Sincerly Johan Gustafsson
  12. firefox, ie for some pages that don't display properly in firefox
  13. iGuest

    Half-Life 2

    iw as really bored of DOOM3 ...half life never enticed me but i am gettin ghtis anways...hpoe it rox...few more days to go
  14. I been looking for that auto script I can do the ranks and all but I cant get the script. I can get script for paid hosting auto signup but not for free hosting.if you found one for free hosting please contact me.
  15. Oh ok that helped alot! Thanks, the calculator is great! Man i should of just tryed to look this up from google. Thanks again man.
  16. File sizes explained: http://forums.xisto.com/no_longer_exists/ Conversion Calculator: http://www.speedguide.net/conversion.php
  17. ok you know how theirs kilabytes,megabytes,gigbytes, trigabytes, etc..? Is their such thing as just "bytes"? or what? becuase phpbb.com says "file size: 100000bytes" for example does bytes stand for kilabytes? or what? and another thing how many bytes or whatever the word"bytes" stands for are in 1mb.-thanks
  18. iGuest

    Gallery

    Do a search on http://www.hotscripts.com/ for 'php image gallery' and it'll come up with a lot of different examples...Or if you want something uberly-simple then get a file upload script and a script which displays all the images in a directory = two files < this is what I did on my site.
  19. I have made an instant message system which is quite complicated. To implement this you may need a reasonable knowledge of php, you will also need a login system that has parsed the username to a variable $username. For this specific example to work best you also need to be able to assign $user_level to a value more than 2 if an admin is logged in. MYSQL tables are at the bottom. FIRST. Create a file, name it formtemplates.php and give it the following content. If you use this, Please link back to my site at http://forums.xisto.com/no_longer_exists/, as this system took me a lot of time to make <?if(isset($_SESSION['username'])) {$username = $_SESSION['username'];} else {$username = Guest;}$user = $_GET['user'];$priv_query = mysql_query("SELECT * FROM users WHERE username='$user'");$priv_num = mysql_num_rows($priv_query);if($priv_num == 1) {$value = "value="1" CHECKED";}$send_message = <<<HTML<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><form action="?page=message&a=send&b=1" method="post" name="" id=""> <table width="50%" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="22%">To</td> <td width="78%"><input name="to_user" type="text" id="to" value="$user"></td> </tr> <tr> <td>From</td> <td> $username </td> </tr> <tr> <td>Message</td> <td><textarea name="message" id="message" rows="5" cols="50"> </textarea></td> </tr> <tr> <td>Private</td> <td><input type="checkbox" name="private" $value></td> </tr> <tr> <td> </td><input name="from" type="hidden" id="from" value="$username"> <td><input type="submit" name="Submit" value="Submit"></td> </tr> </table></form>HTML;?> SECOND. Include the following at the top of the content. This will produce a notice at the top which should stay for one minute before dissapearing again. <?include 'db.php';///connect to database - file content is shown near the bottominclude 'formtemplates.php';///include the send form as shown above./////these variables are explained at the bottom :)$page = $_GET['page'];$a = $_GET['a'];$b = $_GET['b'];$user = $_GET['user'];if (isset($_SESSION['username'])) {/*-------------------------------------------------------------------------------------*/print "<i>";///you will need to adjust these to reflect your log on script - mine uses sessions with these variables$last_login = $_SESSION['last_login'];$username = $_SESSION['username'];$firstname = $_SESSION['first_name'];$userid = $_SESSION['userid'];///retrieve the latest known time the user logged in$last_login_ = mysql_query("SELECT last_login,im_update FROM users WHERE userid=$userid LIMIT 1") or die("MySQL Error: " . mysql_error());while($last = mysql_fetch_array($last_login_)) {$last_login = $last['last_login'];$im_update = $last['im_update'];}/////if ($im_update == 0) {/* to save complexity ive removed this bit - which links to the user table to allow users to decide if they wish to be updated*///get all messages for the user where the message date is after the last login time$sql_messagenew = mysql_query("SELECT * FROM message WHERE to_user='$username' AND date >'$last_login' ORDER BY id desc");$new_row = mysql_num_rows($sql_messagenew);//if there is more than 0 new records then display them - how you wish, the following way is one possibilityif ($new_row !== 0) {print "$firstname You have ($new_row) new Instant messages:";print "<table width="90%" border="1" align="center" cellpadding="4" cellspacing="0">";print " <tr> ";print " <td width="15%">To</td>";print " <td width="15%">From</td>";print " <td width="50%">Message</td>";print " <td width="10%">Date</td>";print " <td width="10%">Type</td>";print " </tr> ";/// display each row that matches the querywhile($row=mysql_fetch_array($sql_messagenew)) {print '<tr><td valign="top"><a href="?page=users&a='.$row['to_user'].' ">'.$row['to_user'].'</a></td><td valign="top"><a href="?page=users&a='.$row['from'].' ">'.$row['from'].'</a></td><td valign="top">'.$row['message'].'</td><td valign="top">'.$row['date'].'</td><td valign="top">'.$row['type'].'</td></tr> ';}/*---*/print "</table>";////end table///print "<br /><br />";} else {//print "$firstname You Have (0) New Instant Messages.";//print "<br /><br />";}//get the current date $date=time();$date = $date+18000;//adjust to gmt $sql = mysql_query("UPDATE users SET last_login=FROM_UNIXTIME($date) WHERE userid='$userid'");//update the last log in time//} this is the close tag for choosing to revieve the updateprint "</i> n";/*----------------------------------------------------------------------------*/}?> THIRD. The following is the script to send IM's and to view them to be placed in the body of the page. To access this you will need to go to file.php?page=message where 'file.php' can be a *.php file with any name. <?if ($page == message) {/*----------------------------------Message---------------------------------*/Print "Instant Message System<br />";Print "<a href=?page=users>- Member List</a><br />";/*when page = users my site lists the active users. This is not explained in this tutorial - but can be done fairly quickly */if ($a == send) {///the section that allows messages to be sent...if ($b == 1) {///insert data to database $date=time();$date = $date+18000;///set the time$date = $date + 60///set a minute delay to leave the IM's showing on the screen after page refreshes$to_user = $_POST['to_user'];$from = $_POST['from'];$message = $_POST['message'];$private = $_POST['private'];$type = "IM";///set the var's/* if private - my script doubles as a comment system, where it is not private i can link it to news posts etc e.g. send comments to news_1 and retrieve them when to_user isnt in the user table*/if(!isset($private)) {$private = 0;} else {$private = 1;}//some data validationif (empty($to_user) || empty ($from) || empty($message) || ($message == " ") || empty($date)) { $message = 'You Need To Complete All Required Fields'; } else {//everything ok, strip slashes, link links and submit to db$message = stripslashes($message);$message = eregi_replace( "(http|https|ftp)://([[:alnum:]/n+-=%&:_.~?]+[#[:alnum:]+]*)", "<a href="1://2" target="_blank">1://2</a>", $message); mysql_query("INSERT INTO `message` ( `id` , `to_user` , `from` , `message` , `date` , `private` , `type` ) VALUES('','{$to_user}','{$from}','{$message}',FROM_UNIXTIME($date),'{$private}','{$type}')"); $message = "<br />Successfully Posted Message";}}print $message;print "<br /><br />";$change = read;print "<a href="?page=$page&a=$change">$change Message</a><br> n";print "<br> n";print $send_message;} else {///section = read...$a = read;print "<br/>";$change = send;print "<a href="?page=$page&a=$change">$change Message</a><br> n";print "<br> n";/*-------*////display them...print "<table width="90%" border="1" align="center" cellpadding="4" cellspacing="0">";print " <tr> ";print " <td width="15%">To</td>";print " <td width="15%">From</td>";print " <td width="50%">Message</td>";print " <td width="10%">Date</td>";print " <td width="10%">Type</td>";print " </tr> ";$user = $_GET['user'];///if not to a user, display all the public messagesif (empty($user)) {////////////*---*/$message_query = mysql_query("SELECT * FROM message WHERE private='0' order by id desc");$row_num_ = mysql_num_rows($message_query);while($row=mysql_fetch_array($message_query)) {print '<tr><td valign="top"><a href="?page=users&a='.$row['to_user'].' ">'.$row['to_user'].'</a></td><td valign="top"><a href="?page=users&a='.$row['from'].' ">'.$row['from'].'</a></td><td valign="top">'.$row['message'].'</td><td valign="top">'.$row['date'].'</td><td valign="top">'.$row['type'].'</td></tr> ';}/*---*/} else {///the user isnt empty - is it to a website user, or to a news post?/*----------------------------*/$username = $_SESSION['username'];if ($user !== $username) {///if the user has admin settings allow him to view the private messages of other usersif($_SESSION['user_level'] > 2){/*---*/////////////////*------0--------*/////////$row_num = $row_num_0;$message_query_0 = mysql_query("SELECT * FROM message WHERE to_user='$user' ORDER BY id desc LIMIT 10");$row_num_0 = mysql_num_rows($message_query_0);while($row=mysql_fetch_array($message_query_0)) {print '<tr><td valign="top"><a href="?page=users&a='.$row['to_user'].' ">'.$row['to_user'].'</a></td><td valign="top"><a href="?page=users&a='.$row['from'].' ">'.$row['from'].'</a></td><td valign="top">'.$row['message'].'</td><td valign="top">'.$row['date'].'</td><td valign="top">'.$row['type'].'</td></tr> ';}/*---*/} else {/*--user doesnt have admin settings - only able to view public messages to other users-*/////////////////*------1--------*/////////$row_num = $row_num_1;$message_query_1 = mysql_query("SELECT * FROM message WHERE private='0' AND to_user='$user' ORDER BY id desc LIMIT 10");$row_num_1 = mysql_num_rows($message_query_1);while($row=mysql_fetch_array($message_query_1)) {print '<tr><td valign="top"><a href="?page=users&a='.$row['to_user'].' ">'.$row['to_user'].'</a></td><td valign="top"><a href="?page=users&a='.$row['from'].' ">'.$row['from'].'</a></td><td valign="top">'.$row['message'].'</td><td valign="top">'.$row['date'].'</td><td valign="top">'.$row['type'].'</td></tr> ';}/*---*/}} else {///user is the same as the one for which messages are requested - so show all their private messages/*---*/////////////////*------2--------*/////////$row_num = $row_num_2;$message_query_2 = mysql_query("SELECT * FROM message WHERE to_user='$user' ORDER BY id desc LIMIT 10");$row_num_2 = mysql_num_rows($message_query_2);while($row=mysql_fetch_array($message_query_2)) {print '<tr><td valign="top"><a href="?page=users&a='.$row['to_user'].' ">'.$row['to_user'].'</a></td><td valign="top"><a href="?page=users&a='.$row['from'].' ">'.$row['from'].'</a></td><td valign="top">'.$row['message'].'</td><td valign="top">'.$row['date'].'</td><td valign="top">'.$row['type'].'</td></tr> ';}/*---*/}/*----------------------------*////////}print "</table>";////end table////*-------*/}///if a variable is for all... then show all ones available$c = $_GET['c'];if($c == all) {print "<table width="90%" border="1" align="center" cellpadding="4" cellspacing="0">";print " <tr> ";print " <td width="15%">To</td>";print " <td width="15%">From</td>";print " <td width="50%">Message</td>";print " <td width="10%">Date</td>";print " <td width="10%">Type</td>";print " </tr> ";///if admin show all messages, if not exclude - ive taken out pagination as there is another tut, and i cba :)if($_SESSION['user_level'] > 2){/*-----------------------------------------------------------------------------------------------------------------------*/////////////////*------3--------*/////////$row_num = $row_num_3;$message_query_3 = mysql_query("SELECT * FROM message ORDER BY id desc");$row_num_3 = mysql_num_rows($message_query_3);while($row=mysql_fetch_array($message_query_3)) {print '<tr><td valign="top"><a href="?page=users&a='.$row['to_user'].' ">'.$row['to_user'].'</a></td><td valign="top"><a href="?page=users&a='.$row['from'].' ">'.$row['from'].'</a></td><td valign="top">'.$row['message'].'</td><td valign="top">'.$row['date'].'</td><td valign="top">'.$row['type'].'</td></tr> ';}/*-----------------------------------------------------------------------------------------------------------------------*/} else { echo "Your userlevel does not authorise you to view this page";}/*-----------------------------------------------------------------------------------------------------------------------*/print "</table>";////end table///}/*----------------------------------End Message------------------------------*/}?> The MYSQL tables i have used here are 'users' and 'message' Message is shown below CREATE TABLE `message` ( `id` int(11) NOT NULL auto_increment, `to_user` varchar(30) NOT NULL default '', `from` varchar(30) NOT NULL default 'Guest', `message` text NOT NULL, `date` datetime NOT NULL default '0000-00-00 00:00:00', `private` enum('0','1') default '0', `type` varchar(10) default 'IM', PRIMARY KEY (`id`)) TYPE=MyISAM AUTO_INCREMENT=33; Users is shown below CREATE TABLE `users` ( `userid` int(25) NOT NULL auto_increment, `first_name` varchar(25) NOT NULL default '', `last_name` varchar(25) NOT NULL default '', `email_address` varchar(35) NOT NULL default '', `mailing_list` enum('1','2') NOT NULL default '1', `age` smallint(6) default NULL, `location` text, `username` varchar(25) NOT NULL default '', `PASSWORD` varchar(255) NOT NULL default '', `info` text NOT NULL, `user_level` enum('0','1','2','3') NOT NULL default '1', `signup_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_login` datetime NOT NULL default '0000-00-00 00:00:00', `activated` enum('0','1') NOT NULL default '0', `im_update` enum('0','1') default '0', PRIMARY KEY (`userid`), KEY `PASSWORD` (`PASSWORD`), KEY `email_address` (`email_address`), KEY `activated` (`activated`), KEY `mailing_list` (`mailing_list`)) TYPE=MyISAM COMMENT='Membership Information' AUTO_INCREMENT=33; db.php is the file used to connect the the mysql database. If this is not working you may recieve a series of errors. You will need to create a file, insert the following php code, and save it as db.php. The content is shown below: <?//set database connection variables$hostname='localhost';$uname='';$password='';$database='';//establish database connection$connect = mysql_connect($hostname,$uname,$password);//display error if connection failsif ($connect==FALSE) { print 'Unable to connect to database: '.mysql_error();} else {//select databasemysql_select_db($database);}?> Information for link creation / running the script. ---------------------------------------------------------------------------- In php you can append data to urls e.g. file.php?a=1 you can then parse this to a php variable. this script uses the following examples: when the loaded page = ?page=message it shows all the public messages. when it = ?page=message&a=send&user=user1 it shows the send form with user1 in the to field ?page=message&a=read&user=user1 shows messages to user1. If the same user user is logged in it shows all messages, if not it shows public messages. If an admin requests it ($_SESSION['user_level'] over 2) it shows all messages. when the form is sent it goes to ?page=message&a=sent&b=1 to insert the data to the database. ---------------------------------------------------------------------------- I admit that when i made it it was for personal use and not as a tutorial. I hope that ive given enough details, if not let me know and i will try and reslove it, or inform me of any changes you make so i can update this. enjoy - once you have it working can you post a reply at the bottom so i know, if your the first person to do so
  20. I love these kinds of sites, like the onion, and yea design needs work,
  21. Sweet man. Thanks for the script.
  22. iGuest

    My Site

    Nice design i like, just the popups come in from the buttons aligned to the left, im using firefox 1.0
  23. er...I think you just make any normal site, but stick to only html to ensure compatability and try and keep pages small.(I'm not entirely sure)
  24. I use IE, but the SBC Yahoo browser... (Based of IE) umm... I would always use Firefox, but I cannot get flash to work with it! =/...-Fatality
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.