Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 04-27-2009, 03:20 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 48,477
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Some very cool add-ons

Update!

There is a slight problem with this code. And that is, if a person does not hit the log-out button, it will continue to say that the person is online. Until he/she logs in again, in which it will say he/she is offline, until the Next time they log on.

So a little diaphram to help you understand that:

First Login, (does not log off)
-Is Online.
Second Login (it doesnt matter if he/she logs off or not)
-Offline.
Third Login (has to log off so the cycle doesnt repeat)
-Is Online (when they are actually online)

Now there is a solution to this problem. But it isn't has "Professional" as the first.

If you don't want to go through all this work, to end up with this possible broken cycle, all you have to do insert the following, in your account.php, accountpost.php, and profile.php: Note: You will need the same Database entry as in the first one, so use that one.

account.php
Find where it says:
PHP Code:

$query 
"SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) { 
And place the following:
Under the first group:
PHP Code:
$status=@mysql_result($result,$i,"status"); 
Under the second group:
PHP Code:
$status stripslashes($status); 
Then find where it says:
PHP Code:
<form name='form1' method='post' action='accountpost.php'>
  <
p>".$box."
  
Notify me via email when I receive a new message or reward code</p>
  <
p><u>Publically Viewable Details: </u></p
And place the following anywhere within that form:
PHP Code:
  <p>Status:
    <
select name='status' id='status'>
<
option value='none'>None</option>
<
option value='online'>Online!</option>
<
option value='offline'>Offline!</option>
<
option value='busy'>Busy!</option>
<
option value='away'>Away!</option>
</
select>
</
p
Note: you can add more, I made it short so you can get the gist of it. You can also add pictures to each one. You can do pretty much anything with it.

accountpost.php
Find where it says:
PHP Code:
// We are changing the settings

$newmsgnotify $_POST["newmsgnotify"];
$newmsgnotify preg_replace("/[^a-zA-Z0-9@._-]/"""$newmsgnotify);
$newmsgnotify secure($newmsgnotify); 
Then place this uner it:
PHP Code:
$status $_POST["status"];
$status secure($status); 
Then find where it says:
PHP Code:
// Run update queries...

$query "UPDATE ".$prefix."users SET newmessagenotify='".$newmsgnotify."' WHERE username='".$loggedinname."'";
mysql_query($query); 
And place this under it:
PHP Code:
$query "UPDATE ".$prefix."users SET status='".$status."' WHERE username='".$loggedinname."'";
mysql_query($query); 
profile.php
Find where it says:
PHP Code:
    $query "SELECT * FROM ".$prefix."users WHERE username = '".$user."'";
    
$result mysql_query($query);
    
$num mysql_numrows($result);

    if(
$num 0){

    
$i=0;
    while (
$i 1) { 
Place this under it:
PHP Code:
    $status=@mysql_result($result,$i,"status"); 
Then find where it says:
PHP Code:
    $ccstat cancp($usersgroup);
    if(
$ccstat == "yes"){
    
$userdisp "<img src='templates/icons/star.gif'> ".$usersname."";
    }
    else{
    
$userdisp $usersname;
    } 
And place this
PHP Code:
    if($status == "none") {
    
$userdisp "".$usersname."'s Profile:";
    }
    elseif(
$status == "online") {
    
$userdisp "".$usersname."'s Profile: Online Status: <b>Online!</b>";
    }
    elseif(
$status == "offline") {
    
$userdisp "".$usersname."'s Profile: Online Status: <b>Offline!</b>";
    }
    elseif(
$status == "busy") {
    
$userdisp "".$usersname."'s Profile: Online Status: <b>Busy!</b>";
    }
    elseif(
$status == "away") {
    
$userdisp "".$usersname."'s Profile: Online Status: <b>away!</b>";
    } 
Then find where it says:
PHP Code:
    $article_title $userdisp."'s Profile:"
And change it to:
PHP Code:
    $article_title "$userdisp"
Like I said this is just the very least you can do with the code. There is so much you can do with it. Who knows, maybe Ill bring in something else. =D
Reply With Quote
 


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
Certain Items Won't Be Added? AlexC Questions and Supports 4 03-27-2012 03:22 PM
A modification jcga1992 Questions and Supports 7 11-07-2011 02:31 PM
Modification Directory Kaeliah Mys v1.1.x Mods 14 02-28-2011 05:14 PM
Anna's New Mods -- UPDATED ! Mod added at the bottom! redheadturkey Mys v1.1.x Mods 17 01-17-2011 07:38 AM
Adoptables not being added Ashje Questions and Supports 2 12-16-2009 11:35 PM


All times are GMT -5. The time now is 03:42 PM.

Currently Active Users: 2307 (0 members and 2307 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636