bypassing the Avatar links in Profile settings/Registration

Forum
Last Post
Threads / Messages

Ittermat

The awesomesauce
Member
Joined
Feb 2, 2016
Messages
304
Points
18
Location
in front of my laptop
Mysidian Dollar
21,294
I want a way to not have that text box appear in either place. since we have premade avatars.

Is there a way to do this by replacing it with an database update code?

Like for registration- something like..
PHP:
$mysidia->db->update("users", ["avatar" => "https://atrocity.mysidiahost.com/picuploads/default_avatars/default.png"], "uid = {$mysidia->user->uid}");


<s>Then for the profile settings
PHP:
$mysidia->db->update("users", ["avatar" => "https://atrocity.mysidiahost.com/picuploads/useravatars/{$User->username}"], "uid = {$mysidia->user->uid}");
</s>


I just dunno what to put in instead or how to actually do it without screwing stuff up... Or if this would even work/is possible.

EDIT Genetic Alpha helped me with the Profile settings one... I just need help with register XD
 
Last edited:
At file /view/registerview.php, remove these 3 lines:
PHP:
        $additionalField->add(new Comment("Avatar: ", FALSE, "b"));
        $additionalField->add(new Comment("Enter the url of your avatar beginning with http://www."));   
        $additionalField->add(new TextField("avatar", "templates/icons/default_avatar.gif"));

Also in future, click the icon with 3 vertical dot and select </> to insert your PHP code into the appropriate BBcode. This will make your code a lot more readable.
 
In addition to Famer's reply, to delete the avatar area in user's profile settings, you want to go to accountview.php then delete this code:

$profileForm->add(new Comment("Avatar: ", FALSE));
$profileForm->add(new TextField("avatar", $profile->getAvatar()));​


and in account.php this:
"avatar" => $mysidia->input->post("avatar"){/QUOTE]​

I think that's about it.​
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,274
Messages
33,113
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top