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.

Need help by creating a addon

edited April 2007 in Vanilla 1.0 Help
hello! i want to create a addon for my community but i don't know how to start. When you are logged in as user there should be a new tab in the menu and by clicking on this tab you should be redirected to a form. the addon should read a string in the Database, if this string is "0" the form shouldn't be shown. insted there should be a notify message "you have 0 credits". if the user has more than 0 credits the addon should redirect you to the form. i don't know how to start. :'(

Comments

  • edited April 2007
    First Create Mockups
    this shouldn't require a new extension.
    U can do this using page Manager, and by adding a field in the database.
    Page Manager supports php, so u will write ur code and make a page of it

    explain with mockups what is it ur trying to do. perhaps other people might find it useful as well
  • to add a menu tab, you use this code:$Menu->AddTab($Text, $Value, $Url, $Attributes = '', $Position = '0', $ForcePosition = '0');
    For instance$Menu->AddTab("My Page", "mypage", "extension.php?PostBackAction=mypage");

    To display this page, you must "catch" this postback like this: if ( ('extension.php' == $Context->SelfUrl) && isset($_GET['PostBackAction']) && $_GET['PostBackAction'] == "mypage") { [.... page content .... ] }

    That should get u started. And for the rest, for proper help, ask proper questions. So make mockups. Schizo is fond of them, if you search around, you can find a few he has made. They are good examples :)
This discussion has been closed.