Public Member Functions | |
| clearTemplateCache () | |
| display ($template, $sendContentType= 'text/html', $hookName= 'TemplateManager::display') | |
| & | getManager () |
| setCacheability ($cacheability=CACHEABILITY_PUBLIC) | |
| smartyAssign ($value, $varName, $passThru=false) | |
| smartyAssignMailto ($params, &$smarty) | |
| smartyCallHook ($params, &$smarty) | |
| smartyDisplayTemplate ($params, &$smarty) | |
| smartyEscape ($string, $esc_type= 'html', $char_set=null) | |
| smartyExplode ($string, $separator) | |
| smartyFlush ($params, &$smarty) | |
| smartyGetDebugInfo ($params, &$smarty) | |
| smartyGetHelpId ($params, &$smarty) | |
| smartyHelpTopic ($params, &$smarty) | |
| smartyHtmlOptionsTranslate ($params, &$smarty) | |
| smartyIcon ($params, &$smarty) | |
| smartyIterate ($params, $content, &$smarty, &$repeat) | |
| smartyPageInfo ($params, &$smarty) | |
| smartyPageLinks ($params, &$smarty) | |
| smartyToArray () | |
| smartyTranslate ($params, &$smarty) | |
| smartyUrl ($params, &$smarty) | |
| TemplateManager () | |
Definition at line 37 of file TemplateManager.inc.php.
| TemplateManager.clearTemplateCache | ( | ) |
Clear template compile and cache directories.
Definition at line 271 of file TemplateManager.inc.php.
| TemplateManager.display | ( | $ | template, | |
| $ | sendContentType = 'text/html', |
|||
| $ | hookName = 'TemplateManager::display' | |||
| ) |
Display the template.
Definition at line 220 of file TemplateManager.inc.php.
References HookRegistry.call(), and Config.getVar().
| & TemplateManager.getManager | ( | ) |
Return an instance of the template manager.
Definition at line 280 of file TemplateManager.inc.php.
References TemplateManager().
Referenced by AboutHandler.aboutThisPublishingSystem(), RegistrationHandler.activateUser(), GroupHandler.addMembership(), SearchHandler.advanced(), SearchHandler.advancedResults(), AnnouncementHandler.announcements(), AnnouncementHandler.announcementTypes(), IssueHandler.archive(), EditorHandler.assignEditor(), SubmissionEditHandler.assignLayoutEditor(), AuthSourcesHandler.auth(), SearchHandler.authors(), IssueManagementHandler.backIssues(), UserHandler.become(), RTHandler.bio(), RTHandler.captureCite(), RefManCitationPlugin.cite(), ProCiteCitationPlugin.cite(), EndNoteCitationPlugin.cite(), CitationPlugin.cite(), AdminFunctionsHandler.clearTemplateCache(), AboutHandler.contact(), RTHandler.context(), IssueManagementHandler.createIssue(), SubscriptionManagerHandler.createUser(), IssueHandler.current(), UpgradeForm.dbInstallError(), InstallForm.dbInstallError(), JournalSetupStep5Form.deleteImage(), PeopleHandler.disableUser(), CustomThemeSettingsForm.display(), UserImportExportPlugin.display(), SampleImportExportPlugin.display(), PubMedExportPlugin.display(), NativeImportExportPlugin.display(), EruditExportPlugin.display(), DOAJPlugin.display(), CrossRefExportPlugin.display(), ThesisSettingsForm.display(), ThesisForm.display(), StudentThesisForm.display(), OpenAdsSettingsForm.display(), RegistrationForm.display(), ProfileForm.display(), LoginChangePasswordForm.display(), ChangePasswordForm.display(), SubscriptionTypeForm.display(), SubscriptionPolicyForm.display(), SubscriptionForm.display(), SuppFileForm.display(), ReviewFormResponseForm.display(), MetadataForm.display(), ProofreadCommentForm.display(), PeerReviewCommentForm.display(), LayoutCommentForm.display(), EditorDecisionCommentForm.display(), EditCommentForm.display(), CopyeditCommentForm.display(), ArticleGalleyForm.display(), AuthSourceSettingsForm.display(), CreateReviewerForm.display(), VersionForm.display(), SearchForm.display(), ContextForm.display(), ReportPlugin.display(), ImportExportPlugin.display(), UserManagementForm.display(), JournalSetupStep5Form.display(), JournalSetupStep3Form.display(), JournalSetupStep2Form.display(), JournalSetupStep1Form.display(), JournalSetupForm.display(), SectionForm.display(), ReviewFormForm.display(), ReviewFormElementForm.display(), PayMethodSettingsForm.display(), PaymentSettingsForm.display(), LanguageSettingsForm.display(), GroupForm.display(), EmailTemplateForm.display(), AnnouncementTypeForm.display(), AnnouncementForm.display(), IssueForm.display(), UpgradeForm.display(), InstallForm.display(), Form.display(), CommentForm.display(), AuthorSubmitSuppFileForm.display(), AuthorSubmitStep5Form.display(), AuthorSubmitStep4Form.display(), AuthorSubmitStep3Form.display(), AuthorSubmitStep2Form.display(), AuthorSubmitStep1Form.display(), AuthorSubmitForm.display(), SiteSettingsForm.display(), JournalSiteSettingsForm.display(), ImportOJS1Form.display(), MailTemplate.displayEditForm(), AboutHandler.displayMembership(), PayPalPlugin.displayPaymentForm(), AdminJournalHandler.doImportOJS1(), AdminLanguagesHandler.downloadLocale(), AnnouncementHandler.editAnnouncement(), AnnouncementHandler.editAnnouncementType(), EmailHandler.editEmail(), SubmissionLayoutHandler.editGalley(), GroupHandler.editGroup(), IssueManagementHandler.editIssue(), AboutHandler.editorialPolicies(), AboutHandler.editorialTeam(), AboutHandler.editorialTeamBio(), ReviewFormHandler.editReviewForm(), ReviewFormHandler.editReviewFormElement(), SubscriptionManagerHandler.editSubscription(), SubscriptionHandler.editSubscription(), SubscriptionManagerHandler.editSubscriptionType(), SubscriptionHandler.editSubscriptionType(), SubmissionLayoutHandler.editSuppFile(), AdminFunctionsHandler.editSystemConfig(), PeopleHandler.editUser(), ManagerHandler.email(), EmailHandler.email(), RTHandler.emailAuthor(), RTHandler.emailColleague(), EmailHandler.emails(), SubmissionEditHandler.enrollSearch(), PeopleHandler.enrollSearch(), PeopleHandler.enrollSyncSelect(), UpgradeForm.execute(), InstallForm.execute(), WebFeedGatewayPlugin.fetch(), ThesisFeedGatewayPlugin.fetch(), AnnouncementFeedGatewayPlugin.fetch(), ResolverPlugin.fetch(), METSGatewayPlugin.fetch(), FilesHandler.files(), RTHandler.findingReferences(), LayoutEditorHandler.futureIssues(), IssueManagementHandler.futureIssues(), RoleBlockPlugin.getBlockTemplateFilename(), GroupHandler.groupMembership(), GroupHandler.groups(), PayPalPlugin.handle(), TranslatorHandler.index(), ThesisHandler.index(), CustomLocaleHandler.index(), CounterHandler.index(), UserHandler.index(), SectionEditorHandler.index(), RTAdminHandler.index(), ReviewerHandler.index(), ProofreaderHandler.index(), ManagerHandler.index(), LoginHandler.index(), LayoutEditorHandler.index(), InformationHandler.index(), IndexHandler.index(), EditorHandler.index(), CopyeditorHandler.index(), AuthorHandler.index(), AnnouncementHandler.index(), AdminHandler.index(), AboutHandler.index(), XMLGalleySettingsForm.initData(), CmsRssSettingsForm.initData(), CmsSettingsForm.initData(), PhpMyVisitesPlugin.insertFooter(), GoogleAnalyticsPlugin.insertFooter(), CoinsPlugin.insertFooter(), UpgradeForm.installError(), InstallForm.installError(), Action.instructions(), IssueManagementHandler.issueData(), IssueManagementHandler.issueToc(), AdminJournalHandler.journals(), AboutHandler.journalSponsorship(), AdminLanguagesHandler.languages(), LoginHandler.lostPassword(), XMLGalleyPlugin.manage(), WebFeedPlugin.manage(), ThesisFeedPlugin.manage(), ThesisPlugin.manage(), PhpMyVisitesPlugin.manage(), OpenAdsPlugin.manage(), GoogleAnalyticsPlugin.manage(), CmsRssPlugin.manage(), CmsPlugin.manage(), AnnouncementFeedPlugin.manage(), GatewayPlugin.manage(), AboutHandler.memberships(), PeopleHandler.mergeUsers(), AdminPeopleHandler.mergeUsers(), RTHandler.metadata(), IssueManagementHandler.notifyUsers(), OpenAdsSettingsForm.OpenAdsSettingsForm(), ManagerPaymentHandler.payments(), ManagerPaymentHandler.payMethodSettings(), PeopleHandler.people(), PluginHandler.plugins(), SubmissionEditHandler.previewReviewForm(), ReviewFormHandler.previewReviewForm(), RTHandler.printerFriendly(), SubmissionEditHandler.proofGalley(), SubmissionProofreadHandler.proofGalley(), SubmissionLayoutHandler.proofGalley(), SubmissionCopyeditHandler.proofGalley(), TrackSubmissionHandler.proofGalley(), SubmissionEditHandler.proofGalleyFile(), SubmissionProofreadHandler.proofGalleyFile(), SubmissionLayoutHandler.proofGalleyFile(), SubmissionCopyeditHandler.proofGalleyFile(), TrackSubmissionHandler.proofGalleyFile(), SubmissionEditHandler.proofGalleyTop(), SubmissionProofreadHandler.proofGalleyTop(), SubmissionLayoutHandler.proofGalleyTop(), SubmissionCopyeditHandler.proofGalleyTop(), TrackSubmissionHandler.proofGalleyTop(), FontSizeBlockPlugin.register(), RegistrationHandler.register(), RegistrationHandler.registerUser(), RegistrationHandler.registrationDisabled(), LoginHandler.requestResetPassword(), LoginHandler.resetPassword(), SearchHandler.results(), ReviewFormHandler.reviewFormElements(), ReviewFormHandler.reviewForms(), ThesisHandler.save(), IssueManagementHandler.saveIssue(), JournalLanguagesHandler.saveLanguageSettings(), AdminLanguagesHandler.saveLanguageSettings(), ManagerPaymentHandler.savePaymentSettings(), ManagerPaymentHandler.savePayMethodSettings(), AdminSettingsHandler.saveSettings(), SubmitHandler.saveSubmit(), SubscriptionManagerHandler.saveSubscriptionPolicies(), SubscriptionHandler.saveSubscriptionPolicies(), AdminFunctionsHandler.saveSystemConfig(), HelpHandler.search(), SectionHandler.sections(), SubmissionEditHandler.selectProofreader(), SubmissionEditHandler.selectReviewForm(), SubscriptionManagerHandler.selectSubscriber(), SubscriptionHandler.selectSubscriber(), CustomThemePlugin.setBreadcrumbs(), ThesisPlugin.setBreadcrumbs(), PhpMyVisitesPlugin.setBreadcrumbs(), GoogleAnalyticsPlugin.setBreadcrumbs(), CmsRssPlugin.setBreadcrumbs(), ReportPlugin.setBreadcrumbs(), ImportExportPlugin.setBreadcrumbs(), SetupHandler.setup(), IssueHandler.setupIssueTemplate(), SetupHandler.setupSaved(), ThesisHandler.setupTemplate(), CounterHandler.setupTemplate(), UserHandler.setupTemplate(), SubscriptionManagerHandler.setupTemplate(), SectionEditorHandler.setupTemplate(), SearchHandler.setupTemplate(), RTAdminHandler.setupTemplate(), ReviewerHandler.setupTemplate(), ProofreaderHandler.setupTemplate(), SubscriptionHandler.setupTemplate(), ManagerHandler.setupTemplate(), LayoutEditorHandler.setupTemplate(), InformationHandler.setupTemplate(), HelpHandler.setupTemplate(), IssueManagementHandler.setupTemplate(), EditorHandler.setupTemplate(), CopyeditorHandler.setupTemplate(), AuthorHandler.setupTemplate(), AnnouncementHandler.setupTemplate(), AdminHandler.setupTemplate(), AboutHandler.setupTemplate(), LoginHandler.signIn(), PeopleHandler.signInAsUser(), AboutHandler.siteMap(), smartyAssign(), smartyDisplayTemplate(), StatisticsHandler.statistics(), AboutHandler.statistics(), SubmissionReviewHandler.submission(), SubmissionProofreadHandler.submission(), SubmissionLayoutHandler.submission(), TrackSubmissionHandler.submission(), TrackSubmissionHandler.submissionEditing(), SubmissionEditHandler.submissionEmailLog(), SubmissionEditHandler.submissionEmailLogType(), SubmissionEditHandler.submissionEventLog(), SubmissionEditHandler.submissionEventLogType(), SubmissionEditHandler.submissionHistory(), SubmissionEditHandler.submissionNotes(), TrackSubmissionHandler.submissionReview(), LayoutEditorHandler.submissions(), EditorHandler.submissions(), AboutHandler.submissions(), ThesisHandler.submit(), SubscriptionManagerHandler.subscriptionPolicies(), SubscriptionHandler.subscriptionPolicies(), SubscriptionManagerHandler.subscriptions(), SubscriptionHandler.subscriptions(), AboutHandler.subscriptions(), SubscriptionManagerHandler.subscriptionTypes(), SubscriptionHandler.subscriptionTypes(), RTHandler.suppFileMetadata(), RTHandler.suppFiles(), AdminFunctionsHandler.systemInfo(), SearchHandler.titles(), AnnouncementHandler.updateAnnouncement(), AnnouncementHandler.updateAnnouncementType(), GroupHandler.updateGroup(), ReviewFormHandler.updateReviewForm(), ReviewFormHandler.updateReviewFormElement(), SubscriptionManagerHandler.updateSubscription(), SubscriptionHandler.updateSubscription(), SubscriptionManagerHandler.updateSubscriptionType(), SubscriptionHandler.updateSubscriptionType(), SubscriptionManagerHandler.updateUser(), PeopleHandler.updateUser(), SubmissionEditHandler.userProfile(), PeopleHandler.userProfile(), SubmissionEditHandler.validate(), ArticleHandler.validate(), ThesisHandler.view(), IssueHandler.view(), HelpHandler.view(), ArticleHandler.view(), AnnouncementHandler.view(), ArticleHandler.viewArticle(), ArticleHandler.viewDownloadInterstitial(), ManagerPaymentHandler.viewPayment(), ManagerPaymentHandler.viewPayments(), ArticleHandler.viewPDFInterstitial(), UserHandler.viewPublicProfile(), ArticleHandler.viewRST(), and XMLGalleySettingsForm.XMLGalleySettingsForm().
| TemplateManager.setCacheability | ( | $ | cacheability = CACHEABILITY_PUBLIC |
) |
Flag the page as cacheable (or not).
| $cacheability | boolean optional |
Definition at line 199 of file TemplateManager.inc.php.
| TemplateManager.smartyAssign | ( | $ | value, | |
| $ | varName, | |||
| $ | passThru = false | |||
| ) |
Assign a value to a template variable.
Definition at line 724 of file TemplateManager.inc.php.
References getManager().
| TemplateManager.smartyAssignMailto | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Smarty usage: {assign_mailto var="varName" address="email.com" ...]}
Generates a hex-encoded mailto address and assigns it to the variable name specified..
Definition at line 324 of file TemplateManager.inc.php.
| TemplateManager.smartyCallHook | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Call hooks from a template.
Definition at line 549 of file TemplateManager.inc.php.
References HookRegistry.call().
| TemplateManager.smartyDisplayTemplate | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Display templates from Smarty and allow hook overrides
Smarty usage: {display_template template="name.tpl" hookname="MyHook.Name"}
Definition at line 259 of file TemplateManager.inc.php.
References getManager().
| TemplateManager.smartyEscape | ( | $ | string, | |
| $ | esc_type = 'html', |
|||
| $ | char_set = null | |||
| ) |
Override the built-in smarty escape modifier to set the charset properly; also add the jsparam escaping method.
Definition at line 698 of file TemplateManager.inc.php.
| TemplateManager.smartyExplode | ( | $ | string, | |
| $ | separator | |||
| ) |
Split the supplied string by the supplied separator.
Definition at line 717 of file TemplateManager.inc.php.
| TemplateManager.smartyFlush | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Flush the output buffer. This is useful in cases where Smarty templates are calling functions that take a while to execute so that they can display a progress indicator or a message stating that the operation may take a while.
Definition at line 535 of file TemplateManager.inc.php.
| TemplateManager.smartyGetDebugInfo | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Get debugging information and assign it to the template.
Definition at line 558 of file TemplateManager.inc.php.
References Registry.get(), DBConnection.getInstance(), Config.getVar(), and Core.microtime().
| TemplateManager.smartyGetHelpId | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Smarty usage: {get_help_id key="(dir)*.page.topic" url="boolean"}
Custom Smarty function for retrieving help topic ids. Direct mapping of page topic key to a numerical value representing the associated help topic xml file $params array associative array, must contain "key" parameter for string to translate $smarty Smarty
Definition at line 426 of file TemplateManager.inc.php.
References Help.getHelp(), and Request.url().
| TemplateManager.smartyHelpTopic | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Smarty usage: {help_topic key="(dir)*.page.topic" text="foo"}
Custom Smarty function for creating anchor tags $params array associative array $smarty Smarty
Definition at line 453 of file TemplateManager.inc.php.
References Help.getHelp(), and Request.url().
| TemplateManager.smartyHtmlOptionsTranslate | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Smarty usage: {html_options_translate ...} For parameter usage, see http://smarty.php.net/manual/en/language.function.html.options.php
Identical to Smarty's "html_options" function except option values are translated from i18n keys. $params array $smarty Smarty
Definition at line 355 of file TemplateManager.inc.php.
References Locale.translate().
| TemplateManager.smartyIcon | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Smarty usage: {icon name="image name" alt="alternative name" url="url path"}
Custom Smarty function for generating anchor tag with optional url $params array associative array, must contain "name" paramater to create image anchor tag
Definition at line 470 of file TemplateManager.inc.php.
References Locale.translate().
| TemplateManager.smartyIterate | ( | $ | params, | |
| $ | content, | |||
| &$ | smarty, | |||
| &$ | repeat | |||
| ) |
Iterator function for looping through objects extending the ItemIterator class. Parameters:
Definition at line 390 of file TemplateManager.inc.php.
| TemplateManager.smartyPageInfo | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Display page information for a listing of items that has been divided onto multiple pages. Usage: {page_info from=$myIterator}
Definition at line 511 of file TemplateManager.inc.php.
References Locale.translate().
| TemplateManager.smartyPageLinks | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Display page links for a listing of items that has been divided onto multiple pages. Usage: {page_links name="nameMustMatchGetRangeInfoCall" iterator=$myIterator additional_param=myAdditionalParameterValue }
Definition at line 624 of file TemplateManager.inc.php.
References Request.getRequestedArgs(), and Request.url().
| TemplateManager.smartyToArray | ( | ) |
Convert the parameters of a function to an array.
Definition at line 690 of file TemplateManager.inc.php.
| TemplateManager.smartyTranslate | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Smarty usage: {translate key="localization.key.name" [paramName="paramValue" ...]}
Custom Smarty function for translating localization keys. Substitution works by replacing tokens like "{$foo}" with the value of the parameter named "foo" (if supplied). $params array associative array, must contain "key" parameter for string to translate plus zero or more named parameters for substitution. Translation variables can be specified also as an optional associative array named "params". $smarty Smarty
Definition at line 304 of file TemplateManager.inc.php.
References Locale.translate().
| TemplateManager.smartyUrl | ( | $ | params, | |
| &$ | smarty | |||
| ) |
Generate a URL into OJS. (This is a wrapper around Request.url to make it available to Smarty templates.)
Definition at line 572 of file TemplateManager.inc.php.
References Request.url().
| TemplateManager.TemplateManager | ( | ) |
Constructor. Initialize template engine and assign basic template variables.
Definition at line 52 of file TemplateManager.inc.php.
References Core.getBaseDir(), Request.getBaseUrl(), Request.getCompleteUrl(), DAORegistry.getDAO(), Request.getJournal(), PublicFileManager.getJournalFilesPath(), Locale.getLocale(), OJSPaymentManager.getManager(), Request.getRequestedPage(), Request.getSite(), PublicFileManager.getSiteFilesPath(), Config.getVar(), Validation.isLoggedIn(), and PluginRegistry.loadPlugin().
Referenced by getManager().
1.5.6