MyBB Community Forums

Full Version: Portal, Rep & Ava
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The image is from the portal. Shouldn't there be text? Is there a setting that I've missed.

Is it possible to change users reputation via admin pan?


EDIT;
Is it possible to disable off-site avatar? I don't want my users to have a custom avatar as I plan to use it as a reward system. Smile
Primus Wrote:Is it possible to change users reputation via admin pan?

Not by default, as that would defeat the purpose of having the system. If you must, you can figure it out in the mybb_users table in the 'reputation' column.
*bumb* Sorry about that.

The rep thing isn't that big of a deal, but what about the two other things?

Disabling off-site avatar and the portal problem?

Smile
I guess you could remove this part from the 'usercp_avatar' template:

<tr>
<td class="trow2" width="40%"><strong>$lang->avatar_url</strong></td>
<td class="trow2" width="60%"><input type="text" name="avatarurl" size="45" value="$avatarurl" /></td>
</tr>

and remove this from usercp.php
	else
	{
		$mybb->input['avatarurl'] = preg_replace("#script:#i", "", $mybb->input['avatarurl']);
		$ext = getextention($mybb->input['avatarurl']);
		if(preg_match("#gif|jpg|jpeg|jpe|bmp|png#i", $ext) && $mybb->settings['maxavatardims'] != "")
		{
			list($width, $height) = @getimagesize($mybb->input['avatarurl']);
			list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']);
			if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
			{
				$lang->error_avatartoobig = sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
				error($lang->error_avatartoobig);
			}
		}
		$db->query("UPDATE ".TABLE_PREFIX."users SET avatar='".addslashes($mybb->input['avatarurl'])."', avatartype='remote' WHERE uid='".$mybb->user['uid']."'");
		remove_avatars($mybb->user['uid']);
	}
Bumbed.

I removed the part from usercp_avatar template, checked UserCp in the forums and it works.

Would it create problems if I leave the usercp.PHP untouched? I haven't done so yet...
but changing something in template will affect the whole users, and as i heard he wanna give it as promotion for some members so changin in templating wont help in his case!!

Confused
If users can't see the 'Off Site Avatar' field in their UserCP, they can't use a linked avatar, right?

What they can is choose an avatar from the gallery.

And as a reward, I will give the ability to upload an avatar (/change the group).

Did some testing, and all seem to be ok. Any thoughts? Smile
i think u will have to edit their account and add the avatar , coz instead of that , u will need to again make the template !! then the link will appear to all ??? am i right

chaning this part in templating doesn\t affect only one group of persons


regardsWink
Yeah if you delete it from the template, all users won't be able to do that offsite avatar. You need a more complex modification to make it part of a 'rewards system'
I know that. I doesn't matter that no one can't use offsite avatar.

There's still default gallery and upload avatar choices.