当前位置: 首页>>代码示例>>PHP>>正文


PHP UploadField::setRightTitle方法代码示例

本文整理汇总了PHP中UploadField::setRightTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP UploadField::setRightTitle方法的具体用法?PHP UploadField::setRightTitle怎么用?PHP UploadField::setRightTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UploadField的用法示例。


在下文中一共展示了UploadField::setRightTitle方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $badge = new UploadField('Badge', _t('ScoutGroup.BADGE', 'Badge'));
     $badge->setFolderName('group/badge');
     $badge->setRightTitle(_t('ScoutGroup.BADGE_HELP', 'The badge/logo/emblem of the Group'))->addExtraClass('help');
     $fields->addFieldToTab('Root.Info', $badge);
     $necker = new UploadField('Necker', _t('ScoutGroup.NECKER', 'Necker'));
     $necker->setFolderName('group/necker');
     $necker->setRightTitle(_t('ScoutGroup.NECKER_HELP', 'The neckerchief the Group'))->addExtraClass('help');
     $fields->addFieldToTab('Root.Info', $necker);
     $fields->addFieldToTab('Root.Info', new TextField('NeckerDescription', _t('ScoutGroup.NECKERDESCRIPTION', 'Neckerchief Description')));
     $fields->addFieldToTab('Root.Social', new TextField('TwitterUser', _t('ScoutGroup.TWITTERUSER', 'Twitter User')));
     $fields->addFieldToTab('Root.Social', new TextField('FacebookPage', _t('ScoutGroup.FACEBOOKPAGE', 'Facebook Page')));
     $fields->addFieldToTab('Root.Social', new TextField('GooglePage', _t('ScoutGroup.GOOGLEPAGE', 'Google Page')));
     $fields->addFieldToTab('Root.Contact', new TextField('Address1', _t('ScoutGroup.ADDRESS1', 'Address 1')));
     $fields->addFieldToTab('Root.Contact', new TextField('Address2', _t('ScoutGroup.ADDRESS2', 'Address 2')));
     $fields->addFieldToTab('Root.Contact', new TextField('Address3', _t('ScoutGroup.ADDRESS3', 'Address 3')));
     $fields->addFieldToTab('Root.Contact', new TextField('Town', _t('ScoutGroup.TOWN', 'Town')));
     $fields->addFieldToTab('Root.Contact', new TextField('Postcode', _t('ScoutGroup.POSTCODE', 'Post Code')));
     $fields->addFieldToTab('Root.Contact', new TextField('Phone', _t('ScoutGroup.PHONE', 'Phone #')));
     $fields->addFieldToTab('Root.Contact', new TextField('Email', _t('ScoutGroup.EMAIL', 'Email Address')));
     $fields->addFieldToTab('Root.Contact', new TextField('CharityNumber', _t('ScoutGroup.CHARITYNUMBER', 'CharityNumber')));
     $sectionGridConfig = new GridFieldConfig_RecordEditor();
     $sectionGridConfig->addComponent(new GridFieldSortableRows('SortOrder'));
     $sectionGrid = new GridField('Sections', 'Sections', $this->Sections(), $sectionGridConfig);
     $fields->addFieldToTab('Root.Sections', $sectionGrid);
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:phpboyscout-silverstripe-scouts,代码行数:30,代码来源:ScoutGroup.php

