Merge lp:~dangarner/xibo/1278059 into lp:xibo/1.6

Proposed by Dan Garner
Status: Merged
Approved by: Dan Garner
Approved revision: 302
Merged at revision: 301
Proposed branch: lp:~dangarner/xibo/1278059
Merge into: lp:xibo/1.6
Diff against target: 191 lines (+37/-17)
6 files modified
server/lib/service/xmdssoap.class.php (+1/-1)
server/lib/xmds.inc.php (+1/-1)
server/manual/content/install/install_environment.php (+9/-9)
server/modules/preview/HtmlTemplateForGetResource.html (+5/-4)
server/modules/preview/xibo-text-render.js (+6/-1)
server/modules/ticker.module.php (+15/-1)
To merge this branch: bzr merge lp:~dangarner/xibo/1278059
Reviewer Review Type Date Requested Status
Xibo Maintainters Pending
Review via email: mp+205498@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'server/lib/service/xmdssoap.class.php'
2--- server/lib/service/xmdssoap.class.php 2014-01-18 09:47:41 +0000
3+++ server/lib/service/xmdssoap.class.php 2014-02-09 15:05:20 +0000
4@@ -1069,7 +1069,7 @@
5
6 // See if the client was offline and if appropriate send an alert
7 // to say that it has come back online
8- if (($row[5] == 0) && ($row[6] == 1) && Config::GetSetting('MAINTENANCE_ENABLED') == 'On') && Config::GetSetting('MAINTENANCE_EMAIL_ALERTS') == 'On'))
9+ if ($row[5] == 0 && $row[6] == 1 && Config::GetSetting('MAINTENANCE_ENABLED') == 'On' && Config::GetSetting('MAINTENANCE_EMAIL_ALERTS') == 'On')
10 {
11 $msgTo = Kit::ValidateParam(Config::GetSetting("mail_to"),_PASSWORD);
12 $msgFrom = Kit::ValidateParam(Config::GetSetting("mail_from"),_PASSWORD);
13
14=== modified file 'server/lib/xmds.inc.php'
15--- server/lib/xmds.inc.php 2014-01-18 09:47:41 +0000
16+++ server/lib/xmds.inc.php 2014-02-09 15:05:20 +0000
17@@ -20,7 +20,7 @@
18 */
19 defined('XIBO') or die("Sorry, you are not allowed to directly access this page.<br /> Please press the back button in your browser.");
20
21-error_reporting(E_ALL);
22+error_reporting(0);
23 ini_set('display_errors', 0); //we never want to display errors on the screen
24
25 // Required Library Files
26
27=== added file 'server/manual/content/install/Capture-2.jpg'
28Binary files server/manual/content/install/Capture-2.jpg 1970-01-01 00:00:00 +0000 and server/manual/content/install/Capture-2.jpg 2014-02-09 15:05:20 +0000 differ
29=== added file 'server/manual/content/install/Capture-3.jpg'
30Binary files server/manual/content/install/Capture-3.jpg 1970-01-01 00:00:00 +0000 and server/manual/content/install/Capture-3.jpg 2014-02-09 15:05:20 +0000 differ
31=== added file 'server/manual/content/install/Capture-4.jpg'
32Binary files server/manual/content/install/Capture-4.jpg 1970-01-01 00:00:00 +0000 and server/manual/content/install/Capture-4.jpg 2014-02-09 15:05:20 +0000 differ
33=== added file 'server/manual/content/install/Capture-6.jpg'
34Binary files server/manual/content/install/Capture-6.jpg 1970-01-01 00:00:00 +0000 and server/manual/content/install/Capture-6.jpg 2014-02-09 15:05:20 +0000 differ
35=== added file 'server/manual/content/install/Configured_Control_Panel.jpg'
36Binary files server/manual/content/install/Configured_Control_Panel.jpg 1970-01-01 00:00:00 +0000 and server/manual/content/install/Configured_Control_Panel.jpg 2014-02-09 15:05:20 +0000 differ
37=== added file 'server/manual/content/install/Control_Panel_Running.jpg'
38Binary files server/manual/content/install/Control_Panel_Running.jpg 1970-01-01 00:00:00 +0000 and server/manual/content/install/Control_Panel_Running.jpg 2014-02-09 15:05:20 +0000 differ
39=== added file 'server/manual/content/install/Win32_phpmyadmin_password.png'
40Binary files server/manual/content/install/Win32_phpmyadmin_password.png 1970-01-01 00:00:00 +0000 and server/manual/content/install/Win32_phpmyadmin_password.png 2014-02-09 15:05:20 +0000 differ
41=== added file 'server/manual/content/install/Win32_phpmyadmin_privileges.png'
42Binary files server/manual/content/install/Win32_phpmyadmin_privileges.png 1970-01-01 00:00:00 +0000 and server/manual/content/install/Win32_phpmyadmin_privileges.png 2014-02-09 15:05:20 +0000 differ
43=== added file 'server/manual/content/install/Win32_xampp_install_start.jpg'
44Binary files server/manual/content/install/Win32_xampp_install_start.jpg 1970-01-01 00:00:00 +0000 and server/manual/content/install/Win32_xampp_install_start.jpg 2014-02-09 15:05:20 +0000 differ
45=== modified file 'server/manual/content/install/install_environment.php'
46--- server/manual/content/install/install_environment.php 2014-01-18 09:47:41 +0000
47+++ server/manual/content/install/install_environment.php 2014-02-09 15:05:20 +0000
48@@ -104,27 +104,27 @@
49 </p><p>Once XAMPP Installer has downloaded, double click on it to run it. You may be prompted to allow the installer to run as the publisher could not be verified. Click "Run".
50 </p><p>You should get to the start of the install wizard.
51 </p>
52-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Win32_xampp_install_start.jpg" class="image"><img alt="" src="/images/thumb/2/20/Win32_xampp_install_start.jpg/100px-Win32_xampp_install_start.jpg" width="100" height="70" class="thumbimage" srcset="/images/thumb/2/20/Win32_xampp_install_start.jpg/150px-Win32_xampp_install_start.jpg 1.5x, /images/thumb/2/20/Win32_xampp_install_start.jpg/200px-Win32_xampp_install_start.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Win32_xampp_install_start.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>XAMPP Installer Running</div></div></div>
53+<div class="img-thumbnail"><img src="content/install/Win32_xampp_install_start.jpg"></div>
54 <p>By default, XAMPP installs to "c:\xampp". Unless you need to move it somewhere else, then that's a good choice. If you do select a different directory, remember it for the next step when we install Xibo. Click Install.
55 The installer will now run, and extract a number of files. When it finishes, it will bring you to a command prompt.
56 </p><p>You'll now be asked a few questions about how XAMPP should install itself. At the following prompts, you may select all default options.
57 </p>
58-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Capture-2.jpg" class="image"><img alt="" src="/images/thumb/c/c1/Capture-2.jpg/100px-Capture-2.jpg" width="100" height="47" class="thumbimage" srcset="/images/thumb/c/c1/Capture-2.jpg/150px-Capture-2.jpg 1.5x, /images/thumb/c/c1/Capture-2.jpg/200px-Capture-2.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Capture-2.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>XAMPP Command Prompt 1</div></div></div>
59-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Capture-3.jpg" class="image"><img alt="" src="/images/thumb/3/36/Capture-3.jpg/100px-Capture-3.jpg" width="100" height="47" class="thumbimage" srcset="/images/thumb/3/36/Capture-3.jpg/150px-Capture-3.jpg 1.5x, /images/thumb/3/36/Capture-3.jpg/200px-Capture-3.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Capture-3.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>XAMPP Command Prompt 2</div></div></div>
60-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Capture-4.jpg" class="image"><img alt="" src="/images/thumb/1/15/Capture-4.jpg/100px-Capture-4.jpg" width="100" height="47" class="thumbimage" srcset="/images/thumb/1/15/Capture-4.jpg/150px-Capture-4.jpg 1.5x, /images/thumb/1/15/Capture-4.jpg/200px-Capture-4.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Capture-4.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>XAMPP Command Prompt 3</div></div></div>
61-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Capture-6.jpg" class="image"><img alt="" src="/images/thumb/7/7f/Capture-6.jpg/100px-Capture-6.jpg" width="100" height="47" class="thumbimage" srcset="/images/thumb/7/7f/Capture-6.jpg/150px-Capture-6.jpg 1.5x, /images/thumb/7/7f/Capture-6.jpg/200px-Capture-6.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Capture-6.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>XAMPP Command Prompt 4</div></div></div>
62+<div class="img-thumbnail"><img src="content/install/Capture-2.jpg"></div>
63+<div class="img-thumbnail"><img src="content/install/Capture-3.jpg"></div>
64+<div class="img-thumbnail"><img src="content/install/Capture-4.jpg"></div>
65+<div class="img-thumbnail"><img src="content/install/Capture-6.jpg"></div>
66 <p>Once the installation scripts complete, you should choose option 1 to load the XAMPP Control Panel. It should open up, and if everything went to plan, look like the screenshot.
67 </p>
68-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Control_Panel_Running.jpg" class="image"><img alt="" src="/images/thumb/b/b7/Control_Panel_Running.jpg/100px-Control_Panel_Running.jpg" width="100" height="79" class="thumbimage" srcset="/images/thumb/b/b7/Control_Panel_Running.jpg/150px-Control_Panel_Running.jpg 1.5x, /images/thumb/b/b7/Control_Panel_Running.jpg/200px-Control_Panel_Running.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Control_Panel_Running.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>XAMPP Control Panel</div></div></div>
69+<div class="img-thumbnail"><img src="content/install/Control_Panel_Running.jpg"></div>
70 <p>At this point, you need to check the boxes next to "Svc" for both Apache and MySql. As you click each, it will prompt you to install the service for that item. Click OK. Then click the "Start" button on each of these items as well.
71 Your screen should now look like the below:
72 </p>
73-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Configured_Control_Panel.jpg" class="image"><img alt="" src="/images/thumb/1/11/Configured_Control_Panel.jpg/100px-Configured_Control_Panel.jpg" width="100" height="79" class="thumbimage" srcset="/images/thumb/1/11/Configured_Control_Panel.jpg/150px-Configured_Control_Panel.jpg 1.5x, /images/thumb/1/11/Configured_Control_Panel.jpg/200px-Configured_Control_Panel.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Configured_Control_Panel.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>XAMPP Control Panel Started</div></div></div>
74+<div class="img-thumbnail"><img src="content/install/Configured_Control_Panel.jpg"></div>
75 <p><br />
76 Before we install Xibo, we need to configure a few things on XAMPP to make it a bit more secure. From the XAMPP Control Panel, click the "Admin" button next to MySQL. This will load a web browser and take you to an application called PHPMyAdmin that was installed along with XAMPP. It will let us setup a password for the "root" MySQL account. The "root" account on MySQL has privileges to add new users, create databases etc so needs to have a strong password.
77 </p><p>From the PHPMyAdmin screen, click "Privileges" at the top of the screen. You'll see the database users that exist already listed. We're interested in the one called "root" that has "localhost" in the "Host" column. Click the blue "Edit Privileges" symbol to the right of the word "Yes".
78 </p>
79-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Win32_phpmyadmin_privileges.png" class="image"><img alt="" src="/images/thumb/d/da/Win32_phpmyadmin_privileges.png/100px-Win32_phpmyadmin_privileges.png" width="100" height="71" class="thumbimage" srcset="/images/thumb/d/da/Win32_phpmyadmin_privileges.png/150px-Win32_phpmyadmin_privileges.png 1.5x, /images/thumb/d/da/Win32_phpmyadmin_privileges.png/200px-Win32_phpmyadmin_privileges.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Win32_phpmyadmin_privileges.png" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>PHPMyAdmin Privileges</div></div></div>
80+<div class="img-thumbnail"><img src="content/install/Win32_phpmyadmin_privileges.png"></div>
81 <p>Scroll down the page until you find the "Change Password" box. Enter a new password in both the password boxes and click "Go". On a piece of paper, write down "MySQL Admin User details. Username: root Password:" followed by the password you just chose. We'll need these later!
82 </p>
83-<div class="thumb tnone"><div class="thumbinner" style="width:102px;"><a href="/wiki/File:Win32_phpmyadmin_password.png" class="image"><img alt="" src="/images/thumb/6/6f/Win32_phpmyadmin_password.png/100px-Win32_phpmyadmin_password.png" width="100" height="71" class="thumbimage" srcset="/images/thumb/6/6f/Win32_phpmyadmin_password.png/150px-Win32_phpmyadmin_password.png 1.5x, /images/thumb/6/6f/Win32_phpmyadmin_password.png/200px-Win32_phpmyadmin_password.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Win32_phpmyadmin_password.png" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>PHPMyAdmin Change Password</div></div></div>
84\ No newline at end of file
85+<div class="img-thumbnail"><img src="content/install/Win32_phpmyadmin_password.png"></div>
86\ No newline at end of file
87
88=== modified file 'server/modules/preview/HtmlTemplateForGetResource.html'
89--- server/modules/preview/HtmlTemplateForGetResource.html 2013-11-20 18:59:36 +0000
90+++ server/modules/preview/HtmlTemplateForGetResource.html 2014-02-09 15:05:20 +0000
91@@ -4,7 +4,7 @@
92 <title>Xibo Open Source Digital Signage</title>
93 <meta name="viewport" content="width=[[ViewPortWidth]], user-scalable=no, initial-scale=1.0, target-densitydpi=device-dpi" />
94 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
95- <!-- Copyright 2006-2013 Daniel Garner. Part of the Xibo Open Source Digital Signage Solution. Released under the AGPLv3 or later. -->
96+ <!-- Copyright 2006-2014 Daniel Garner. Part of the Xibo Open Source Digital Signage Solution. Released under the AGPLv3 or later. -->
97
98 <script type="text/javascript">
99 /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
100@@ -48,7 +48,7 @@
101 <script type="text/javascript">
102 /**
103 * Xibo - Digital Signage - http://www.xibo.org.uk
104-* Copyright (C) 2009-2013 Daniel Garner
105+* Copyright (C) 2009-2014 Daniel Garner
106 *
107 * This file is part of Xibo.
108 *
109@@ -65,7 +65,7 @@
110 * You should have received a copy of the GNU Affero General Public License
111 * along with Xibo. If not, see <http://www.gnu.org/licenses/>.
112 */
113-jQuery.fn.extend({xiboRender:function(e,t){var n={type:"ticker",direction:"single",duration:"50",durationIsPerItem:false,numItems:0,takeItemsFrom:"start",itemsPerPage:0,scrollSpeed:"2",scaleMode:"scale"};var e=$.extend({},n,e);e.width=$(window).width();e.height=$(window).height();e.scaleFactor=Math.min(e.width/e.originalWidth,e.height/e.originalHeight);this.each(function(){if(e.type=="ticker"){if(e.sourceid==undefined){console.error("Source ID undefined - assuming 1");e.sourceid=1}if(e.sourceid==1){if(e.takeItemsFrom=="end"){t.reverse()}if(e.numItems>t.length||e.numItems==0)e.numItems=t.length;e.items=t.slice(0,e.numItems);if(e.takeItemsFrom=="end"){t.reverse()}}else{e.numItems=t.length}}var n=e.numItems;var r=e.itemsPerPage>0?Math.ceil(e.numItems/e.itemsPerPage):e.numItems;var i=1;var s=this;for(var o=0;o<t.length;o++){if(e.direction=="single"&&e.itemsPerPage>0&&(i>=e.itemsPerPage||o==0)){s=$("<div/>").addClass("page").appendTo(this);i=0}$("<div/>").addClass("item").html(t[o]).appendTo(s);i++}if(e.scaleMode=="fit"){$("*",this).css("font-size","");$(this).css({width:e.originalWidth,height:e.originalHeight}).fitText(1.75)}else if(e.scaleMode=="scale"){$(this).css({zoom:e.scaleFactor,width:e.originalWidth,height:e.originalHeight})}var u=false;if(e.direction=="single"){var a=e.itemsPerPage>0?"> .page":"> .item";var f=e.itemsPerPage>0?r:n;var l=e.durationIsPerItem?e.duration:e.duration/f;$(this).cycle({fx:e.transition,timeout:l*1e3,slides:a})}else if(e.direction=="left"||e.direction=="right"){u=true;$(" .item",this).css({display:"inline","padding-left":"4px"});$(" .item p",this).css({display:"inline"})}else if(e.direction=="up"||e.direction=="down"){u=true}if(u){var c=$("<div/>").addClass("scroll").attr({scrollamount:e.scrollSpeed,scaleFactor:e.scaleFactor,behaviour:"scroll",direction:e.direction,height:e.originalHeight,width:e.originalWidth});$(this).wrapInner(c);$(this).find(".scroll").marquee()}})},dataSetRender:function(e){if(e===undefined||e===null){e={duration:5,transition:"fade"}}$(this).each(function(){var t=$(this).attr("totalPages");$(this).cycle({fx:e.transition,timeout:e.duration*1e3/t,slides:"> table"})})}});if(!window.console){(function(){var e=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"],t,n=e.length;window.console={};for(t=0;t<n;t++){window.console[e[t]]=function(){}}})()}
114+jQuery.fn.extend({xiboRender:function(e,t){var n={type:"ticker",direction:"single",duration:"50",durationIsPerItem:false,numItems:0,takeItemsFrom:"start",itemsPerPage:0,scrollSpeed:"2",scaleMode:"scale"};var e=$.extend({},n,e);e.width=$(window).width();e.height=$(window).height();e.scaleFactor=Math.min(e.width/e.originalWidth,e.height/e.originalHeight);this.each(function(){if(e.type=="ticker"){if(e.sourceid==undefined){console.error("Source ID undefined - assuming 1");e.sourceid=1}if(e.sourceid==1){if(e.takeItemsFrom=="end"){t.reverse()}if(e.numItems>t.length||e.numItems==0)e.numItems=t.length;e.items=t.slice(0,e.numItems);if(e.takeItemsFrom=="end"){t.reverse()}}else{e.numItems=t.length}}var n=e.numItems;var r=e.itemsPerPage>0?Math.ceil(e.numItems/e.itemsPerPage):e.numItems;var i=1;var s=this;for(var o=0;o<t.length;o++){if(e.direction=="single"&&e.itemsPerPage>0&&(i>=e.itemsPerPage||o==0)){s=$("<div/>").addClass("page").appendTo(this);i=0}$("<div/>").addClass("item").html(t[o]).appendTo(s);i++}if(e.scaleMode=="fit"){$("*",this).css("font-size","");$(this).css({width:e.originalWidth,height:e.originalHeight}).fitText(1.75)}else if(e.scaleMode=="scale"){$(this).css({zoom:e.scaleFactor,width:e.originalWidth,height:e.originalHeight})}var u=false;if(e.direction=="single"){var a=e.itemsPerPage>0?"> .page":"> .item";var f=e.itemsPerPage>0?r:n;var l=e.durationIsPerItem?e.duration:e.duration/f;$(this).cycle({fx:e.transition,timeout:l*1e3,slides:a})}else if(e.direction=="left"||e.direction=="right"){u=true;$(" .item",this).css({display:"inline","padding-left":"4px"});$(" .item p",this).css({display:"inline"})}else if(e.direction=="up"||e.direction=="down"){u=true}if(u){var c=$("<div/>").addClass("scroll").attr({scrollamount:e.scrollSpeed,scaleFactor:e.scaleFactor,behaviour:"scroll",direction:e.direction,height:e.originalHeight,width:e.originalWidth});$(this).wrapInner(c);$(this).find(".scroll").marquee()}if(e.direction=="up"||e.direction=="down"){$(this).children().children().css("white-space","normal")}})},dataSetRender:function(e){if(e===undefined||e===null){e={duration:5,transition:"fade"}}$(this).each(function(){var t=$(this).attr("totalPages");$(this).cycle({fx:e.transition,timeout:e.duration*1e3/t,slides:"> table"})})}});if(!window.console){(function(){var e=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"],t,n=e.length;window.console={};for(t=0;t<n;t++){window.console[e[t]]=function(){}}})()}
115 </script>
116 <!--script type="text/javascript" src="modules/preview/xibo-text-render.js"></script-->
117
118@@ -95,4 +95,5 @@
119 <body>
120 <!--[[[BODYCONTENT]]]-->
121 </body>
122-</html>
123\ No newline at end of file
124+</html>
125+<!--[[[CONTROLMETA]]]-->
126\ No newline at end of file
127
128=== modified file 'server/modules/preview/xibo-text-render.js'
129--- server/modules/preview/xibo-text-render.js 2013-08-05 20:30:26 +0000
130+++ server/modules/preview/xibo-text-render.js 2014-02-09 15:05:20 +0000
131@@ -1,6 +1,6 @@
132 /**
133 * Xibo - Digital Signage - http://www.xibo.org.uk
134-* Copyright (C) 2009-2013 Daniel Garner
135+* Copyright (C) 2009-2014 Daniel Garner
136 *
137 * This file is part of Xibo.
138 *
139@@ -221,6 +221,11 @@
140 // Set some options on the extra DIV and make it a marquee
141 $(this).find('.scroll').marquee();
142 }
143+
144+ // Correct the Up and Down scrolling so that half the article is not cut
145+ if (options.direction == "up" || options.direction == "down") {
146+ $(this).children().children().css("white-space", "normal");
147+ }
148 });
149 },
150 dataSetRender: function(options) {
151
152=== modified file 'server/modules/ticker.module.php'
153--- server/modules/ticker.module.php 2014-01-19 12:39:47 +0000
154+++ server/modules/ticker.module.php 2014-02-09 15:05:20 +0000
155@@ -122,7 +122,6 @@
156 array('Substitute' => 'Copyright'),
157 array('Substitute' => 'Link'),
158 array('Substitute' => 'PermaLink'),
159- array('Substitute' => 'Link'),
160 array('Substitute' => 'Tag|Namespace')
161 );
162 Theme::Set('substitutions', $subs);
163@@ -550,6 +549,20 @@
164 if (count($items) == 0)
165 return '';
166
167+ // Work out how many pages we will be showing.
168+ $pages = $numItems;
169+
170+ if ($numItems > count($items) || $numItems == 0)
171+ $pages = count($items);
172+
173+ $pages = ($itemsPerPage > 0) ? ceil($pages / $itemsPerPage) : $pages;
174+ $totalDuration = ($durationIsPerItem == 0) ? $duration : ($duration * $pages);
175+
176+ $controlMeta = array('numItems' => $pages, 'totalDuration' => $totalDuration);
177+
178+ // Replace and Control Meta options
179+ $template = str_replace('<!--[[[CONTROLMETA]]]-->', '<!-- NUMITEMS=' . $pages . ' -->' . PHP_EOL . '<!-- DURATION=' . $totalDuration . ' -->', $template);
180+
181 // Replace the head content
182 $headContent = '<script type="text/javascript">';
183 $headContent .= ' function init() { ';
184@@ -557,6 +570,7 @@
185 $headContent .= ' } ';
186 $headContent .= ' var options = ' . json_encode($options) . ';';
187 $headContent .= ' var items = ' . json_encode($items) . ';';
188+ $headContent .= ' var meta = ' . json_encode($controlMeta) . ';';
189 $headContent .= '</script>';
190
191 if ($itemsSideBySide == 1) {

Subscribers

People subscribed via source and target branches

to all changes: