function SemanticGlossaryRegisterPropertyAliases() { SMWDIProperty::registerPropertyAlias('___glt', wfMsg('semanticglossary-prop-glt')); SMWDIProperty::registerPropertyAlias('___gld', wfMsg('semanticglossary-prop-gld')); SMWDIProperty::registerPropertyAlias('___gll', wfMsg('semanticglossary-prop-gll')); return true; }
function saclInitProperties() { // Read restriction properties SMWDIProperty::registerProperty('___VISIBLE', '_str', wfMsgForContent('sacl-property-visibility')); SMWDIProperty::registerProperty('___VISIBLE_WL_GROUP', '_str', wfMsgForContent('sacl-property-visibility-wl-group')); SMWDIProperty::registerProperty('___VISIBLE_WL_USER', '_wpg', wfMsgForContent('sacl-property-visibility-wl-user')); SMWDIProperty::registerPropertyAlias('___VISIBLE', 'Visible to'); SMWDIProperty::registerPropertyAlias('___VISIBLE_WL_GROUP', 'Visible to group'); SMWDIProperty::registerPropertyAlias('___VISIBLE_WL_USER', 'Visible to user'); // Write restriction properties SMWDIProperty::registerProperty('___EDITABLE', '_str', wfMsgForContent('sacl-property-editable')); SMWDIProperty::registerProperty('___EDITABLE_WL_GROUP', '_str', wfMsgForContent('sacl-property-editable-wl-group')); SMWDIProperty::registerProperty('___EDITABLE_WL_USER', '_wpg', wfMsgForContent('sacl-property-editable-wl-user')); SMWDIProperty::registerPropertyAlias('___EDITABLE_BY', 'Editable by'); SMWDIProperty::registerPropertyAlias('___EDITABLE_WL_GROUP', 'Editable by group'); SMWDIProperty::registerPropertyAlias('___EDITABLE_WL_USER', 'Editable by user'); return true; }
/** * @brief Initializes all properties, hooks into smwInitProperties. * * @return true */ public static function sespInitProperties() { // Page author SMWDIProperty::registerProperty('___EUSER', '_wpg', wfMsgForContent('sesp-property-author')); SMWDIProperty::registerPropertyAlias('___EUSER', 'Page author'); // Page creator SMWDIProperty::registerProperty('___CUSER', '_wpg', wfMsgForContent('sesp-property-first-author')); SMWDIProperty::registerPropertyAlias('___CUSER', 'Page creator'); // Revision ID SMWDIProperty::registerProperty('___REVID', '_num', wfMsgForContent('sesp-property-revision-id')); SMWDIProperty::registerPropertyAlias('___REVID', 'Revision ID'); //View count SMWDIProperty::registerProperty('___VIEWS', '_num', wfMsgForContent('sesp-property-view-count')); SMWDIProperty::registerPropertyAlias('___VIEWS', 'Number of page views'); //Sub pages SMWDIProperty::registerProperty('___SUBP', '_wpg', wfMsgForContent('sesp-property-subpages')); SMWDIProperty::registerPropertyAlias('___SUBP', 'Subpage'); //Number of revisions SMWDIProperty::registerProperty('___NREV', '_num', wfMsgForContent('sesp-property-revisions')); SMWDIProperty::registerPropertyAlias('___NREV', 'Number of revisions'); //Number of talk page revisions SMWDIProperty::registerProperty('___NTREV', '_num', wfMsgForContent('sesp-property-talk-revisions')); SMWDIProperty::registerPropertyAlias('___NTREV', 'Number of talk page revisions'); // MIME type SMWDIProperty::registerProperty('___MIMETYPE', '_str', wfMsgForContent('sesp-property-mimetype')); SMWDIProperty::registerPropertyAlias('___MIMETYPE', 'MIME type'); // MIME type SMWDIProperty::registerProperty('___MEDIATYPE', '_str', wfMsgForContent('sesp-property-mediatype')); SMWDIProperty::registerPropertyAlias('___MEDIATYPE', 'Media type'); // SHORTURL type SMWDIProperty::registerProperty('___SHORTURL', '_uri', wfMsgForContent('sesp-property-shorturl')); SMWDIProperty::registerPropertyAlias('___SHORTURL', 'Short URL'); // METADATA types SMWDIProperty::registerProperty('___EXIFDATETIME', '_dat', wfMsgForContent('exif-datetimeoriginal')); SMWDIProperty::registerPropertyAlias('___EXIFDATETIME', 'Exposure date'); SMWDIProperty::registerProperty('___EXIFSOFTWARE', '_str', wfMsgForContent('exif-software')); SMWDIProperty::registerPropertyAlias('___EXIFSOFTWARE', 'Software'); return true; }
/** * Add a new alias label to an existing datatype id. Note that every ID should have a primary * label, either provided by SMW or registered with registerDatatype. This function should be * called from within the hook 'smwInitDatatypes'. * * @deprecated Use SMWDIProperty::registerPropertyAlias(). Will vanish before SMW 1.7. */ public static function registerPropertyAlias($id, $label) { SMWDIProperty::registerPropertyAlias($id, $label); }
function sdfInitProperties() { global $sdgContLang, $wgLanguageCode; $sd_property_vals = array( SD_SP_HAS_FILTER => array( '_SD_F', '_wpg' ), SD_SP_COVERS_PROPERTY => array( '_SD_CP', '_wpp' ), SD_SP_HAS_VALUE => array( '_SD_V', '_str' ), SD_SP_GETS_VALUES_FROM_CATEGORY => array( '_SD_VC', '_wpc' ), SD_SP_USES_TIME_PERIOD => array( '_SD_TP', '_str' ), SD_SP_HAS_INPUT_TYPE => array( '_SD_IT', '_str' ), SD_SP_REQUIRES_FILTER => array( '_SD_RF', '_wpg' ), SD_SP_HAS_LABEL => array( '_SD_L', '_str' ), SD_SP_HAS_DRILLDOWN_TITLE => array( '_SD_DT', '_str' ), SD_SP_HAS_DISPLAY_PARAMETERS => array( '_SD_DP', '_str' ), ); // register main property labels $sd_prop_labels = $sdgContLang->getPropertyLabels(); foreach ( $sd_prop_labels as $prop_id => $prop_alias ) { $prop_vals = $sd_property_vals[$prop_id]; if ( class_exists( 'SMWDIProperty' ) ) { SMWDIProperty::registerProperty( $prop_vals[0], $prop_vals[1], $prop_alias, true ); } else { SMWPropertyValue::registerProperty( $prop_vals[0], $prop_vals[1], $prop_alias, true ); } } // if it's not English, add the English-language aliases as well if ( $wgLanguageCode != 'en' ) { $sd_prop_aliases = $sdgContLang->getPropertyAliases(); foreach ( $sd_prop_aliases as $prop_alias => $prop_id ) { $prop_vals = $sd_property_vals[$prop_id]; if ( class_exists( 'SMWDIProperty' ) ) { SMWDIProperty::registerPropertyAlias( $prop_vals[0], $prop_alias ); } else { SMWPropertyValue::registerPropertyAlias( $prop_vals[0], $prop_alias ); } } } return true; }