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
=== modified file 'inc/_core/_template.funcs.php'
--- inc/_core/_template.funcs.php 2010-02-01 00:55:37 +0000
+++ inc/_core/_template.funcs.php 2010-03-30 19:20:36 +0000
@@ -213,20 +213,27 @@
213 * 'glue' => ' - ',213 * 'glue' => ' - ',
214 * 'format' => 'htmlbody',214 * 'format' => 'htmlbody',
215 * 'arcdir_text' => T_('Archive directory'),215 * 'arcdir_text' => T_('Archive directory'),
216 * 'catdir_text' => T_('Category directory'),216 * 'catdir_text' => T_('Category Directory'),
217 * 'mediaidx_text' => T_('Photo Index'),
218 * 'msgform_text' => T_('Send an Email Message'),
219 * 'profile_text' => T_('User Profile'),
220 * 'user_text' => T_('User'),
221 * 'subs_text' => T_('Subscriptions'),
222 * 'comments_text' => T_('Latest Comments'),
223 * 'feedback-popup_text' => T_('Feedback'),
217 * ), $params );224 * ), $params );
218 * </code>225 * </code>
219 *226 *
220 * Displays title depending on value of $disp: 227 * Displays title depending on value of $disp:
221 * - "Archive Directory" (arcdir_text param) title if $disp is 'arcdir'228 * - "Archive Directory" (arcdir_text param) title if $disp is 'arcdir'
222 * - "Category Directory" (catdir_text param) title if $disp is 'catdir'229 * - "Category Directory" (catdir_text param) title if $disp is 'catdir'
223 * - "Latest comments (on)" title if $disp is 'comments'230 * - "Latest comments (on)" (comments_text param) title if $disp is 'comments'
224 * - "Feedback on" title if $disp is 'feedback-popup'231 * - "Feedback on" (feedback-popup_text param) title if $disp is 'feedback-popup'
225 * - "User profile" title if $disp is 'profile'232 * - "User profile" (user_text param) title if $disp is 'user'
226 * - "Subscriptions" title if $disp is 'subs'233 * - "Subscriptions" (subs_text param) title if $disp is 'subs'
227 * - "Send an email message" title if $disp is 'msgform'234 * - "Send an email message" (msgform_text param) title if $disp is 'msgform'
235 * - "User" (user_text param) title if $disp is 'user'
228 * - "PREVIEW" title if we are previewing an item236 * - "PREVIEW" title if we are previewing an item
229 * - "User" title if $disp is 'user'
230 *237 *
231 * 'auto_pilot' => 'seo_title': Use the SEO title autopilot. (Default: "none")238 * 'auto_pilot' => 'seo_title': Use the SEO title autopilot. (Default: "none")
232 *239 *
@@ -254,9 +261,16 @@
254 'title_page_after' => '#',261 'title_page_after' => '#',
255 'glue' => ' - ',262 'glue' => ' - ',
256 'format' => 'htmlbody',263 'format' => 'htmlbody',
257 'arcdir_text' => T_('Archive directory'),264 'arcdir_text' => T_('Archive Directory'),
258 'catdir_text' => T_('Category directory'),265 'catdir_text' => T_('Category Directory'),
259 ), $params );266 'mediaidx_text' => T_('Photo Index'),
267 'msgform_text' => T_('Send an Email Message'),
268 'profile_text' => T_('User Profile'),
269 'user_text' => T_('User'),
270 'subs_text' => T_('Subscriptions'),
271 'comments_text' => T_('Latest Comments'),
272 'feedback-popup_text' => T_('Feedback'),
273 ), $params );
260274
261 if( $params['auto_pilot'] == 'seo_title' )275 if( $params['auto_pilot'] == 'seo_title' )
262 { // We want to use the SEO title autopilot. Do overrides:276 { // We want to use the SEO title autopilot. Do overrides:
@@ -283,17 +297,22 @@
283 // We are requesting the archive directory:297 // We are requesting the archive directory:
284 $r[] = $params['catdir_text'];298 $r[] = $params['catdir_text'];
285 break;299 break;
300
301 case 'mediaidx':
302 // We are requesting the media index:
303 $r[] = $params['mediaidx_text'];
304 break;
286305
287 case 'comments':306 case 'comments':
288 // We are requesting the latest comments:307 // We are requesting the latest comments:
289 global $Item;308 global $Item;
290 if( isset( $Item ) )309 if( isset( $Item ) )
291 {310 {
292 $r[] = sprintf( /* TRANS: %s is an item title */ T_('Latest comments on %s'), $Item->get('title') );311 $r[] = sprintf( /* TRANS: %s is an item title */ $params['comments_text'] . T_(' on %s'), $Item->get('title') );
293 }312 }
294 else313 else
295 {314 {
296 $r[] = T_('Latest comments');315 $r[] = $params['comments_text'];
297 }316 }
298 break;317 break;
299318
@@ -301,22 +320,22 @@
301 // We are requesting the comments on a specific post:320 // We are requesting the comments on a specific post:
302 // Should be in first position321 // Should be in first position
303 $Item = & $MainList->get_by_idx( 0 );322 $Item = & $MainList->get_by_idx( 0 );
304 $r[] = sprintf( /* TRANS: %s is an item title */ T_('Feedback on %s'), $Item->get('title') );323 $r[] = sprintf( /* TRANS: %s is an item title */ $params['feedback-popup_text'] . T_(' on %s'), $Item->get('title') );
305 break;324 break;
306325
307 case 'profile':326 case 'profile':
308 // We are requesting the user profile:327 // We are requesting the user profile:
309 $r[] = T_('User profile');328 $r[] = $params['profile_text'];
310 break;329 break;
311330
312 case 'subs':331 case 'subs':
313 // We are requesting the subscriptions screen:332 // We are requesting the subscriptions screen:
314 $r[] = T_('Subscriptions');333 $r[] = $params['subs_text'];
315 break;334 break;
316335
317 case 'msgform':336 case 'msgform':
318 // We are requesting the message form:337 // We are requesting the message form:
319 $r[] = T_('Send an email message');338 $r[] = $params['msgform_text'];
320 break;339 break;
321340
322 case 'single':341 case 'single':
@@ -342,7 +361,7 @@
342361
343 case 'user':362 case 'user':
344 // We are requesting the message form:363 // We are requesting the message form:
345 $r[] = T_('User');364 $r[] = $params['user_text'];
346 break;365 break;
347366
348 default:367 default:

Subscribers

People subscribed via source and target branches