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 12-24-2014, 01:20 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 113,786
Abronsyth is on a distinguished road
Default Editing Contact Options

I know I'm asking a lot of questions XD Just trying to fix some things before that I never bothered with.

So in the user's account they have the option to share their facebook and messaging accounts. I would like to remove this as I don't want users to be able to share such personal information on their public profiles.

Then I'd like to add in a Deviantart and Forum account section.

I've looked through accountview.php and lang_account, and while I found the contact section in view, I couldn't find a way to remove specific feilds.

Would someone be able to point me in the right direction?
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #2  
Old 12-24-2014, 02:29 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,396
IntoRain is on a distinguished road
Default

Well, you will have to modify the database first to add in the deviantart and forum account option. Go to your database and add two columns, one for deviantart and the other for the forum

Assuming you called those columns "deviantart" and "forumaccount":

Go to your class_member.php and search for the formatcontacts() function. Then change this line:

PHP Code:
$sites = array("website""facebook""twitter""deviantart""forumaccount"); 
Now go to account.php and change these lines:

PHP Code:
    public function contacts(){
        
$mysidia Registry::get("mysidia");        
        if(
$mysidia->input->post("submit")){
            
$newmsgnotify = ($mysidia->input->post("newmsgnotify") == 1)?1:0;
            
$mysidia->db->update("users_options", array("newmessagenotify" => $newmsgnotify), "username='{$mysidia->user->username}'");

//change this line, add in the ones you want to update, delete the ones you removed from the ArrayList below
            
$mysidia->db->update("users_contacts", array("website" => $mysidia->input->post("website"), "twitter" => $mysidia->input->post("twitter"), "skype" => $mysidia->input->post("skype"), "deviantart" => $mysidia->input->post("deviantart"), "forumaccount" => $mysidia->input->post("forumaccount")), "username = '{$mysidia->user->username}'");
            return;
        }
        
        
$contactList = new ArrayList;    
//remove the lines you dont want, add in the new ones. These have to match the mysidia->db->update commented above
        
$contactList->add(new String("website"));
        
$contactList->add(new String("deviantart"));
        
$contactList->add(new String("forumaccount"));
        
$contactList->add(new String("twitter"));    
        
$contactList->add(new String("skype"));    
        
$this->setField("contactList"$contactList);
    } 
By now, your users are able to edit their deviantart account and can't edit facebook account anymore (in the /account/contacts link).
To change the display in the user's profile (/profile/view/User link), go to class_userprofile.php, contactinfo() function and edit the lines like:

PHP Code:
  private function contactinfo($contacts){
      
$mysidia Registry::get("mysidia");    
      
$document $mysidia->frame->getDocument();    
      
$member = new Member($mysidia->input->get("user"));
      
      if(
$mysidia->user->uid == $member->uid){
      
$document->add(new Image("templates/icons/web.gif""web"));
      
$document->add(new Comment($contacts->website));

      
$document->add(new Image("templates/icons/twitter.gif""twitter"));
      
$document->add(new Comment($contacts->twitter));    
  
      
$document->add(new Image("templates/icons/skype.gif""skype"));
      
$document->add(new Comment($contacts->skype));

//for example I removed the facebook, msn, etc. lines and added these ones:
      
$document->add(new Image("_deviantart_image.gif""deviantart"));
      
$document->add(new Comment($contacts->deviantart));

      
$document->add(new Image("_image_.gif""forumaccount"));
      
$document->add(new Comment($contacts->forumaccount));

      
$document->add(new Image("templates/icons/title.gif""Write a PM"));
      
$document->add(new Link("messages/newpm/{$mysidia->input->get("user")}""Send {$mysidia->input->get("user")} a Private Message"TRUE));
      
$document->add(new Image("templates/icons/fr.gif""Send a Friend Request"));
      
$document->add(new Link("friends/request/{$member->uid}""Send {$mysidia->input->get("user")} a Friend Request"TRUE));
      
$document->add(new Image("templates/icons/trade.gif""Make a Trade Offer"));
      
$document->add(new Link("trade/offer/user/{$member->uid}""Make {$mysidia->input->get("user")} a Trade Offer")); 
      } 
  } 
__________________


asp.net stole my soul.

Last edited by IntoRain; 12-24-2014 at 02:32 PM.
Reply With Quote
  #3  
Old 12-24-2014, 03:19 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 113,786
Abronsyth is on a distinguished road
Default

Aaah awesome!

Thank you very, very much!

Kind of surprised I managed to add the columns XD
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #4  
Old 12-24-2014, 07:06 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,396
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by Abronsyth View Post
Aaah awesome!

Thank you very, very much!

Kind of surprised I managed to add the columns XD
I'm glad it worked out! ^^
__________________


asp.net stole my soul.
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
Editing Images with PHP PTGigi Tutorials and Tips 9 04-13-2015 09:25 PM
Editing adoptables Papyrus Questions and Supports 2 01-24-2012 05:53 AM
Some More Breeding Options AlexC Suggestions and Feature Requests 7 01-06-2012 01:06 PM
Extra Options for ROOT Admins Ashje Questions and Supports 7 07-14-2009 10:44 PM
Editing pages. Saphira Questions and Supports 1 01-11-2009 04:46 PM


All times are GMT -5. The time now is 01:34 AM.

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