aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSeb Sauvage <sebsauvage@sebsauvage.net>2012-01-25 22:26:36 +0100
committerEmilien Klein <emilien@klein.st>2012-01-25 22:26:36 +0100
commit96bc4efe9ea9ed513d1ec06e0823847d5eebe82f (patch)
treea5ebeab219ac5a3a308f531416102e817ac29c0b
parent8baf884671060db9e166b96f6428aff80f6ca1f5 (diff)
downloadShaarli-96bc4efe9ea9ed513d1ec06e0823847d5eebe82f.tar.gz
Shaarli-96bc4efe9ea9ed513d1ec06e0823847d5eebe82f.tar.zst
Shaarli-96bc4efe9ea9ed513d1ec06e0823847d5eebe82f.zip
Version 0.0.36 beta:
- Corrected: Improper text color in install form. - Corrected: Error in QRCode url (missing '?') - Changed: Display adjustments in “Daily” page. - Added: Shaarli licence in COPYING
-rw-r--r--COPYING21
-rw-r--r--images/squiggle2.pngbin0 -> 898 bytes
-rw-r--r--inc/shaarli.css10
-rw-r--r--index.php12
-rw-r--r--tpl/daily.html14
-rw-r--r--tpl/linklist.html2
6 files changed, 44 insertions, 15 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 00000000..d9731d27
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,21 @@
1Shaarli is distributed under the zlib/libpng License:
2
3Copyright (c) 2011 Sbastien SAUVAGE (sebsauvage.net)
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from
7the use of this software.
8
9Permission is granted to anyone to use this software for any purpose,
10including commercial applications, and to alter it and redistribute it
11freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would
16 be appreciated but is not required.
17
18 2. Altered source versions must be plainly marked as such, and must
19 not be misrepresented as being the original software.
20
21 3. This notice may not be removed or altered from any source distribution.
diff --git a/images/squiggle2.png b/images/squiggle2.png
new file mode 100644
index 00000000..23409ce3
--- /dev/null
+++ b/images/squiggle2.png
Binary files differ
diff --git a/inc/shaarli.css b/inc/shaarli.css
index b4c41822..a949666e 100644
--- a/inc/shaarli.css
+++ b/inc/shaarli.css
@@ -248,7 +248,7 @@ font-size:9pt;
248#newversion { background-color: #FFFFA0; color:#000; position:absolute; top:0;right:0; padding:2 7 2 7; font-size:9pt;} 248#newversion { background-color: #FFFFA0; color:#000; position:absolute; top:0;right:0; padding:2 7 2 7; font-size:9pt;}
249#cloudtag { padding-left:10%; padding-right:10%; } 249#cloudtag { padding-left:10%; padding-right:10%; }
250#cloudtag a { color:black; text-decoration:none; } 250#cloudtag a { color:black; text-decoration:none; }
251#installform td { font-size: 10pt; padding:10px 5px 10px 5px; clear:left; } 251#installform td { font-size: 10pt; color:black; padding:10px 5px 10px 5px; clear:left; }
252#changepasswordform { color:#ccc; padding:10px 5px 10px 5px; clear:left; } 252#changepasswordform { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
253#changetag { color:#ccc; padding:10px 5px 10px 5px; clear:left; } 253#changetag { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
254#configform td { color:#ccc; font-size: 10pt; padding:10px 5px 10px 5px; } 254#configform td { color:#ccc; font-size: 10pt; padding:10px 5px 10px 5px; }
@@ -370,7 +370,13 @@ div.dailyEntryThumbnail
370 background:url(../images/50pc_transparent.png); 370 background:url(../images/50pc_transparent.png);
371 padding:4px 0px 2px 0px; 371 padding:4px 0px 2px 0px;
372} 372}
373div.dailyEntryDescription { margin-top: 10px; text-align:justify; } 373div.dailyEntryDescription
374{
375 margin-top: 10px;
376 margin-bottom: 30px;
377 text-align:justify;
378 overflow:auto;
379}
374 380
375/* Common css screwdriver */ 381/* Common css screwdriver */
376.clear{ 382.clear{
diff --git a/index.php b/index.php
index da2445de..9dd6483e 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
1<?php 1<?php
2// Shaarli 0.0.35 beta - Shaare your links... 2// Shaarli 0.0.36 beta - Shaare your links...
3// The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net 3// The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net
4// http://sebsauvage.net/wiki/doku.php?id=php:shaarli 4// http://sebsauvage.net/wiki/doku.php?id=php:shaarli
5// Licence: http://www.opensource.org/licenses/zlib-license.php 5// Licence: http://www.opensource.org/licenses/zlib-license.php
@@ -58,7 +58,7 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
58header("Cache-Control: no-store, no-cache, must-revalidate"); 58header("Cache-Control: no-store, no-cache, must-revalidate");
59header("Cache-Control: post-check=0, pre-check=0", false); 59header("Cache-Control: post-check=0, pre-check=0", false);
60header("Pragma: no-cache"); 60header("Pragma: no-cache");
61define('shaarli_version','0.0.35 beta'); 61define('shaarli_version','0.0.36 beta');
62if (!is_dir($GLOBALS['config']['DATADIR'])) { mkdir($GLOBALS['config']['DATADIR'],0705); chmod($GLOBALS['config']['DATADIR'],0705); } 62if (!is_dir($GLOBALS['config']['DATADIR'])) { mkdir($GLOBALS['config']['DATADIR'],0705); chmod($GLOBALS['config']['DATADIR'],0705); }
63if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['DATADIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. 63if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['DATADIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
64if ($GLOBALS['config']['ENABLE_LOCALCACHE']) 64if ($GLOBALS['config']['ENABLE_LOCALCACHE'])
@@ -988,9 +988,11 @@ function renderPage()
988 foreach($linksToDisplay as $key=>$link) 988 foreach($linksToDisplay as $key=>$link)
989 { 989 {
990 // Roughly estimate length of entry (by counting characters) 990 // Roughly estimate length of entry (by counting characters)
991 $length=strlen($link['title'])+strlen($link['description']); 991 // Title: 30 chars = 1 line. 1 line is 30 pixels height.
992 if ($link['thumbnail']) $length +=100; // 1 thumbnails roughly take as much space as 100 words; 992 // Description: 836 characters gives roughly 342 pixel height.
993 993 // This is not perfect, but it's usually ok.
994 $length=strlen($link['title'])+(342*strlen($link['description']))/836;
995 if ($link['thumbnail']) $length +=100; // 1 thumbnails roughly takes 100 pixels height.
994 // Then put in column which is the less filled: 996 // Then put in column which is the less filled:
995 $smallest=min($fill); // find smallest value in array. 997 $smallest=min($fill); // find smallest value in array.
996 $index=array_search($smallest,$fill); // find index of this smallest value. 998 $index=array_search($smallest,$fill); // find index of this smallest value.
diff --git a/tpl/daily.html b/tpl/daily.html
index e05acc86..9ee74739 100644
--- a/tpl/daily.html
+++ b/tpl/daily.html
@@ -14,41 +14,41 @@
14 <div style="clear:both;"></div> 14 <div style="clear:both;"></div>
15 15
16 {if="$linksToDisplay"} 16 {if="$linksToDisplay"}
17 <div style="float:left;position:relative; width:32%;"> 17 <div style="float:left;position:relative; width:33%; padding-left:1%;">
18 {loop="col1"} 18 {loop="col1"}
19 <div class="dailyEntry"> 19 <div class="dailyEntry">
20 <div style="float:right;position:relative;top:-1px;"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
20 {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if} 21 {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
21 <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div> 22 <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
22 {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if} 23 {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
23 <div class="dailyEntryDescription">{$value.formatedDescription}</div> 24 <div class="dailyEntryDescription">{$value.formatedDescription}</div>
24 <div style="width:100%;text-align:right"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
25 </div> 25 </div>
26 {/loop} 26 {/loop}
27 </div> 27 </div>
28 28
29 <div style="float:left;position:relative; width:32%;"> 29 <div style="float:left;position:relative; width:33%;">
30 {loop="col2"} 30 {loop="col2"}
31 <div class="dailyEntry"> 31 <div class="dailyEntry">
32 <div style="float:right;position:relative;top:-1px;"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
32 {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if} 33 {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
33 <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div> 34 <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
34 {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if} 35 {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
35 <div class="dailyEntryDescription">{$value.formatedDescription}</div> 36 <div class="dailyEntryDescription">{$value.formatedDescription}</div>
36 <div style="width:100%;text-align:right"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
37 </div> 37 </div>
38 {/loop} 38 {/loop}
39 </div> 39 </div>
40 40
41 <div style="float:left;position:relative; width:32%;"> 41 <div style="float:left;position:relative; width:33%;">
42 {loop="col3"} 42 {loop="col3"}
43 <div class="dailyEntry"> 43 <div class="dailyEntry">
44 <div style="float:right;position:relative;top:-1px;"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
44 {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if} 45 {if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
45 <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div> 46 <div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
46 {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if} 47 {if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
47 <div class="dailyEntryDescription">{$value.formatedDescription}</div> 48 <div class="dailyEntryDescription">{$value.formatedDescription}</div>
48 <div style="width:100%;text-align:right"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
49 </div> 49 </div>
50 {/loop} 50 {/loop}
51 </div> 51 </div>
52 {else} 52 {else}
53 <div style="text-align:center; padding:40px 0px 90px 0px;">No articles on this day.</div> 53 <div style="text-align:center; padding:40px 0px 90px 0px;">No articles on this day.</div>
54 {/if} 54 {/if}
diff --git a/tpl/linklist.html b/tpl/linklist.html
index a7dd61e9..dc5b5398 100644
--- a/tpl/linklist.html
+++ b/tpl/linklist.html
@@ -42,7 +42,7 @@
42 {else} 42 {else}
43 <span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span> 43 <span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
44 {/if} 44 {/if}
45 <div style="position:relative;display:inline;"><a href="http://invx.com/code/qrcode/?code={$scripturl|urlencode}%2F{$value.linkdate|smallHash}&width=200&height=200" onclick="return false;" class="qrcode"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> - 45 <div style="position:relative;display:inline;"><a href="http://invx.com/code/qrcode/?code={$scripturl|urlencode}%3F{$value.linkdate|smallHash}&width=200&height=200" onclick="return false;" class="qrcode"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> -
46 <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br> 46 <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br>
47 {if="$value.tags"} 47 {if="$value.tags"}
48 <div class="linktaglist"> 48 <div class="linktaglist">