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 04-01-2012, 04:34 AM
StarGirl's Avatar
StarGirl StarGirl is offline
Member
 
Join Date: Feb 2012
Posts: 45
Gender: Female
Credits: 8,216
StarGirl is on a distinguished road
Default How to enable sig images

You know in your site settings, there's an option to turn on " Enable Alternate Friendly Signature BBCode". It says I need to change the .htaccess file to something that will make it work. So what exactly do I change in there? I see the file, I see the part that converts the links..

Also, I've tried to get user's avatars to show up on the profile.php page. I got it, but now users are shown twice, one after the other and I think some are mixed up. Can you help? [I have no programming experience, I simply copied the query and edited it]
Code:
	// We did not specify a user, so show the memberlist
	$article_title = "Memberlist";
	$article_content = "Here are all of the members of this site, sorted by registration date.<br /><br />";
    include("classes/class_pagination.php");
    include("css/pagination.css");
	$query = "SELECT * FROM {$prefix}users ORDER BY uid ASC";
	$stmt = $adopts->query($query);
	$rowsperpage = 15;
    $pagination = new Pagination($adopts, $query, $rowsperpage, "http://www.{$domain}{$scriptpath}/profile.php");
    $pagination->setPage($_GET[page]);

	$query = "SELECT * FROM {$prefix}users ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}";  
	$stmt = $adopts->query($query);

	while ($row = $stmt->fetchObject()){
		$status = cancp($row->usergroup);
        $star = ($status == "yes")?"<img src='icons/star-rating-full.png' border=0' width='15' length='15' /> ":"";
        
        $getavatar = "SELECT * FROM {$prefix}users_profile ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}";  
	$stmt2 = $adopts->query($getavatar);

	while ($avatarrow = $stmt2->fetchObject()){
		$article_content .= "<strong><a href='profile.php?user={$row->username}'>{$star}<img src='{$avatarrow->avatar}' width='25' length='25'>{$row->username}</a></strong><br />";
        }
	}

	$article_content .= "<br />{$pagination->showPage()}";

}

Last edited by StarGirl; 04-01-2012 at 05:14 AM.
Reply With Quote
  #2  
Old 04-04-2012, 04:45 AM
StarGirl's Avatar
StarGirl StarGirl is offline
Member
 
Join Date: Feb 2012
Posts: 45
Gender: Female
Credits: 8,216
StarGirl is on a distinguished road
Default

Anyone? :/
Reply With Quote
  #3  
Old 04-04-2012, 05:50 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: 333,756
Hall of Famer is on a distinguished road
Default

Well just get rid of these from your profile.php and you will find users showing up only once:

PHP Code:
    include("classes/class_pagination.php");    
    include(
"css/pagination.css");     
    
$query "SELECT * FROM {$prefix}users ORDER BY uid ASC";     
    
$stmt $adopts->query($query);     
    
$rowsperpage 15;     
    
$pagination = new Pagination($adopts$query$rowsperpage"http://www.{$domain}{$scriptpath}/profile.php");      
    
$pagination->setPage($_GET[page]); 
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #4  
Old 04-04-2012, 06:40 AM
StarGirl's Avatar
StarGirl StarGirl is offline
Member
 
Join Date: Feb 2012
Posts: 45
Gender: Female
Credits: 8,216
StarGirl is on a distinguished road
Default

I already fixed the showing up twice problem by changing it to..
Code:
	// We did not specify a user, so show the memberlist
	$article_title = "Memberlist";
	$article_content = "Here are all of the members of this site, sorted by registration date.<br /><br />";
    include("classes/class_pagination.php");
    include("css/pagination.css");
	$query = "SELECT * FROM {$prefix}users ORDER BY uid ASC";
	$stmt = $adopts->query($query);
	$rowsperpage = 15;
    $pagination = new Pagination($adopts, $query, $rowsperpage, "http://{$domain}{$scriptpath}/profile.php");
    $pagination->setPage($_GET[page]);

	$query = "SELECT * FROM {$prefix}users ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}";  
	$stmt = $adopts->query($query);

	while ($row = $stmt->fetchObject()){
		$status = cancp($row->usergroup);
        $star = ($status == "yes")?"<img src='icons/star-rating-full.png' border=0' width='15' length='15' /> ":"";
        
        $getavatar = "SELECT * FROM {$prefix}users_profile ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}";  
	$stmt2 = $adopts->query($getavatar);

	while ($avatarrow = $stmt2->fetchObject()){
	$avatar = ($avatarrow->avatar);
	}
	
		$article_content .= "<strong><a href='profile.php?user={$row->username}'>{$star}<img src='{$avatar}' width='25' length='25'>{$row->username}</a></strong><br />";
	}
	$article_content .= "<br />{$pagination->showPage()}";

}
Now the users are shown once, all have avatars next to them, but all the avatars shown are the same, and that avatar is the one of the newest user (last one on the list).
Reply With Quote
  #5  
Old 04-04-2012, 08:44 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: 333,756
Hall of Famer is on a distinguished road
Default

I see, looks like you did not retrieve the avatars from database successfully. Since usergroup and avatar info are stored in separate database tables, you will need to use the JOIN feature for your mysql query. The new Mys v1.3.1 database engine makes it all easy, I will show you how it will work when the new version is released.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #6  
Old 04-04-2012, 10:45 AM
StarGirl's Avatar
StarGirl StarGirl is offline
Member
 
Join Date: Feb 2012
Posts: 45
Gender: Female
Credits: 8,216
StarGirl is on a distinguished road
Default

Join feature ? So you mean I put a JOIN in the query?

Last edited by StarGirl; 04-04-2012 at 10:51 AM.
Reply With Quote
  #7  
Old 04-04-2012, 11:17 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: 333,756
Hall of Famer is on a distinguished road
Default

Well the JOIN keyword is used when you attempt to grab data from multiple database tables. The new script for Mys v1.3.1 will introduce a database class and a method called join() which makes things easier. I will show you an example later tonight after I return from classes.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #8  
Old 04-04-2012, 11:34 AM
StarGirl's Avatar
StarGirl StarGirl is offline
Member
 
Join Date: Feb 2012
Posts: 45
Gender: Female
Credits: 8,216
StarGirl is on a distinguished road
Default

I think i'll just wait for v1.3.1, this is confusing for me. :P
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
GD images mapleblade Mys v1.2.x Mods 11 03-04-2012 04:39 AM
breeding enable alt problem SilverDragonTears Questions and Supports 0 11-30-2011 10:32 PM
no images RoconzaArt Questions and Supports 1 03-13-2011 10:39 AM
I cant see the images zKaZy Questions and Supports 11 03-28-2010 11:49 AM
Images not showing Tequila Questions and Supports 22 03-07-2009 07:15 AM


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

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