- Corrected: Improper text color in install form.
- Corrected: Error in QRCode url (missing '?')
- Changed: Display adjustments in “Daily” page.
- Added: Shaarli licence in COPYING
--- /dev/null
+Shaarli is distributed under the zlib/libpng License:
+
+Copyright (c) 2011 Sébastien SAUVAGE (sebsauvage.net)
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from
+the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would
+ be appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source distribution.
#newversion { background-color: #FFFFA0; color:#000; position:absolute; top:0;right:0; padding:2 7 2 7; font-size:9pt;}
#cloudtag { padding-left:10%; padding-right:10%; }
#cloudtag a { color:black; text-decoration:none; }
-#installform td { font-size: 10pt; padding:10px 5px 10px 5px; clear:left; }
+#installform td { font-size: 10pt; color:black; padding:10px 5px 10px 5px; clear:left; }
#changepasswordform { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
#changetag { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
#configform td { color:#ccc; font-size: 10pt; padding:10px 5px 10px 5px; }
background:url(../images/50pc_transparent.png);
padding:4px 0px 2px 0px;
}
-div.dailyEntryDescription { margin-top: 10px; text-align:justify; }
+div.dailyEntryDescription
+{
+ margin-top: 10px;
+ margin-bottom: 30px;
+ text-align:justify;
+ overflow:auto;
+}
/* Common css screwdriver */
.clear{
<?php
-// Shaarli 0.0.35 beta - Shaare your links...
+// Shaarli 0.0.36 beta - Shaare your links...
// The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net
// http://sebsauvage.net/wiki/doku.php?id=php:shaarli
// Licence: http://www.opensource.org/licenses/zlib-license.php
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
-define('shaarli_version','0.0.35 beta');
+define('shaarli_version','0.0.36 beta');
if (!is_dir($GLOBALS['config']['DATADIR'])) { mkdir($GLOBALS['config']['DATADIR'],0705); chmod($GLOBALS['config']['DATADIR'],0705); }
if (!is_file($GLOBALS['config']['DATADIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['DATADIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files.
if ($GLOBALS['config']['ENABLE_LOCALCACHE'])
foreach($linksToDisplay as $key=>$link)
{
// Roughly estimate length of entry (by counting characters)
- $length=strlen($link['title'])+strlen($link['description']);
- if ($link['thumbnail']) $length +=100; // 1 thumbnails roughly take as much space as 100 words;
-
+ // Title: 30 chars = 1 line. 1 line is 30 pixels height.
+ // Description: 836 characters gives roughly 342 pixel height.
+ // This is not perfect, but it's usually ok.
+ $length=strlen($link['title'])+(342*strlen($link['description']))/836;
+ if ($link['thumbnail']) $length +=100; // 1 thumbnails roughly takes 100 pixels height.
// Then put in column which is the less filled:
$smallest=min($fill); // find smallest value in array.
$index=array_search($smallest,$fill); // find index of this smallest value.
<div style="clear:both;"></div>
{if="$linksToDisplay"}
- <div style="float:left;position:relative; width:32%;">
+ <div style="float:left;position:relative; width:33%; padding-left:1%;">
{loop="col1"}
<div class="dailyEntry">
+ <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>
{if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
<div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
{if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
<div class="dailyEntryDescription">{$value.formatedDescription}</div>
- <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>
</div>
{/loop}
</div>
- <div style="float:left;position:relative; width:32%;">
+ <div style="float:left;position:relative; width:33%;">
{loop="col2"}
<div class="dailyEntry">
+ <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>
{if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
<div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
{if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
<div class="dailyEntryDescription">{$value.formatedDescription}</div>
- <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>
</div>
{/loop}
</div>
- <div style="float:left;position:relative; width:32%;">
+ <div style="float:left;position:relative; width:33%;">
{loop="col3"}
<div class="dailyEntry">
+ <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>
{if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
<div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
{if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
<div class="dailyEntryDescription">{$value.formatedDescription}</div>
- <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>
</div>
{/loop}
- </div>
+ </div>
{else}
<div style="text-align:center; padding:40px 0px 90px 0px;">No articles on this day.</div>
{/if}
{else}
<span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
{/if}
- <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> -
+ <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> -
<span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br>
{if="$value.tags"}
<div class="linktaglist">