Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

[Request] Discovery Recovery

TreyTrey Charlotte NC New
edited July 2006 in Vanilla 1.0 Help
I've been fiddling around trying to make this into some sort of extension for a few hours now and couldnt get it to work properly. What I'm trying to do is add another box on the users account page, in the same manner that the role history is displayed, and for it to display how the person discovered the forum / why they would like to become a member. It would be nice if only certain people with higher powers (maybe those of who thats able to hide discussions) could see it just so it wouldnt be out in the open for everyone.

I was playing around with the account_profile.php file and found that I could echo out $this->User->Discovery and it would show what the user put in for that field, but that was the closest I've gotten to getting this to work.

Hopefully this wouldnt be to hard to implimend into an extension, and I thought I could do it but as of right now I cant get it to work right. Maybe even a few steps toward the right direction would be good for me to complete the task.

Comments

  • Options
    lechlech Chicagoland
    trey, toss up your code or plant it online somewhere, I like the sound of this.
  • Options
    TreyTrey Charlotte NC New
    everytime I tried to get it to work I wasnt able to succeed. I'm not to best with dealing with classes, I mainly know how to create and use functions of that matter and I believe I would have to extend on some class to be able to get the discovery again without having to run another database query.

    like I said though, If I would go to the account_profile.php file within the themes directory and add the following..
    <li> <h3>Discovery Recovered</h3> <p>'.$this->User->Discovery.'</p> </li>
    to it, it would show what the person put in for that feild, but I would rather have it as an extension versus modifying that file
  • Options
    lechlech Chicagoland
    Hmmm, I was expecting more, but I suppose it's a start...
  • Options
    MarkMark Vanilla Staff
    Before the applicants are approved, the discovery information appears on the top-right of the account page. If you want to know how to make it appear, take a look at the existing discovery extension and see how it was done there.

    One thing I should note is that the "discovery" db field doesn't come with Vanilla's default installation. It is added by the discovery extensions, so you should also either note that (a) your new extension relies on the original one being installed or (b) make sure that the field exists when the extension is enabled.
  • Options
    TreyTrey Charlotte NC New
    thanks for the tip with looking at that extension, I didnt think of that. I messed with it a little bit just now but didnt get very far with it =/. I'll take another stab at it when I get home later.
This discussion has been closed.