Hey guys, I am very excited about the release of this module for 6.x and about the fact that it hasn't broke anything or spit out errors, and I'm anxious to get this to work. I followed the directives in README.txt as well I could but still have no luck showing Meez on my users' profile pages. In a nutshell, I think I am confused as to exactly what the modifications to the profile.tpl.php and template.php need to be.

This is what I did:

Step 1: Appended to template.php:

function THEMENAME_user_meez($account,$version) {

  if ($account->avatars[$version]->src) {
    $picture = $account->avatars[$version]->src;
  }
  else if (variable_get('user_picture_default', '')) {
    $picture = variable_get('user_picture_default', '');
  }

  if (isset($picture)) {
    $alt = t("@user's profile", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));
    $picture = theme('image', $picture, $alt, $alt, '', FALSE);

    if (!empty($account->uid) && user_access('access user profiles')) {
      $picture = l($picture, "user/$account->uid", array('title' => t("View @user's profile.", array('@user' => $account->name))), NULL, NULL, FALSE, TRUE);
    }

    return '<div class="picture">'. $picture .'</div>';
  }
}

I copied and pasted this exactly like that. As there was no mention of needing to alter any of that, I assumed this was plug and play. After a bit of digging on here I noticed some mention of that the readme function used to read theme_user_meez() but it was updated to THEMENAME so that users would think to change out THEMENAME with their theme's name. Unsure of exactly which name needs to go here, I changed my code to:

function a3_atlantis_user_meez($account,$version) {

Where a3_atlantis is the name of the folder containing the theme I am using. Is the underscore causing an issue? The actual "name" in the theme .info has a space between the words, which I assume would be even worse to try.

If I am doing something wrong in this step, would it be a good idea to be more specific about what goes in the template.php for casual users in a new README.txt? What should THEMENAME read as? I am going to change my theme's folder to be something without an underscore and try this way to see if it may be a naming incompatibility issue, but since I'm sure that is probably not the issue, I'll only respond if that DID fix anything. If you don't hear back from me assume it accomplished nothing.

Step 2: Created a user-profile.tpl.php

This works beautifully, changed some things to make sure I did it right. My user-profile.tpl.php looks like this, as per README.txt:

<div class="profile">

<?php
  theme('user_meez', $account, 'body_sm')
?>
<?php print $user_profile; ?>

</div>

I get no errors, but no results, either. I'm assuming everything else works well on the admin module settings because that part seemed very straightforward and when I updated my profile to add my Meez name it first gave me some sort of error that said something wasn't working at the time, kept hitting submit until it actually went through. Now my Meez username shows on my profile listing.

CommentFileSizeAuthor
#1 318839_meez_6x_upgrade_extras.patch3.36 KBgreggles

Comments

greggles’s picture

Component: Documentation » Code
Category: support » bug
StatusFileSize
new3.36 KB

Well, let's start with the 6.x version didn't work for a variety of reasons :(

I've attached a patch which fixes that and fixes the feature to make the meez avatar show up on the profile page by default (i.e. without having to mess with the template). That is the "for Dummies" way of getting this to show up, of course - without template code :)

So, can you try this out?

greggles’s picture

Status: Active » Needs review
Babalu’s picture

subscribe

greggles’s picture

@Babalu - could you try the patch I posted?

Babalu’s picture

yes i try it on the weekend

krikette’s picture

Yay thanks! I'm excited!

I don't know how to patch, but I do know what the things in the file mean so I may manually remove/replace the items from the patch and see how it works :D

greggles’s picture

Assigned: Unassigned » greggles
Status: Needs review » Fixed

Well, it's certainly true that patch files are no fun if you aren't comfortable using them and since this module was definitely broken before and at least somewhat working now I've committed this patch. In about 6 hours you should see that the release node http://drupal.org/node/279605 has been updated to code from today which will be an indication that the changes are included and you can just download that file.

Please do let me know if it works.

krikette’s picture

Ohh, whoops. hehe

Well I dug through the patch and just removed all the [-] lines from the module file, and then replaced with [+].

I haven't gotten a chance to use the upload you posted, but this method worked fine for me with one exception.. After I put in my changes and reinstalled the module, got an error about there being no dsc() function.

So I went back through and removed:

dsc($picture);

Works fine. :)

Thanks so much! I'll go back in a bit and grab the newest module and try it - could be that the error I was getting was due to my own fault from mucking around with something I don't have the knowledge to be playing in. Cheers!

greggles’s picture

Great, I fixed that in the code as well (whoops - that's a debug function!) so it should be fine when the tar.gz gets created later today.

pillarsdotnet’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.