Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How can i remove Relationship status and change "College" text

jone68jone68 New
edited September 2011 in Vanilla 2.0 - 2.8
Nice plugin Thank you very much!

Two questions 1. How can i remove Relationship status future?
2. How can i change "College" i'd like to make it like "College/University"

Thank you,
Tagged:

Best Answer

  • You have total control over the About Me plugin. just follow these steps
    1, open the About me folder under plugins in your web directory: .../Plugin/AboutMe
    2, Open the default.php file and remove the " ->Column('RelStat', array('s','m','i','d','w'), FALSE)" line from the code. and save
    3, Open the Views folder inside AboutMe
    4, Open aboutme_edit and remove both the relationship define code and the relationship status code lines.
    5, Go to the college line and replace it with the desired name and save
    6, open avoutme_view
    7, rename the college in "$College = $this->AboutMe->Col;" but do not change the "col" unless you want to rename the table, which has to be done in default.php too.
    save the changes and re-enable the plugin to effect the changes.

    i did many stuffs like that on my forum: http://forum.ynet-ng.com.

Answers

  • You have total control over the About Me plugin. just follow these steps
    1, open the About me folder under plugins in your web directory: .../Plugin/AboutMe
    2, Open the default.php file and remove the " ->Column('RelStat', array('s','m','i','d','w'), FALSE)" line from the code. and save
    3, Open the Views folder inside AboutMe
    4, Open aboutme_edit and remove both the relationship define code and the relationship status code lines.
    5, Go to the college line and replace it with the desired name and save
    6, open avoutme_view
    7, rename the college in "$College = $this->AboutMe->Col;" but do not change the "col" unless you want to rename the table, which has to be done in default.php too.
    save the changes and re-enable the plugin to effect the changes.

    i did many stuffs like that on my forum: http://forum.ynet-ng.com.
  • @Mr_White Thanks! that works :)
  • im trying to delete the "real name" option. but im having trouble...
  • This didn't seem to work for me. Although I've followed the steps, when I fill out the form, I get an error telling me that RelStat is a required field. I'd like to strip down most of the fields in this plugin (and be left with about 5) but the BD and the RelStat seem to linger even after I delete them in the two spaces mentioned above.

  • try disabling the plugin and then re-enabling. Try deleting the appropriate table in the datatbase as well. I got it working, but I don't remember what I did.

  • @achu
    I dont know

  • Sorry, I've been extremely busy, and since the community had answered the question before I could, I did not bother adding my two sense.

    I will be releasing a newer version in the near future that allows administrators to disable / enable all of the fields, as well as privacy settings for the user.

    In this version I will be sure to make more of the display text utilize the translation feature, then changing the name as mentioned above would be as easy as adding the translation to the proper file.

  • @zodiacdm: Yes, that would be great to be able to enable/disable fields in the admin-settings. For people who do not understand PHP it is quite hard to edit such details.

    Also easier translation would be greatly appreciated.

    Thanks in advance,
    Robert

  • This give you more flexibility to do what you want:
    http://vanillaforums.org/addon/myprofile-plugin

    grep is your friend.

  • For those of you still struggling to make the relationship field not required, I've worked out the secret. Note that I was not trying to remove it, just make it not required.

    Step 1: Open up your vanilla folder, then go to plugins, AboutMe, and open default.php

    Find this: ->Column('RelStat', array('s','m','i','d','w'), FALSE)
    And change it to this: ->Column('RelStat', array('p','s','m','i','d','w'), TRUE)

    Step 2: If you are able to reinstall the plugin, uninstall it and then reinstall it now

    -OR-

    If you have been using this plugin on a live site and CANNOT afford to remove all the user info and start over, you will need to go into your MySQL. On the table AboutMe, change the column RelStat enum to include a possible value of 'p'. You can change the column to also allow null values, but it won't matter the way the form is set up. More info on mysql enum: http://dev.mysql.com/doc/refman/5.0/en/enum.html

    Whether you chose to reinstall or edit your mysql tables, there is one more thing to do.

    Step 3: Go to plugins > AboutMe > Views and open aboutme_view.php

    Find this line: <?php } if(!empty($this->AboutMe->RelStat )) { ?>

    And change it to this: <?php } if(!empty($this->AboutMe->RelStat ) && $this->AboutMe->RelStat != "p") { ?>

    Done

    Hope this helps someone else out there. :)

Sign In or Register to comment.