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

if ($this->IsPostBack) {

y2kbgy2kbg New
edited January 2007 in Vanilla 1.0 Help
if ($this->IsPostBack) {
why doesn't this return true on the settings page? What does this actually check?

Comments

  • Options
    First, which settings page is this on? I couldn't find it.

    Second, I just started using Vanilla 2 or so days ago...but, IsPostBack checks for if a submit button has been pressed (this is what a postback is).
  • Options
    library/Framework/Framework.Class.Control.php - line 74

    yes, this IsPostBack lets you know if a form has just been submitted
  • Options
    well it is used in an extension here to make a settings page:

    function Render() { if ($this->IsPostBack) { $this->CallDelegate('PreRender'); $this->PostBackParams->Clear(); if ($this->PostBackAction == "Friends") { $this->PostBackParams->Set('PostBackAction', "ProcessFriends"); echo ' <div id="Form" class="Account FriendsSettings"> <fieldset> <legend>'.$this->Context->GetDefinition("Friends_Settings").'</legend> '.$this->Get_Warnings().' '.$this->Get_PostBackForm('frmFriends').' <H2>Some General Options:</H2> ' . GetDynamicCheckBox('Friends_AllowGuests', 1,$this->ConfigurationManager->GetSetting('Friends_AllowGuests'),'',$this->Context->GetDefinition("Friends_AllowGuests_Description")) . ' ' . GetDynamicCheckBox('Friends_Request', 1,$this->ConfigurationManager->GetSetting('Friends_Request'),'',$this->Context->GetDefinition("Friends_Request_Description")) . ' ' . GetDynamicCheckBox('Friends_PeoplesTab', 1,$this->ConfigurationManager->GetSetting('Friends_PeoplesTab'),'',$this->Context->GetDefinition("Friends_PeoplesTab_Description")) . ' <br><H2>Select the Columns you would like to display:</H2> ' . GetDynamicCheckBox('Friends_NameCell', 1,$this->ConfigurationManager->GetSetting('Friends_NameCell'),'',$this->Context->GetDefinition("Friends_NameCell_Description")) . ' ' . GetDynamicCheckBox('Friends_DateRegistered', 1,$this->ConfigurationManager->GetSetting('Friends_DateRegistered'),'',$this->Context->GetDefinition("Friends_DateRegistered_Description")) . ' ' . GetDynamicCheckBox('Friends_MemberIcons', 1,$this->ConfigurationManager->GetSetting('Friends_MemberIcons'),'',$this->Context->GetDefinition("Friends_MemberIcons_Description")) . ' ' . GetDynamicCheckBox('Friends_VisitCount', 1,$this->ConfigurationManager->GetSetting('Friends_VisitCount'),'',$this->Context->GetDefinition("Friends_VisitCount_Description")) . ' ' . GetDynamicCheckBox('Friends_Email', 1,$this->ConfigurationManager->GetSetting('Friends_Email'),'',$this->Context->GetDefinition("Friends_Email_Description")) . ' ' . GetDynamicCheckBox('Friends_PostCount', 1,$this->ConfigurationManager->GetSetting('Friends_PostCount'),'',$this->Context->GetDefinition("Friends_PostCount_Description")) . ' ' . GetDynamicCheckBox('Friends_Role', 1,$this->ConfigurationManager->GetSetting('Friends_Role'),'',$this->Context->GetDefinition("Friends_Role_Description")) . ' <div class="Submit"> <input type="submit" name="btnSave" value="'.$this->Context->GetDefinition('Save').'" class="Button SubmitButton" /> <a href="'.GetUrl($this->Context->Configuration,$this->Context->SelfUrl).'"class="CancelButton">'.$this->Context->GetDefinition('Cancel').'</a> </div> </form> </fieldset> </div>'; } } $this->CallDelegate('PostRender'); } These options do not appear after you click a submit button they appear when you click a link under settings and the postbackaction = Friends
This discussion has been closed.