Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.1.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2011, 03:16 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 64,574
Missy Master is an unknown quantity at this point
Default Who's Online

1. Add a field in the users table :

online int(80) Not Null Default 0



2. find this in Profile.php and add the online part to the query:



$query = "SELECT * FROM ".$prefix."users ORDER BY usergroup ASC LIMIT $offset, $rowsperpage";
$result = mysql_query($query);
$num2 = mysql_numrows($result);

//Loop out code
$i=0;
while ($i < $num2) {

$id=@mysql_result($result,$i,"uid");
$username=@mysql_result($result,$i,"username");
$email=@mysql_result($result,$i,"email");
$level=@mysql_result($result,$i,"usergroup");
$online=@mysql_result($result,$i,"online");


$star = "";


3. THEN add close under that:


if($online == 1){

// Show a sun if online

$sun = "<img src='templates/icons/sun.gif' border=0'> ";
}

else if($online == 0){

// Show something else for offline

$sun = "<img src='templates/icons/moon.gif' border=0'> ";
}



//I am using sun and moon, you can use whatever lol //


4. Find this in the same page and change to add in the gif:


$article_content = $article_content."<b><a href='profile.php?user=".$username."'>".$sun."".$s tar."".$status."".$username."</a></b><br>";



5. upload enter.php:


6. Alter this part of login.php to say:


if($username == $luser and $password == $lpass){

$article_title = "Login Successful!";
$article_content = "Welcome back ".$username.". You are now logged in. <a href='enter.php'>Click Here to enter!</a>";



//We are routing them to go through the page that enters the online info!//


7. upload exit.php


8. Edit your log out link to go to exit.php.


9. upload online_list.php ---- this is online only!



The big thing here is to force members to go through an entry and exit page that will make them designated as 'online' or 'offline'! I don't think I forgot anything but I might have, so back up back up!! :)

Remember I might have something a bit different so alter as needed!!
Attached Files
File Type: php online_list.php (9.9 KB, 7 views)
File Type: php enter.php (2.8 KB, 5 views)
File Type: php exit.php (2.8 KB, 5 views)

Last edited by Missy Master; 02-16-2011 at 08:59 PM.
Reply With Quote
  #2  
Old 02-17-2011, 04:38 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 492,723
Hall of Famer is on a distinguished road
Default

Wow this! Thank you so much for doing a whos online script Anna, I will test it myself on a demo site and see if it should be added to next release of Mysidia Adoptables.

Hall of Famer
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 02-17-2011, 09:23 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 64,574
Missy Master is an unknown quantity at this point
Default

Great, let me know how it works out, it's been working for me fine!


The whole key is really making sure the log on and off happens through the pages you route it all through! :)
Reply With Quote
  #4  
Old 02-17-2011, 10:11 AM
PokePets PokePets is offline
Premium Member
 
Join Date: Jun 2010
Posts: 228
Gender: Male
Credits: 22,556
PokePets
Default

OMG ♥

Thaaaaaaaaaank you very muuuuuuuuuutch!
Reply With Quote
  #5  
Old 02-26-2011, 10:26 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 64,574
Missy Master is an unknown quantity at this point
Default

welcome!! I wanted one of these too for a long time, finally figured out how to do it!!
Reply With Quote
Reply


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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Who's Online page parayna Questions and Supports 2 12-11-2014 01:20 PM
Online Page Nieth Questions and Supports 7 11-26-2013 07:10 AM
Who's Online Page Yuki Night Questions and Supports 5 01-29-2013 12:53 AM
online pet/art tools Nemesis Other Chat 1 11-11-2012 02:34 PM
Who's Online RoconzaArt Suggestions and Feature Requests 23 02-18-2011 10:22 AM


All times are GMT -5. The time now is 05:45 AM.

Currently Active Users: 1247 (0 members and 1247 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636