示例2: updateCMSFields

    function updateCMSFields(FieldList $fields)
    {
        $linkToManagerForPages = Config::inst()->get("MetaTagCMSControlPages", "url_segment") . '/';
        $linkToManagerForFiles = Config::inst()->get("MetaTagCMSControlFiles", "url_segment") . '/';
        $fields->addFieldToTab('Root.SearchEngines', new TabSet('Options', new Tab('Help', new LiteralField('HelpExplanation', '
						<h3>Search Engine - How to use ...</h3>
						<p>
							To improve your visibility with search engines, we provide a number of tools here.
							Improving your rankings with Search Engines can work as follows:
						</p>
						<ul>
							<li> - decide on a few keywords for each page - basically the words that people would search for on Google (e.g. <i>feed elderly cat</i>))</li>
							<li> - ensure that these words are seen in strategic places on this page</li>
							<li> - create links to the page from <i>third-party</i> websites</li>
						</ul>
						<p>
							<br />The tools provided here help you to achieve these goals by ensuring:
						</p>
						<ul>
							<li> - easy addition of keywords to key field (navigation label, meta description)</li>
							<li> - you can adjust the file image names and descriptions to match the keywords</li>
						</ul>
						')), new Tab('Menus', new LiteralField('MenuTitleExplanation', '<h3>Menu Title</h3><p>To improve consistency, you can set the menu title to automatically match the page title for any page on the site. </p>'), new CheckboxField('UpdateMenuTitle', 'Automatically update the Menu Title / Navigation Label to match the Page Title?')), new Tab('Meta Title', new TextField('PrependToMetaTitle', 'Prepend (add in front) of Meta Title'), new TextField('AppendToMetaTitle', 'Append (add at the end) of Meta Title')), new Tab('Meta Description', new LiteralField('MetaDescriptionExplanation', '<h3>&ldquo;Meta Description&rdquo;: Summary for Search Engines</h3><p>The Meta Description is not visible on the website itself. However, it is picked up by search engines like google.  They display it as the short blurb underneath the link to your pages. It will not get you much higher in the rankings, but it will entice people to click on your link.</p>'), new CheckboxField('UpdateMetaDescription', 'Automatically fill every meta description on every Page (using the first ' . Config::inst()->get("MetaTagsContentControllerEXT", "meta_desc_length") . ' words of the Page Content field).')), new Tab('Other Meta Data', new LiteralField('MetaOtherExplanation', '<h3>Other &ldquo;Meta Data&rdquo;: More hidden information about the page</h3><p>You can add some other <i>hidden</i> information to your pages - which can be picked up by Search Engines and other automated readers decyphering your website.</p>'), new TextField('MetaDataCountry', 'Country'), new TextField('MetaDataCopyright', 'Content Copyright'), new TextField('MetaDataDesign', 'Design provided by ...'), new TextField('MetaDataCoding', 'Website Coding carried out by ...'), new TextareaField('ExtraMeta', 'Custom Meta Tags (advanced users only)')), new Tab('Pages', new LiteralField('LinkToManagerHeaderForPages', "<p><a href=\"{$linkToManagerForPages}\" target=\"_blank\">Review and Edit</a> pages in a new window ...</p>")), new Tab('Files', new LiteralField('LinkToManagerHeaderForFiles', "<p><a href=\"{$linkToManagerForFiles}\" target=\"_blank\">Review and Edit</a> files in a new window ...</p>"))));
        $fields->addFieldToTab("Root.Icons", $uploadField = new UploadField('Favicon', 'Icon'));
        $uploadField->setAllowedExtensions(array("png"));
        $uploadField->setRightTitle("Upload a 480px wide x 480px high non-transparent PNG file. Ask your developer for help if unsure. Icons can also be loaded onto the server directly into the /themes/mytheme/icons/ folder and as a favicon.ico in the root directory.");
        return $fields;
    }
开发者ID:helpfulrobot,项目名称:zucchi-metatags,代码行数:28,代码来源:MetaTagsSiteConfigDE.php

示例3: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     $type = new DropdownField('EventType', _t('ScoutDistrict.Events.TYPE', 'Type'), array('section-meeting' => _t('ScoutDistrict.Enum.SECTIONMEETING', 'Section Meeting'), 'leaders-meeting' => _t('ScoutDistrict.Enum.LEADERSMEETING', 'Leaders Meeting'), 'activity' => _t('ScoutDistrict.Enum.ACTIVITY', 'Activity'), 'fundraising' => _t('ScoutDistrict.Enum.FUNDRAISING', 'Fundraising'), 'committee' => _t('ScoutDistrict.Enum.COMMITTEE', 'Committee'), 'camp' => _t('ScoutDistrict.Enum.CAMP', 'Camp'), 'group' => _t('ScoutDistrict.Enum.GROUP', 'Group'), 'district' => _t('ScoutDistrict.Enum.DISTRICT', 'District'), 'training' => _t('ScoutDistrict.Enum.TRAINING', 'Training'), 'other' => _t('ScoutDistrict.Enum.OTHER', 'Other')));
     $type->setRightTitle(_t('ScoutDistrict.Events.TYPE_HELP', 'What Type of event is this'))->addExtraClass('help');
     $location = new TextField('EventLocation', _t('ScoutDistrict.Events.LOCATION', 'Location'));
     $location->setRightTitle(_t('ScoutDistrict.Events.LOCATION_HELP', 'Where is the event being held'))->addExtraClass('help');
     $latitude = new TextField('EventLatitude', _t('ScoutDistrict.Events.LATITUDE', 'Latitude'));
     $latitude->setRightTitle(_t('ScoutDistrict.Events.LATITUDE_HELP', 'Latitude of event Location'))->addExtraClass('help');
     $longitude = new TextField('EventLongitude', _t('ScoutDistrict.Events.LONGITUDE', 'Longitude'));
     $longitude->setRightTitle(_t('ScoutDistrict.Events.LONGITUDE_HELP', 'Longitude of event Location'))->addExtraClass('help');
     $bookingDetails = new TextareaField('EventBookingDetails', _t('ScoutDistrict.Events.BOOKINGDETAILS', 'Booking Details'));
     $bookingDetails->setRightTitle(_t('ScoutDistrict.Events.BOOKINGDETAILS_HELP', 'Details of how to book a place for the Event'))->addExtraClass('help');
     $bookingURL = new TextField('EventBookingURL', _t('ScoutDistrict.Events.BOOKINGURL', 'Booking URL'));
     $bookingURL->setRightTitle(_t('ScoutDistrict.Events.BOOKINGURL_HELP', 'The URL of an external site to book a place'))->addExtraClass('help');
     $fields->addFieldsToTab('Root.Scouts', array($type, $location, $latitude, $longitude, $bookingDetails, $bookingURL));
     $thumbnail = new UploadField('ThumbnailImage', _t('ScoutDistrict.Events.THUMBNAIL', 'Thumbnail Image'));
     $thumbnail->setFolderName('event/thumbnail');
     $thumbnail->setRightTitle(_t('ScoutDistrict.Events.THUMBNAIL_HELP', 'A small image for displaying in listing/aggregated content'))->addExtraClass('help');
     $image = new UploadField('Image', _t('ScoutDistrict.Events.IMAGE', 'Image'));
     $image->setFolderName('event/image');
     $image->setRightTitle(_t('ScoutDistrict.Events.IMAGE_HELP', 'A Larger image for displaying in event header'))->addExtraClass('help');
     $files = new UploadField('Files', _t('ScoutDistrict.Events.FILE', 'Files'));
     $files->setFolderName('event/file');
     $files->setRightTitle(_t('ScoutDistrict.Events.FILE_HELP', 'This can be a file containing information about the event or an application form, etc'))->addExtraClass('help');
     $fields->addFieldsToTab('Root.Files', array($thumbnail, $image, $files));
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:phpboyscout-silverstripe-scouts,代码行数:27,代码来源:ScoutCalenderEventExtension.php

示例4: updateCMSFields

 public function updateCMSFields(FieldList $fields)
 {
     /* -----------------------------------------
         * Color Picker
        ------------------------------------------*/
     Requirements::css('boilerplate/css/colorpicker.css');
     Requirements::javascript('boilerplate/javascript/colorpicker.min.js');
     Requirements::javascript('boilerplate/javascript/colorpicker.init.js');
     /* =========================================
        * Settings
        =========================================*/
     if (!$fields->fieldByName('Root.Settings')) {
         $fields->addFieldToTab('Root', new TabSet('Settings'));
     }
     /* -----------------------------------------
         * Images
        ------------------------------------------*/
     $fields->findOrMakeTab('Root.Settings.Images', 'Images');
     $fields->addFieldsToTab('Root.Settings.Images', array($logo = new UploadField('LogoImage', _t('BoilerplateConfig.LogoImageLabel', 'Logo')), $favicon = new UploadField('Favicon', _t('BoilerplateConfig.FaviconLabel', 'Favicon'))));
     $logo->setRightTitle('Choose an Image For Your Logo');
     $favicon->setRightTitle('Choose an Image For Your Favicon (16x16)');
     /* -----------------------------------------
         * Company Details
        ------------------------------------------*/
     $fields->findOrMakeTab('Root.Settings.Details', 'Details');
     $fields->addFieldsToTab('Root.Settings.Details', array(new Textfield('Phone', _t('BoilerplateConfig.PhoneLabel', 'Phone Number')), new Textfield('Email', _t('BoilerplateConfig.EmailLabel', 'Public Email Address')), $PhysicalAddress = new HtmlEditorField('PhysicalAddress', _t('BoilerplateConfig.PhysicalAddressLabel', 'Physical Address'))));
     $PhysicalAddress->setRows(3);
     /* -----------------------------------------
         * Tracking Code
        ------------------------------------------*/
     $fields->findOrMakeTab('Root.Settings.TrackingCode', 'Tracking Code');
     $fields->addFieldsToTab('Root.Settings.TrackingCode', array($trackingCode = new TextareaField('TrackingCode', _t('BoilerplateConfig.TrackingCodeLabel', 'Tracking Code'))));
     $trackingCode->setRows(20);
 }
开发者ID:ormandroid,项目名称:ss_boilerplate,代码行数:34,代码来源:BoilerplateConfig.php

示例5: updateSettingsFields

 /**
  * standard SS method
  * @var Array
  **/
 public function updateSettingsFields(FieldList $fields)
 {
     $fields->addFieldToTab("Root.Facebook", new HeaderField(_t("MetaTagsSTE.FB_HOW_THIS_PAGE_IS_SHARED", "How is this page shared on Facebook?")));
     $fields->addFieldToTab("Root.Facebook", $fieldTitle = new ReadonlyField("fb_title", _t("MetaTagsSTE.FB_TITLE", "Title"), $this->owner->Title));
     $fields->addFieldToTab("Root.Facebook", $fieldType = new ReadonlyField("fb_type", _t("MetaTagsSTE.FB_TITLE", "Type"), "website"));
     $fields->addFieldToTab("Root.Facebook", $fieldSiteName = new ReadonlyField("fb_type", _t("MetaTagsSTE.FB_SITE_NAME", "Site Name"), SiteConfig::current_site_config()->Title));
     $fields->addFieldToTab("Root.Facebook", $fieldDescription = new ReadonlyField("fb_description", _t("MetaTagsSTE.FB_DESCRIPTION", "Description (from MetaDescription)"), $this->owner->MetaDescription));
     $fields->addFieldToTab("Root.Facebook", $shareOnFacebookImageField = new UploadField("ShareOnFacebookImage", _t("MetaTagsSTE.FB_IMAGE", "Image")));
     $shareOnFacebookImageField->setFolderName("OpenGraphShareImages");
     $shareOnFacebookImageField->setRightTitle("Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images that are 600 x 315 pixels to display link page posts with larger images.");
     $fields->addFieldToTab("Root.Facebook", $shareOnFacebookImageField = new LiteralField("fb_try_it_out", '<h3><a href="https://www.facebook.com/sharer/sharer.php?u=' . urlencode($this->owner->AbsoluteLink()) . '">' . _t("MetaTagsSTE.FB_TRY_IT_OUT", "Share on Facebook Now") . '</a></h3>', $this->owner->ShareOnFacebookImage()));
     //right titles
     $fieldTitle->setRightTitle(_t("MetaTagsSTE.FB_TITLE_RIGHT", "Uses the Page Title"));
     $fieldType->setRightTitle(_t("MetaTagsSTE.FB_TYPE_RIGHT", "Can not be changed"));
     $fieldSiteName->setRightTitle(_t("MetaTagsSTE.FB_SITE_NAME_RIGHT", "Can be set in the site settings"));
     $fieldDescription->setRightTitle(_t("MetaTagsSTE.FB_DESCRIPTION", "Description is set in the Metadata section of each page."));
     $shareOnFacebookImageField->setRightTitle(_t("MetaTagsSTE.FB_HOW_TO_CHOOSE_IMAGE", "If no image is set then the Facebook user can choose an image from the page - with options retrieved by Facebook."));
 }
开发者ID:helpfulrobot,项目名称:zucchi-metatags,代码行数:22,代码来源:MetaTagsSTE.php

示例6: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $type = new DropdownField('Type', 'Type of Section', array('beavers' => _t('ScoutDistrict.Enum.BEAVERS', 'Beavers'), 'cubs' => _t('ScoutDistrict.Enum.CUBS', 'Cubs'), 'scouts' => _t('ScoutDistrict.Enum.SCOUTS', 'Scouts'), 'explorer' => _t('ScoutDistrict.Enum.EXPLORER', 'Explorer'), 'network' => _t('ScoutDistrict.Enum.NETWORK', 'Network')));
     $fields->addFieldToTab('Root.Info', $type);
     $logo = new UploadField('Logo', _t('ScoutGroup.LOGO', 'Logo'));
     $logo->setFolderName('section/logo');
     $logo->setRightTitle(_t('ScoutSection.LOGO_HELP', 'The section logo'))->addExtraClass('help');
     $fields->addFieldToTab('Root.Info', $logo);
     $fields->addFieldToTab('Root.Info', new TextareaField('Promise', _t('ScoutSection.PROMISE', 'Promise')));
     $fields->addFieldToTab('Root.Info', new TextareaField('Law', _t('ScoutSection.LAW', 'Law')));
     $fields->addFieldToTab('Root.Info', new TextareaField('Motto', _t('ScoutSection.MOTTO', 'Motto')));
     //        $fields->addFieldToTab('Root.Info', new HtmlEditorField('MembershipBadges', _t('ScoutSection.MEMBERSHIPBADGES', 'Membership Badges')));
     //        $fields->addFieldToTab('Root.Info', new HtmlEditorField('ActivityBadges', _t('ScoutSection.ACTIVITYBADGES', 'Activity Badges')));
     //        $fields->addFieldToTab('Root.Info', new HtmlEditorField('StagedBadges', _t('ScoutSection.STAGEDBADGES', 'Staged Badges')));
     //        $fields->addFieldToTab('Root.Info', new HtmlEditorField('ChallengeBadges', _t('ScoutSection.CHALLENGEBADGES', 'Challenge Badges')));
     //        $fields->addFieldToTab('Root.Info', new HtmlEditorField('ChiefScout', _t('ScoutSection.CHIEFSCOUT', 'Chief Scout')));
     $this->extend('updateCMSFields', $fields);
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:phpboyscout-silverstripe-scouts,代码行数:20,代码来源:ScoutSection.php

示例7: getCMSFields

 public function getCMSFields()
 {
     $this->beforeUpdateCMSFields(function ($fields) {
         $datefield = new DateField('Date', 'Date (DD/MM/YYYY)');
         $datefield->setConfig('showcalendar', true);
         $datefield->setConfig('showdropdown', true);
         $datefield->setConfig('dateformat', 'dd/MM/YYYY');
         $fields->addFieldToTab('Root.Main', $datefield, 'Content');
         $image = new UploadField('AttachedImage', 'Main Image');
         $image->getValidator()->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif'));
         $image->setConfig('allowedMaxFileNumber', 1);
         $image->setFolderName('Managed/NewsImages');
         $image->setCanPreviewFolder(false);
         $image->setRightTitle("Displayed to the right of the content in the main article, where it can be clicked to enlarge. <br />A thumbnail also appears next to the article summary on the main News page.");
         $fields->addFieldToTab('Root.Main', $image, "Content");
     });
     $fields = parent::getCMSFields();
     $fields->renameField("Title", "Headline");
     $fields->removeFieldFromTab("Root.Main", "MenuTitle");
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:purplespider-basic-news,代码行数:21,代码来源:NewsArticle.php

示例8: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->removeFieldFromTab("Root", "Sort");
     $fields->removeFieldFromTab("Root.Main", "AdvertisementImage");
     $fields->removeFieldFromTab("Root.Main", "AdvertisementImageID");
     $fields->removeFieldFromTab("Root.Main", "LinkedPageID");
     $fields->removeFieldFromTab("Root.Main", "ExternalLink");
     $fields->removeFieldFromTab("Root.Parents", "Parents");
     $fields->removeFieldFromTab("Root", "Parents");
     $fields->addFieldToTab("Root.Main", new ReadonlyField("Link"));
     $fields->addFieldToTab("Root.Main", $mainImageField = new UploadField($name = "AdvertisementImage", $title = $this->i18n_singular_name()));
     $mainImageField->setRightTitle(self::recommended_image_size_statement());
     $fields->addFieldToTab("Root.Main", $additionalImageField = new UploadField($name = "AdditionalImage", $title = $this->i18n_singular_name() . " " . _t("Advertisement.ADDITIONAL_IMAGE", "additional image")));
     $additionalImageField->setRightTitle(self::recommended_image_size_statement());
     if ($this->ID) {
         $treeField = new TreeMultiselectField("Parents", _t("Advertisement.GETCMSFIELDSPARENTID", "only show on ... (leave blank to show on all " . $this->i18n_singular_name() . " pages)"), "SiteTree");
         /*$callback = $this->callbackFilterFunctionForMultiSelect();
         		if($callback) {
         			$treeField->setFilterFunction ($callback);
         		}*/
         $fields->addFieldToTab("Root.ShownOn", $treeField);
     }
     $fields->addFieldToTab("Root.OptionalLink", $externalLinkField = new TextField($name = "ExternalLink", $title = _t("Advertisement.GETCMSFIELDSEXTERNALLINK", "link to external site")));
     $externalLinkField->setRightTitle(_t("Advertisement.GETCMSFIELDSEXTERNALLINK_EXPLANATION", "(e.g. http://www.wikipedia.org) - this will override an internal link"));
     $fields->addFieldToTab("Root.OptionalLink", new TreeDropdownField($name = "LinkedPageID", $title = _t("Advertisement.GETCMSFIELDSEXTERNALLINKID", "link to a page on this website"), $sourceObject = "SiteTree"));
     $fields->addFieldToTab("Root.OptionalLink", new CheckboxField($name = "RemoveInternalLink", $title = _t("Advertisement.RemoveInternalLink", "remove internal link")));
     if (class_exists("DataObjectSorterController")) {
         //sorted on parent page...
     } else {
         $fields->addFieldToTab("Root.Position", $sortField = new NumericField("Sort", _t("Advertisement.SORT", "Sort index number")));
         $sortField->setRightTitle(_t("Advertisement.SORT_EXPLANATION", "the lower the number, the earlier it shows"));
     }
     $fields->removeFieldFromTab("Root.Main", "AlternativeSortNumber");
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-advertisements,代码行数:36,代码来源:Advertisement.php


注:本文中的UploadField::setRightTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。