aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--application/LinkDB.php3
-rw-r--r--application/Utils.php25
-rw-r--r--inc/shaarli.css4
-rw-r--r--index.php98
-rw-r--r--plugins/markdown/markdown.css29
-rw-r--r--tpl/dailyrss.html4
-rw-r--r--tpl/pluginsadmin.html16
7 files changed, 102 insertions, 77 deletions
diff --git a/application/LinkDB.php b/application/LinkDB.php
index 9f4d3e3c..9488ac45 100644
--- a/application/LinkDB.php
+++ b/application/LinkDB.php
@@ -32,6 +32,9 @@ class LinkDB implements Iterator, Countable, ArrayAccess
32 // Links are stored as a PHP serialized string 32 // Links are stored as a PHP serialized string
33 private $_datastore; 33 private $_datastore;
34 34
35 // Link date storage format
36 const LINK_DATE_FORMAT = 'Ymd_His';
37
35 // Datastore PHP prefix 38 // Datastore PHP prefix
36 protected static $phpPrefix = '<?php /* '; 39 protected static $phpPrefix = '<?php /* ';
37 40
diff --git a/application/Utils.php b/application/Utils.php
index 868946df..3d819716 100644
--- a/application/Utils.php
+++ b/application/Utils.php
@@ -229,3 +229,28 @@ function space2nbsp($text)
229function format_description($description, $redirector) { 229function format_description($description, $redirector) {
230 return nl2br(space2nbsp(text2clickable($description, $redirector))); 230 return nl2br(space2nbsp(text2clickable($description, $redirector)));
231} 231}
232
233/**
234 * Sniff browser language to set the locale automatically.
235 * Note that is may not work on your server if the corresponding locale is not installed.
236 *
237 * @param string $headerLocale Locale send in HTTP headers (e.g. "fr,fr-fr;q=0.8,en;q=0.5,en-us;q=0.3").
238 **/
239function autoLocale($headerLocale)
240{
241 // Default if browser does not send HTTP_ACCEPT_LANGUAGE
242 $attempts = array('en_US');
243 if (isset($headerLocale)) {
244 // (It's a bit crude, but it works very well. Preferred language is always presented first.)
245 if (preg_match('/([a-z]{2})-?([a-z]{2})?/i', $headerLocale, $matches)) {
246 $loc = $matches[1] . (!empty($matches[2]) ? '_' . strtoupper($matches[2]) : '');
247 $attempts = array(
248 $loc.'.UTF-8', $loc, str_replace('_', '-', $loc).'.UTF-8', str_replace('_', '-', $loc),
249 $loc . '_' . strtoupper($loc).'.UTF-8', $loc . '_' . strtoupper($loc),
250 $loc . '_' . $loc.'.UTF-8', $loc . '_' . $loc, $loc . '-' . strtoupper($loc).'.UTF-8',
251 $loc . '-' . strtoupper($loc), $loc . '-' . $loc.'.UTF-8', $loc . '-' . $loc
252 );
253 }
254 }
255 setlocale(LC_ALL, $attempts);
256} \ No newline at end of file
diff --git a/inc/shaarli.css b/inc/shaarli.css
index 8a7409b2..1be4d752 100644
--- a/inc/shaarli.css
+++ b/inc/shaarli.css
@@ -1147,6 +1147,10 @@ ul.errors {
1147 margin: 10px 0; 1147 margin: 10px 0;
1148} 1148}
1149 1149
1150#pluginsadmin label {
1151 cursor: pointer;
1152}
1153
1150#pluginsadmin .plugin_parameter { 1154#pluginsadmin .plugin_parameter {
1151 padding: 5px 0; 1155 padding: 5px 0;
1152 border-width: 1px 0; 1156 border-width: 1px 0;
diff --git a/index.php b/index.php
index 3a63319c..a9264cbb 100644
--- a/index.php
+++ b/index.php
@@ -268,7 +268,7 @@ $GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redir
268// a token depending of deployment salt, user password, and the current ip 268// a token depending of deployment salt, user password, and the current ip
269define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt'])); 269define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt']));
270 270
271autoLocale(); // Sniff browser language and set date format accordingly. 271autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); // Sniff browser language and set date format accordingly.
272header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling. 272header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling.
273 273
274//================================================================================================== 274//==================================================================================================
@@ -315,26 +315,6 @@ function setup_login_state() {
315} 315}
316$userIsLoggedIn = setup_login_state(); 316$userIsLoggedIn = setup_login_state();
317 317
318
319// ------------------------------------------------------------------------------------------
320// Sniff browser language to display dates in the right format automatically.
321// (Note that is may not work on your server if the corresponding local is not installed.)
322function autoLocale()
323{
324 $attempts = array('en_US'); // Default if browser does not send HTTP_ACCEPT_LANGUAGE
325 if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) // e.g. "fr,fr-fr;q=0.8,en;q=0.5,en-us;q=0.3"
326 { // (It's a bit crude, but it works very well. Preferred language is always presented first.)
327 if (preg_match('/([a-z]{2})-?([a-z]{2})?/i',$_SERVER['HTTP_ACCEPT_LANGUAGE'],$matches)) {
328 $loc = $matches[1] . (!empty($matches[2]) ? '_' . strtoupper($matches[2]) : '');
329 $attempts = array($loc.'.UTF-8', $loc, str_replace('_', '-', $loc).'.UTF-8', str_replace('_', '-', $loc),
330 $loc . '_' . strtoupper($loc).'.UTF-8', $loc . '_' . strtoupper($loc),
331 $loc . '_' . $loc.'.UTF-8', $loc . '_' . $loc, $loc . '-' . strtoupper($loc).'.UTF-8',
332 $loc . '-' . strtoupper($loc), $loc . '-' . $loc.'.UTF-8', $loc . '-' . $loc);
333 }
334 }
335 setlocale(LC_TIME, $attempts); // LC_TIME = Set local for date/time format only.
336}
337
338// ------------------------------------------------------------------------------------------ 318// ------------------------------------------------------------------------------------------
339// PubSubHubbub protocol support (if enabled) [UNTESTED] 319// PubSubHubbub protocol support (if enabled) [UNTESTED]
340// (Source: http://aldarone.fr/les-flux-rss-shaarli-et-pubsubhubbub/ ) 320// (Source: http://aldarone.fr/les-flux-rss-shaarli-et-pubsubhubbub/ )
@@ -551,33 +531,6 @@ function getMaxFileSize()
551 return $maxsize; 531 return $maxsize;
552} 532}
553 533
554/* Converts a linkdate time (YYYYMMDD_HHMMSS) of an article to a timestamp (Unix epoch)
555 (used to build the ADD_DATE attribute in Netscape-bookmarks file)
556 PS: I could have used strptime(), but it does not exist on Windows. I'm too kind. */
557function linkdate2timestamp($linkdate)
558{
559 if(strcmp($linkdate, '_000000') !== 0 || !$linkdate){
560 $Y=$M=$D=$h=$m=$s=0;
561 $r = sscanf($linkdate,'%4d%2d%2d_%2d%2d%2d',$Y,$M,$D,$h,$m,$s);
562 return mktime($h,$m,$s,$M,$D,$Y);
563 }
564 return time();
565}
566
567/* Converts a linkdate time (YYYYMMDD_HHMMSS) of an article to a RFC822 date.
568 (used to build the pubDate attribute in RSS feed.) */
569function linkdate2rfc822($linkdate)
570{
571 return date('r',linkdate2timestamp($linkdate)); // 'r' is for RFC822 date format.
572}
573
574/* Converts a linkdate time (YYYYMMDD_HHMMSS) of an article to a ISO 8601 date.
575 (used to build the updated tags in ATOM feed.) */
576function linkdate2iso8601($linkdate)
577{
578 return date('c',linkdate2timestamp($linkdate)); // 'c' is for ISO 8601 date format.
579}
580
581// ------------------------------------------------------------------------------------------ 534// ------------------------------------------------------------------------------------------
582// Token management for XSRF protection 535// Token management for XSRF protection
583// Token should be used in any form which acts on data (create,update,delete,import...). 536// Token should be used in any form which acts on data (create,update,delete,import...).
@@ -769,14 +722,16 @@ function showRSS()
769 { 722 {
770 $link = $linksToDisplay[$keys[$i]]; 723 $link = $linksToDisplay[$keys[$i]];
771 $guid = $pageaddr.'?'.smallHash($link['linkdate']); 724 $guid = $pageaddr.'?'.smallHash($link['linkdate']);
772 $rfc822date = linkdate2rfc822($link['linkdate']); 725 $date = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']);
773 $absurl = $link['url']; 726 $absurl = $link['url'];
774 if (startsWith($absurl,'?')) $absurl=$pageaddr.$absurl; // make permalink URL absolute 727 if (startsWith($absurl,'?')) $absurl=$pageaddr.$absurl; // make permalink URL absolute
775 if ($usepermalinks===true) 728 if ($usepermalinks===true)
776 echo '<item><title>'.$link['title'].'</title><guid isPermaLink="true">'.$guid.'</guid><link>'.$guid.'</link>'; 729 echo '<item><title>'.$link['title'].'</title><guid isPermaLink="true">'.$guid.'</guid><link>'.$guid.'</link>';
777 else 730 else
778 echo '<item><title>'.$link['title'].'</title><guid isPermaLink="false">'.$guid.'</guid><link>'.$absurl.'</link>'; 731 echo '<item><title>'.$link['title'].'</title><guid isPermaLink="false">'.$guid.'</guid><link>'.$absurl.'</link>';
779 if (!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()) echo '<pubDate>'.escape($rfc822date)."</pubDate>\n"; 732 if (!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()) {
733 echo '<pubDate>'.escape($date->format(DateTime::RSS))."</pubDate>\n";
734 }
780 if ($link['tags']!='') // Adding tags to each RSS entry (as mentioned in RSS specification) 735 if ($link['tags']!='') // Adding tags to each RSS entry (as mentioned in RSS specification)
781 { 736 {
782 foreach(explode(' ',$link['tags']) as $tag) { echo '<category domain="'.$pageaddr.'">'.$tag.'</category>'."\n"; } 737 foreach(explode(' ',$link['tags']) as $tag) { echo '<category domain="'.$pageaddr.'">'.$tag.'</category>'."\n"; }
@@ -857,8 +812,9 @@ function showATOM()
857 { 812 {
858 $link = $linksToDisplay[$keys[$i]]; 813 $link = $linksToDisplay[$keys[$i]];
859 $guid = $pageaddr.'?'.smallHash($link['linkdate']); 814 $guid = $pageaddr.'?'.smallHash($link['linkdate']);
860 $iso8601date = linkdate2iso8601($link['linkdate']); 815 $date = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']);
861 $latestDate = max($latestDate,$iso8601date); 816 $iso8601date = $date->format(DateTime::ISO8601);
817 $latestDate = max($latestDate, $iso8601date);
862 $absurl = $link['url']; 818 $absurl = $link['url'];
863 if (startsWith($absurl,'?')) $absurl=$pageaddr.$absurl; // make permalink URL absolute 819 if (startsWith($absurl,'?')) $absurl=$pageaddr.$absurl; // make permalink URL absolute
864 $entries.='<entry><title>'.$link['title'].'</title>'; 820 $entries.='<entry><title>'.$link['title'].'</title>';
@@ -866,7 +822,10 @@ function showATOM()
866 $entries.='<link href="'.$guid.'" /><id>'.$guid.'</id>'; 822 $entries.='<link href="'.$guid.'" /><id>'.$guid.'</id>';
867 else 823 else
868 $entries.='<link href="'.$absurl.'" /><id>'.$guid.'</id>'; 824 $entries.='<link href="'.$absurl.'" /><id>'.$guid.'</id>';
869 if (!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()) $entries.='<updated>'.escape($iso8601date).'</updated>'; 825
826 if (!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()) {
827 $entries.='<updated>'.escape($iso8601date).'</updated>';
828 }
870 829
871 // Add permalink in description 830 // Add permalink in description
872 $descriptionlink = '(<a href="'.$guid.'">Permalink</a>)'; 831 $descriptionlink = '(<a href="'.$guid.'">Permalink</a>)';
@@ -972,8 +931,7 @@ function showDailyRSS() {
972 931
973 // For each day. 932 // For each day.
974 foreach ($days as $day => $linkdates) { 933 foreach ($days as $day => $linkdates) {
975 $daydate = linkdate2timestamp($day.'_000000'); // Full text date 934 $dayDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $day.'_000000');
976 $rfc822date = linkdate2rfc822($day.'_000000');
977 $absurl = escape(index_url($_SERVER).'?do=daily&day='.$day); // Absolute URL of the corresponding "Daily" page. 935 $absurl = escape(index_url($_SERVER).'?do=daily&day='.$day); // Absolute URL of the corresponding "Daily" page.
978 936
979 // Build the HTML body of this RSS entry. 937 // Build the HTML body of this RSS entry.
@@ -986,7 +944,8 @@ function showDailyRSS() {
986 $l = $LINKSDB[$linkdate]; 944 $l = $LINKSDB[$linkdate];
987 $l['formatedDescription'] = format_description($l['description'], $GLOBALS['redirector']); 945 $l['formatedDescription'] = format_description($l['description'], $GLOBALS['redirector']);
988 $l['thumbnail'] = thumbnail($l['url']); 946 $l['thumbnail'] = thumbnail($l['url']);
989 $l['timestamp'] = linkdate2timestamp($l['linkdate']); 947 $l_date = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $l['linkdate']);
948 $l['timestamp'] = $l_date->getTimestamp();
990 if (startsWith($l['url'], '?')) { 949 if (startsWith($l['url'], '?')) {
991 $l['url'] = index_url($_SERVER) . $l['url']; // make permalink URL absolute 950 $l['url'] = index_url($_SERVER) . $l['url']; // make permalink URL absolute
992 } 951 }
@@ -996,10 +955,10 @@ function showDailyRSS() {
996 // Then build the HTML for this day: 955 // Then build the HTML for this day:
997 $tpl = new RainTPL; 956 $tpl = new RainTPL;
998 $tpl->assign('title', $GLOBALS['title']); 957 $tpl->assign('title', $GLOBALS['title']);
999 $tpl->assign('daydate', $daydate); 958 $tpl->assign('daydate', $dayDate->getTimestamp());
1000 $tpl->assign('absurl', $absurl); 959 $tpl->assign('absurl', $absurl);
1001 $tpl->assign('links', $links); 960 $tpl->assign('links', $links);
1002 $tpl->assign('rfc822date', escape($rfc822date)); 961 $tpl->assign('rssdate', escape($dayDate->format(DateTime::RSS)));
1003 $html = $tpl->draw('dailyrss', $return_string=true); 962 $html = $tpl->draw('dailyrss', $return_string=true);
1004 963
1005 echo $html . PHP_EOL; 964 echo $html . PHP_EOL;
@@ -1055,7 +1014,8 @@ function showDaily($pageBuilder)
1055 $linksToDisplay[$key]['taglist']=$taglist; 1014 $linksToDisplay[$key]['taglist']=$taglist;
1056 $linksToDisplay[$key]['formatedDescription'] = format_description($link['description'], $GLOBALS['redirector']); 1015 $linksToDisplay[$key]['formatedDescription'] = format_description($link['description'], $GLOBALS['redirector']);
1057 $linksToDisplay[$key]['thumbnail'] = thumbnail($link['url']); 1016 $linksToDisplay[$key]['thumbnail'] = thumbnail($link['url']);
1058 $linksToDisplay[$key]['timestamp'] = linkdate2timestamp($link['linkdate']); 1017 $date = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']);
1018 $linksToDisplay[$key]['timestamp'] = $date->getTimestamp();
1059 } 1019 }
1060 1020
1061 /* We need to spread the articles on 3 columns. 1021 /* We need to spread the articles on 3 columns.
@@ -1080,11 +1040,12 @@ function showDaily($pageBuilder)
1080 $fill[$index]+=$length; 1040 $fill[$index]+=$length;
1081 } 1041 }
1082 1042
1043 $dayDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $day.'_000000');
1083 $data = array( 1044 $data = array(
1084 'linksToDisplay' => $linksToDisplay, 1045 'linksToDisplay' => $linksToDisplay,
1085 'linkcount' => count($LINKSDB), 1046 'linkcount' => count($LINKSDB),
1086 'cols' => $columns, 1047 'cols' => $columns,
1087 'day' => linkdate2timestamp($day.'_000000'), 1048 'day' => $dayDate->getTimestamp(),
1088 'previousday' => $previousday, 1049 'previousday' => $previousday,
1089 'nextday' => $nextday, 1050 'nextday' => $nextday,
1090 ); 1051 );
@@ -1238,11 +1199,12 @@ function renderPage()
1238 uksort($tags, function($a, $b) { 1199 uksort($tags, function($a, $b) {
1239 // Collator is part of PHP intl. 1200 // Collator is part of PHP intl.
1240 if (class_exists('Collator')) { 1201 if (class_exists('Collator')) {
1241 $c = new Collator(setlocale(LC_ALL, 0)); 1202 $c = new Collator(setlocale(LC_COLLATE, 0));
1242 return $c->compare($a, $b); 1203 if (!intl_is_failure(intl_get_error_code())) {
1243 } else { 1204 return $c->compare($a, $b);
1244 return strcasecmp($a, $b); 1205 }
1245 } 1206 }
1207 return strcasecmp($a, $b);
1246 }); 1208 });
1247 1209
1248 $tagList=array(); 1210 $tagList=array();
@@ -1588,7 +1550,7 @@ function renderPage()
1588 $link = array( 1550 $link = array(
1589 'title' => trim($_POST['lf_title']), 1551 'title' => trim($_POST['lf_title']),
1590 'url' => $url, 1552 'url' => $url,
1591 'description' => trim($_POST['lf_description']), 1553 'description' => $_POST['lf_description'],
1592 'private' => (isset($_POST['lf_private']) ? 1 : 0), 1554 'private' => (isset($_POST['lf_private']) ? 1 : 0),
1593 'linkdate' => $linkdate, 1555 'linkdate' => $linkdate,
1594 'tags' => str_replace(',', ' ', $tags) 1556 'tags' => str_replace(',', ' ', $tags)
@@ -1799,7 +1761,8 @@ HTML;
1799 ($exportWhat=='private' && $link['private']!=0) || 1761 ($exportWhat=='private' && $link['private']!=0) ||
1800 ($exportWhat=='public' && $link['private']==0)) 1762 ($exportWhat=='public' && $link['private']==0))
1801 { 1763 {
1802 echo '<DT><A HREF="'.$link['url'].'" ADD_DATE="'.linkdate2timestamp($link['linkdate']).'" PRIVATE="'.$link['private'].'"'; 1764 $date = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']);
1765 echo '<DT><A HREF="'.$link['url'].'" ADD_DATE="'.$date->getTimestamp().'" PRIVATE="'.$link['private'].'"';
1803 if ($link['tags']!='') echo ' TAGS="'.str_replace(' ',',',$link['tags']).'"'; 1766 if ($link['tags']!='') echo ' TAGS="'.str_replace(' ',',',$link['tags']).'"';
1804 echo '>'.$link['title']."</A>\n"; 1767 echo '>'.$link['title']."</A>\n";
1805 if ($link['description']!='') echo '<DD>'.$link['description']."\n"; 1768 if ($link['description']!='') echo '<DD>'.$link['description']."\n";
@@ -2042,7 +2005,8 @@ function buildLinkList($PAGE,$LINKSDB)
2042 $link['description'] = format_description($link['description'], $GLOBALS['redirector']); 2005 $link['description'] = format_description($link['description'], $GLOBALS['redirector']);
2043 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight'; 2006 $classLi = ($i % 2) != 0 ? '' : 'publicLinkHightLight';
2044 $link['class'] = $link['private'] == 0 ? $classLi : 'private'; 2007 $link['class'] = $link['private'] == 0 ? $classLi : 'private';
2045 $link['timestamp'] = linkdate2timestamp($link['linkdate']); 2008 $date = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']);
2009 $link['timestamp'] = $date->getTimestamp();
2046 $taglist = explode(' ', $link['tags']); 2010 $taglist = explode(' ', $link['tags']);
2047 uasort($taglist, 'strcasecmp'); 2011 uasort($taglist, 'strcasecmp');
2048 $link['taglist'] = $taglist; 2012 $link['taglist'] = $taglist;
diff --git a/plugins/markdown/markdown.css b/plugins/markdown/markdown.css
index 6d666dcf..3c1b2aeb 100644
--- a/plugins/markdown/markdown.css
+++ b/plugins/markdown/markdown.css
@@ -114,6 +114,35 @@
114 margin-bottom: 0; 114 margin-bottom: 0;
115} 115}
116 116
117.markdown pre {
118 background-color: #eee;
119 padding: 4px 9px;
120 -webkit-border-radius: 5px;
121 -moz-border-radius: 5px;
122 border-radius: 5px;
123 overflow: auto;
124 box-shadow: 0 -1px 0 #e5e5e5,0 0 1px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);
125}
126
127.markdown pre code {
128 color: black;
129 font-family: 'Consolas', 'Monaco', 'Andale Mono', monospace;
130 direction: ltr;
131 text-align: left;
132 white-space: pre;
133 word-spacing: normal;
134 word-break: normal;
135 line-height: 1.7;
136 font-size: 11.5px;
137 -moz-tab-size: 4;
138 -o-tab-size: 4;
139 tab-size: 4;
140 -webkit-hyphens: none;
141 -moz-hyphens: none;
142 -ms-hyphens: none;
143 hyphens: none;
144}
145
117.md_help { 146.md_help {
118 color: white; 147 color: white;
119} 148}
diff --git a/tpl/dailyrss.html b/tpl/dailyrss.html
index d959d6be..4133ca3e 100644
--- a/tpl/dailyrss.html
+++ b/tpl/dailyrss.html
@@ -2,7 +2,7 @@
2 <title>{$title} - {function="strftime('%A %e %B %Y', $daydate)"}</title> 2 <title>{$title} - {function="strftime('%A %e %B %Y', $daydate)"}</title>
3 <guid>{$absurl}</guid> 3 <guid>{$absurl}</guid>
4 <link>{$absurl}</link> 4 <link>{$absurl}</link>
5 <pubDate>{$rfc822date}</pubDate> 5 <pubDate>{$rssdate}</pubDate>
6 <description><![CDATA[ 6 <description><![CDATA[
7 {loop="links"} 7 {loop="links"}
8 <h3><a href="{$value.url}">{$value.title}</a></h3> 8 <h3><a href="{$value.url}">{$value.title}</a></h3>
@@ -13,4 +13,4 @@
13 <br><br><hr> 13 <br><br><hr>
14 {/loop} 14 {/loop}
15 ]]></description> 15 ]]></description>
16</item> \ No newline at end of file 16</item>
diff --git a/tpl/pluginsadmin.html b/tpl/pluginsadmin.html
index 4f7d091e..5ddcf061 100644
--- a/tpl/pluginsadmin.html
+++ b/tpl/pluginsadmin.html
@@ -36,7 +36,7 @@
36 <tbody> 36 <tbody>
37 {loop="$enabledPlugins"} 37 {loop="$enabledPlugins"}
38 <tr data-line="{$key}" data-order="{$counter}"> 38 <tr data-line="{$key}" data-order="{$counter}">
39 <td class="center"><input type="checkbox" name="{$key}" checked="checked"></td> 39 <td class="center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td>
40 <td class="center"> 40 <td class="center">
41 <a href="#" 41 <a href="#"
42 onclick="return orderUp(this.parentNode.parentNode.getAttribute('data-order'));"> 42 onclick="return orderUp(this.parentNode.parentNode.getAttribute('data-order'));">
@@ -48,8 +48,8 @@
48 </a> 48 </a>
49 <input type="hidden" name="order_{$key}" value="{$counter}"> 49 <input type="hidden" name="order_{$key}" value="{$counter}">
50 </td> 50 </td>
51 <td>{$key}</td> 51 <td><label for="{$key}">{function="str_replace('_', ' ', $key)"}</label></td>
52 <td>{$value.description}</td> 52 <td><label for="{$key}">{$value.description}</label></td>
53 </tr> 53 </tr>
54 {/loop} 54 {/loop}
55 </tbody> 55 </tbody>
@@ -73,9 +73,9 @@
73 </tr> 73 </tr>
74 {loop="$disabledPlugins"} 74 {loop="$disabledPlugins"}
75 <tr> 75 <tr>
76 <td class="center"><input type="checkbox" name="{$key}"></td> 76 <td class="center"><input type="checkbox" name="{$key}" id="{$key}"></td>
77 <td>{$key}</td> 77 <td><label for="{$key}">{function="str_replace('_', ' ', $key)"}</label></td>
78 <td>{$value.description}</td> 78 <td><label for="{$key}">{$value.description}</label></td>
79 </tr> 79 </tr>
80 {/loop} 80 {/loop}
81 </table> 81 </table>
@@ -99,7 +99,7 @@
99 {loop="$enabledPlugins"} 99 {loop="$enabledPlugins"}
100 {if="count($value.parameters) > 0"} 100 {if="count($value.parameters) > 0"}
101 <div class="plugin_parameters"> 101 <div class="plugin_parameters">
102 <h2>{$key}</h2> 102 <h2>{function="str_replace('_', ' ', $key)"}</h2>
103 {loop="$value.parameters"} 103 {loop="$value.parameters"}
104 <div class="plugin_parameter"> 104 <div class="plugin_parameter">
105 <div class="float_label"> 105 <div class="float_label">
@@ -128,4 +128,4 @@
128 128
129<script src="inc/plugin_admin.js#"></script> 129<script src="inc/plugin_admin.js#"></script>
130</body> 130</body>
131</html> \ No newline at end of file 131</html>