"Suggest a Resource", "ResourceFeedback" => "Resource Feedback"); return GetArrayValue($DefaultHeaders, $FeedbackType, "Leave Feedback"); } /** * Load data necessary to display the resource feedback form. * @param mixed $ParameterOne resource ID * @param mixed $ParameterTwo unused parameter * @param mixed $ParameterThree unused parameter * @return array data necessary to display the resource feedback form */ function LoadDataForResourceFeedback($ParameterOne, $ParameterTwo, $ParameterThree) { global $G_User; $Resource = new Resource($ParameterOne); $Schema = new MetadataSchema(); $TitleField = $Schema->GetFieldByMappedName("Title"); $UrlField = $Schema->GetFieldByMappedName("Url"); return array( "CanViewTitleField" => $Resource->UserCanViewField($G_User, $TitleField), "CanViewUrlField" => $Resource->UserCanViewField($G_User, $UrlField), "SafeResourceId" => defaulthtmlentities($ParameterOne), "SafeResourceTitle" => defaulthtmlentities($Resource->Get($TitleField)), "SafeResourceUrl" => defaulthtmlentities($Resource->Get($UrlField))); } /** * Append HTML to the feedback form. * @return void */ function AppendHtmlToForm() { global $AF; # fetch the data from plugins $Data = $AF->SignalEvent( "EVENT_APPEND_HTML_TO_FORM", array( "PageName" => "LeaveFeedback", "FormName"=>"FeedbackForm", "Labels" => array(), "InputElements" => array(), "Notes" => array())) ; # extract data: $Labels, $InputElements, $Notes extract($Data); # append them where required for ($i = 0; $i < count($Labels); $i++) { ?>