Need help for Site - Fandom Forums
Fandom Forums



Go Back   Fandom Forums > Indepth Interests > Web Development

Web Development Post here if you are looking for help with making a website. You may advertise, but need a post count of 150.

Reply
 
Thread Tools Display Modes
Old 12-14-2005, 05:05 PM   #1
Sulaman
Genin
 
Sulaman's Avatar
 
Join Date: Dec 2005
Posts: 162
Thanks: 0
Thanked 0 Times in 0 Posts
Sulaman is an unknown quantity at this point
Arrow Need help for Site

Hi!
I made a new site Naruto Gate and I have a website and Forums. How do I have a login put on it so it could be like on http://www.narutocentral.com and have a login, logout, register on the site like it has. I want my site to be integrated with my forum. Please help. My site is a PHP site. Also, I wanna know how I can put and import news to my site content place from my forums. I have IPB 2.1.3 Forums. Thanks
Sulaman is offline   Reply With Quote


Old 12-14-2005, 05:17 PM   #2
#1 Lazy Ass
Academy Student
 
#1 Lazy Ass's Avatar
 
Join Date: Dec 2005
Location: In my Cell eating a rock
Age: 24
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
#1 Lazy Ass is an unknown quantity at this point
Hey Sulaman, that's a very good question.
__________________


Dennis Miller: I don't wanna go on a RANT here but America's foreign policy makes about as much sense as Beowolf having sex with Robert Fulton at the first Battle of Antetum. I mean when a neo-conservative defenstrates it's like Raskalnakov filibuster dioxymonohydrostinate.
Peter: What the hell does RANT mean?
#1 Lazy Ass is offline   Reply With Quote
Old 12-14-2005, 05:18 PM   #3
#1 Lazy Ass
Academy Student
 
#1 Lazy Ass's Avatar
 
Join Date: Dec 2005
Location: In my Cell eating a rock
Age: 24
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
#1 Lazy Ass is an unknown quantity at this point
Narutogate.com, right? I'll have to check it out.
__________________


Dennis Miller: I don't wanna go on a RANT here but America's foreign policy makes about as much sense as Beowolf having sex with Robert Fulton at the first Battle of Antetum. I mean when a neo-conservative defenstrates it's like Raskalnakov filibuster dioxymonohydrostinate.
Peter: What the hell does RANT mean?
#1 Lazy Ass is offline   Reply With Quote
Old 12-14-2005, 05:19 PM   #4
Sulaman
Genin
 
Sulaman's Avatar
 
Join Date: Dec 2005
Posts: 162
Thanks: 0
Thanked 0 Times in 0 Posts
Sulaman is an unknown quantity at this point
umm... its http://naruto-gate.ramorax.com
Sulaman is offline   Reply With Quote
Old 12-14-2005, 05:21 PM   #5
#1 Lazy Ass
Academy Student
 
#1 Lazy Ass's Avatar
 
Join Date: Dec 2005
Location: In my Cell eating a rock
Age: 24
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
#1 Lazy Ass is an unknown quantity at this point
Wow. Love it. You did so much better than I could.....
__________________


Dennis Miller: I don't wanna go on a RANT here but America's foreign policy makes about as much sense as Beowolf having sex with Robert Fulton at the first Battle of Antetum. I mean when a neo-conservative defenstrates it's like Raskalnakov filibuster dioxymonohydrostinate.
Peter: What the hell does RANT mean?
#1 Lazy Ass is offline   Reply With Quote
Old 12-14-2005, 09:22 PM   #6
Sulaman
Genin
 
Sulaman's Avatar
 
Join Date: Dec 2005
Posts: 162
Thanks: 0
Thanked 0 Times in 0 Posts
Sulaman is an unknown quantity at this point
can anyone help me please its urgent.. Thanks
Sulaman is offline   Reply With Quote
Old 12-14-2005, 09:22 PM   #7
Sulaman
Genin
 
Sulaman's Avatar
 
