[BETA] Dynamic Avatar

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
MasterClaus
Registered User
Posts: 68
Joined: Sun Feb 19, 2012 6:41 am
Location: Việt Nam

Re: [ALPHA] Dynamic Avatar

Post by MasterClaus »

Not update yet?
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy

Re: [ALPHA] Dynamic Avatar

Post by dellsystem »

Not yet. I'll update the repository on github once I've made progress.
Former moderator and website team member | My MODs, and more (GitHub)
User avatar
FB92
Registered User
Posts: 181
Joined: Sun Oct 02, 2011 8:34 pm

Re: [ALPHA] Dynamic Avatar

Post by FB92 »

Everything on the installation and admin side works fine. Yet, it won't show up in the avatar page. I've set it to required - yet the normal avatar settings are the only things on the avatar settings page.
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy

Re: [ALPHA] Dynamic Avatar

Post by dellsystem »

FB92 wrote:Everything on the installation and admin side works fine. Yet, it won't show up in the avatar page. I've set it to required - yet the normal avatar settings are the only things on the avatar settings page.
The avatar settings page in the UCP isn't supposed to change, this MOD only adds a new tab called "Dynamic avatar", under which you can adjust the avatar (see the demo - username=ash, password=ketchum). Does that tab not appear?

(A setting to disable the avatar page will be worked on for the next version.)
Former moderator and website team member | My MODs, and more (GitHub)
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: [ALPHA] Dynamic Avatar

Post by Jessica »

tried out the demo. loving it (:
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [ALPHA] Dynamic Avatar

Post by Mess »

Love it, great idea. And it looks awesome in the demo. Well done.
I'm guessing the hard part will be to find suitable graphics.
User avatar
Devilwillcry4you
Registered User
Posts: 41
Joined: Sat May 17, 2008 12:02 am
Location: Northeastern PA

Re: [ALPHA] Dynamic Avatar

Post by Devilwillcry4you »

Looking great is there a shop that will go with this also?
User avatar
FB92
Registered User
Posts: 181
Joined: Sun Oct 02, 2011 8:34 pm

Re: [ALPHA] Dynamic Avatar

Post by FB92 »

Yep worked it out thanks.

I'm just going to use the penguin if others want their own different avatar they can use the normal avatar system. Awesome MOD.
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy

Re: [ALPHA] Dynamic Avatar

Post by dellsystem »

Devilwillcry4you wrote:Looking great is there a shop that will go with this also?
I'm working on adding a shop feature to this MOD, and will release a new version when it's done :)
Former moderator and website team member | My MODs, and more (GitHub)
User avatar
Devilwillcry4you
Registered User
Posts: 41
Joined: Sat May 17, 2008 12:02 am
Location: Northeastern PA

Re: [ALPHA] Dynamic Avatar

Post by Devilwillcry4you »

Sounds great is there anything I can do to help?
vipaka
Registered User
Posts: 493
Joined: Sun Aug 28, 2011 7:25 pm

Re: [ALPHA] Dynamic Avatar

Post by vipaka »

This segment's template loops are throwing errors because it doesn't recognize what the layer_data information is. Printing the $layer_data variable makes this clear (there is no field for a lot of these values, but even the ones that are present aren't being recognized properly). 'Current' in particular seems to be a jquery-based value that isn't really defined anywhere...? The rest just aren't being assigned/called properly. I'll see if I can work it out myself (and if so post the solution). The values are all called properly (the images and names of items and layers are all working perfectly) but the errors in the header persist.

Hopefully you'll be rewriting this section anyways since this loops the data through all layers and items (not just user-specific items/layers for whatever items they've bought from the shop).

Code: Select all

// Get the user's items
				$sql = "SELECT *
						FROM " . DYNAMO_USERS_TABLE . "
						WHERE dynamo_user_id = $user_id";
				$result = $db->sql_query($sql);
				
				while ($row = $db->sql_fetchrow($result))
				{
					// Update the $layers array - current item
					// If there is no data in the dynamo users table, set to 0
					$layer_id = $row['dynamo_user_layer'];
					$item_id = $row['dynamo_user_item'];
					$layers[$layer_id]['current'] = $item_id;
				}
			
				// Create the template loops and stuff by looping through $layers
				foreach ($layers as $layer_id => $layer_data)
				{
//everything after this til the foreach tag is closed.
Errors:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 235: Undefined index: current
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 237: Undefined index: default
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 243: Undefined index: position
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 252: Undefined index: name
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 253: Undefined index: desc
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 255: Undefined index: mandatory
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 245: Undefined index: items
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 255: Undefined index: mandatory
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_dynamo.php on line 259: Undefined index: items
[phpBB Debug] PHP Warning: in file /includes/ucp/ucp_dynamo.php on line 259: Invalid argument supplied for foreach()
and this is the result of printing $layer_data

Code: Select all

Array ( [items] => Array ( [291] => Array ( [name] => Eyes Yellow [desc] => Yellow eyes [url] => ./images/dynamo/2-291.png ) [292]
x as many items as there are.
Curious about my work? See it for yourself.
Image
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy

Re: [ALPHA] Dynamic Avatar

Post by dellsystem »

Thanks for pointing that out vipaka. I'll look into when I get home. I will indeed be rewriting that section to account for the addition of the points MOD. What is //everything after this til the foreach tag is closed.? Is that just a comment you added yourself?
Devilwillcry4you wrote:Sounds great is there anything I can do to help?
You can test it out once the new version is released and report any issues you have :) If you have any experience with PHP and have a Github account, you can even open issues directly from the repository's issue tracker, or look through my commits and comment on them if you notice any issues.
Former moderator and website team member | My MODs, and more (GitHub)
vipaka
Registered User
Posts: 493
Joined: Sun Aug 28, 2011 7:25 pm

Re: [ALPHA] Dynamic Avatar

Post by vipaka »

Yes, I just commented out the rest of the template loops inside the foreach since they'd just take up space. If I remove them from the code, the errors go away but the template is also no longer functional (since the loops aren't there to call, lol).
Curious about my work? See it for yourself.
Image
User avatar
Devilwillcry4you
Registered User
Posts: 41
Joined: Sat May 17, 2008 12:02 am
Location: Northeastern PA

Re: [ALPHA] Dynamic Avatar

Post by Devilwillcry4you »

Will do that been testing it for awhile now and have some suggestions to make it more user friendly.
User avatar
Devilwillcry4you
Registered User
Posts: 41
Joined: Sat May 17, 2008 12:02 am
Location: Northeastern PA

Re: [ALPHA] Dynamic Avatar

Post by Devilwillcry4you »

Dell any updates on the integration of a shop and points mod?

Return to “[3.0.x] MODs in Development”