Changeset 2742
- Timestamp:
- 07/09/08 20:16:36 (16 months ago)
- Location:
- branches/release-41
- Files:
-
- 1 added
- 2 modified
-
lib/MT/Template/Context/Search.pm (modified) (6 diffs)
-
lib/MT/Template/ContextHandlers.pm (modified) (343 diffs)
-
t/91-tagcoverage.t (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-41/lib/MT/Template/Context/Search.pm
r2420 r2742 39 39 ########################################################################### 40 40 41 =head2 IfStraightSearch 42 43 A conditional block which outputs its contents if the search in progress 44 is a regular (or "straight") search. 45 46 =for tags search 47 48 =cut 49 50 ########################################################################### 51 52 =head2 IfTagSearch 53 54 A conditional block which outputs its contents if the search in progress 55 is a search of entries by tag. 56 57 =for tags search 58 59 =cut 60 61 ########################################################################### 62 63 =head2 NoSearch 64 65 A container tag whose contents are displayed only if there is no search 66 performed. 67 68 This tag is only recognized in search templates. 69 70 =for tags search 71 72 =cut 73 74 ########################################################################### 75 76 =head2 NoSearchResults 77 78 A container tag whose contents are displayed if a search is performed 79 but no results are found. 80 81 This tag is only recognized in search templates. 82 83 =for tags search 84 85 =cut 86 87 ########################################################################### 88 41 89 =head2 SearchResultsHeader 42 90 … … 48 96 This tag is only recognized in SearchResults block. 49 97 98 B<Example:> 99 100 <mt:SearchResultsHeader> 101 <h3>Look what we found!</h3> 102 </mt:SearchResultsHeader> 103 50 104 =for tags search 51 105 … … 61 115 62 116 This tag is only recognized in SearchResults block. 117 118 B<Example:> 119 120 <mt:SearchResultsFooter> 121 <p>If you didn't find what you were looking for, you can also peruse 122 the <a href="<mt:Link identifier="archive_index">">site archives</a>.</p> 123 </mt:SearchResultsFooter> 63 124 64 125 =for tags search … … 110 171 This tag is only recognized in search templates. 111 172 173 =for tags search 174 112 175 =cut 113 176 … … 124 187 =cut 125 188 189 ########################################################################### 190 191 =head2 SearchIncludeBlogs 192 193 Used in the search result template to pass the IncludeBlogs parameters 194 through from the search form keeping the context of any followup search 195 the same as the initial search. 196 197 B<Example:> 198 199 <input type="hidden" name="IncludeBlogs" value="<$mt:SearchIncludeBlogs$>" /> 200 201 =cut 202 126 203 sub _hdlr_include_blogs { $_[0]->stash('include_blogs') || '' } 204 205 ########################################################################### 206 207 =head2 SearchString 208 209 An HTML-encoded search query. This tag is only recognized in search templates. 210 211 B<Example:> 212 213 <$mt:SearchString$> 214 215 =for tags search 216 217 =cut 218 127 219 sub _hdlr_search_string { $_[0]->stash('search_string') || '' } 220 221 ########################################################################### 222 223 =head2 SearchTemplateID 224 225 Returns the identifier of the search template (ie, "feed" or 226 "nomorepizzaplease"). 227 228 B<Example:> 229 230 <$mt:SearchTemplateID$> 231 232 =for tags search 233 234 =cut 235 128 236 sub _hdlr_template_id { $_[0]->stash('template_id') || '' } 129 237 sub _hdlr_max_results { $_[0]->stash('maxresults') || '' } 238 239 ########################################################################### 240 241 =head2 SearchResultCount 242 243 The number of results found across all of the blogs searched. This tag 244 is only recognized in search templates. 245 246 B<Example:> 247 248 <$mt:SearchResultCount$> 249 250 =for tags search, count 251 252 =cut 130 253 131 254 sub _hdlr_result_count { … … 133 256 $results ? $results : 0; 134 257 } 258 259 ########################################################################### 260 261 =head2 SearchResults 262 263 A container tag that creates a list of search results. This tag 264 creates an entry and blog context that all Entry* and Blog* tags 265 can be used. 266 267 This tag is only recognized in search templates. 268 269 =for tags search 270 271 =cut 135 272 136 273 sub _hdlr_results { -
branches/release-41/lib/MT/Template/ContextHandlers.pm
r2728 r2742 1075 1075 ########################################################################### 1076 1076 1077 =head2 string_format 1078 1079 An alias for the 'sprintf' modifier. 1080 1081 =cut 1082 1083 ########################################################################### 1084 1077 1085 =head2 sprintf 1078 1086 … … 1228 1236 =over 4 1229 1237 1230 =item html1238 =item * html 1231 1239 1232 1240 Similar to the 'encode_html' modifier. Escapes special characters as 1233 1241 HTML entities. 1234 1242 1235 =item url1243 =item * url 1236 1244 1237 1245 Similar to the 'encode_url' modifier. Escapes special characters using 1238 1246 a URL-encoded format (ie, " " becomes "%20"). 1239 1247 1240 =item javascript or js1248 =item * javascript or js 1241 1249 1242 1250 Similar to the 'encode_js' modifier. Escapes special characters such … … 1244 1252 in a JavaScript string. 1245 1253 1246 =item mail1254 =item * mail 1247 1255 1248 1256 A very simple email obfuscation technique. … … 1455 1463 ########################################################################### 1456 1464 1465 =head2 TemplateNote 1466 1467 A function tag that always returns an empty string. This tag is useful 1468 for placing simple notes in your templates, since it produces nothing. 1469 1470 B<Example:> 1471 1472 <$mt:TemplateNote note="Hi, mom!"$> 1473 1474 =for tags templating 1475 1476 =cut 1477 1478 ########################################################################### 1479 1480 =head2 Ignore 1481 1482 A block tag that always produces an empty string. This tag is useful 1483 for wrapping template code you wish to disable, or perhaps annotating 1484 sections of your template. 1485 1486 B<Example:> 1487 1488 <mt:Ignore> 1489 The API key for the following tag is D3ADB33F. 1490 </mt:Ignore> 1491 1492 =for tags templating 1493 1494 =cut 1495 1496 ########################################################################### 1497 1498 =head2 IfStatic 1499 1500 Returns true if the current publishing context is static publishing, 1501 and false otherwise. 1502 1503 =for tags templating, utility 1504 1505 =cut 1506 1507 ########################################################################### 1508 1509 =head2 IfDynamic 1510 1511 Returns true if the current publishing context is dynamic publishing, 1512 and false otherwise. 1513 1514 =for tags templating, utility 1515 1516 =cut 1517 1518 ########################################################################### 1519 1457 1520 =head2 App:Listing 1458 1521 … … 1526 1589 =over 4 1527 1590 1528 =item type (optional)1591 =item * type (optional) 1529 1592 1530 1593 The C<MT::Object> object type the listing is processing. If unset, 1531 1594 will use the contents of the C<object_type> variable. 1532 1595 1533 =item loop (optional)1596 =item * loop (optional) 1534 1597 1535 1598 The source of data to process. This is an array of hashes, similar … … 1537 1600 variable is used instead. 1538 1601 1539 =item empty_message (optional)1602 =item * empty_message (optional) 1540 1603 1541 1604 Used when there are no rows to output for the listing. If not set, … … 1544 1607 found. 1545 1608 1546 =item id (optional)1609 =item * id (optional) 1547 1610 1548 1611 Used to construct the DOM id for the listing. The outer C<div> tag … … 1551 1614 attribute). 1552 1615 1553 =item listing_class (optional)1616 =item * listing_class (optional) 1554 1617 1555 1618 Provides a custom class name that can be applied to the main … … 1557 1620 that is always applied). 1558 1621 1559 =item action (optional; default 'script_url' variable)1622 =item * action (optional; default 'script_url' variable) 1560 1623 1561 1624 Supplies the 'action' attribute of the C<form> tag produced. 1562 1625 1563 =item hide_pager (optional; default '0')1626 =item * hide_pager (optional; default '0') 1564 1627 1565 1628 Controls whether the pagination controls are shown or not. 1566 1629 If unspecified, pagination is shown. 1567 1630 1568 =item show_actions (optional; default '1')1631 =item * show_actions (optional; default '1') 1569 1632 1570 1633 Controls whether the actions associated with the object type … … 1677 1740 =over 4 1678 1741 1679 =item mode1742 =item * mode 1680 1743 1681 1744 Maps to a '__mode' argument. 1682 1745 1683 =item type1746 =item * type 1684 1747 1685 1748 Maps to a '_type' argument. … … 1741 1804 =over 4 1742 1805 1743 =item bar_position (optional; default "top")1806 =item * bar_position (optional; default "top") 1744 1807 1745 1808 Assigns a CSS class name indicating whether the control is above or 1746 1809 below the listing or edit form it is associated with. 1747 1810 1748 =item hide_pager1811 =item * hide_pager 1749 1812 1750 1813 Assign either 1 or 0 to control whether the pagination controls are 1751 1814 displayed or not. 1752 1815 1753 =item form_id1816 =item * form_id 1754 1817 1755 1818 Associates the pagition controls and item action widget with the … … 1793 1856 =over 4 1794 1857 1795 =item id (optional)1858 =item * id (optional) 1796 1859 1797 1860 If specified, will be used as the 'id' attribute for the outermost C<div> … … 1799 1862 variable instead. 1800 1863 1801 =item label (required)1864 =item * label (required) 1802 1865 1803 1866 The label to display above the widget. 1804 1867 1805 =item label_link (optional)1868 =item * label_link (optional) 1806 1869 1807 1870 If specified, this link will wrap the label for the widget. 1808 1871 1809 =item label_onclick1872 =item * label_onclick 1810 1873 1811 1874 If specified, this JavaScript code will be assigned to the 'onclick' 1812 1875 attribute of a link tag wrapping the widget label. 1813 1876 1814 =item class (optional)1877 =item * class (optional) 1815 1878 1816 1879 If unspecified, will use the id of the widget. This class is included in the 1817 1880 'class' attribute of the outermost C<div> tag for the widget. 1818 1881 1819 =item header_action1820 1821 =item can_close (optional; default "0")1882 =item * header_action 1883 1884 =item * can_close (optional; default "0") 1822 1885 1823 1886 Identifies whether widget may be closed or not. 1824 1887 1825 =item tabbed (optional; default "0")1888 =item * tabbed (optional; default "0") 1826 1889 1827 1890 If specified, the widget will be assigned an attribute that gives it … … 1932 1995 =over 4 1933 1996 1934 =item id (optional)1935 1936 =item class (optional; default "info")1937 1938 =item rebuild (optional)1997 =item * id (optional) 1998 1999 =item * class (optional; default "info") 2000 2001 =item * rebuild (optional) 1939 2002 1940 2003 Accepted values: "all", "index". 1941 2004 1942 =item can_close (optional; default "1")2005 =item * can_close (optional; default "1") 1943 2006 1944 2007 =back … … 2063 2126 =over 4 2064 2127 2065 =item action (optional)2128 =item * action (optional) 2066 2129 2067 2130 Identifies the URL to submit the form to. If not given, will use 2068 2131 the current application URI. 2069 2132 2070 =item method (optional; default "POST")2133 =item * method (optional; default "POST") 2071 2134 2072 2135 Supplies the C<form> method. "GET" or "POST" are the typical values 2073 2136 for this, but will accept any HTTP-compatible method (ie: "PUT", "DELETE"). 2074 2137 2075 =item object_id (optional)2138 =item * object_id (optional) 2076 2139 2077 2140 Populates a hidden 'id' field in the form. If not given, will also use any 2078 2141 'id' template variable defined. 2079 2142 2080 =item blog_id (optional)2143 =item * blog_id (optional) 2081 2144 2082 2145 Populates a hidden 'blog_id' field in the form. If not given, will also use 2083 2146 any 'blog_id' template variable defined. 2084 2147 2085 =item object_type (optional)2148 =item * object_type (optional) 2086 2149 2087 2150 Populates a hidden '_type' field in the form. If not given, will also use 2088 2151 any 'type' template variable defined. 2089 2152 2090 =item id (optional)2153 =item * id (optional) 2091 2154 2092 2155 Used to form the 'id' element of the HTML C<form> tag. If not specified, … … 2094 2157 determined object_type. 2095 2158 2096 =item name (optional)2159 =item * name (optional) 2097 2160 2098 2161 Supplies the C<form> name attribute. If unspecified, will use the C<id> 2099 2162 attribute, if available. 2100 2163 2101 =item enctype (optional)2164 =item * enctype (optional) 2102 2165 2103 2166 If assigned, sets an 'enctype' attribute on the C<form> tag using the value … … 2175 2238 =over 4 2176 2239 2177 =item id (required)2240 =item * id (required) 2178 2241 2179 2242 A unique identifier for this group of settings. 2180 2243 2181 =item class (optional)2244 =item * class (optional) 2182 2245 2183 2246 If specified, applies this CSS class to the C<fieldset> tag produced. 2184 2247 2185 =item shown (optional; default "1")2248 =item * shown (optional; default "1") 2186 2249 2187 2250 Controls whether the C<fieldset> is initially shown or not. If hidden, … … 2230 2293 =over 4 2231 2294 2232 =item id (required)2295 =item * id (required) 2233 2296 2234 2297 Each application setting tag requires a unique 'id' attribute. This id 2235 2298 should not be re-used within the template. 2236 2299 2237 =item required (optional; default "0")2300 =item * required (optional; default "0") 2238 2301 2239 2302 Controls whether the field is displayed with visual cues that the 2240 2303 field is a required field or not. 2241 2304 2242 =item label2305 =item * label 2243 2306 2244 2307 Supplies the label phrase for the setting. 2245 2308 2246 =item show_label (optional; default "1")2309 =item * show_label (optional; default "1") 2247 2310 2248 2311 Controls whether the label portion of the setting is shown or not. 2249 2312 2250 =item shown (optional; default "1")2313 =item * shown (optional; default "1") 2251 2314 2252 2315 Controls whether the setting is visible or not. If specified, adds … … 2254 2317 setting. 2255 2318 2256 =item label_class (optional)2319 =item * label_class (optional) 2257 2320 2258 2321 Allows an additional CSS class to be applied to the label of the 2259 2322 setting. 2260 2323 2261 =item content_class (optional)2324 =item * content_class (optional) 2262 2325 2263 2326 Allows an addtional CSS class to be applied to the contents of the 2264 2327 setting. 2265 2328 2266 =item hint (optional)2329 =item * hint (optional) 2267 2330 2268 2331 Supplies a "hint" phrase that provides inline instruction to the user. … … 2270 2333 forces it to display. 2271 2334 2272 =item show_hint (optional; default "0")2335 =item * show_hint (optional; default "0") 2273 2336 2274 2337 Controls whether the inline help 'hint' label is shown or not. 2275 2338 2276 =item warning2339 =item * warning 2277 2340 2278 2341 Supplies a warning message to the user regarding the use of this setting. 2279 2342 2280 =item show_warning2343 =item * show_warning 2281 2344 2282 2345 Controls whether the warning message is shown or not. 2283 2346 2284 =item help_page2347 =item * help_page 2285 2348 2286 2349 Identifies a specific page of the MT help documentation for this setting. 2287 2350 2288 =item help_section2351 =item * help_section 2289 2352 2290 2353 Identifies a section name of the MT help documentation for this setting. … … 2408 2471 =over 4 2409 2472 2410 =item var (optional)2473 =item * var (optional) 2411 2474 2412 2475 If assigned, the current 'index' of the loop is assigned to this template 2413 2476 variable. 2414 2477 2415 =item from (optional; default "0")2416 2417 =item start2478 =item * from (optional; default "0") 2479 2480 =item * start 2418 2481 2419 2482 Identifies the starting number for the loop. 2420 2483 2421 =item to2422 2423 =item end2484 =item * to 2485 2486 =item * end 2424 2487 2425 2488 Identifies the ending number for the loop. Either 'to' or 'end' must 2426 2489 be specified. 2427 2490 2428 =item step (optional; default "1")2429 2430 =item increment2491 =item * step (optional; default "1") 2492 2493 =item * increment 2431 2494 2432 2495 Provides the amount to increment the loop counter. 2433 2496 2434 =item glue (optional)2497 =item * glue (optional) 2435 2498 2436 2499 If specified, this string is added inbetween each block of the loop. … … 2442 2505 =over 4 2443 2506 2444 =item __first__2507 =item * __first__ 2445 2508 2446 2509 Assigned 1 when the loop is in the first iteration. 2447 2510 2448 =item __last__2511 =item * __last__ 2449 2512 2450 2513 Assigned 1 when the loop is in the last iteration. 2451 2514 2452 =item __odd__2515 =item * __odd__ 2453 2516 2454 2517 Assigned 1 when the loop index is odd, 0 when it is even. 2455 2518 2456 =item __even__2519 =item * __even__ 2457 2520 2458 2521 Assigned 1 when the loop index is even, 0 when it is odd. 2459 2522 2460 =item __index__2523 =item * __index__ 2461 2524 2462 2525 Holds the current loop index value, even if the 'var' attribute has 2463 2526 been given. 2464 2527 2465 =item __counter__2528 =item * __counter__ 2466 2529 2467 2530 Tracks the number of times the loop has run (starts at 1). … … 2597 2660 =over 4 2598 2661 2599 =item name2600 2601 =item var2662 =item * name 2663 2664 =item * var 2602 2665 2603 2666 Declares a variable to test. When none of the comparison attributes are … … 2605 2668 a "true" value, meaning if it is assigned a non-empty, non-zero value. 2606 2669 2607 =item tag2670 =item * tag 2608 2671 2609 2672 Declares a MT tag to execute; the value of which is used for testing. … … 2613 2676 If tag passes through the logical result of that conditional tag. 2614 2677 2615 =item op2678 =item * op 2616 2679 2617 2680 If specified, applies the specified mathematical operator to the value … … 2621 2684 =over 4 2622 2685 2623 =item + or add2686 =item * + or add 2624 2687 2625 2688 Addition. 2626 2689 2627 =item - or sub2690 =item * - or sub 2628 2691 2629 2692 Subtraction. 2630 2693 2631 =item ++ or inc2694 =item * ++ or inc 2632 2695 2633 2696 Adds 1 to the given value. 2634 2697 2635 =item -- or dec2698 =item * -- or dec 2636 2699 2637 2700 Subtracts 1 from the given value. 2638 2701 2639 =item * or mul2702 =item * * or mul 2640 2703 2641 2704 Multiplication. 2642 2705 2643 =item / or div2706 =item * / or div 2644 2707 2645 2708 Division. 2646 2709 2647 =item % or mod2710 =item * % or mod 2648 2711 2649 2712 Issues a modulus operator. … … 2651 2714 =back 2652 2715 2653 =item value2716 =item * value 2654 2717 2655 2718 Used in conjunction with the 'op' attribute. 2656 2719 2657 =item eq2720 =item * eq 2658 2721 2659 2722 Tests whether the given value is equal to the value of the 'eq' attribute. 2660 2723 2661 =item ne2724 =item * ne 2662 2725 2663 2726 Tests whether the given value is not equal to the value of the 'ne' attribute. 2664 2727 2665 =item gt2728 =item * gt 2666 2729 2667 2730 Tests whether the given value is greater than the value of the 'gt' attribute. 2668 2731 2669 =item lt2732 =item * lt 2670 2733 2671 2734 Tests whether the given value is less than the value of the 'lt' attribute. 2672 2735 2673 =item ge2736 =item * ge 2674 2737 2675 2738 Tests whether the given value is greater than or equal to the value of the 2676 2739 'ge' attribute. 2677 2740 2678 =item le2741 =item * le 2679 2742 2680 2743 Tests whether the given value is less than or equal to the value of the 2681 2744 'le' attribute. 2682 2745 2683 =item like2746 =item * like 2684 2747 2685 2748 Tests whether the given value matches the regex pattern in the 'like' 2686 2749 attribute. 2687 2750 2688 =item test2751 =item * test 2689 2752 2690 2753 Uses a Perl (or PHP under Dynamic Publishing) expression. For Perl, this … … 2969 3032 ########################################################################### 2970 3033 3034 =head2 Unless 3035 3036 A conditional tag that is the logical opposite of the L<If> tag. All 3037 attributes supported by the L<If> tag are also supported for this tag. 3038 3039 =for tags templating 3040 3041 =cut 3042 3043 ########################################################################### 3044 2971 3045 =head2 Loop 2972 3046 … … 2981 3055 =over 4 2982 3056 2983 =item name2984 2985 =item var3057 =item * name 3058 3059 =item * var 2986 3060 2987 3061 The template variable that contains the array of hashref data to 2988 3062 process. 2989 3063 2990 =item sort_by (optional)3064 =item * sort_by (optional) 2991 3065 2992 3066 Causes the data in the given array to be resorted in the manner … … 3000 3074 sort_by="key reverse"; sort_by="value numeric" 3001 3075 3002 =item glue (optional)3076 =item * glue (optional) 3003 3077 3004 3078 If specified, this string will be placed inbetween each "row" … … 3012 3086 =over 4 3013 3087 3014 =item __first__3088 =item * __first__ 3015 3089 3016 3090 Assigned when the loop is in the first iteration. 3017 3091 3018 =item __last__3092 =item * __last__ 3019 3093 3020 3094 Assigned when the loop is in the last iteration. 3021 3095 3022 =item __odd__3096 =item * __odd__ 3023 3097 3024 3098 Assigned 1 when the loop is on odd numbered rows, 0 when even. 3025 3099 3026 =item __even__3100 =item * __even__ 3027 3101 3028 3102 Assigned 1 when the loop is on even numbered rows, 0 when odd. 3029 3103 3030 =item __key__3104 =item * __key__ 3031 3105 3032 3106 When looping over a hashref template variable, this variable is 3033 3107 assigned the key currently in context. 3034 3108 3035 =item __value__3109 =item * __value__ 3036 3110 3037 3111 This variable holds the value of the array or hashref element … … 3138 3212 An alias for the 'Var' tag, and considered deprecated in favor of 'Var'. 3139 3213 3214 =for tags deprecated 3215 3140 3216 =cut 3141 3217 … … 3150 3226 =over 4 3151 3227 3152 =item name (or var)3228 =item * name (or var) 3153 3229 3154 3230 Identifies the template variable. The 'name' attribute supports a variety … … 3175 3251 <mt:Var name="count(foo)"> 3176 3252 3177 =item op3253 =item * op 3178 3254 3179 3255 Along with the 'value' attribute, this allows the application of … … 3181 3257 are supported). 3182 3258 3183 =item value3259 =item * value 3184 3260 3185 3261 If provided with the 'op' attribute, provides the operand for the … … 3190 3266 is useful for setting variables as well. 3191 3267 3192 =item function3268 =item * function 3193 3269 3194 3270 For array template variables, this attribute supports: … … 3196 3272 =over 4 3197 3273 3198 =item pop3274 =item * pop 3199 3275 3200 3276 Takes an element from the end of the array (last element). 3201 3277 3202 =item shift3278 =item * shift 3203 3279 3204 3280 Takes an element from the front of the array (index 0). 3205 3281 3206 =item count3282 =item * count 3207 3283 3208 3284 Returns the number of elements in the array template variable. … … 3214 3290 =over 4 3215 3291 3216 =item delete3292 =item * delete 3217 3293 3218 3294 Only valid when used with the 'key' attribute, or if a key is present 3219 3295 in the variable name. 3220 3296 3221 =item count3297 =item * count 3222 3298 3223 3299 Returns the number of keys present in the hash template variable. … … 3225 3301 =back 3226 3302 3227 =item index3303 =item * index 3228 3304 3229 3305 Identifies an element of an array template variable. 3230 3306 3231 =item key3307 =item * key 3232 3308 3233 3309 Identifies a key of a hash template variable. 3234 3310 3235 =item default3311 =item * default 3236 3312 3237 3313 If the variable is undefined or empty, this value will be output instead. 3238 3314 3239 =item to_json3315 =item * to_json 3240 3316 3241 3317 Formats the variable in JSON notation. 3242 3318 3243 =item glue3319 =item * glue 3244 3320 3245 3321 For array template variables, this attribute is used in joining the … … 3437 3513 =over 4 3438 3514 3439 =item tag or name3515 =item * tag or name 3440 3516 3441 3517 If either 'name' or 'tag' are specified, tests the entry in context … … 3553 3629 =over 4 3554 3630 3555 =item glue3631 =item * glue 3556 3632 3557 3633 A text string that is used to join each of the items together. For example … … 3561 3637 would print out each tag name separated by a comma and a space. 3562 3638 3563 =item type3639 =item * type 3564 3640 3565 3641 The kind of object for which to show tags. By default the entry tags are shown. 3566 3642 3567 =item sort_by3643 =item * sort_by 3568 3644 3569 3645 The tag object column on which to order the tags. Common values are name and 3570 3646 rank. By default tags are sorted by name. 3571 3647 3572 =item sort_order3648 =item * sort_order 3573 3649 3574 3650 The direction in which to sort tags by the sort_by field. Possible values … … 3576 3652 when sorted by name and descending order when sorted by other columns. 3577 3653 3578 =item limit3654 =item * limit 3579 3655 3580 3656 A number of tags to show. If given, only the first tags as ordered by 3581 3657 sort_by and sort_order are shown. 3582 3658 3583 =item top3659 =item * top 3584 3660 3585 3661 A number of tags to show. If given, only the given number of tags with … … 3817 3893 =over 4 3818 3894 3819 =item max (optional; default "6")3895 =item * max (optional; default "6") 3820 3896 3821 3897 Allows a user to specify the upper bound of the scale. … … 3931 4007 3932 4008 To avoid printing out the leading text when no entry tags are assigned you 3933 can use the EntryIfTaggedconditional block to first test for entry tags3934 on the entry. You can also use the EntryIfTaggedconditional block with4009 can use the L<EntryIfTagged> conditional block to first test for entry tags 4010 on the entry. You can also use the L<EntryIfTagged> conditional block with 3935 4011 the tag attribute to test for the assignment of a particular entry tag. 3936 4012 … … 3939 4015 =over 4 3940 4016 3941 =item glue4017 =item * glue 3942 4018 3943 4019 A text string that is used to join each of the items together. For example: 3944 4020 3945 <mt:EntryTags glue=", "><$ MTTagName$></mt:EntryTags>4021 <mt:EntryTags glue=", "><$mt:TagName$></mt:EntryTags> 3946 4022 3947 4023 would print out each tag name separated by a comma and a space. … … 3951 4027 B<Example:> 3952 4028 3953 The following code can be used anywhere MTEntriescan be used. It prints4029 The following code can be used anywhere L<Entries> can be used. It prints 3954 4030 a list of all of the tags assigned to each entry returned by L<Entries> 3955 4031 glued together by a comma and a space. … … 3995 4071 ########################################################################### 3996 4072 4073 =head2 TagLabel 4074 4075 An alias for the 'TagName' tag. 4076 4077 =cut 4078 4079 ########################################################################### 4080 3997 4081 =head2 TagName 3998 4082 … … 4003 4087 =over 4 4004 4088 4005 =item normalize (optional; default "0")4089 =item * normalize (optional; default "0") 4006 4090 4007 4091 If specified, outputs the "normalized" form of the tag. A normalized … … 4011 4095 =over 4 4012 4096 4013 =item quote (optional; default "0")4097 =item * quote (optional; default "0") 4014 4098 4015 4099 If specified, causes any tag with spaces in it to be wrapped in quote … … 4229 4313 =over 4 4230 4314 4231 =item type4232 4233 =item archive_type4315 =item * type 4316 4317 =item * archive_type 4234 4318 4235 4319 The archive type to test for, case-insensitively. See L<ArchiveType> for … … 4276 4360 =over 4 4277 4361 4278 =item type or archive_type4362 =item * type or archive_type 4279 4363 4280 4364 Specifies the name of the archive type you wish to check to see if it is enabled. … … 4354 4438 =over 4 4355 4439 4356 =item var (optional)4440 =item * var (optional) 4357 4441 4358 4442 Supplies a variable name to use for assigning the contents of the … … 4387 4471 =over 4 4388 4472 4389 =item module4473 =item * module 4390 4474 4391 4475 The name of a template module in the current blog. 4392 4476 4393 =item widget4477 =item * widget 4394 4478 4395 4479 The name of the widget in the current blog to include. 4396 4480 4397 =item file4481 =item * file 4398 4482 4399 4483 The path to an external file on the system. The path can be absolute or … … 4402 4486 includes like that found in PHP. 4403 4487 4404 =item identifier4488 =item * identifier 4405 4489 4406 4490 For selecting Index templates by their unique identifier. … … 4411 4495 filename to load. 4412 4496 4413 =item blog_id (optional)4497 =item * blog_id (optional) 4414 4498 4415 4499 Used to include a template from another blog in the system. Use in 4416 4500 conjunction with the module, widget or identifier attributes. 4417 4501 4418 =item global (optional; default "0")4502 =item * global (optional; default "0") 4419 4503 4420 4504 Forces an Include of a globally defined template even if the … … 4422 4506 (For module, widget and identifier includes.) 4423 4507 4424 =item ssi (optional; default "0")4508 =item * ssi (optional; default "0") 4425 4509 4426 4510 If specified, causes the include to be handled as a server-side … … 4443 4527 Suitable for module, widget or identifier includes. 4444 4528 4445 =item cache (optional; default "0")4529 =item * cache (optional; default "0") 4446 4530 4447 4531 Enables caching of the contents of the include. Suitable for module, 4448 4532 widget or identifier includes. 4449 4533 4450 =item key or cache_key (optional)4534 =item * key or cache_key (optional) 4451 4535 4452 4536 Used to cache the template module. Used in conjunction with the 'cache' 4453 4537 attribute. Suitable for module, widget or identifier includes. 4454 4538 4455 =item ttl (optional)4539 =item * ttl (optional) 4456 4540 4457 4541 Specifies the lifetime in seconds of a cached template module. Suitable … … 4791 4875 =over 4 4792 4876 4793 =item format4877 =item * format 4794 4878 4795 4879 A required attribute that defines the template with a string of specifiers. … … 4801 4885 =over 4 4802 4886 4803 =item %a4887 =item * %a 4804 4888 4805 4889 The entry's author's display name passed through the dirify global filter. Example: melody_nelson 4806 4890 4807 =item %-a4891 =item * %-a 4808 4892 4809 4893 The same as above except using dashes. Example: melody-nelson 4810 4894 4811 =item %b4895 =item * %b 4812 4896 4813 4897 For individual archive mappings, this returns the basename of the entry. By … … 4816 4900 entry screen. Example: my_summer_vacation 4817 4901 4818 =item %-b4902 =item * %-b 4819 4903 4820 4904 Same as above but using dashes. Example: my-summer-vacation 4821 4905 4822 =item %c4906 =item * %c 4823 4907 4824 4908 The entry's primary category/subcategory path, built using the category 4825 4909 basename field. Example: arts_and_entertainment/tv_and_movies 4826 4910 4827 =item %-c4911 =item * %-c 4828 4912 4829 4913 Same as above but using dashes. Example: arts-and-entertainment/tv-and-movies 4830 4914 4831 =item %C4915 =item * %C 4832 4916 4833 4917 The entry's primary category label passed through the dirify global filter. Example: arts_and_entertainment 4834 4918 4835 =item %-C4919 =item * %-C 4836 4920 4837 4921 Same as above but using dashes. Example: arts-and-entertainment 4838 4922 4839 =item %d4923 =item * %d 4840 4924 4841 4925 2-digit day of the month. Example: 09 4842 4926 4843 =item %D4927 =item * %D 4844 4928 4845 4929 3-letter language-dependent abbreviation of the week day. Example: Tue 4846 4930 4847 =item %e4931 =item * %e 4848 4932 4849 4933 A numeric entry ID padded with leading zeroes to six digits. Example: 000040 4850 4934 4851 =item %E4935 =item * %E 4852 4936 4853 4937 The entry's numeric ID. Example: 40 4854 4938 4855 =item %f4939 =item * %f 4856 4940 4857 4941 Archive filename with the specified extension. This can be used instead of … … 4859 4943 Example: entry_basename.html or index.html 4860 4944 4861 =item %F4945 =item * %F 4862 4946 4863 4947 Same as above but without the file extension. Example: filename 4864 4948 4865 =item %h4949 =item * %h 4866 4950 4867 4951 2-digit hour on a 24-hour clock with a leading zero if applicable. 4868 4952 Example: 09 for 9am, 16 for 4pm 4869 4953 4870 =item %H4954 =item * %H 4871 4955 4872 4956 2-digit hour on a 24-hour clock without a leading zero if applicable. 4873 4957 Example: 9 for 9am, 16 for 4pm 4874 4958 4875 =item %i4959 =item * %i 4876 4960 4877 4961 The setting of the IndexBasename configuration directive with the default 4878 4962 file extension appended. Example: index.html 4879 4963 4880 =item %I4964 =item * %I 4881 4965 4882 4966 Same as above but without the file extension. Example: index 4883 4967 4884 =item %j4968 =item * %j 4885 4969 4886 4970 3-digit day of year, zero-padded. Example: 040 4887 4971 4888 =item %m4972 =item * %m 4889 4973 4890 4974 2-digit month, zero-padded. Example: 07 4891 4975 4892 =item %M4976 =item * %M 4893 4977 4894 4978 3-letter language-dependent abbreviation of the month. Example: Sep 4895 4979 4896 =item %n4980 =item * %n 4897 4981 4898 4982 2-digit minute, zero-padded. Example: 04 4899 4983 4900 =item %s4984 =item * %s 4901 4985 4902 4986 2-digit second, zero-padded. Example: 01 4903 4987 4904 =item %x4988 =item * %x 4905 4989 4906 4990 File extension with a leading dot (.). If a file extension has not 4907 4991 been specified a blank string is returned. Example: .html 4908 4992 4909 =item %y4993 =item * %y 4910 4994 4911 4995 4-digit year. Example: 2005 4912 4996 4913 =item %Y4997 =item * %Y 4914 4998 4915 4999 2-digit year with zero-padding. Example: 05 … … 5028 5112 B<Attributes:> 5029 5113 5030 =item template5114 =item * template 5031 5115 5032 5116 The name of the index template. 5033 5117 5034 =item identifier5118 =item * identifier 5035 5119 5036 5120 A template identifier. 5037 5121 5038 =item entry_id5122 =item * entry_id 5039 5123 5040 5124 The numeric system ID of the entry. 5041 5125 5042 =item with_index (optional; default "0")5126 =item * with_index (optional; default "0") 5043 5127 5044 5128 If not set to 1, remove index filenames (by default, index.html) … … 5118 5202 =over 4 5119 5203 5120 =item version (optional; default "0")5204 =item * version (optional; default "0") 5121 5205 5122 5206 If specified, also outputs the version (same as L<Version>). … … 5214 5298 =over 4 5215 5299 5216 =item tag5300 =item * tag 5217 5301 5218 5302 A tag which is evaluated and tested for non-emptiness. 5219 5303 5220 =item name or var5304 =item * name or var 5221 5305 5222 5306 A variable whose contents are tested for non-emptiness. … … 5264 5348 =over 4 5265 5349 5266 =item tag5350 =item * tag 5267 5351 5268 5352 A tag which is evaluated and tested for non-zeroness. 5269 5353 5270 =item name or var5354 =item * name or var 5271 5355 5272 5356 A variable whose contents are tested for non-zeroness. … … 5425 5509 =over 4 5426 5510 5427 =item var or name5511 =item * var or name 5428 5512 5429 5513 Identifies the name of the template variable. See L<Var> for more 5430 5514 information on the format of this attribute. 5431 5515 5432 =item value5516 =item * value 5433 5517 5434 5518 The value to assign to the variable. 5435 5519 5436 =item op (optional)5520 =item * op (optional) 5437 5521 5438 5522 See the L<Var> tag for more information about this attribute. 5439 5523 5440 =item prepend (optional)5524 =item * prepend (optional) 5441 5525 5442 5526 If specified, places the contents at the front of any existing value 5443 5527 for the template variable. 5444 5528 5445 =item append (optional)5529 =item * append (optional) 5446 5530 5447 5531 If specified, places the contents at the end of any existing value … … 5450 5534 =back 5451 5535 5452 =for tags templating5536 =for tags deprecated 5453 5537 5454 5538 =cut … … 5466 5550 =over 4 5467 5551 5468 =item var or name (required)5552 =item * var or name (required) 5469 5553 5470 5554 Identifies the name of the template variable. See L<Var> for more 5471 5555 information on the format of this attribute. 5472 5556 5473 =item op (optional)5557 =item * op (optional) 5474 5558 5475 5559 See the L<Var> tag for more information about this attribute. 5476 5560 5477 =item prepend (optional)5561 =item * prepend (optional) 5478 5562 5479 5563 If specified, places the contents at the front of any existing value 5480 5564 for the template variable. 5481 5565 5482 =item append (optional)5566 =item * append (optional) 5483 5567 5484 5568 If specified, places the contents at the end of any existing value … … 5504 5588 =over 4 5505 5589 5506 =item var or name (required)5590 =item * var or name (required) 5507 5591 5508 5592 Identifies the name of the template variable. See L<Var> for more … … 5896 5980 } 5897 5981 5898 =for tags search 5982 ########################################################################### 5983 5984 =head2 MaxResults 5985 5986 Deprecated in favor of L<SearchMaxResults>. 5987 5988 =for tags deprecated 5989 5990 =cut 5899 5991 5900 5992 ########################################################################### … … 5903 5995 5904 5996 Returns the value of the C<SearchMaxResults> or C<MaxResults> configuration 5905 setting. Use C<SearchMaxResults> because MaxResults is considered deprecated.5997 setting. Use C<SearchMaxResults> because MaxResults is considered deprecated. 5906 5998 5907 5999 =for tags search, configuration … … 6048 6140 =over 4 6049 6141 6050 =item display_name6142 =item * display_name 6051 6143 6052 6144 Specifies a particular author to select. 6053 6145 6054 =item lastn6146 =item * lastn 6055 6147 6056 6148 Limits the selection of authors to the specified number. 6057 6149 6058 =item sort_by (optional)6150 =item * sort_by (optional) 6059 6151 6060 6152 Supported values: display_name, name, created_on. 6061 6153 6062 =item sort_order (optional; default "ascend")6154 =item * sort_order (optional; default "ascend") 6063 6155 6064 6156 Supported values: ascend, descend. 6065 6157 6066 =item roles6158 =item * roles 6067 6159 6068 6160 A comma separated list of roles used to select users by. 6069 6161 eg: "Author, Commenter". 6070 6162 6071 =item need_entry (optional; default "1")6163 =item * need_entry (optional; default "1") 6072 6164 6073 6165 Identifies whether the author(s) must have published an entry 6074 6166 to be included or not. 6075 6167 6076 =item status (optional; default "enabled")6168 =item * status (optional; default "enabled") 6077 6169 6078 6170 Supported values: enabled, disabled. 6079 6171 6080 =item namespace6172 =item * namespace 6081 6173 6082 6174 Used in conjunction with the "min*", "max*" attributes to 6083 6175 select authors based on a particular scoring mechanism. 6084 6176 6085 =item min_score6177 =item * min_score 6086 6178 6087 6179 If 'namespace' is also specified, filters the authors based on … … 6089 6181 to consider the author for inclusion. 6090 6182 6091 =item max_score6183 =item * max_score 6092 6184 6093 6185 If 'namespace' is also specified, filters the authors based on … … 6095 6187 to consider the author for inclusion. 6096 6188 6097 =item min_rank6189 =item * min_rank 6098 6190 6099 6191 If 'namespace' is also specified, filters the authors based on … … 6101 6193 to consider the author for inclusion. 6102 6194 6103 =item max_rate6195 =item * max_rate 6104 6196 6105 6197 If 'namespace' is also specified, filters the authors based on … … 6107 6199 to consider the author for inclusion. 6108 6200 6109 =item min_count6201 =item * min_count 6110 6202 6111 6203 If 'namespace' is also specified, filters the authors based on … … 6113 6205 to consider the author for inclusion. 6114 6206 6115 =item max_count6207 =item * max_count 6116 6208 6117 6209 If 'namespace' is also specified, filters the authors based on … … 6504 6596 ########################################################################### 6505 6597 6506 =head2 Author IconURL6598 =head2 AuthorAuthIconURL 6507 6599 6508 6600 Returns URL to a small (16x16) image represents in what authentication … … 6516 6608 =over 4 6517 6609 6518 =item size (optional; default "logo_small")6610 =item * size (optional; default "logo_small") 6519 6611 6520 6612 Identifies the requested size of the logo. This is an identifier, … … 6676 6768 =over 4 6677 6769 6678 =item blog_ids6770 =item * blog_ids 6679 6771 6680 6772 This attribute allows you to limit the set of blogs iterated over by … … 6741 6833 ########################################################################### 6742 6834 6835 =head2 IfBlog 6836 6837 A conditional tag that produces its contents when there is a blog in 6838 context. This tag is useful for situations where a blog may or may not 6839 be in context, such as the search template, when a search is conducted 6840 across all blogs. 6841 6842 B<Example:> 6843 6844 <mt:IfBlog> 6845 <h1>Search results for <$mt:BlogName$>:</h1> 6846 <mt:Else> 6847 <h1>Search results from all blogs:</h1> 6848 </mt:IfBlog> 6849 6850 =for tags blogs 6851 6852 =cut 6853 6854 ########################################################################### 6855 6743 6856 =head2 BlogID 6744 6857 … … 6889 7002 =over 4 6890 7003 6891 =item no_colon (optional; default "0")7004 =item * no_colon (optional; default "0") 6892 7005 6893 7006 If specified, will produce the timezone without the ":" character … … 6925 7038 =over 4 6926 7039 6927 =item locale (optional; default "0")7040 =item * locale (optional; default "0") 6928 7041 6929 7042 If assigned, will format the language in the style "language_LOCALE" (ie: "en_US", "de_DE", etc). 6930 7043 6931 =item ietf (optional; default "0")7044 =item * ietf (optional; default "0") 6932 7045 6933 7046 If assigned, will change any '_' in the language code to a '-', conforming … … 6965 7078 =over 4 6966 7079 6967 =item exclude_port (optional; default "0")7080 =item * exclude_port (optional; default "0") 6968 7081 6969 7082 Removes any specified port number if this attribute is set to true (1), … … 6971 7084 www.somedomain.com:8080). 6972 7085 6973 =item signature (optional; default "0")7086 =item * signature (optional; default "0") 6974 7087 6975 7088 If set to 1, then this template tag will instead return a unique signature … … 7014 7127 =over 4 7015 7128 7016 =item exclude_port (optional; default "0")7129 =item * exclude_port (optional; default "0") 7017 7130 7018 7131 If set, exclude the port number from the CGIHost. … … 7038 7151 =head2 BlogCategoryCount 7039 7152 7040 =for tags multiblog, count, blogs 7153 Returns the number of categories associated with a blog. This 7154 template tag supports the multiblog template tags. 7155 7156 This template tag also supports all of the same filtering mechanisms 7157 defined by the mt:Categories tag allowing users to retrieve a count 7158 of the number of comments on a blog that meet a certain criteria. 7159 7160 B<Example:> 7161 7162 <$mt:BlogCategoryCount$> 7163 7164 =for tags multiblog, count, blogs, categories 7041 7165 7042 7166 =cut … … 7179 7303 =over 4 7180 7304 7181 =item with_index (optional; default "0")7305 =item * with_index (optional; default "0") 7182 7306 7183 7307 If specified, forces the trailing "index" filename to be left on any … … 7309 7433 =over 4 7310 7434 7311 =item lastn (optional)7435 =item * lastn (optional) 7312 7436 7313 7437 Allows you to limit the number of entries output. This attribute … … 7319 7443 This would publish the 5 most recent entries, ordered by their titles. 7320 7444 7321 =item limit (optional)7445 =item * limit (optional) 7322 7446 7323 7447 Similar to the C<lastn> attribute, but limits output based on whichever 7324 7448 sort order is in use. 7325 7449 7326 =item sort_by (optional; default "authored_on")7450 =item * sort_by (optional; default "authored_on") 7327 7451 7328 7452 Accepted values are: C<authored_on>, C<title>, C<ping_count>, … … 7335 7459 field basename you wish to sort on). 7336 7460 7337 =item sort_order (optional)7461 =item * sort_order (optional) 7338 7462 7339 7463 Accepted values are 'ascend' and 'descend'. The default is the order … … 7341 7465 screen. 7342 7466 7343 =item field:I<basename>7467 =item * field:I<basename> 7344 7468 7345 7469 Permits filtering entries based on a custom field defined (available … … 7354 7478 (checkbox field) checked. 7355 7479 7356 =item namespace (optional)7480 =item * namespace (optional) 7357 7481 7358 7482 The namespace attribute is used to specify which scoring namespace … … 7364 7488 of recommend/favorite votes that have been made. 7365 7489 7366 =item class_type (optional; default 'entry')7490 =item * class_type (optional; default 'entry') 7367 7491 7368 7492 Accepted values are 'entry' and 'page'. 7369 7493 7370 =item offset (optional)7494 =item * offset (optional) 7371 7495 7372 7496 Accepted values are any non-zero positive integers, or the keyword … … 7375 7499 the request. 7376 7500 7377 =item category or categories (optional)7501 =item * category or categories (optional) 7378 7502 7379 7503 This attribute allows you to filter the entries based on category … … 7401 7525 <mt:Entries categories="NOT Family"> 7402 7526 7403 =item include_subcategories (optional)7527 =item * include_subcategories (optional) 7404 7528 7405 7529 If this attribute is specified in conjunction with the category (or … … 7407 7531 of the identified category/categories to be included as well. 7408 7532 7409 =item tag or tags (optional)7533 =item * tag or tags (optional) 7410 7534 7411 7535 This attribute functions similarly to the C<category> attribute, but … … 7413 7537 described for category selection. 7414 7538 7415 =item author (optional)7539 =item * author (optional) 7416 7540 7417 7541 Accepts an author's username to filter entry selection. … … 7421 7545 <mt:Entries author="Melody"> 7422 7546 7423 =item id (optional)7547 =item * id (optional) 7424 7548 7425 7549 If specified, selects a single entry matching the given entry ID. … … 7427 7551 <mt:Entries id="10"> 7428 7552 7429 =item min_score (optional)7430 7431 =item max_score (optional)7432 7433 =item min_rate (optional)7434 7435 =item max_rate (optional)7436 7437 =item min_count (optional)7438 7439 =item max_count (optional)7553 =item * min_score (optional) 7554 7555 =item * max_score (optional) 7556 7557 =item * min_rate (optional) 7558 7559 =item * max_rate (optional) 7560 7561 =item * min_count (optional) 7562 7563 =item * max_count (optional) 7440 7564 7441 7565 Allows filtering of entries based on score, rating or count. Each of 7442 7566 the attributes require the C<namespace> attribute. 7443 7567 7444 =item scored_by (optional)7568 =item * scored_by (optional) 7445 7569 7446 7570 Allows filtering of entries that were scored by a particular user, 7447 7571 specified by username. Requires the C<namespace> attribute. 7448 7572 7449 =item days (optional)7573 =item * days (optional) 7450 7574 7451 7575 Limits the selection of entries to a specified number of days, … … 7457 7581 published. 7458 7582 7459 =item recently_commented_on (optional)7583 =item * recently_commented_on (optional) 7460 7584 7461 7585 Selects the list of entries that have received published comments … … 7469 7593 received comment. 7470 7594 7471 =item unique7595 =item * unique 7472 7596 7473 7597 If specified, this flag will cause MT to keep track of which entries … … 7491 7615 from the first Entries tag. 7492 7616 7493 =item glue (optional)7617 =item * glue (optional) 7494 7618 7495 7619 Specifies a string that is output inbetween published entries. … … 7652 7776 } else { 7653 7777 my @cats = cat_path_to_category($category_arg, [ \%blog_terms, \%blog_args ], $class_type); 7778 use Data::Dumper; die Dumper({ terms => \%blog_terms, args => \%blog_args, cats => \@cats, arg => $category_arg }); 7654 7779 if (@cats) { 7655 7780 $cats = \@cats; … … 8201 8326 } 8202 8327 8328 ########################################################################### 8329 8330 =head2 DateHeader 8331 8332 A container tag whose contents will be displayed if the entry in context 8333 was posted on a new day in the list. 8334 8335 B<Example:> 8336 8337 <mt:Entries> 8338 <mt:DateHeader> 8339 <h2><$mt:EntryDate format="%A, %B %e, %Y"$></h2> 8340 </mt:DateHeader> 8341 <!-- display entry here --> 8342 </mt:Entries> 8343 8344 =for tags entries 8345 8346 =cut 8347 8348 ########################################################################### 8349 8350 =head2 DateFooter 8351 8352 A container tag whose contents will be displayed if the entry in context 8353 is the last entry in the group of entries for a given day. 8354 8355 B<Example:> 8356 8357 <mt:Entries> 8358 <!-- display entry here --> 8359 <mt:DateFooter> 8360 <hr /> 8361 </mt:DateFooter> 8362 </mt:Entries> 8363 8364 =for tags entries 8365 8366 =cut 8367 8368 ########################################################################### 8369 8370 =head2 EntriesHeader 8371 8372 The contents of this container tag will be displayed when the first 8373 entry listed by a L<Entries> tag is reached. 8374 8375 =for tags entries 8376 8377 =cut 8378 8379 ########################################################################### 8380 8381 =head2 EntriesFooter 8382 8383 The contents of this container tag will be displayed when the last 8384 entry listed by a L<Entries> tag is reached. 8385 8386 =for tags entries 8387 8388 =cut 8389 8390 ########################################################################### 8391 8392 =head2 PagesHeader 8393 8394 The contents of this container tag will be displayed when the first page 8395 listed by a L<Pages> tag is reached. 8396 8397 B<Example:> 8398 8399 <mt:Pages glue=", "> 8400 <mt:PagesHeader> 8401 The following pages are available: 8402 </mt:PagesHeader> 8403 <a href="<$mt:PagePermalink$>"><$mt:PageTitle$></a> 8404 </mt:Pages> 8405 8406 =for tags pages 8407 8408 =cut 8409 8410 ########################################################################### 8411 8412 =head2 PagesFooter 8413 8414 The contents of this container tag will be displayed when the last page 8415 listed by a L<Pages> tag is reached. 8416 8417 =for tags pages 8418 8419 =cut 8420 8203 8421 # returns an iterator that supplies entries, in the order of last comment 8204 8422 # date (descending) … … 8326 8544 =over 4 8327 8545 8328 =item convert_breaks (optional; default "1")8546 =item * convert_breaks (optional; default "1") 8329 8547 8330 8548 Accepted values are '0' and '1'. Typically, this attribute is … … 8332 8550 text based on the text formatting option for the entry. 8333 8551 8334 =item words (optional)8552 =item * words (optional) 8335 8553 8336 8554 Accepts any positive integer to limit the number of words … … 8414 8632 =over 4 8415 8633 8416 =item generate (optional)8634 =item * generate (optional) 8417 8635 8418 8636 If specified, will draw content from the "main" text field of … … 8518 8736 =over 4 8519 8737 8520 =item flag (required)8738 =item * flag (required) 8521 8739 8522 8740 Accepts one of: 'allow_pings', 'allow_comments'. … … 8560 8778 =over 4 8561 8779 8562 =item no_generate (optional)8780 =item * no_generate (optional) 8563 8781 8564 8782 If the excerpt field is empty, this flag will prevent the generation 8565 8783 of an excerpt using the main text of the entry. 8566 8784 8567 =item words (optional; default "40")8785 =item * words (optional; default "40") 8568 8786 8569 8787 Controls the length of the auto-generated entry excerpt. Does B<not> 8570 8788 limit the content when the excerpt field contains content. 8571 8789 8572 =item convert_breaks (optional; default "0")8790 =item * convert_breaks (optional; default "0") 8573 8791 8574 8792 When set to '1', applies the text formatting filters on the excerpt … … 8622 8840 usernames.> 8623 8841 8842 =for tags deprecated 8843 8624 8844 =cut 8625 8845 … … 8659 8879 favor of L<EntryAuthorDisplayName>.> 8660 8880 8881 =for tags deprecated 8882 8661 8883 =cut 8662 8884 … … 8697 8919 =over 4 8698 8920 8699 =item spam_protect (optional; default "0")8921 =item * spam_protect (optional; default "0") 8700 8922 8701 8923 If specified, this will apply a light obfuscation of the email address, … … 8744 8966 =over 4 8745 8967 8746 =item new_window8968 =item * new_window 8747 8969 8748 8970 If specified, the published link is given a C<target> attribute of '_blank'. 8749 8971 8750 =item show_email (optional; default "0")8972 =item * show_email (optional; default "0") 8751 8973 8752 8974 If set, will allow publishing of an email address if the URL field 8753 8975 for the author is empty. 8754 8976 8755 =item spam_protect (optional)8977 =item * spam_protect (optional) 8756 8978 8757 8979 If specified, this will apply a light obfuscation of any email address … … 8759 8981 address (C<:>, C<@>, and C<.>) into HTML entities. 8760 8982 8761 =item type (optional)8983 =item * type (optional) 8762 8984 8763 8985 Accepted values: C<url>, C<email>, C<archive>. Note: an 'archive' type 8764 8986 requires publishing of "Author" archives. 8765 8987 8766 =item show_hcard (optional; default "0")8988 =item * show_hcard (optional; default "0") 8767 8989 8768 8990 If present, adds additional CSS class names to the link tag published, … … 8935 9157 ########################################################################### 8936 9158 8937 =head2 EntryTrackback Link9159 =head2 EntryTrackbackData 8938 9160 8939 9161 Outputs the TrackBack RDF block that allows for TrackBack … … 8945 9167 =over 4 8946 9168 8947 =item comment_wrap (optional; default "1")9169 =item * comment_wrap (optional; default "1") 8948 9170 8949 9171 If enabled, will enclose the RDF markup inside an HTML 8950 9172 comment tag. 8951 9173 8952 =item with_index (optional; default "0")9174 =item * with_index (optional; default "0") 8953 9175 8954 9176 If specified, will leave any "index.html" (or appropriate index … … 9041 9263 =over 4 9042 9264 9043 =item type (optional)9044 9045 =item archive_type (optional)9265 =item * type (optional) 9266 9267 =item * archive_type (optional) 9046 9268 9047 9269 Identifies the archive type to use when creating the link. For instance, … … 9094 9316 =over 4 9095 9317 9096 =item separator (optional)9318 =item * separator (optional) 9097 9319 9098 9320 Accepts either "-" or "_". If unspecified, the raw basename value is … … 9150 9372 =over 4 9151 9373 9152 =item type or archive_type (optional)9374 =item * type or archive_type (optional) 9153 9375 9154 9376 Specifies an alternative archive type to use instead of the individual 9155 9377 archive. 9156 9378 9157 =item valid_html (optional; default "0")9379 =item * valid_html (optional; default "0") 9158 9380 9159 9381 When publishing entry permalinks for non-individual archive templates, an … … 9164 9386 valid HTML. 9165 9387 9166 =item with_index (optional; default "0")9388 =item * with_index (optional; default "0") 9167 9389 9168 9390 If assigned, will retain any index filename at the end of the permalink. … … 9270 9492 =over 4 9271 9493 9272 =item glue (optional)9494 =item * glue (optional) 9273 9495 9274 9496 If specified, this string is placed in between each result from the loop. … … 9381 9603 Outputs a link to the MT Comment script to allow signing in to a TypeKey 9382 9604 configured blog. B<NOTE: This is deprecated in favor of L<SignInLink>.> 9605 9606 =for tags deprecated 9383 9607 9384 9608 =cut … … 9417 9641 a blog. B<NOTE: This tag is deprecated in favor of L<SignOutLink>.> 9418 9642 9643 =for tags deprecated 9644 9419 9645 =cut 9420 9646 … … 9442 9668 } 9443 9669 9670 ########################################################################### 9671 9672 =head2 CommentFields 9673 9674 A deprecated tag that formerly published an entry comment form. 9675 9676 =for tags deprecated 9677 9678 =cut 9679 9444 9680 sub _hdlr_comment_fields { 9445 9681 my ($ctx, $args, $cond) = @_; … … 9565 9801 =over 4 9566 9802 9567 =item ts (optional)9803 =item * ts (optional) 9568 9804 9569 9805 If specified, will use the given date as the date to publish. Must be 9570 9806 in the format of "YYYYMMDDhhmmss". 9571 9807 9572 =item relative (optional)9808 =item * relative (optional) 9573 9809 9574 9810 If specified, will publish the date using a phrase, if the date is … … 9578 9814 =over 4 9579 9815 9580 =item relative="1"9816 =item * relative="1" 9581 9817 9582 9818 Supports display of one duration: moments ago; N minutes ago; N hours ago; N days ago. For older dates in the same year, the date is shown as the abbreviated month and day of the month ("Jan 3"). For older dates, the year is added to that ("Jan 3 2005"). 9583 9819 9584 =item relative="2"9820 =item * relative="2" 9585 9821 9586 9822 Supports display of two durations: less than 1 minute ago; N seconds, N minutes ago; N minutes ago; N hours, N minutes ago; N hours ago; N days, N hours ago; N days ago. 9587 9823 9588 =item relative="3"9824 =item * relative="3" 9589 9825 9590 9826 Supports display of two durations: N seconds ago; N seconds, N minutes ago; 9591 9827 N minutes ago; N hours, N minutes ago; N hours ago; N days, N hours ago; N days ago. 9592 9828 9593 =item relative="js"9829 =item * relative="js" 9594 9830 9595 9831 When specified, publishes the date using JavaScript, which relies on a … … 9598 9834 =back 9599 9835 9600 =item format (optional)9836 =item * format (optional) 9601 9837 9602 9838 A string that provides the format in which to publish the date. If … … 9607 9843 =over 4 9608 9844 9609 =item %Y9845 =item * %Y 9610 9846 9611 9847 The 4-digit year. Example: "1999". 9612 9848 9613 =item %m9849 =item * %m 9614 9850 9615 9851 The 2-digit month (zero-padded). Example: for a date in September, this would output "09". 9616 9852 9617 =item %d9853 =item * %d 9618 9854 9619 9855 The 2-digit day of the month (zero-padded). Example: "05". 9620 9856 9621 =item %H9857 =item * %H 9622 9858 9623 9859 The 2-digit hour of the day (24-hour clock, zero-padded). Example: "18". 9624 9860 9625 =item %M9861 =item * %M 9626 9862 9627 9863 The 2-digit minute of the hour (zero-padded). Example: "09". 9628 9864 9629 =item %S9865 =item * %S 9630 9866 9631 9867 The 2-digit second of the minute (zero-padded). Example: "04". 9632 9868 9633 =item %w9869 =item * %w 9634 9870 9635 9871 The numeric day of the week, in the range C<0>-C<6>, where C<0> is 9636 9872 C<Sunday>. Example: "3". 9637 9873 9638 =item %j9874 =item * %j 9639 9875 9640 9876 The numeric day of the year, in the range C<0>-C<365>. Zero-padded to 9641 9877 three digits. Example: "040". 9642 9878 9643 =item %y9879 =item * %y 9644 9880 9645 9881 The two-digit year, zero-padded. Example: %y for a date in 2008 would 9646 9882 output "08". 9647 9883 9648 =item %b9884 =item * %b 9649 9885 9650 9886 The abbreviated month name. Example: %b for a date in January would 9651 9887 output "Jan". 9652 9888 9653 =item %B9889 =item * %B 9654 9890 9655 9891 The full month name. Example: "January". 9656 9892 9657 =item %a9893 =item * %a 9658 9894 9659 9895 The abbreviated day of the week. Example: %a for a date on a Monday would 9660 9896 output "Mon". 9661 9897 9662 =item %A9898 =item * %A 9663 9899 9664 9900 The full day of the week. Example: "Friday". 9665 9901 9666 =item %e9667 9668 The numeric day of the month (space-padded). Example: " 08".9669 9670 =item %I9902 =item * %e 9903 9904 The numeric day of the month (space-padded). Example: " 8". 9905 9906 =item * %I 9671 9907 9672 9908 The two-digit hour on a 12-hour clock padded with a zero if applicable. 9673 9909 Example: "04". 9674 9910 9675 =item %k9911 =item * %k 9676 9912 9677 9913 The two-digit military time hour padded with a space if applicable. 9678 9914 Example: " 9". 9679 9915 9680 =item %l9916 =item * %l 9681 9917 9682 9918 The hour on a 12-hour clock padded with a space if applicable. … … 9685 9921 =back 9686 9922 9687 =item format_name (optional)9923 =item * format_name (optional) 9688 9924 9689 9925 Supports date formatting for particular standards. … … 9691 9927 =over 4 9692 9928 9693 =item rfc8229929 =item * rfc822 9694 9930 9695 9931 Outputs the date in the format: "%a, %d %b %Y %H:%M:%S Z". 9696 9932 9697 =item iso86019933 =item * iso8601 9698 9934 9699 9935 Outputs the date in the format: "%Y-%m-%dT%H:%M:%SZ". … … 9701 9937 =back 9702 9938 9703 =item utc (optional)9939 =item * utc (optional) 9704 9940 9705 9941 Converts the date into UTC time. 9706 9942 9707 =item offset_blog_id (optional)9943 =item * offset_blog_id (optional) 9708 9944 9709 9945 Identifies the ID of the blog to use for adjusting the time to 9710 9946 blog time. Will default to the current blog in context if unset. 9711 9947 9712 =item language (optional)9948 =item * language (optional) 9713 9949 9714 9950 Used to force localization of the date to a specific language. … … 9851 10087 ########################################################################### 9852 10088 9853 =head2 Comments TBD10089 =head2 Comments 9854 10090 9855 10091 A container tag which iterates over a list of comments on an entry or for a 9856 blog. By default, all comments in context (e.g on an entry or in a blog) are10092 blog. By default, all comments in context (e.g. on an entry or in a blog) are 9857 10093 returned. When used in a blog context, only comments on published entries are 9858 10094 returned. … … 9862 10098 =over 4 9863 10099 9864 =item lastn10100 =item * lastn 9865 10101 9866 10102 Display the last N comments in context where N is a positive integer. 9867 10103 B<NOTE: lastn required in a blog context.> 9868 10104 9869 =item offset 9870 9871 =item sort_by 9872 9873 =item sort_order 10105 =item * offset (optional; default "0") 10106 10107 Specifies a number of comments to skip. 10108 10109 =item * sort_by (optional) 10110 10111 Specifies a sort column. 10112 10113 =item * sort_order (optional) 9874 10114 9875 10115 Specifies the sort order and overrides the General Settings. Recognized 9876 10116 values are "ascend" and "descend." 9877 10117 9878 =item namespace 9879 9880 =item min_score 9881 9882 =item max_score 9883 9884 =item min_rate 9885 9886 =item max_rate 9887 9888 =item min_count 9889 9890 =item max_count 9891 9892 =item scored_by 10118 =item * namespace 10119 10120 Used in conjunction with the "min*", "max*" attributes to 10121 select comments based on a particular scoring mechanism. 10122 10123 =item * min_score 10124 10125 If 'namespace' is also specified, filters the comments based on 10126 the score within that namespace. This specifies the minimum score 10127 to consider the comment for inclusion. 10128 10129 =item * max_score 10130 10131 If 'namespace' is also specified, filters the comments based on 10132 the score within that namespace. This specifies the maximum score 10133 to consider the comment for inclusion. 10134 10135 =item * min_rank 10136 10137 If 'namespace' is also specified, filters the comments based on 10138 the rank within that namespace. This specifies the minimum rank 10139 to consider the comment for inclusion. 10140 10141 =item * max_rate 10142 10143 If 'namespace' is also specified, filters the comments based on 10144 the rank within that namespace. This specifies the maximum rank 10145 to consider the comment for inclusion. 10146 10147 =item * min_count 10148 10149 If 'namespace' is also specified, filters the comments based on 10150 the count within that namespace. This specifies the minimum count 10151 to consider the comment for inclusion. 10152 10153 =item * max_count 10154 10155 If 'namespace' is also specified, filters the comments based on 10156 the count within that namespace. This specifies the maximum count 10157 to consider the comment for inclusion. 9893 10158 9894 10159 =back … … 10269 10534 ########################################################################### 10270 10535 10536 =head2 CommentName 10537 10538 Deprecated in favor of the L<CommentAuthor> tag. 10539 10540 =for tags deprecated 10541 10542 =cut 10543 10544 ########################################################################### 10545 10271 10546 =head2 CommentAuthor 10272 10547 … … 10321 10596 =over 4 10322 10597 10323 =item show_email (optional; default "0")10598 =item * show_email (optional; default "0") 10324 10599 10325 10600 Specifies if the comment author's email can be displayed. 10326 10601 10327 =item show_url (optional; default "1")10602 =item * show_url (optional; default "1") 10328 10603 10329 10604 Specifies if the comment author's URL can be displayed. 10330 10605 10331 =item new_window (optional; default "0")10606 =item * new_window (optional; default "0") 10332 10607 10333 10608 Specifies to open the link in a new window by adding C<target="_blank"> 10334 10609 to the anchor tag. See example below. 10335 10610 10336 =item default_name (optional; default "Anonymous")10611 =item * default_name (optional; default "Anonymous") 10337 10612 10338 10613 Used in the event that the commenter did not provide a value for their 10339 10614 name. 10340 10615 10341 =item no_redirect (optional; default "0")10616 =item * no_redirect (optional; default "0") 10342 10617 10343 10618 Prevents use of the mt-comments.cgi script to handle the comment author 10344 10619 link. 10345 10620 10346 =item nofollowfy (optional)10621 =item * nofollowfy (optional) 10347 10622 10348 10623 If assigned, applies a C<rel="nofollow"> link relation to the link. … … 10416 10691 =over 4 10417 10692 10418 =item spam_protect (optional; default "0")10693 =item * spam_protect (optional; default "0") 10419 10694 10420 10695 =back … … 10528 10803 ########################################################################### 10529 10804 10805 =head2 CommentPreviewEmail 10806 10807 A deprecated tag, replaced with L<CommentEmail>. 10808 10809 =for tags deprecated 10810 10811 =cut 10812 10813 ########################################################################### 10814 10815 =head2 CommentPreviewBody 10816 10817 A deprecated tag, replaced with L<CommentBody>. 10818 10819 =for tags deprecated 10820 10821 =cut 10822 10823 ########################################################################### 10824 10825 =head2 CommentPreviewAuthorLink 10826 10827 A deprecated tag, replaced with L<CommentAuthorLink>. 10828 10829 =for tags deprecated 10830 10831 =cut 10832 10833 ########################################################################### 10834 10835 =head2 CommentPreviewURL 10836 10837 A deprecated tag, replaced with L<CommentURL>. 10838 10839 =for tags deprecated 10840 10841 =cut 10842 10843 ########################################################################### 10844 10845 =head2 CommentPreviewDate 10846 10847 A deprecated tag, replaced with L<CommentDate>. 10848 10849 =for tags deprecated 10850 10851 =cut 10852 10853 ########################################################################### 10854 10855 =head2 CommentPreviewAuthor 10856 10857 A deprecated tag, replaced with L<CommentAuthor>. 10858 10859 =for tags deprecated 10860 10861 =cut 10862 10863 ########################################################################### 10864 10865 =head2 CommentPreviewIP 10866 10867 A deprecated tag, replaced with L<CommentIP>. 10868 10869 =for tags deprecated 10870 10871 =cut 10872 10873 ########################################################################### 10874 10530 10875 =head2 CommentBody 10531 10876 … … 10534 10879 =over 4 10535 10880 10536 =item autolink (optional)10881 =item * autolink (optional) 10537 10882 10538 10883 If unspecified, any plaintext links in the comment body will be … … 10541 10886 override the blog preference. 10542 10887 10543 =item convert_breaks (optional)10888 =item * convert_breaks (optional) 10544 10889 10545 10890 By default, the comment text is formatted according to the comment text … … 10548 10893 applied. 10549 10894 10550 =item words (optional)10895 =item * words (optional) 10551 10896 10552 10897 Limits the length of the comment body to the specified number of words. … … 10704 11049 =over 4 10705 11050 10706 =item label or text (optional)11051 =item * label or text (optional) 10707 11052 10708 11053 A custom phrase for the link (default is "Reply"). 10709 11054 10710 =item onclick (optional)11055 =item * onclick (optional) 10711 11056 10712 11057 Custom JavaScript code for the onclick attribute. By default, this … … 10744 11089 =over 4 10745 11090 10746 =item pad11091 =item * pad 10747 11092 10748 11093 If specified, zero-pads the ID to 6 digits. Example: 001234. … … 10764 11109 10765 11110 =head2 CommentReplies 11111 11112 A block tag which iterates over a list of reply comments to the 11113 in context. 11114 11115 B<Example:> 11116 11117 <mt:Comment> 11118 <mt:CommentReplies> 11119 <mt:CommentsHeader>Replies to the comment:</mt:CommentsHeader> 11120 <$mt:CommentBody$> 11121 </mt:CommentReplies> 11122 </mt:Comment> 10766 11123 10767 11124 =for tags comments, loop … … 10842 11199 =head2 CommentRepliesRecurse 10843 11200 11201 Recursively call the block with the replies to the comment in context. This 11202 tag, when placed at the end of loop controlled by MTCommentReplies tag will 11203 cause them to recursively descend into any replies to comments that exist 11204 during the loop. 11205 11206 B<Example:> 11207 11208 <mt:Comments> 11209 <$mt:CommentBody$> 11210 <mt:CommentReplies> 11211 <mt:CommentsHeader><ul></MTCommentsHeader> 11212 <li><$mt:CommentID$> 11213 <$mt:CommentRepliesRecurse$> 11214 </li> 11215 <mt:CommentsFooter></ul></mt:CommentsFooter> 11216 </mt:CommentReplies> 11217 </mt:Comments> 11218 10844 11219 =for tags comments 10845 11220 … … 10915 11290 ########################################################################### 10916 11291 11292 =head2 CommentsHeader 11293 11294 The contents of this container tag will be displayed when the first 11295 comment listed by a L<Comments> or L<CommentReplies> tag is reached. 11296 11297 =for tags comments 11298 11299 =cut 11300 11301 ########################################################################### 11302 11303 =head2 CommentsFooter 11304 11305 The contents of this container tag will be displayed when the last 11306 comment listed by a L<Comments> or L<CommentReplies> tag is reached. 11307 11308 =for tags comments 11309 11310 =cut 11311 11312 ########################################################################### 11313 10917 11314 =head2 IfCommentParent 10918 11315 … … 10967 11364 =head2 CommenterNameThunk 10968 11365 10969 =for tags comments 11366 Used to populate the commenter_name Javascript variable. Deprecated in 11367 favor of the L<UserSessionState> tag. 11368 11369 =for tags deprecated 10970 11370 10971 11371 =cut … … 10992 11392 =head2 CommenterUsername 10993 11393 11394 This template tag returns the username of the current commenter in context. 11395 If no name exists, then it returns an empty string. 11396 11397 B<Example:> 11398 11399 <mt:Entries> 11400 <h1><$mt:EntryTitle$></h1> 11401 <mt:Comments> 11402 <a name="comment-<$mt:CommentID$>"></a> 11403 <p><$mt:CommentBody$></p> 11404 <cite><a href="/profiles/<$mt:CommenterID$>"><$mt:CommenterUsername$></a></cite> 11405 </mt:Comments> 11406 </mt:Entries> 11407 10994 11408 =for tags comments 10995 11409 … … 11004 11418 ########################################################################### 11005 11419 11006 =head2 UserSession CookieTimeout11420 =head2 UserSessionState 11007 11421 11008 11422 Returns a JSON-formatted data structure that represents the user that is 11009 11423 currently logged in. 11010 11424 11011 =for tags comments 11425 =for tags comments, authentication 11012 11426 11013 11427 =cut … … 11028 11442 =head2 UserSessionCookieTimeout 11029 11443 11030 =for tags comments 11444 Returns the value of the C<UserSessionCookieTimeout> configuration setting. 11445 11446 =for tags comments, configuration, authentication 11031 11447 11032 11448 =cut … … 11041 11457 =head2 UserSessionCookiePath 11042 11458 11043 =for tags comments 11459 Returns the value of the C<UserSessionCookiePath> configuration setting. 11460 11461 The C<UserSessionCookiePath> may also use MT tags. If it does, they will 11462 be evaluated for the blog in context. 11463 11464 =for tags comments, configuration, authentication 11044 11465 11045 11466 =cut … … 11068 11489 =head2 UserSessionCookieDomain 11069 11490 11070 =for tags comments 11491 Returns the value of the C<UserSessionCookieDomain> configuration setting, 11492 or the domain name of the blog currently in context. Any "www" subdomain 11493 will be ignored (ie, "www.sixapart.com" becomes ".sixapart.com"). 11494 11495 The C<UserSessionCookieDomain> may also use MT tags. If it does, they will 11496 be evaluated for the blog in context. 11497 11498 =for tags comments, configuration, authentication 11071 11499 11072 11500 =cut … … 11096 11524 ########################################################################### 11097 11525 11098 =head2 UserSessionCookie 11099 11100 =for tags comments 11526 =head2 UserSessionCookieName 11527 11528 Returns the value of the C<UserSessionCookieName> configuration setting. 11529 If the setting contains the C<%b> string, it will replaced with the blog ID 11530 of the blog currently in context. 11531 11532 B<Example:> 11533 11534 <$mt:UserSessionCookieName$> 11535 11536 =for tags comments, configuration 11101 11537 11102 11538 =cut … … 11119 11555 =head2 CommenterName 11120 11556 11557 The name of the commenter for the comment currently in context. 11558 11559 B<Example:> 11560 11561 <$mt:CommenterName$> 11562 11121 11563 =for tags comments 11122 11564 … … 11135 11577 =head2 CommenterEmail 11136 11578 11579 The email address of the commenter. The spam_protect global filter may 11580 be used. 11581 11582 B<Example:> 11583 11584 <$mt:CommenterEmail$> 11585 11137 11586 =for tags comments 11138 11587 … … 11150 11599 =head2 CommenterAuthType 11151 11600 11152 =for tags comments 11601 Returns a string which identifies what authentication provider the commenter 11602 in context used to authenticate him/herself. Commenter context is created by 11603 either MTComments or MTCommentReplies template tag. For example, 'MT' will be 11604 returned when the commenter in context is authenticated by Movable Type. When 11605 the commenter in context is authenticated by Vox, 'Vox' will be returned. 11606 11607 B<Example:> 11608 11609 <mt:Comments> 11610 <$mt:CommenterName$> (<$mt:CommenterAuthType$>) said: 11611 <$mt:CommentBody$> 11612 </mt:Comments> 11613 11614 =for tags comments, authentication 11153 11615 11154 11616 =cut … … 11164 11626 =head2 CommenterAuthIconURL 11165 11627 11166 =for tags comments 11628 Returns URL to a small (16x16) image represents in what authentication 11629 provider the commenter in context is authenticated. Commenter context 11630 is created by either a L<Comments> or L<CommentReplies> block tag. For 11631 commenters authenticated by Movable Type, it will be a small spanner 11632 logo of Movable Type. Otherwise, icon image is provided by each of 11633 authentication provider. Movable Type provides images for Vox, 11634 LiveJournal and OpenID out of the box. 11635 11636 B<Example:> 11637 11638 <mt:Comments> 11639 <$mt:CommenterName$><$mt:CommenterAuthIconURL$>: 11640 <$mt:CommentBody$> 11641 </mt:Comments> 11642 11643 =for tags comments, authentication 11167 11644 11168 11645 =cut … … 11187 11664 ########################################################################### 11188 11665 11666 =head2 CommenterIfTrusted 11667 11668 Deprecated in favor of the L<IfCommenterTrusted> tag. 11669 11670 =for tags deprecated 11671 11672 =cut 11673 11674 ########################################################################### 11675 11189 11676 =head2 IfCommenterTrusted 11190 11677 11191 =for tags comments 11678 A conditional tag that displays its contents if the commenter in context 11679 has been marked as trusted. 11680 11681 =for tags comments, authentication 11192 11682 11193 11683 =cut … … 11285 11775 =head2 CommenterUserpic 11286 11776 11777 This template tag returns a complete HTML C<img> tag for the current 11778 commenter's userpic. For example: 11779 11780 <img src="http://yourblog.com/userpics/1.jpg" width="100" height="100" /> 11781 11782 B<Example:> 11783 11784 <h2>Recent Commenters</h2> 11785 <mt:Entries recently_commented_on="10"> 11786 <div class="userpic" style="float: left; padding: 5px;"><$mt:CommenterUserpic$></div> 11787 </mt:Entries> 11788 11287 11789 =for tags comments 11288 11790 … … 11301 11803 =head2 CommenterUserpicURL 11302 11804 11805 This template tag returns the URL to the image of the current 11806 commenter's userpic. 11807 11808 B<Example:> 11809 11810 <img src="<$mt:CommenterUserpicURL$>" /> 11811 11303 11812 =for tags comments 11304 11813 … … 11315 11824 =head2 CommenterUserpicAsset 11316 11825 11317 =for tags comments 11826 This template tag is a container tag that puts the current commenter's 11827 userpic asset in context. Because userpics are stored as assets within 11828 Movable Type, this allows you to utilize all of the asset-related 11829 template tags when displaying a user's userpic. 11830 11831 B<Example:> 11832 11833 <mt:CommenterUserpicAsset> 11834 <img src="<$mt:AssetThumbnailURL width="20" height="20"$>" 11835 width="20" height="20" /> 11836 </mt:CommenterUserpicAsset> 11837 11838 =for tags comments, assets 11318 11839 11319 11840 =cut … … 11357 11878 =head2 ArchivePrevious 11358 11879 11359 11360 =cut 11880 A container tag that creates a context to the "previous" archive 11881 relative to the current archive context. 11882 11883 This tag also works with the else tag to produce content if there is no 11884 "previous" archive. 11885 11886 B<Attributes:> 11887 11888 =over 4 11889 11890 =item * type or archive_type (optional) 11891 11892 Specifies the "previous" archive type the context is for. See 11893 the L<ArchiveList> tag for supported values for this attribute. 11894 11895 =back 11896 11897 B<Example:> 11898 11899 <mt:ArchivePrevious> 11900 <a href="<$mt:ArchiveLink$>" 11901 title="<$mt:ArchiveTitle escape="html"$>">Next</a> 11902 <mt:Else> 11903 <!-- output when no previous archive is available --> 11904 </mt:ArchivePrevious> 11905 11906 =for tags archiving 11907 11908 =cut 11909 11910 ########################################################################### 11361 11911 11362 11912 =head2 ArchiveNext … … 11366 11916 11367 11917 This tag also works with the else tag to produce content if there is no 11368 " previous" archive.11918 "next" archive. 11369 11919 11370 11920 B<Attributes:> … … 11372 11922 =over 4 11373 11923 11374 =item type or archive_type (optional)11924 =item * type or archive_type (optional) 11375 11925 11376 11926 Specifies the "next" archive type the context is for. See the L<ArchiveList> … … 11384 11934 <a href="<$mt:ArchiveLink$>" 11385 11935 title="<$mt:ArchiveTitle escape="html"$>">Next</a> 11386 <mt: else>11387 <!-- output when no previousarchive is available -->11936