Join Date: Dec 2005
Posts: 162
Thanks: 0
Thanked 0 Times in 0 Posts
Sulaman is an unknown quantity at this point
Bump!!
Sulaman is offline   Reply With Quote
Old 12-15-2005, 12:18 PM   #8
goku100
I own j00!
 
goku100's Avatar
 
Join Date: May 2005
Location: London, UK
Age: 22
Posts: 5,159
Thanks: 21
Thanked 22 Times in 18 Posts
goku100 will become famous soon enoughgoku100 will become famous soon enough
hey i would love to help you upload manga and episodes onto your forum if you need to and also i will try and get your registration and things like that workin, just PM and tell me what i ave to do exactly^^
__________________
[CENTER][url=http://www.wiitalk.co.uk/forums/wiitag.php][img]http://www.wiigo.co.uk/tag/t/w09939494.gif[/img][/url][/CENTER]
[CENTER][IMG]http://i22.photobucket.com/albums/b310/Perpetualdesignz/6n6wazere.gif[/IMG][/CENTER]
goku100 is offline   Reply With Quote
Old 12-15-2005, 02:25 PM   #9
haka
crazy back stabber!!
 
haka's Avatar
 
Join Date: Sep 2005
Location: The city of my own sorrow
Age: 21
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
haka is an unknown quantity at this point
ask tom he may know.
__________________
Sometimes its best not to get close
to someone dear to you.
It only causes pain in the end.



Which FF Character Are You?



Proud owner of:
The Bisexual Fc

Proud Co-owner of:
The sand shinobis FC
The Gorillaz Fc

Proud member of:
Hyuuga Neji FC
Pro Gamers FC
Legend of zelda FC
Final Fantasy Fc
Avatar the last airbender Fc
haka is offline   Reply With Quote
Old 12-15-2005, 11:08 PM   #10
radical_dreamer
Academy Student
 
radical_dreamer's Avatar
 
Join Date: Dec 2005
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
radical_dreamer is an unknown quantity at this point
Yea. I'm glad to help u.
__________________
Our Site

For all the dreamers our planet dreams is not over yet...

----------------------------Radical Dreamer---------------------------
radical_dreamer is offline   Reply With Quote
Old 12-16-2005, 07:21 PM   #11
im570n3d
Academy Student
 
Join Date: Oct 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
im570n3d is an unknown quantity at this point
well ima php coder if that what your looking for please aim im570n3d and we will talk also that is http://www.anime-divx.com/ old layout im not accusing of ripping but please state ur reason
__________________
im570n3d is offline   Reply With Quote
Old 12-16-2005, 08:17 PM   #12
OffTheChain
 
OffTheChain's Avatar
 
Join Date: Feb 2005
Posts: 8,963
Thanks: 0
Thanked 5 Times in 5 Posts
OffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure EvilOffTheChain Pure Evil
pulsive designs.....they make those style layouts.

Like they made national-anime's..
OffTheChain is offline   Reply With Quote
Old 12-16-2005, 10:48 PM   #13
Sulaman
Genin
 
Sulaman's Avatar
 
Join Date: Dec 2005
Posts: 162
Thanks: 0
Thanked 0 Times in 0 Posts
Sulaman is an unknown quantity at this point
Quote:
How do I have a login put on it so it could be like on http://www.narutocentral.com and have a login, logout, register on the site like it has. I want my site to be integrated with my forum. Please help. My site is a PHP site. Also, I wanna know how I can put and import news to my site content place from my forums. I have IPB 2.1.3 Forums.
Anyone know how I can do that?
Sulaman is offline   Reply With Quote
Old 12-17-2005, 02:30 PM   #14
teddyguy612
Academy Student
 
teddyguy612's Avatar
 
Join Date: Dec 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
teddyguy612 is an unknown quantity at this point
Ok.... I'll tell you since i have a site also---- narutospot.2plans.com!!!!!!!

If you have PHPmyadmin, run this query on it first:

CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(255) NOT NULL default '',
`email` varchar(40) NOT NULL default '',
`msn` varchar(250) NOT NULL default 'Not Specified',
`aim` varchar(250) NOT NULL default 'Not Specified',
`location` varchar(36) NOT NULL default 'Not Specified',
PRIMARY KEY (`id`)
) TYPE=MyISAM;

