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.

Requests or development advice/assistance

edited August 2006 in Vanilla 1.0 Help
There are several things I want Vanilla to do, which will require extensions.

I realize these won't appear overnight, and some will take more work/time than others. What I'm looking for is either someone willing to develop each (for anyone to use), or, can point me in the right direction (Vanilla-specific info: how to extend which classes? what delegates to use?) for how to achieve them myself, to share. :)

Some I tried on my own, but I soon got frustrated since I wasn't sure if I was even going about it the right way, if it was even possible (perhaps necessary delegates don't exist? etc). I'm slightly past a beginner with classes, I'm just struggling a bit to figure out "the Vanilla way" to do things. :)
  • Registration via email verification
  • Email pref: display, hide or email form
  • Permissions
    • Category: view, add discussion, add comment (with ability to add individual users, rather than just roles, to keep the number of roles down)
    • User: view profile, send/view email
  • Sub-categories
  • "areas" (i.e: the equivalent of "categories" in traditional forums)
  • Split(/merge) comments, with option to create a post which would appear first in the new discussion (where you can explain what discussions the comments were taken from, for example)
  • discussion tooltip preview (ala VBulletin)
  • on categories list, display category title in bold if it has new discussions within it
  • display user title in discussion
A tall order, huh? As I said, I'm not expecting miracles. I'm more than willing to work on them myself, I just need some coaching. :)


  • im sure some will be easy such as display user title in discussion, it might even be a one line php thing and some css and themeage. This might be same with the bold categorie titles if new post. Ill look further in the morning.
  • I dont understand why people are so eager to copy other forums and create extensions for it (like sub-categories). Build something new that doesnt exist in other forums.
  • I build or aquire what I need, not what others need or think is stylish.

    Thanks Immersion, your help is appreciated. :)
  • edited August 2006
    The Registration via email should be easy to do:
    • The user apply and get the applicant role; a Verification Key need to be created, save in the database and sent by mail to the applicant (like in the RequestPasswordReset function in UserManager). You should already have the delegations in the CreateUser fonction in People.Class.UserManager;
    • The applicant follow the link, the key is verified and the user get a new role. that's a new PostBackControl for people.php to create.
    You also need to add a checkbox in the Registration panel in the setting page to enable this feature. You will need a delegation in settings_registration_form.php
    and in People.Control.RegistrationForm
  • Thanks Dinoboff, that really helps. :)
  • hi mary, nice to see you here too :-)

    user title in discussion: do it with a theme. Make a new theme folder with a new name, copy discussion.php (individual discussion posts) or discussions.php (discussion overview) into that folder and edit the copies. Take a look at account_profile.php for the names of the item you want (e.g. for User name: $this->User->Name; for user role: $this->User->Role) and add these where you want them to discussion(s).php.

    You can use a similar approach for the tooltip preview I guess too.

    Ah yes, lastly, choose your theme in the settings.
  • comments.php was the file I wanted. Thanks Jakob. :)
  • Hmm. How can I attach a new form to a user's profile page? I can create a new control to stick on account.php which mostly works (validate input, etc), but, only by itself: I can't get at the profile user info (most specifically, their id, username and email address), or figure out how to have the form and profile info both always visible. Have I run into a wall?
  • edited August 2006
    Not sure what you mean. Do you mean a new form to the personal information? If so, you should check this extension.
  • Yes, that's what I mean. Thanks. :)
  • Mm, this won't work - that adds to the existing form, I want to add a new (separate) form.
  • edited August 2006
    Still not sure what you mean. Do you what a new page with your own form (with a new link in the account option) in the account page ?
  • I'd wanted it so that on a user's profile page, after the user's details, the contact form would appear (by necessity, a separate form, rather than adding to the existing one).

    Try on a separate page, I haven't been able to figure out how to gain access to the user data, for the profile you're currently looking at.
  • edited August 2006
    For the details of the profile you're currently looking at, use $UserID = ForceIncomingInt('u', $Context->Session->UserID); $UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager'); $User = $UserManager->GetUserById($UserID); echo $User->Name; echo $User->Email; ...
    For the visitor details, it's just $Context->Session->Name and $Context->Session->Email...
    See the People User class to see all the properties of the User object.
  • edited August 2006
    I think you do this way function EmailForm(&$Context) { ... $UserID = ForceIncomingInt('u', 0); $UserManager = $Context->ObjectFactory->NewContextObject($Context, 'UserManager'); $User = $UserManager->GetUserById($UserID); ... } Render() { this->PostBackParams->Set('PostBackAction', 'ProcessEmailForm'); $this->PostBackParams->Set('u', ForceIncomingInt('u', $Context->Session->UserID)); echo '<div id="Form" class="EmailForm"> <fieldset> <legend>Email Form</legend>'; $this->CallDelegate('PreWarningsRender'); echo $this->Get_Warnings() .$this->Get_PostBackForm('frmEmailForm'); $this->CallDelegate('PreInputsRender'); echo '<ul> <li> <label for="SubjectEmailForm">Subject <small>(required):</small></label> <input type="text" name="SubjectEmailForm" value="" maxlength="100" class="SmallInput" id="SubjectEmailForm" /> </li> ...} $this->CallDelegate('PostRender'); } $EmailForm = $Context->ObjectFactory->NewContextObject($Context, 'EmailForm'); $Page->AddRenderControl($EmailForm, $Configuration["CONTROL_POSITION_BODY_ITEM"] + 1); $Panel->AddList('Email Options', 10); $Panel->AddListItem('Email Options', 'Email this user', GetUrl($Context->Configuration, 'account.php', '', '', '', '', 'PostBackAction=EmailForm'));
  • Thanks, that tells me what I needed to know. :)
  • I just a added the Validation via email extension on the addons page
  • Thanks again by the way. I'm so absurdly busy I kept forgetting to email you back. :)
  • np, I happy to work on it ;-)
  • Good to see these requirements being ticked off! There's a point which hasn't been addressed yet: * Category: view, add discussion, add comment (with ability to add individual users, rather than just roles, to keep the number of roles down) anyone making progress on this? it's becoming a bit of a show stopper :(
This discussion has been closed.