Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 03-31-2012, 06:20 PM
solskenn's Avatar
solskenn solskenn is offline
Member
 
Join Date: Mar 2012
Location: Ankh-Morpork
Posts: 73
Gender: Female
Credits: 5,964
solskenn is on a distinguished road
Default

the whole thing? or just the sidebar part?
Reply With Quote
  #12  
Old 03-31-2012, 08:08 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,370
SilverDragonTears is on a distinguished road
Default

Just the sidebar part will be fine.
__________________

Check out SilvaTales
Reply With Quote
  #13  
Old 04-01-2012, 06:42 AM
solskenn's Avatar
solskenn solskenn is offline
Member
 
Join Date: Mar 2012
Location: Ankh-Morpork
Posts: 73
Gender: Female
Credits: 5,964
solskenn is on a distinguished road
Default

Code:
function getsidebar() {
	//This function determines what shows in the side bar of the template
	$isloggedin = $GLOBALS['isloggedin'];
	$loggedinname = $GLOBALS['loggedinname'];
	if($isloggedin == "yes") {
		$msgctr = "<a href='messages.php'>Messages</a>";
		
		$stmt = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}messages WHERE touser='{$loggedinname}' and status='unread'");
	    $row = $stmt->fetchAll();

		if(count($row) > 0) {
		    $msgctr = "<a href='messages.php'>Messages <b>(".count($row).")</b></a>";
		}
		$sidebar = "You have {$GLOBALS['money']} {$GLOBALS['settings']['cost']}.<br />
		<a href='donate.php'>Donate money to friends</a><br />
		<ul>
		<li><a href='logout.php'>Log Out</a></li>";

		$stmt = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}users WHERE username='{$loggedinname}' and usergroup='1'");
	    $row = $stmt->fetch(PDO::FETCH_ASSOC);
		
		if(is_array($row)) {
			$sidebar .= "<li><a href='admincp/index.php'>Admin Center</a></li><br />";
		}

		$stmt1 = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}online WHERE username != 'Visitor'");
	    $row1 = $stmt1->fetchAll();
		$total1 = count($row1);
		$stmt2 = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}online WHERE username = 'Visitor'");
	    $row2 = $stmt2->fetchAll();
        $total2 = count($row2);
		$sidebar .= "<a href='online.php'>This site has {$total1} members and {$total2} guests online.</a></ul>";
	}
	else {
		$sidebar = "<b><u>Member Login:</u></b><br />
		<form name='form1' method='post' action='login.php'>
		  <p>Username: 
			<input name='username' type='text' id='username'>
		</p>
		  <p>Password: 
		<p>	<input name='password' type='password' id='password'>
		</p>
		  <p>
			<input type='submit' name='Submit' value='Log In'>
		  </p>
		</form>Don't have an account?<br /><a href='register.php'>Register Free</a><br /><a href='forgotpass.php'>Forgot Password?</a>";
		$stmt1 = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}online WHERE username != 'Visitor'");
	    $row1 = $stmt1->fetchAll();
		$total1 = count($row1);
		$stmt2 = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}online WHERE username = 'Visitor'");
	    $row2 = $stmt2->fetchAll();
        $total2 = count($row2);
		$sidebar .= "<br />This site currently has {$total1} members and {$total2} guests.";

	}
	return $sidebar;
}
I'm pretty sure this is all of it..
Reply With Quote
  #14  
Old 04-01-2012, 06:44 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,370
SilverDragonTears is on a distinguished road
Default

Where do you want your avatar to show up?
__________________

Check out SilvaTales
Reply With Quote
  #15  
Old 04-01-2012, 08:18 PM
solskenn's Avatar
solskenn solskenn is offline
Member
 
Join Date: Mar 2012
Location: Ankh-Morpork
Posts: 73
Gender: Female
Credits: 5,964
solskenn is on a distinguished road
Default

At the bottom, beneath where the "online members" is currently at.

While your poking in there, could I also ask that the "online members" be moved to above the links? If you just want to stick to adding the avatar then that's fine ^,^ Just thought I'd ask while you were already looking.
Reply With Quote
  #16  
Old 04-08-2012, 09:23 AM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 67,278
AlexC is an unknown quantity at this point
Default

I tried doing this as well - as well as the edit posted, but I'm getting the same error. D:
__________________
Reply With Quote
  #17  
Old 04-25-2012, 08:03 AM
Alaric Alaric is offline
Mod
 
Join Date: Nov 2011
Posts: 112
Gender: Male
Credits: 312,484
Alaric is on a distinguished road
Default

It shows me this when i refresh the page

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/989717/public_html/functions/functions.php on line 252
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
(How to...) Add user avatar to the sidebar with Mys v1.3.3 Hall of Famer Tutorials and Tips 3 12-28-2015 10:55 PM
Avatar uploading MikiHeart Feedback and Suggestions 11 11-13-2013 05:38 AM
Memberlist (user avatar) Alaric Questions and Supports 6 06-01-2012 02:28 AM
Avatar system AlkseeyaKC Suggestions and Feature Requests 1 01-14-2012 07:38 AM
User name and avatar RoconzaArt Questions and Supports 8 03-15-2011 10:02 AM


All times are GMT -5. The time now is 08:27 AM.

Currently Active Users: 9707 (0 members and 9707 guests)
Threads: 4,080, Posts: 32,024, 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