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
  #1  
Old 03-28-2012, 06:13 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,281
SilverDragonTears is on a distinguished road
Default Avatar in menu

Trying to get the user's avatar to show up by placing it in the functions.php with the links. I'm failing though... any ideas?
__________________

Check out SilvaTales
Reply With Quote
  #2  
Old 03-28-2012, 07:09 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,281
SilverDragonTears is on a distinguished road
Default

Of course 10 minutes after I posted I figured it out... Will post if anyone is interested.
__________________

Check out SilvaTales
Reply With Quote
  #3  
Old 03-28-2012, 03:44 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 67,174
AlexC is an unknown quantity at this point
Default

I'm interested in that - I've wanted to do that for ages. D:

you have the coolest mods.
__________________

Last edited by AlexC; 03-28-2012 at 03:50 PM.
Reply With Quote
  #4  
Old 03-28-2012, 05:38 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,281
SilverDragonTears is on a distinguished road
Default

My script is different than yours.... so I don't know the proper lines but...

Code:
		$sidebar = "You have {$GLOBALS['money']} {$GLOBALS['settings']['cost']}.<br />
		<a href='donate.php'>Donate money to friends</a>";

                
	        $stmt = $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}users_profile WHERE username='{$loggedinname}'");

	        while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
	$avatar=$row['avatar'];
		$sidebar .= "<img src='{$row['avatar']}' border='0' width='100px' height='100px'><br><br>
                <a href='index.php'>Home</a>
		<a href='adopt.php'>Dragon Lair</a>
		<a href='pound.php'>Abandoned Lair</a>
Lemme know if you need help. And anything else on my site you like let me know. I can try to tell you how to do it.
__________________

Check out SilvaTales
Reply With Quote
  #5  
Old 03-28-2012, 05:56 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 67,174
AlexC is an unknown quantity at this point
Default

I'll try it soon. Gotta do some homework. xD Thank you!

(den mod, deeeeennnn moooooddddd srsly it is awesome.)
__________________
Reply With Quote
  #6  
Old 03-31-2012, 01:12 PM
solskenn's Avatar
solskenn solskenn is offline
Member
 
Join Date: Mar 2012
Location: Ankh-Morpork
Posts: 73
Gender: Female
Credits: 5,962
solskenn is on a distinguished road
Default

I'm still having problems getting this to work. No matter where/how I put the code in it still says something like "error on line..." and when I check that line it was a code that worked before.

This is practically the default code, with minor edits for my site. Can you help?




Code:
//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>";
Reply With Quote
  #7  
Old 03-31-2012, 01:29 PM
StarGirl's Avatar
StarGirl StarGirl is offline
Member
 
Join Date: Feb 2012
Posts: 45
Gender: Female
Credits: 8,196
StarGirl is on a distinguished road
Default

solskenn, try this:
PHP Code:
//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>";
        }

            
$getavatar $GLOBALS['adopts']->query("SELECT * FROM {$GLOBALS['prefix']}users_profile WHERE username='{$loggedinname}'");

            while(
$row $getavatar->fetch(PDO::FETCH_ASSOC)) {
    
$avatar=$row['avatar'];

        
$sidebar "<img src='{$row['avatar']}' border='0' width='100px' height='100px'><br>
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>"

[Sorry, I know the question wasn't directed towards me. :P]
Reply With Quote
  #8  
Old 03-31-2012, 03:18 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,281
SilverDragonTears is on a distinguished road
Default

What version are you using of the Mys script?
__________________

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

v1.3 and I've only made small edits to the software (usually microscopic changes in a file).

I tried yours Stargirl and I got another "error in line.." message.
Reply With Quote
  #10  
Old 03-31-2012, 05:23 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,281
SilverDragonTears is on a distinguished road
Default

Can you post your script here so I can take a look?
__________________

Check out SilvaTales
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 11:19 AM.

Currently Active Users: 8878 (0 members and 8878 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