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

Extension Idea: LDAP Lookup

edited August 2006 in Vanilla 1.0 Help
I use Vanilla as the Forum for my college at University. Within University there is a LDAP Server which is useful for looking up students, lecturers and staff and provides information such as their phone number, email address, username, department/course and homepage URL. I'm familiar with PHP and had a quick play with creating a test extension based on the examples on the documentation, it looks fairly easy to add elements to the sidebar for example, however I haven't got a clue how I would go arround adding a completely new Search function (eg. so you can enter your keywords on Search.php, but then select a new 'Directory' option). How exactly would this be achieveable in an extension? Thanks, Alex

Comments

  • Options
    MarkMark Vanilla Staff
    edited July 2006
    The library/Vanilla/Vanilla.Control.SearchForm.php control has delegates that you can attach to in order to accomplish this.

    You can attach to the PreSearchQuery delegate to add your new radio option to the SearchForm->TypeRadio select control and to perform the search on your ldap data source.

    You can attach to the PreSearchResultsRender delegate to display your search results. Sadly I didn't make the searchform control as slick as I could have, but you can still accomplish it by including the search_results_top.php and search_results_bottom.php templates yourself and then stopping execution of the method.
  • Options
    Thanks, I'll take a look Thanks again for such a great application :)
  • Options
    MarkMark Vanilla Staff
    I think next revision I will change that control so this type of thing is a little easier.
  • Options
    MarkMark Vanilla Staff
    edited July 2006
    If you are going to attempt to accomplish this and you want the latest version of the SearchForm (that makes this a bit easier), you can get it from the subversion repository here: http://lussumo.com/svn/vanilla/trunk/library/Vanilla/Vanilla.Control.SearchForm.php (I added that MidSearchResultsRender delegate and fixed the if statement that decides which type of results to display)
  • Options
    Hi I am looking for someone to help me with my dilemma. I use my forum for my high school alumni class and I needed to have a phone number field where members can input their phone number for every alumni to see incase they needed to call an old classmate. I can't code PHP that's why I need someone's help. Please please help a fellow Canadian Mark :(
  • Options
    its not funny, bentot
This discussion has been closed.