First, save this as CONFIG.php:

<?
ob_start(); // allows you to use cookies
$conn = mysql_connect("localhost","DATABASE USERNAME","DATABASE PASSWORD");
mysql_select_db(DATABASE NAME) or die(mysql_error());
//fill in the above lines where there are capital letters.
$logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]' AND password = '$_COOKIE[pass]'");
$logged = mysql_fetch_array($logged);
//the above lines get the user's information from the database.
?>

Remember to change the requieered parts, like the mysql or postresql databases.

Now save this as register.php::

<?php
ob_start();
// allows you to use cookies
include("config.php");
//gets the config page
if ($_POST[register]) {
// the above line checks to see if the html form has been submitted
$username = $_POST[username];
$password = $_POST[pass];
$cpassword = $_POST[cpass];
$email = $_POST[emai1];
//the above lines set variables with the user submitted information
if($username==NULL|$password==NULL|$cpas sword==NULL|$email==NULL) {
//checks to make sure no fields were left blank
echo "A field was left blank.";
}else{
//none were left blank! We continue...
if($password != $cpassword) {
// the passwords are not the same!
echo "Passwords do not match";
}else{
// the passwords are the same! we continue...
$password = md5($password);
// encrypts the password
$checkname = mysql_query("SELECT username FROM users WHERE username='$username'");
$checkname= mysql_num_rows($checkname);
$checkemail = mysql_query("SELECT email FROM users WHERE email='$email'");
$checkemail = mysql_num_rows($checkemail);
if ($checkemail>0|$checkname>0) {
// oops...someone has already registered with that username or email!
echo "The username or email is already in use";
}else{
// noone is using that email or username! We continue...
$username = htmlspecialchars($username);
$password = htmlspecialchars($password);
$email = htmlspecialchars($email);
// the above lines make it so that there is no html in the user submitted information.
//Everything seems good, lets insert.
$query = mysql_query("INSERT INTO users (username, password, email) VALUES('$username','$password','$email') ");
// inserts the information into the database.
echo "You have successfully registered!";
}
}
}
}
else
{
// the form has not been submitted...so now we display it.
echo ("
<center>
<form method=\"POST\">
Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"><br />
Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\"><br />
Confirm Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\"><br />
Email: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"emai1\"><br />
<input name=\"register\" type=\"submit\" value=\"Register\">
</form>
</center>
");
}
?>

Then,save this as login.php:

<?
oB_start();
// allows you to use cookies.
include("config.php");
if (!$logged[username])
{
if (!$_POST[login])
{
echo("
<center><form method=\"POST\">
<table>
<tr>
<td align=\"right\">
Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\">
</td>
</tr>
<tr>
<td align=\"right\">
Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\">
</td></tr><tr>
<td align=\"center\">
<input type=\"submit\" name=\"login\" value=\"Login\">
</td></tr><tr>
<td align=\"center\">
<a href=\"register.php\">Register Here</a>
</td></tr></table></form></center>");
}
if ($_POST[login]) {
// the form has been submitted. We continue...
$username=$_POST['username'];
$password = md5($_POST[password]);
// the above lines set variables with the submitted information.
$info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
$data = mysql_fetch_array($info);
if($data[password] != $password) {
// the password was not the user's password!
echo "Incorrect username or password!";
}else{
// the password was right!
$query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
$user = mysql_fetch_array($query);
// gets the user's information
setcookie("id", $user[id],time()+(60*60*24*5), "/", "");
setcookie("pass", $user[password],time()+(60*60*24*5), "/", "");
// the above lines set 2 cookies. 1 with the user's id and another with his/her password.
echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://yoursite.com\"/>Thank You! You will be redirected");
// modify the above line...add in your site url instead of yoursite.com
}
}
}
else
{
// we now display the user controls.
echo ("<center>Welcome <b>$logged[username]</b><br /></center>
- <a href=\"editprofile.php\">Edit Profile</a><br />
- <a href=\"members.php\">Member List</a><br />
- <a href=\"logout.php\">Logout</a>");
}
?>

save this as editprofile.php::
<?
ob_start();
include("config.php");
if ($logged[username])
{
// the user is logged in! We continue...
if (!$_POST[update])
{
// the form hasn't been submitted. We continue...
$profile = mysql_query("SELECT * from users where username = '$logged[username]'");
$profile = mysql_fetch_array($profile);
// the above lines get the information so that it can be displayed in the html form.
echo("
<center><form method=\"POST\">
<table width=\"100%\">
<tr>
<td align=\"right\" width=\"25%\">
Location
</td>
<td align=\"left\">
<input type=\"text\" size=\"25\" maxlength=\"25\" name=\"locate\" value=\"$profile[location]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
MSN Messenger
</td>
<td align=\"left\">
<input size=\"25\" name=\"msn\" value=\"$profile[msn]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
AOL Messenger</td>
<td align=\"left\">
<input size=\"25\" name=\"aim\" value=\"$profile[aim]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Email Address</td>
<td align=\"left\">
<input size=\"25\" name=\"email\" value=\"$profile[email]\"></td>
</tr>
<tr>
<td align=\"center\">
</td>
<td align=\"left\">
<input type=\"submit\" name=\"update\" value=\"Update\"></td>
</tr>
</table>
</form>
</center>");
}
else
{
$email = htmlspecialchars($_POST[email]);
$aim = htmlspecialchars($_POST[aim]);
$msn = htmlspecialchars($_POST[msn]);
$locate = htmlspecialchars($_POST[locate]);
// the above lines get rid of all html.
echo ("Your profile has been updated!");
$update = mysql_query("Update users set email = '$email',
msn = '$msn', aim = '$aim', location = '$locate' where username = '$logged[username]'");
// updates the information in the database.
}
}
else
{
// They aren't logged in!
echo ("<a href=\"login.php\">You must login</a>");
}
?>

save this as members.php (profile):

<?
ob_start();
include("config.php");
if (!$_GET[user])
{
$getuser = mysql_query("SELECT * from users order by id asc");
while ($user = mysql_fetch_array($getuser))
{
// gets all the users information.
echo ("<a href=\"members.php?user=$user[username]\">$user[username]</a><br />\n");
// links to a page to view the user's profile.
}
}
ELSE
{
$getuser = mysql_query("SELECT * from users where username = '$_GET[user]'");
$usernum = mysql_num_rows($getuser);
if ($usernum == 0)
{
echo ("User Not Found");
}
else
{
$profile = mysql_fetch_array($getuser);
echo ("<center><b>$profile[username]'s Profile:</b><br /></center>
MSN Messenger: $profile[msn]<br />
AIM Messebger: $profile[aim]<br />
Location: $profile[location]<br />
Email: $profile[email]");
// in the above code, we display the user's information.
}
}
?>

now, for the logout.php this just makes a false cookie action:

<?
ob_start();
setcookie("id", 2132421,time()+(60*60*24*5), "/", "");
setcookie("pass", loggedout,time()+(60*60*24*5), "/", "");
echo ("You are now logged out!");
?>

Remember, the files need to be PHP.

Also, if you want member only pages, use this:

<?
ob_start();
include("config.php");
if ($logged[username])
{
echo("You are logged in");
}
else
{
echo("You are not logged in");
}
?>

Remeber to put this code at the top of every page u want the login action to work:

<?
ob_start();
include("config.php");
?>

Your Done

if you would like to add PM features and other stuff, just ask me!
teddyguy612 is offline   Reply With Quote
Old 12-17-2005, 09:04 PM   #15
Sulaman
Genin
 
Sulaman's Avatar
 
Join Date: Dec 2005
Posts: 162
Thanks: 0
Thanked 0 Times in 0 Posts
Sulaman is an unknown quantity at this point
Thanks alot
Sulaman is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 02:00 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.