Merge lp:~quam-plures-core/quam-plures/qp-disp-titles into lp:quam-plures

Proposed by Lee Turner
Status: Merged
Merged at revision: not available
Proposed branch: lp:~quam-plures-core/quam-plures/qp-disp-titles
Merge into: lp:quam-plures
Diff against target: 119 lines (+36/-17)
1 file modified
inc/_core/_template.funcs.php (+36/-17)
To merge this branch: bzr merge lp:~quam-plures-core/quam-plures/qp-disp-titles
Reviewer Review Type Date Requested Status
EdB Approve
Review via email: mp+22479@code.launchpad.net

Description of the change

Added ability to customise titles for all disp pages.

To post a comment you must log in.
Revision history for this message
EdB (edb) wrote :

Will grab this now and try to test tonight but I'm worn out from this "working" thing. And I gotta patch my other branch but that should be no problem.

Revision history for this message
EdB (edb) wrote :

Tested without issue. Changed a message form title, then figured out I needed a custom html_header to change the <title> tag, and both - of course - worked. Will merge this in fairly soon :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'inc/_core/_template.funcs.php'
2--- inc/_core/_template.funcs.php 2010-02-01 00:55:37 +0000
3+++ inc/_core/_template.funcs.php 2010-03-30 19:20:36 +0000
4@@ -213,20 +213,27 @@
5 * 'glue' => ' - ',
6 * 'format' => 'htmlbody',
7 * 'arcdir_text' => T_('Archive directory'),
8- * 'catdir_text' => T_('Category directory'),
9+ * 'catdir_text' => T_('Category Directory'),
10+ * 'mediaidx_text' => T_('Photo Index'),
11+ * 'msgform_text' => T_('Send an Email Message'),
12+ * 'profile_text' => T_('User Profile'),
13+ * 'user_text' => T_('User'),
14+ * 'subs_text' => T_('Subscriptions'),
15+ * 'comments_text' => T_('Latest Comments'),
16+ * 'feedback-popup_text' => T_('Feedback'),
17 * ), $params );
18 * </code>
19 *
20 * Displays title depending on value of $disp:
21 * - "Archive Directory" (arcdir_text param) title if $disp is 'arcdir'
22 * - "Category Directory" (catdir_text param) title if $disp is 'catdir'
23- * - "Latest comments (on)" title if $disp is 'comments'
24- * - "Feedback on" title if $disp is 'feedback-popup'
25- * - "User profile" title if $disp is 'profile'
26- * - "Subscriptions" title if $disp is 'subs'
27- * - "Send an email message" title if $disp is 'msgform'
28+ * - "Latest comments (on)" (comments_text param) title if $disp is 'comments'
29+ * - "Feedback on" (feedback-popup_text param) title if $disp is 'feedback-popup'
30+ * - "User profile" (user_text param) title if $disp is 'user'
31+ * - "Subscriptions" (subs_text param) title if $disp is 'subs'
32+ * - "Send an email message" (msgform_text param) title if $disp is 'msgform'
33+ * - "User" (user_text param) title if $disp is 'user'
34 * - "PREVIEW" title if we are previewing an item
35- * - "User" title if $disp is 'user'
36 *
37 * 'auto_pilot' => 'seo_title': Use the SEO title autopilot. (Default: "none")
38 *
39@@ -254,9 +261,16 @@
40 'title_page_after' => '#',
41 'glue' => ' - ',
42 'format' => 'htmlbody',
43- 'arcdir_text' => T_('Archive directory'),
44- 'catdir_text' => T_('Category directory'),
45- ), $params );
46+ 'arcdir_text' => T_('Archive Directory'),
47+ 'catdir_text' => T_('Category Directory'),
48+ 'mediaidx_text' => T_('Photo Index'),
49+ 'msgform_text' => T_('Send an Email Message'),
50+ 'profile_text' => T_('User Profile'),
51+ 'user_text' => T_('User'),
52+ 'subs_text' => T_('Subscriptions'),
53+ 'comments_text' => T_('Latest Comments'),
54+ 'feedback-popup_text' => T_('Feedback'),
55+ ), $params );
56
57 if( $params['auto_pilot'] == 'seo_title' )
58 { // We want to use the SEO title autopilot. Do overrides:
59@@ -283,17 +297,22 @@
60 // We are requesting the archive directory:
61 $r[] = $params['catdir_text'];
62 break;
63+
64+ case 'mediaidx':
65+ // We are requesting the media index:
66+ $r[] = $params['mediaidx_text'];
67+ break;
68
69 case 'comments':
70 // We are requesting the latest comments:
71 global $Item;
72 if( isset( $Item ) )
73 {
74- $r[] = sprintf( /* TRANS: %s is an item title */ T_('Latest comments on %s'), $Item->get('title') );
75+ $r[] = sprintf( /* TRANS: %s is an item title */ $params['comments_text'] . T_(' on %s'), $Item->get('title') );
76 }
77 else
78 {
79- $r[] = T_('Latest comments');
80+ $r[] = $params['comments_text'];
81 }
82 break;
83
84@@ -301,22 +320,22 @@
85 // We are requesting the comments on a specific post:
86 // Should be in first position
87 $Item = & $MainList->get_by_idx( 0 );
88- $r[] = sprintf( /* TRANS: %s is an item title */ T_('Feedback on %s'), $Item->get('title') );
89+ $r[] = sprintf( /* TRANS: %s is an item title */ $params['feedback-popup_text'] . T_(' on %s'), $Item->get('title') );
90 break;
91
92 case 'profile':
93 // We are requesting the user profile:
94- $r[] = T_('User profile');
95+ $r[] = $params['profile_text'];
96 break;
97
98 case 'subs':
99 // We are requesting the subscriptions screen:
100- $r[] = T_('Subscriptions');
101+ $r[] = $params['subs_text'];
102 break;
103
104 case 'msgform':
105 // We are requesting the message form:
106- $r[] = T_('Send an email message');
107+ $r[] = $params['msgform_text'];
108 break;
109
110 case 'single':
111@@ -342,7 +361,7 @@
112
113 case 'user':
114 // We are requesting the message form:
115- $r[] = T_('User');
116+ $r[] = $params['user_text'];
117 break;
118
119 default:

Subscribers

People subscribed via source and target branches