[add] new template system inspired by communauty fork

This commit is contained in:
Knah Tsaeb 2015-07-17 13:49:55 +02:00
parent b6d9d9b37a
commit e89182bacf
72 changed files with 3129 additions and 18 deletions

View file

@ -44,11 +44,16 @@
// -----------------------------------------------------------------------------------------------
// You should not touch below (or at your own risks !)
// Optionnal config file.
// Run config screen if first run:
if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install();
require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS.
if (is_file($GLOBALS['config']['DATADIR'].'/options.php')){
require($GLOBALS['config']['DATADIR'].'/options.php');
}
define('myShaarli_version','1.0.0 beta');
define('myShaarli_version','1.1.0 beta');
define('PHPPREFIX','<?php /* '); // Prefix to encapsulate data in php code.
define('PHPSUFFIX',' */ ?>'); // Suffix to encapsulate data in php code.
// http://server.com/x/shaarli --> /shaarli/
@ -79,7 +84,7 @@
include 'inc/Parsedown.php';
}
include "inc/rain.tpl.class.php"; //include Rain TPL
raintpl::$tpl_dir = "tpl/"; // template directory
raintpl::$tpl_dir = 'tpl/'.$GLOBALS['config']['THEME'].'/'; // template directory
if (!is_dir('tmp')) { mkdir('tmp',0705); chmod('tmp',0705); }
raintpl::$cache_dir = "tmp/"; // cache directory
@ -123,14 +128,6 @@ function stripslashes_deep($value) { $value = is_array($value) ? array_map('stri
if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false;
if (empty($GLOBALS['titleLink'])) $GLOBALS['titleLink']='?';
// I really need to rewrite Shaarli with a proper configuation manager.
// Run config screen if first run:
if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install();
require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS.
// a token depending of deployment salt, user password, and the current ip
define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt']));
@ -717,7 +714,7 @@ public function assign($what,$where)
public function renderPage($page)
{
if ($this->tpl===false) $this->initialize(); // Lazy initialization
$this->tpl->draw($page);
$this->tpl->draw($page);
}
}
@ -2409,9 +2406,9 @@ function processWS()
}
function getAllTheme(){
$allTheme = glob('inc/styles/*.css');
$allTheme = glob('tpl/*', GLOB_ONLYDIR);
foreach ($allTheme as $value) {
$themes[] = basename($value, '.css');
$themes[] = str_replace('tpl/', '', $value);
}
return $themes;
}

View file

@ -1 +1 @@
1.0.0 beta
1.1.0 beta

View file

@ -9,7 +9,4 @@
<link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" />
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" />
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" />
<link type="text/css" rel="stylesheet" href="inc/styles/{$theme}.css?version={$version|urlencode}#" />
{if condition="is_file('inc/user.css')"}
<link type="text/css" rel="stylesheet" href="inc/user.css?version={$version}#" />
{/if}
<link type="text/css" rel="stylesheet" href="myShaarli.css?version={$version|urlencode}" />

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="headerform">
<form method="get" name="addform" class="addform">
<input type="text" name="post" autofocus>
<input type="submit" value="Add link" class="bigbutton">
</form>
</div>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<form method="post" name="changepasswordform" id="changepasswordform">
<p>
<label for="oldpassword">Old password:</label>
<input type="password" name="oldpassword" id="oldpassword" autofocus/>
</p>
<p>
<label for="setpassword">New password:</label>
<input type="password" name="setpassword" id="setpassword">
</p>
<p>
<input type="hidden" name="token" value="{$token}">
<input type="submit" name="Save" value="Save password" class="bigbutton">
</p>
</form>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
{if="empty($GLOBALS['disablejquery'])"}
<script src="inc/jquery.min.js#"></script>
<script src="inc/jquery-ui.min.js#"></script>
{/if}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<form method="post" name="changetag" id="editlinkform">
<fieldset>
<legend>
Rename tag
</legend>
<p>
<label for="">Old tag :</label>
<input type="text" name="fromtag" class="fromtag" autofocus>
(Case sensitive)
</p>
<p>
<label>New tag :</label>
<input type="text" name="totag" class="fromtag">
</p>
<p class="submitButton">
<input type="submit" name="renametag" value="Rename tag" class="bigbutton">
</p>
</fieldset>
<fieldset>
<legend>
Delete tag
</legend>
<p>
<label for="">Tag :</label>
<input type="text" name="tagToDelete" class="fromtag">
(Case sensitive)
</p>
<p class="submitButton">
<input type="hidden" name="token" value="{$token}">
<input type="submit" name="deletetag" value="Delete tag" class="bigbutton" onClick="return confirmDeleteTag();">
</p>
</fieldset>
</form>
</div>
{include="page.footer"}
{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"}
<script>
$(document).ready(function() {
$('.fromtag').autocomplete({
source : '{$source}?ws=singletag',
minLength : 1
});
function confirmDeleteTag() {
var agree = confirm("Are you sure you want to delete this tag from all links ?");
if (agree) {
return true;
} else {
return false;
}
}
});
</script>
{/if}
</body>
</html>

View file

@ -0,0 +1,127 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
{$timezone_js}
<form method="post" action="" name="configform" id="configform">
<ul class="tabs">
<li>
<input type="radio" checked name="tabs" id="tab1">
<label class="tabsLabel" for="tab1">&#9658; General</label>
<div id="tab-content1" class="tab-content">
<p>
<label for="title">Page title :</label>
<input type="text" name="title" id="title" size="50" value="{$title}" autofocus>
</p>
<p>
<label for="titleLink">Title link :</label>
<input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}">
</p>
<p>
<label for="contactLink">Contact link in footer: </label>
<input type="text" name="contactLink" id="contactLink" value="{$GLOBALS['config']['contactLink']}"/>
<span>Example : http://example.com/contact.php or mailo:contact@example.com</span>
</p>
<p>
<label>Timezone : </label>
{$timezone_form}
</p>
<p>
<label for="redirector">Redirector : </label>
<input type="text" name="redirector" id="redirector" size="50" value="{$redirector}">
(e.g. <i>http://anonym.to/?</i> will mask the HTTP_REFERER)
</p>
<p>
<label for="enableCache">Enable local cache : </label>
<input type="checkbox" name="enableCache" id="enableCache" {if="!empty($GLOBALS['config']['ENABLE_LOCALCACHE'])"}checked{/if}/>
</p>
</div>
</li>
<li>
<input type="radio" name="tabs" id="tab2">
<label class="tabsLabel" for="tab2" >&#9658; Security</label>
<div id="tab-content2" class="tab-content">
<p>
<label for="disablesessionprotection">Security :</label>
<input type="checkbox" name="disablesessionprotection" id="disablesessionprotection" {if="!empty($GLOBALS['disablesessionprotection'])"}checked{/if}>
<label for="disablesessionprotection">&nbsp;Disable session cookie hijacking protection (Check this if you get disconnected often or if your IP address changes often.)</label>
</p>
<p>
<label for="banAfter">Ban after : </label>
<input type="text" name="banAfter" id="banAfter" value="{$GLOBALS['config']['BAN_AFTER']}"/>
</p>
<p>
<label for="banDuration">Ban time : </label>
<input type="text" name="banDuration" id="banDuration" value="{$GLOBALS['config']['BAN_DURATION']}"/>
in second
</p>
<p>
<label for="updateCheck">Update :</label>
<input type="checkbox" name="updateCheck" id="updateCheck" {if="!empty($GLOBALS['config']['ENABLE_UPDATECHECK'])"}checked{/if}/>
<label for="updateCheck">&nbsp;Notify me when a new release is ready</label>
</p>
</div>
</li>
<li>
<input type="radio" name="tabs" id="tab3">
<label class="tabsLabel" for="tab3">&#9658; Display</label>
<div id="tab-content3" class="tab-content">
<p>
<label for="theme">Theme : </label>
<select name="theme" id="theme">
{loop="themes"}
<option {if="$GLOBALS['config']['THEME']==$value"}selected{/if} value="{$value}">{$value|ucfirst}</option>
{/loop}
</select>
</p>
<p>
<label for="linkPerPage">Link per page : </label>
<input type="text" name="linkPerPage" id="linkPerPage" value="{$GLOBALS['config']['LINKS_PER_PAGE']}"/>
</p>
<p>
<label for="hideTimestamps">Hide timestamps : </label>
<input type="checkbox" name="hideTimestamps" id="hideTimestamps" {if="!empty($GLOBALS['config']['HIDE_TIMESTAMPS'])"}checked{/if}/>
</p>
</div>
</li>
<li>
<input type="radio" name="tabs" id="tab4">
<label class="tabsLabel" for="tab4">&#9658; Extra</label>
<div id="tab-content4" class="tab-content">
<p>
<label for="privateLinkByDefault">New link:</label>
<input type="checkbox" name="privateLinkByDefault" id="privateLinkByDefault" {if="!empty($GLOBALS['privateLinkByDefault'])"}checked{/if}/>
<label for="privateLinkByDefault">&nbsp;All new link are private by default</label>
</p>
<p>
<label for="enableMarkdown">Enable Markdown : </label>
<input type="checkbox" name="enableMarkdown" id="enableMarkdown" {if="!empty($GLOBALS['config']['ENABLE_MARKDOWN'])"}checked{/if}/>
</p>
<p>
<label for="enableThumbnails">Enable thumbnail : </label>
<input type="checkbox" name="enableThumbnails" id="enableThumbnails" {if="!empty($GLOBALS['config']['ENABLE_THUMBNAILS'])"}checked{/if}/>
</p>
<p>
<label for="externalThumbshot">External thumbnailer : </label>
<input type="text" name="externalThumbshot" id="externalThumbshot" size="50" value="{$GLOBALS['config']['externalThumbshot']}">
</p>
<p>
<label for="enableFavicon">Enable favicon : </label>
<input type="checkbox" name="enableFavicon" id="enableFavicon" {if="!empty($GLOBALS['config']['ENABLE_FAVICON'])"}checked{/if}/>
</p>
</div>
</li>
</ul>
<p>
<input type="hidden" name="token" value="{$token}">
<input type="submit" name="Save" value="Save config" class="bigbutton">
</p>
</form>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}</head>
<body>
<div id="pageheader">{include="page.header"}</div>
<div class="daily">
<div class="dailyAbout">
All links of one day<br>in a single page.<br>
{if="$previousday"} <a href="?do=daily&day={$previousday}"><b>&lt;</b>Previous day</a>{else}<b>&lt;</b>Previous day{/if}
-
{if="$nextday"}<a href="?do=daily&day={$nextday}">Next day<b>&gt;</b></a>{else}Next day<b>&gt;</b>{/if}
<br><br>
<a href="?do=dailyrss" title="1 RSS entry per day"><img src="images/feed-icon-14x14.png#" width="14" height="14" style="position:relative;top:3px; margin-right:4px;">Daily RSS Feed</a>
</div>
<div class="dailyTitle"><img src="../images/floral_left.png" width="51" height="50" class="nomobile"> The Daily Shaarli <img src="../images/floral_right.png" width="51" height="50" class="nomobile"></div>
<div class="dailyDate"><span class="nomobile">&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;</span> {$day} <span class="nomobile">&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;</span></div>
<div style="clear:both;"></div>
{if="$linksToDisplay"}
<div id="daily_col1">
{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>
{/loop}
</div>
<div id="daily_col2">
{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>
{/loop}
</div>
<div id="daily_col3">
{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>
{/loop}
</div>
{else}
<div style="text-align:center; padding:40px 0px 90px 0px;">No articles on this day.</div>
{/if}
<div style="clear:both;"></div>
<div style="text-align:center; padding-bottom:20px;"><img src="../images/squiggle_closing.png" width="66" height="61" alt="-"></div>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,8 @@
{loop="links"}
<h3><a href="{$value.url}">{$value.title|htmlspecialchars}</a></h3>
<small>{if="!$GLOBALS['config']['HIDE_TIMESTAMPS']"}{$value.localdate|htmlspecialchars} - {/if}{if="$value.tags"}{$value.tags|htmlspecialchars}{/if}<br>
{$value.url|htmlspecialchars}</small><br>
{if="$value.thumbnail"}{$value.thumbnail}{/if}<br>
{if="$value.description"}{$value.formatedDescription}{/if}
<br><br><hr>
{/loop}

View file

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
{if="empty($GLOBALS['disablejquery'])"}
<script src="inc/jquery.min.js#"></script>
<script src="inc/jquery-ui.min.js#"></script>
{/if}
</head>
<body
{if condition="$link.title==''"}onload="document.linkform.lf_title.focus();"
{elseif condition="$link.description==''"}onload="document.linkform.lf_description.focus();"
{else}onload="document.linkform.lf_tags.focus();"{/if} >
<div id="pageheader">
{if="$source !== 'firefoxsocialapi'"}
{include="page.header"}
{/if}
<div id="editlinkform">
<form method="post" name="linkform">
<p>
<label for="lf_url">URL</label>
<input type="text" id="lf_url" name="lf_url" value="{$link.url|htmlspecialchars}">
</p>
<p>
<label for="lf_title">Title</label>
<input type="text" id="lf_title" name="lf_title" value="{$link.title|htmlspecialchars}">
</p>
<p>
<label for="lf_description">Description</label><a href="doc/markdown.php" id="help"><img src="../images/help_icon.png" alt="help icon"/></a>
<textarea id="lf_description" name="lf_description" rows="4" cols="25">{$link.description|htmlspecialchars}</textarea>
</p>
<p>
<label for="lf_tags">Tags</label>
<input type="text" id="lf_tags" name="lf_tags" value="{$link.tags|htmlspecialchars}">
</p>
<p>
<label for="lf_via">Origine</label>
<input type="text" id="lf_via" name="lf_via" value="{$link.via|htmlspecialchars}">
</p>
{if condition="($link_is_new && $GLOBALS['privateLinkByDefault']==true) || $link.private == true"}
<p>
<input type="checkbox" checked="checked" name="lf_private" id="lf_private">
&nbsp;<label for="lf_private">Private</label>
</p>
{else}
<p>
<input type="checkbox" name="lf_private" id="lf_private">
&nbsp;<label for="lf_private">Private</label>
</p>
{/if}
<p class="submitButton">
<input type="hidden" id="lf_linkdate" name="lf_linkdate" value="{$link.linkdate}">
<input type="submit" value="Save" name="save_edit" class="bigbutton">
<input type="submit" value="Cancel" name="cancel_edit" class="bigbutton">
{if condition="!$link_is_new"}
<input type="submit" value="Delete" name="delete_link" class="bigbutton" onClick="return confirmDeleteLink();">
{/if}
<input type="hidden" name="token" value="{$token}">
{if condition="$http_referer"}
<input type="hidden" name="returnurl" value="{$http_referer|htmlspecialchars}">
{/if}
</p>
</form>
</div>
</div>
{if="$source !== 'firefoxsocialapi'"}
{include="page.footer"}
{/if}
{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"}
<script>
$(document).ready(function() {
$('#lf_tags').autocomplete({
source : '{$source}?ws=tags',
minLength : 1
});
$("#help").click(function() {
window.open("doc/markdown.php", "myWindow","scrollbars=1, width=400, height=400");
return false;
});
});
</script>
{/if}
</body>
</html>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="toolsdiv">
<ul>
<li>
<a href="?do=export&what=all">Export all <span>: Export all links</span></a>
</li>
<li>
<a href="?do=export&what=public">Export public <span>: Export public links only</span></a>
</li>
<li>
<a href="?do=export&what=private">Export private <span>: Export private links only</span></a>
</li>
</ul>
<div class="clearFix">
&nbsp;
</div>
</div>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body onload="document.uploadform.filetoupload.focus();">
<div id="pageheader">
{include="page.header"}
<div id="uploaddiv">
Import Netscape html bookmarks (as exported from Firefox/Chrome/Opera/delicious/diigo...) (Max: {$maxfilesize|htmlspecialchars} bytes).
<form method="post" action="?do=upload" enctype="multipart/form-data" name="uploadform" id="uploadform">
<p>
<input type="file" name="filetoupload" size="80">
</p>
<p>
<input type="checkbox" name="private" id="private">
<label for="private">&nbsp;Import all links as private</label>
</p>
<p>
<input type="checkbox" name="overwrite" id="overwrite">
<label for="overwrite">&nbsp;Overwrite existing links</label>
</p>
<p>
<input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize|htmlspecialchars}">
<input type="hidden" name="token" value="{$token}">
<input type="submit" name="import_file" value="Import" class="bigbutton">
</p>
</form>
</div>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,12 @@
<title>{$pagetitle}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
<!--<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />-->
<link rel="icon" type="image/png" sizes="128x128" href="images/favicon_128.png#" />
<link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" />
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" />
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" />
<link type="text/css" rel="stylesheet" href="columns.css?version={$version|urlencode}" />

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}{$timezone_js}</head>
<body onload="document.installform.setlogin.focus();">
<div id="install">
<h1>Shaarli</h1>
It looks like it's the first time you run Shaarli. Please configure it:<br>
<form method="POST" action="#" name="installform" id="installform">
<table>
<tr><td><b>Login:</b></td><td><input type="text" name="setlogin" size="30"></td></tr>
<tr><td><b>Password:</b></td><td><input type="password" name="setpassword" size="30"></td></tr>
{$timezone_html}
<tr><td><b>Page title:</b></td><td><input type="text" name="title" size="30"></td></tr>
<tr><td valign="top"><b>Update:</b></td><td>
<input type="checkbox" name="updateCheck" id="updateCheck" checked="checked"><label for="updateCheck">&nbsp;Notify me when a new release is ready</label></td>
</tr>
<tr><td colspan="2"><input type="submit" name="Save" value="Save config" class="bigbutton"></td></tr>
</table>
</form>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,159 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
{if="empty($GLOBALS['disablejquery'])"}
<script src="inc/jquery.min.js#"></script>
<script src="inc/jquery-ui.min.js#"></script>
{/if}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="headerform">
<form method="get" class="searchform" name="searchform">
<input type="text" id="searchform_value" name="searchterm" value="" placeholder="Search text"/>
<input type="submit" value="Search" class="bigbutton"/>
</form>
<form method="get" class="tagfilter" name="tagfilter">
<input type="text" name="searchtags" id="tagfilter_value" value="{loop="search_crits"}{$value|htmlspecialchars} {/loop}" placeholder="Filter by tag"/>
<input type="submit" value="Filter by tag" class="bigbutton"/>
</form>
</div>
</div>
<div id="linklist">
{include="linklist.paging"}
{if="count($links)==0"}
<div id="searchcriteria">
Nothing found.
</div>
{else}
{if="$search_type=='fulltext'"}
<div id="searchcriteria">
{$result_count} results for <i>{$search_crits}</i>
</div>
{/if}
{if="$search_type=='tags'"}
<div id="searchcriteria">
{$result_count} results for tags <i> {loop="search_crits"} <span class="linktag" title="Remove tag"><a href="?removetag={$value|htmlspecialchars}">{$value|htmlspecialchars} <span class="removeTag">x</span></a></span> {/loop}</i>
</div>
{/if}
{/if}
<ul class="linkList">
{loop="links"}
<li {if="$value.class"} class="{$value.class}"{/if} >
<!--<a name="{$value.linkdate|smallHash}" id="{$value.linkdate|smallHash}"></a>-->
{if="$GLOBALS['config']['ENABLE_THUMBNAILS']"}
<div class="thumbnail">
{$value.url|thumbnail}
</div>
{/if}
<div class="linkcontainer {if="$GLOBALS['config']['ENABLE_THUMBNAILS']"}linkcontainerThumb{/if}">
{if="isLoggedIn()"}
<div class="linkeditbuttons">
<form method="get" class="buttoneditform">
<input type="hidden" name="edit_link" value="{$value.linkdate}">
<input type="image" alt="Edit" src="images/edit_icon.png#" title="Edit" class="button_edit">
</form>
<br>
<form method="post" class="buttoneditform">
<input type="hidden" name="lf_linkdate" value="{$value.linkdate}">
<input type="hidden" name="token" value="{$token}">
<input type="hidden" name="delete_link">
<input type="image" alt="Delete" src="images/delete_icon.png#" title="Delete" class="button_delete" onClick="return confirmDeleteLink();">
</form>
</div>
{/if}
<h3 class="linktitle">{function="returnFavicon($value.url)"}<a href="{$redirector}{$value.url|htmlspecialchars}">{$value.title|htmlspecialchars}</a></h3>
{if="$value.description"}
<div class="linkdescription" {if condition="$search_type=='permalink'"}{/if}>
{$value.description}
</div>
{/if}
{if condition="isset($value.via) && !empty($value.via)"}
<div>
<a href="{$value.via}">Origine => {$value.via|getJustDomain}</a>
</div>{/if}
{if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
<span class="linkdate linkBottom" title="Permalink"><a href="?{$value.linkdate|smallHash}">{$value.localdate|htmlspecialchars} - permalink</a> - </span>
{else}
<span class="linkdate linkBottom" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
{/if}
<span class="linkarchive linkBottom"><a href="https://web.archive.org/web/{$value.url|htmlspecialchars}">Archive.org</a> - </span>
{if="$GLOBALS['config']['WALLABAG_URL'] && isLoggedIn()"}
<span class="linkWallabag linkBottom"><a href="{$GLOBALS['config']['WALLABAG_URL']}/?plainurl={$value.url|htmlspecialchars}">Save to Wallabag</a> - </span>
{/if}
<span><a href="http://qrfree.kaywa.com/?l=1&amp;s=8&d={$scripturl|urlencode}%3F{$value.linkdate|smallHash}"
onclick="showQrCode(this); return false;" class="qrcode" data-permalink="{$scripturl}?{$value.linkdate|smallHash}"><img src="images/qrcode.png#" title="QR-Code" alt="qrcode logo"></a></span> - <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span>
<br>
{if="$value.tags"}
<div class="linktaglist">
{loop="value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value|htmlspecialchars}</a></span> {/loop}
</div>
{/if}
</div>
<span class="clearFix">&nbsp;</span>
</li>
{/loop}
</ul>
{include="linklist.paging"}
</div>
{include="page.footer"}
<script>
$('#tagfilter_value').autocomplete({
source : '{$source}?ws=tags',
minLength : 1
});
// Remove any displayed QR-Code
function remove_qrcode() {
var elem = document.getElementById("permalinkQrcode");
if (elem)
elem.parentNode.removeChild(elem);
return false;
}
// Show the QR-Code of a permalink (when the QR-Code icon is clicked).
function showQrCode(caller,loading=false) {
// Dynamic javascript lib loading: We only load qr.js if the QR code icon is clicked:
if ( typeof (qr) == 'undefined')// Load qr.js only if not present.
{
if (!loading)// If javascript lib is still loading, do not append script to body.
{
var element = document.createElement("script");
element.src = "inc/qr.min.js";
document.body.appendChild(element);
}
setTimeout(function() {
showQrCode(caller, true);
}, 200);
// Retry in 200 milliseconds.
return false;
}
// Remove previous qrcode if present.
remove_qrcode();
// Build the div which contains the QR-Code:
var element = document.createElement('div');
element.id = "permalinkQrcode";
// Make QR-Code div commit sepuku when clicked:
if (element.attachEvent) {
element.attachEvent('onclick', 'this.parentNode.removeChild(this);');
}// Damn IE
else {
element.setAttribute('onclick', 'this.parentNode.removeChild(this);');
}
// Build the QR-Code:
var image = qr.image({
size : 8,
value : caller.dataset.permalink
});
if (image) {
element.appendChild(image);
element.innerHTML += "<br>Click to close";
caller.parentNode.appendChild(element);
} else {
element.innerHTML = "Your browser does not seem to be HTML5 compatible.";
}
return false;
}
</script>
</body>
</html>

View file

@ -0,0 +1,24 @@
<div class="paging">
{if="isLoggedIn()"}
<div class="paging_privatelinks">
<a href="?privateonly"> {if="$privateonly"} <img src="images/private_16x16_active.png#" width="16" height="16" title="Click to see all links" alt="Click to see all links"> {else} <img src="images/private_16x16.png#" width="16" height="16" title="Click to see only private links" alt="Click to see only private links"> {/if} </a>
</div>
{/if}
<div class="paging_linksperpage">
Links per page: <a href="?linksperpage=20">20</a><a href="?linksperpage=50">50</a><a href="?linksperpage=100">100</a>
<form method="GET" class="linksperpage">
<input type="text" name="linksperpage">
</form>
</div>
<div class="paginNavigation">
{if="$previous_page_url"}
<a href="{$previous_page_url}" class="paging_older">&#x25C4;Older</a>
{/if}
<div class="paging_current">
page {$page_current} / {$page_max}
</div>
{if="$next_page_url"}
<a href="{$next_page_url}" class="paging_newer">Newer&#x25BA;</a>
{/if}
</div>
</div>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="headerform">
{if="!ban_canLogin()"}
You have been banned from login after too many failed attempts. Try later.
{else}
<form method="post" id="configform" class="configform">
<p>
<label for="login">Login :</label>
<input type="text" name="login" id="login" tabindex="1" autofocus />
<label for="password">Password :</label>
<input type="password" name="password" id="password" tabindex="2">
</p>
<p>
<input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="3">
<label for="longlastingsession">&nbsp;Stay signed in (Do not check on public computers)</label>
</p>
<p>
{if="$returnurl"}
<input type="hidden" name="returnurl" value="{$returnurl|htmlspecialchars}">
{/if}
<input type="hidden" name="token" value="{$token}">
<input type="submit" value="Login" class="bigbutton" tabindex="4" />
</p>
</form>
{/if}
</div>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,23 @@
<div id="footer">
<a href="https://forge.leslibres.org/projects/shaarli/repository/show?rev=myShaarli">myShaarli are made by Knah Tsaeb</a> is based on <b><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli">Shaarli 0.0.41 beta</a></b> - The personal, minimalist, super-fast, no-database delicious clone. By <a href="http://sebsauvage.net" target="_blank">sebsauvage.net</a>.
<br/>
Original theme by <a href="http://blog.idleman.fr" target="_blank">idleman.fr</a>.
<br/>
{if="$GLOBALS['config']['contactLink']"} For contact me <a href="{$GLOBALS['config']['contactLink']}">use this link</a>{/if}.
</div>
{if="$newversion"}
<div id="newversion">
&#x25CF;<a href="{$GLOBALS['config']['UPDATECHECK_DOWNLOAD']}">{$newversion|htmlspecialchars}</a>
</div>
{/if}
{if="isLoggedIn()"}
<script>
function confirmDeleteLink() {
var agree = confirm("Are you sure you want to delete this link ?");
if (agree)
return true;
else
return false;
}
</script>
{/if}

View file

@ -0,0 +1,24 @@
<div id="logo" title="Share your links !" onclick="document.location='?';"></div>
<div id="linkcount" class="nomobile">
Shaare
{if="!empty($linkcount)"}{$linkcount}{/if} links
</div>
<span id="shaarli_title"><a href="{$titleLink}">{$shaarlititle|htmlspecialchars}</a></span>
{if="!empty($_GET['source']) && $_GET['source']=='bookmarklet'"}
{ignore} When called as a popup from bookmarklet, do not display menu. {/ignore}
{else}
<a href="?" class="nomobile">Home</a>
{if="isLoggedIn()"}
<a href="?do=logout">Logout</a><a href="?do=tools">Tools</a><a href="?do=addlink"><b>Add link</b></a>
{elseif="$GLOBALS['config']['OPEN_SHAARLI']"}
<a href="?do=tools">Tools</a><a href="?do=addlink"><b>Add link</b></a>
{else}
<a href="?do=login">Login</a>
{/if}
<a href="{$feedurl}?do=rss{$searchcrits}" class="nomobile">RSS Feed</a>
<a href="{$feedurl}?do=atom{$searchcrits}" style="padding-left:10px;" class="nomobile">ATOM Feed</a>
<a href="?do=tagcloud">Tag cloud</a>
<a href="?do=picwall{$searchcrits}">Picture wall</a>
<a href="?do=daily">Daily</a>
{/if}
<div class="clear"></div>

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
</div>
You body goes here...
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
{if="empty($GLOBALS['disablejquery'])"}
<script src="inc/jquery.min.js#"></script>
<script src="inc/jquery-ui.min.js#"></script>
<script src="inc/jquery.lazyload.min.js#"></script>
{/if}
</head>
<body>
<div id="pageheader">
{include="page.header"}
</div>
<div class="picwall_container">
{loop="linksToDisplay"}
<div class="picwall_pictureframe">
{$value.thumbnail}<a href="{$value.permalink}"><span class="info">{$value.title|htmlspecialchars}</span></a>
</div>
{/loop}
</div>
{include="page.footer"}
{if="empty($GLOBALS['disablejquery'])"}
<script>
$(document).ready(function() {
$("img.lazyimage").show().lazyload();
});
</script>
{/if}
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}</head>
<body>
<div id="pageheader">{include="page.header"}</div>
<div style="background-color:#003;">
{loop="linksToDisplay"}
<div style="float:left;width:48%;border-right:2px solid white;height:120px;overflow:hide;">
<div style="float:left;width:120px;text-align:center">{$value.thumbnail}</div>
<a href="{$value.permalink}" style="color:yellow;font-weight:bold;text-decoration:none;">{$value.title|htmlspecialchars}</a><br>
<span style="font-size:8pt;color:#eee;">{$value.description|htmlspecialchars}</span>
<div style="clear:both;"></div>
</div><br>
{/loop}
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,42 @@
===== Shaarli template organisation =====
Any Shaarli page should conform to this RainTPL template:
-----------------------------------------------------
<html>
<head>{include="includes"}</head>
<body>
<div id="pageheader">{include="page.header"}</div>
You body goes here...
{include="page.footer"}
</body>
</html>
-----------------------------------------------------
If you want to also add something in the page header (in the dark area), do it here:
<div id="pageheader">{include="page.header"}My menu goes here...</div>
Example: "Add new link" form:
-----------------------------------------------------
<html>
<head>{include="includes"}</head>
<body onload="document.addform.post.focus();">
<div id="pageheader">
{include="page.header"}
<div id="headerform">
<form method="GET" action="" name="addform" class="addform">
<input type="text" name="post" style="width:50%;">
<input type="submit" value="Add link" class="bigbutton">
</form>
</div>
</div>
{include="page.footer"}
</body>
</html>
-----------------------------------------------------

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
</div>
<div id="cloudtag">
{loop="tags"}
<span>{$value.count}</span><a href="?searchtags={$key|htmlspecialchars}" style="font-size:{$value.size}em;">{$key|htmlspecialchars}</a>
{/loop}
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="toolsdiv">
<ul>
<li>
<a href="{$GLOBALS['config']['UPDATECHECK_DOWNLOAD']}">Version : <span>myshaarli {#myShaarli_version#}</span></a>
</li>
{if="!$GLOBALS['config']['OPEN_SHAARLI']"}
<li>
<a href="?do=changepasswd">Change password : <span>Change your password.</span></a>
</li>
{/if}
<li>
<a href="?do=configure">Configure your Shaarli : <span>Change Title, timezone...</span></a>
</li>
<li>
<a href="?do=changetag">Rename/delete tags : <span>Rename or delete a tag in all links</span></a>
</li>
<li>
<a href="?do=import">Import : <span>Import Netscape html bookmarks (as exported from Firefox, Chrome, Opera, delicious...)</span></a>
</li>
<li>
<a href="?do=export">Export : <span>Export Netscape html bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)</span></a>
</li>
<li>
<a class="smallbutton" onclick="alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');return false;" href="javascript:javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+'&amp;title='%20+%20encodeURIComponent(title)+'&amp;description='%20+%20encodeURIComponent(document.getSelection())+'&amp;source=bookmarklet','_blank','menubar=no,height=450,width=600,toolbar=no,scrollbars=no,status=no,dialog=1');})();">✚Shaare link</a><a href="#" style="clear:none;"><span>&#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Then click "✚Shaare link" button in any page you want to share.</span></a>
</li>
<li>
<a class="smallbutton" onclick="alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');return false;" href="?private=1&post=">✚Add Note</a><a href="#" style="clear:none;"><span>&#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Then click "✚Add Note" button anytime to start composing a (default private) Note (text post) to your Shaarli.</span></a>
</li>
<li>
<a class="smallbutton" onclick="activateFirefoxSocial(this)">✚Add to Firefox social</a><a href="#" style="clear:none;"><span>&#x21D0; Click on this button to add Shaarli to the "Share this page" button in Firefox.</span></a>
</li>
</ul>
<div class="clear"></div>
</div>
</div>
{include="page.footer"}
<script>
function activateFirefoxSocial(node) {
var loc = location.href;
var baseURL = loc.substring(0, loc.lastIndexOf("/"));
// Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
var data = {
name : "{$shaarlititle}",
description : "The personal, minimalist, super-fast, no-database delicious clone.",
author : "Shaarli",
version : "1.0.0",
iconURL : baseURL + "/images/favicon.ico",
icon32URL : baseURL + "/images/favicon.ico",
icon64URL : baseURL + "/images/favicon.ico",
shareURL : baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{description}&source=firefoxsocialapi{/noparse}",
homepageURL : baseURL
};
node.setAttribute("data-service", JSON.stringify(data));
var activate = new CustomEvent("ActivateSocialFeature");
node.dispatchEvent(activate);
}
</script>
</body>
</html>

18
tpl/original/addlink.html Normal file
View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="headerform">
<form method="get" name="addform" class="addform">
<input type="text" name="post" autofocus>
<input type="submit" value="Add link" class="bigbutton">
</form>
</div>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<form method="post" name="changepasswordform" id="changepasswordform">
<p>
<label for="oldpassword">Old password:</label>
<input type="password" name="oldpassword" id="oldpassword" autofocus/>
</p>
<p>
<label for="setpassword">New password:</label>
<input type="password" name="setpassword" id="setpassword">
</p>
<p>
<input type="hidden" name="token" value="{$token}">
<input type="submit" name="Save" value="Save password" class="bigbutton">
</p>
</form>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
{if="empty($GLOBALS['disablejquery'])"}
<script src="inc/jquery.min.js#"></script>
<script src="inc/jquery-ui.min.js#"></script>
{/if}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<form method="post" name="changetag" id="editlinkform">
<fieldset>
<legend>
Rename tag
</legend>
<p>
<label for="">Old tag :</label>
<input type="text" name="fromtag" class="fromtag" autofocus>
(Case sensitive)
</p>
<p>
<label>New tag :</label>
<input type="text" name="totag" class="fromtag">
</p>
<p class="submitButton">
<input type="submit" name="renametag" value="Rename tag" class="bigbutton">
</p>
</fieldset>
<fieldset>
<legend>
Delete tag
</legend>
<p>
<label for="">Tag :</label>
<input type="text" name="tagToDelete" class="fromtag">
(Case sensitive)
</p>
<p class="submitButton">
<input type="hidden" name="token" value="{$token}">
<input type="submit" name="deletetag" value="Delete tag" class="bigbutton" onClick="return confirmDeleteTag();">
</p>
</fieldset>
</form>
</div>
{include="page.footer"}
{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"}
<script>
$(document).ready(function() {
$('.fromtag').autocomplete({
source : '{$source}?ws=singletag',
minLength : 1
});
function confirmDeleteTag() {
var agree = confirm("Are you sure you want to delete this tag from all links ?");
if (agree) {
return true;
} else {
return false;
}
}
});
</script>
{/if}
</body>
</html>

127
tpl/original/configure.html Normal file
View file

@ -0,0 +1,127 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
{$timezone_js}
<form method="post" action="" name="configform" id="configform">
<ul class="tabs">
<li>
<input type="radio" checked name="tabs" id="tab1">
<label class="tabsLabel" for="tab1">&#9658; General</label>
<div id="tab-content1" class="tab-content">
<p>
<label for="title">Page title :</label>
<input type="text" name="title" id="title" size="50" value="{$title}" autofocus>
</p>
<p>
<label for="titleLink">Title link :</label>
<input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}">
</p>
<p>
<label for="contactLink">Contact link in footer: </label>
<input type="text" name="contactLink" id="contactLink" value="{$GLOBALS['config']['contactLink']}"/>
<span>Example : http://example.com/contact.php or mailo:contact@example.com</span>
</p>
<p>
<label>Timezone : </label>
{$timezone_form}
</p>
<p>
<label for="redirector">Redirector : </label>
<input type="text" name="redirector" id="redirector" size="50" value="{$redirector}">
(e.g. <i>http://anonym.to/?</i> will mask the HTTP_REFERER)
</p>
<p>
<label for="enableCache">Enable local cache : </label>
<input type="checkbox" name="enableCache" id="enableCache" {if="!empty($GLOBALS['config']['ENABLE_LOCALCACHE'])"}checked{/if}/>
</p>
</div>
</li>
<li>
<input type="radio" name="tabs" id="tab2">
<label class="tabsLabel" for="tab2" >&#9658; Security</label>
<div id="tab-content2" class="tab-content">
<p>
<label for="disablesessionprotection">Security :</label>
<input type="checkbox" name="disablesessionprotection" id="disablesessionprotection" {if="!empty($GLOBALS['disablesessionprotection'])"}checked{/if}>
<label for="disablesessionprotection">&nbsp;Disable session cookie hijacking protection (Check this if you get disconnected often or if your IP address changes often.)</label>
</p>
<p>
<label for="banAfter">Ban after : </label>
<input type="text" name="banAfter" id="banAfter" value="{$GLOBALS['config']['BAN_AFTER']}"/>
</p>
<p>
<label for="banDuration">Ban time : </label>
<input type="text" name="banDuration" id="banDuration" value="{$GLOBALS['config']['BAN_DURATION']}"/>
in second
</p>
<p>
<label for="updateCheck">Update :</label>
<input type="checkbox" name="updateCheck" id="updateCheck" {if="!empty($GLOBALS['config']['ENABLE_UPDATECHECK'])"}checked{/if}/>
<label for="updateCheck">&nbsp;Notify me when a new release is ready</label>
</p>
</div>
</li>
<li>
<input type="radio" name="tabs" id="tab3">
<label class="tabsLabel" for="tab3">&#9658; Display</label>
<div id="tab-content3" class="tab-content">
<p>
<label for="theme">Theme : </label>
<select name="theme" id="theme">
{loop="themes"}
<option {if="$GLOBALS['config']['THEME']==$value"}selected{/if} value="{$value}">{$value|ucfirst}</option>
{/loop}
</select>
</p>
<p>
<label for="linkPerPage">Link per page : </label>
<input type="text" name="linkPerPage" id="linkPerPage" value="{$GLOBALS['config']['LINKS_PER_PAGE']}"/>
</p>
<p>
<label for="hideTimestamps">Hide timestamps : </label>
<input type="checkbox" name="hideTimestamps" id="hideTimestamps" {if="!empty($GLOBALS['config']['HIDE_TIMESTAMPS'])"}checked{/if}/>
</p>
</div>
</li>
<li>
<input type="radio" name="tabs" id="tab4">
<label class="tabsLabel" for="tab4">&#9658; Extra</label>
<div id="tab-content4" class="tab-content">
<p>
<label for="privateLinkByDefault">New link:</label>
<input type="checkbox" name="privateLinkByDefault" id="privateLinkByDefault" {if="!empty($GLOBALS['privateLinkByDefault'])"}checked{/if}/>
<label for="privateLinkByDefault">&nbsp;All new link are private by default</label>
</p>
<p>
<label for="enableMarkdown">Enable Markdown : </label>
<input type="checkbox" name="enableMarkdown" id="enableMarkdown" {if="!empty($GLOBALS['config']['ENABLE_MARKDOWN'])"}checked{/if}/>
</p>
<p>
<label for="enableThumbnails">Enable thumbnail : </label>
<input type="checkbox" name="enableThumbnails" id="enableThumbnails" {if="!empty($GLOBALS['config']['ENABLE_THUMBNAILS'])"}checked{/if}/>
</p>
<p>
<label for="externalThumbshot">External thumbnailer : </label>
<input type="text" name="externalThumbshot" id="externalThumbshot" size="50" value="{$GLOBALS['config']['externalThumbshot']}">
</p>
<p>
<label for="enableFavicon">Enable favicon : </label>
<input type="checkbox" name="enableFavicon" id="enableFavicon" {if="!empty($GLOBALS['config']['ENABLE_FAVICON'])"}checked{/if}/>
</p>
</div>
</li>
</ul>
<p>
<input type="hidden" name="token" value="{$token}">
<input type="submit" name="Save" value="Save config" class="bigbutton">
</p>
</form>
</div>
{include="page.footer"}
</body>
</html>

63
tpl/original/daily.html Normal file
View file

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}</head>
<body>
<div id="pageheader">{include="page.header"}</div>
<div class="daily">
<div class="dailyAbout">
All links of one day<br>in a single page.<br>
{if="$previousday"} <a href="?do=daily&day={$previousday}"><b>&lt;</b>Previous day</a>{else}<b>&lt;</b>Previous day{/if}
-
{if="$nextday"}<a href="?do=daily&day={$nextday}">Next day<b>&gt;</b></a>{else}Next day<b>&gt;</b>{/if}
<br><br>
<a href="?do=dailyrss" title="1 RSS entry per day"><img src="images/feed-icon-14x14.png#" width="14" height="14" style="position:relative;top:3px; margin-right:4px;">Daily RSS Feed</a>
</div>
<div class="dailyTitle"><img src="../images/floral_left.png" width="51" height="50" class="nomobile"> The Daily Shaarli <img src="../images/floral_right.png" width="51" height="50" class="nomobile"></div>
<div class="dailyDate"><span class="nomobile">&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;</span> {$day} <span class="nomobile">&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;&#x0097;</span></div>
<div style="clear:both;"></div>
{if="$linksToDisplay"}
<div id="daily_col1">
{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>
{/loop}
</div>
<div id="daily_col2">
{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>
{/loop}
</div>
<div id="daily_col3">
{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>
{/loop}
</div>
{else}
<div style="text-align:center; padding:40px 0px 90px 0px;">No articles on this day.</div>
{/if}
<div style="clear:both;"></div>
<div style="text-align:center; padding-bottom:20px;"><img src="../images/squiggle_closing.png" width="66" height="61" alt="-"></div>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,8 @@
{loop="links"}
<h3><a href="{$value.url}">{$value.title|htmlspecialchars}</a></h3>
<small>{if="!$GLOBALS['config']['HIDE_TIMESTAMPS']"}{$value.localdate|htmlspecialchars} - {/if}{if="$value.tags"}{$value.tags|htmlspecialchars}{/if}<br>
{$value.url|htmlspecialchars}</small><br>
{if="$value.thumbnail"}{$value.thumbnail}{/if}<br>
{if="$value.description"}{$value.formatedDescription}{/if}
<br><br><hr>
{/loop}

View file

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
{if="empty($GLOBALS['disablejquery'])"}
<script src="inc/jquery.min.js#"></script>
<script src="inc/jquery-ui.min.js#"></script>
{/if}
</head>
<body
{if condition="$link.title==''"}onload="document.linkform.lf_title.focus();"
{elseif condition="$link.description==''"}onload="document.linkform.lf_description.focus();"
{else}onload="document.linkform.lf_tags.focus();"{/if} >
<div id="pageheader">
{if="$source !== 'firefoxsocialapi'"}
{include="page.header"}
{/if}
<div id="editlinkform">
<form method="post" name="linkform">
<p>
<label for="lf_url">URL</label>
<input type="text" id="lf_url" name="lf_url" value="{$link.url|htmlspecialchars}">
</p>
<p>
<label for="lf_title">Title</label>
<input type="text" id="lf_title" name="lf_title" value="{$link.title|htmlspecialchars}">
</p>
<p>
<label for="lf_description">Description</label><a href="doc/markdown.php" id="help"><img src="../images/help_icon.png" alt="help icon"/></a>
<textarea id="lf_description" name="lf_description" rows="4" cols="25">{$link.description|htmlspecialchars}</textarea>
</p>
<p>
<label for="lf_tags">Tags</label>
<input type="text" id="lf_tags" name="lf_tags" value="{$link.tags|htmlspecialchars}">
</p>
<p>
<label for="lf_via">Origine</label>
<input type="text" id="lf_via" name="lf_via" value="{$link.via|htmlspecialchars}">
</p>
{if condition="($link_is_new && $GLOBALS['privateLinkByDefault']==true) || $link.private == true"}
<p>
<input type="checkbox" checked="checked" name="lf_private" id="lf_private">
&nbsp;<label for="lf_private">Private</label>
</p>
{else}
<p>
<input type="checkbox" name="lf_private" id="lf_private">
&nbsp;<label for="lf_private">Private</label>
</p>
{/if}
<p class="submitButton">
<input type="hidden" id="lf_linkdate" name="lf_linkdate" value="{$link.linkdate}">
<input type="submit" value="Save" name="save_edit" class="bigbutton">
<input type="submit" value="Cancel" name="cancel_edit" class="bigbutton">
{if condition="!$link_is_new"}
<input type="submit" value="Delete" name="delete_link" class="bigbutton" onClick="return confirmDeleteLink();">
{/if}
<input type="hidden" name="token" value="{$token}">
{if condition="$http_referer"}
<input type="hidden" name="returnurl" value="{$http_referer|htmlspecialchars}">
{/if}
</p>
</form>
</div>
</div>
{if="$source !== 'firefoxsocialapi'"}
{include="page.footer"}
{/if}
{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"}
<script>
$(document).ready(function() {
$('#lf_tags').autocomplete({
source : '{$source}?ws=tags',
minLength : 1
});
$("#help").click(function() {
window.open("doc/markdown.php", "myWindow","scrollbars=1, width=400, height=400");
return false;
});
});
</script>
{/if}
</body>
</html>

28
tpl/original/export.html Normal file
View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="toolsdiv">
<ul>
<li>
<a href="?do=export&what=all">Export all <span>: Export all links</span></a>
</li>
<li>
<a href="?do=export&what=public">Export public <span>: Export public links only</span></a>
</li>
<li>
<a href="?do=export&what=private">Export private <span>: Export private links only</span></a>
</li>
</ul>
<div class="clearFix">
&nbsp;
</div>
</div>
</div>
{include="page.footer"}
</body>
</html>

33
tpl/original/import.html Normal file
View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body onload="document.uploadform.filetoupload.focus();">
<div id="pageheader">
{include="page.header"}
<div id="uploaddiv">
Import Netscape html bookmarks (as exported from Firefox/Chrome/Opera/delicious/diigo...) (Max: {$maxfilesize|htmlspecialchars} bytes).
<form method="post" action="?do=upload" enctype="multipart/form-data" name="uploadform" id="uploadform">
<p>
<input type="file" name="filetoupload" size="80">
</p>
<p>
<input type="checkbox" name="private" id="private">
<label for="private">&nbsp;Import all links as private</label>
</p>
<p>
<input type="checkbox" name="overwrite" id="overwrite">
<label for="overwrite">&nbsp;Overwrite existing links</label>
</p>
<p>
<input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize|htmlspecialchars}">
<input type="hidden" name="token" value="{$token}">
<input type="submit" name="import_file" value="Import" class="bigbutton">
</p>
</form>
</div>
</div>
{include="page.footer"}
</body>
</html>

View file

@ -0,0 +1,12 @@
<title>{$pagetitle}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
<!--<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />-->
<link rel="icon" type="image/png" sizes="128x128" href="images/favicon_128.png#" />
<link rel="icon" type="image/png" sizes="64x64" href="images/favicon_64.png#" />
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon_32.png#" />
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon_16.png#" />
<link type="text/css" rel="stylesheet" href="myShaarli.css?version={$version|urlencode}" />

23
tpl/original/install.html Normal file
View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}{$timezone_js}</head>
<body onload="document.installform.setlogin.focus();">
<div id="install">
<h1>Shaarli</h1>
It looks like it's the first time you run Shaarli. Please configure it:<br>
<form method="POST" action="#" name="installform" id="installform">
<table>
<tr><td><b>Login:</b></td><td><input type="text" name="setlogin" size="30"></td></tr>
<tr><td><b>Password:</b></td><td><input type="password" name="setpassword" size="30"></td></tr>
{$timezone_html}
<tr><td><b>Page title:</b></td><td><input type="text" name="title" size="30"></td></tr>
<tr><td valign="top"><b>Update:</b></td><td>
<input type="checkbox" name="updateCheck" id="updateCheck" checked="checked"><label for="updateCheck">&nbsp;Notify me when a new release is ready</label></td>
</tr>
<tr><td colspan="2"><input type="submit" name="Save" value="Save config" class="bigbutton"></td></tr>
</table>
</form>
</div>
{include="page.footer"}
</body>
</html>

159
tpl/original/linklist.html Normal file
View file

@ -0,0 +1,159 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
{if="empty($GLOBALS['disablejquery'])"}
<script src="inc/jquery.min.js#"></script>
<script src="inc/jquery-ui.min.js#"></script>
{/if}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="headerform">
<form method="get" class="searchform" name="searchform">
<input type="text" id="searchform_value" name="searchterm" value="" placeholder="Search text"/>
<input type="submit" value="Search" class="bigbutton"/>
</form>
<form method="get" class="tagfilter" name="tagfilter">
<input type="text" name="searchtags" id="tagfilter_value" value="{loop="search_crits"}{$value|htmlspecialchars} {/loop}" placeholder="Filter by tag"/>
<input type="submit" value="Filter by tag" class="bigbutton"/>
</form>
</div>
</div>
<div id="linklist">
{include="linklist.paging"}
{if="count($links)==0"}
<div id="searchcriteria">
Nothing found.
</div>
{else}
{if="$search_type=='fulltext'"}
<div id="searchcriteria">
{$result_count} results for <i>{$search_crits}</i>
</div>
{/if}
{if="$search_type=='tags'"}
<div id="searchcriteria">
{$result_count} results for tags <i> {loop="search_crits"} <span class="linktag" title="Remove tag"><a href="?removetag={$value|htmlspecialchars}">{$value|htmlspecialchars} <span class="removeTag">x</span></a></span> {/loop}</i>
</div>
{/if}
{/if}
<ul class="linkList">
{loop="links"}
<li {if="$value.class"} class="{$value.class}"{/if} >
<!--<a name="{$value.linkdate|smallHash}" id="{$value.linkdate|smallHash}"></a>-->
{if="$GLOBALS['config']['ENABLE_THUMBNAILS']"}
<div class="thumbnail">
{$value.url|thumbnail}
</div>
{/if}
<div class="linkcontainer {if="$GLOBALS['config']['ENABLE_THUMBNAILS']"}linkcontainerThumb{/if}">
{if="isLoggedIn()"}
<div class="linkeditbuttons">
<form method="get" class="buttoneditform">
<input type="hidden" name="edit_link" value="{$value.linkdate}">
<input type="image" alt="Edit" src="images/edit_icon.png#" title="Edit" class="button_edit">
</form>
<br>
<form method="post" class="buttoneditform">
<input type="hidden" name="lf_linkdate" value="{$value.linkdate}">
<input type="hidden" name="token" value="{$token}">
<input type="hidden" name="delete_link">
<input type="image" alt="Delete" src="images/delete_icon.png#" title="Delete" class="button_delete" onClick="return confirmDeleteLink();">
</form>
</div>
{/if}
<h3 class="linktitle">{function="returnFavicon($value.url)"}<a href="{$redirector}{$value.url|htmlspecialchars}">{$value.title|htmlspecialchars}</a></h3>
{if="$value.description"}
<div class="linkdescription" {if condition="$search_type=='permalink'"}{/if}>
{$value.description}
</div>
{/if}
{if condition="isset($value.via) && !empty($value.via)"}
<div>
<a href="{$value.via}">Origine => {$value.via|getJustDomain}</a>
</div>{/if}
{if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
<span class="linkdate linkBottom" title="Permalink"><a href="?{$value.linkdate|smallHash}">{$value.localdate|htmlspecialchars} - permalink</a> - </span>
{else}
<span class="linkdate linkBottom" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
{/if}
<span class="linkarchive linkBottom"><a href="https://web.archive.org/web/{$value.url|htmlspecialchars}">Archive.org</a> - </span>
{if="$GLOBALS['config']['WALLABAG_URL'] && isLoggedIn()"}
<span class="linkWallabag linkBottom"><a href="{$GLOBALS['config']['WALLABAG_URL']}/?plainurl={$value.url|htmlspecialchars}">Save to Wallabag</a> - </span>
{/if}
<span><a href="http://qrfree.kaywa.com/?l=1&amp;s=8&d={$scripturl|urlencode}%3F{$value.linkdate|smallHash}"
onclick="showQrCode(this); return false;" class="qrcode" data-permalink="{$scripturl}?{$value.linkdate|smallHash}"><img src="images/qrcode.png#" title="QR-Code" alt="qrcode logo"></a></span> - <span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span>
<br>
{if="$value.tags"}
<div class="linktaglist">
{loop="value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value|htmlspecialchars}</a></span> {/loop}
</div>
{/if}
</div>
<span class="clearFix">&nbsp;</span>
</li>
{/loop}
</ul>
{include="linklist.paging"}
</div>
{include="page.footer"}
<script>
$('#tagfilter_value').autocomplete({
source : '{$source}?ws=tags',
minLength : 1
});
// Remove any displayed QR-Code
function remove_qrcode() {
var elem = document.getElementById("permalinkQrcode");
if (elem)
elem.parentNode.removeChild(elem);
return false;
}
// Show the QR-Code of a permalink (when the QR-Code icon is clicked).
function showQrCode(caller,loading=false) {
// Dynamic javascript lib loading: We only load qr.js if the QR code icon is clicked:
if ( typeof (qr) == 'undefined')// Load qr.js only if not present.
{
if (!loading)// If javascript lib is still loading, do not append script to body.
{
var element = document.createElement("script");
element.src = "inc/qr.min.js";
document.body.appendChild(element);
}
setTimeout(function() {
showQrCode(caller, true);
}, 200);
// Retry in 200 milliseconds.
return false;
}
// Remove previous qrcode if present.
remove_qrcode();
// Build the div which contains the QR-Code:
var element = document.createElement('div');
element.id = "permalinkQrcode";
// Make QR-Code div commit sepuku when clicked:
if (element.attachEvent) {
element.attachEvent('onclick', 'this.parentNode.removeChild(this);');
}// Damn IE
else {
element.setAttribute('onclick', 'this.parentNode.removeChild(this);');
}
// Build the QR-Code:
var image = qr.image({
size : 8,
value : caller.dataset.permalink
});
if (image) {
element.appendChild(image);
element.innerHTML += "<br>Click to close";
caller.parentNode.appendChild(element);
} else {
element.innerHTML = "Your browser does not seem to be HTML5 compatible.";
}
return false;
}
</script>
</body>
</html>

View file

@ -0,0 +1,24 @@
<div class="paging">
{if="isLoggedIn()"}
<div class="paging_privatelinks">
<a href="?privateonly"> {if="$privateonly"} <img src="images/private_16x16_active.png#" width="16" height="16" title="Click to see all links" alt="Click to see all links"> {else} <img src="images/private_16x16.png#" width="16" height="16" title="Click to see only private links" alt="Click to see only private links"> {/if} </a>
</div>
{/if}
<div class="paging_linksperpage">
Links per page: <a href="?linksperpage=20">20</a><a href="?linksperpage=50">50</a><a href="?linksperpage=100">100</a>
<form method="GET" class="linksperpage">
<input type="text" name="linksperpage">
</form>
</div>
<div class="paginNavigation">
{if="$previous_page_url"}
<a href="{$previous_page_url}" class="paging_older">&#x25C4;Older</a>
{/if}
<div class="paging_current">
page {$page_current} / {$page_max}
</div>
{if="$next_page_url"}
<a href="{$next_page_url}" class="paging_newer">Newer&#x25BA;</a>
{/if}
</div>
</div>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="headerform">
{if="!ban_canLogin()"}
You have been banned from login after too many failed attempts. Try later.
{else}
<form method="post" id="configform" class="configform">
<p>
<label for="login">Login :</label>
<input type="text" name="login" id="login" tabindex="1" autofocus />
<label for="password">Password :</label>
<input type="password" name="password" id="password" tabindex="2">
</p>
<p>
<input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="3">
<label for="longlastingsession">&nbsp;Stay signed in (Do not check on public computers)</label>
</p>
<p>
{if="$returnurl"}
<input type="hidden" name="returnurl" value="{$returnurl|htmlspecialchars}">
{/if}
<input type="hidden" name="token" value="{$token}">
<input type="submit" value="Login" class="bigbutton" tabindex="4" />
</p>
</form>
{/if}
</div>
</div>
{include="page.footer"}
</body>
</html>

1219
tpl/original/myShaarli.css Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
<div id="footer">
<a href="https://forge.leslibres.org/projects/shaarli/repository/show?rev=myShaarli">myShaarli are made by Knah Tsaeb</a> is based on <b><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli">Shaarli 0.0.41 beta</a></b> - The personal, minimalist, super-fast, no-database delicious clone. By <a href="http://sebsauvage.net" target="_blank">sebsauvage.net</a>.
<br/>
Original theme by <a href="http://blog.idleman.fr" target="_blank">idleman.fr</a>.
<br/>
{if="$GLOBALS['config']['contactLink']"} For contact me <a href="{$GLOBALS['config']['contactLink']}">use this link</a>{/if}.
</div>
{if="$newversion"}
<div id="newversion">
&#x25CF;<a href="{$GLOBALS['config']['UPDATECHECK_DOWNLOAD']}">{$newversion|htmlspecialchars}</a>
</div>
{/if}
{if="isLoggedIn()"}
<script>
function confirmDeleteLink() {
var agree = confirm("Are you sure you want to delete this link ?");
if (agree)
return true;
else
return false;
}
</script>
{/if}

View file

@ -0,0 +1,24 @@
<div id="logo" title="Share your links !" onclick="document.location='?';"></div>
<div id="linkcount" class="nomobile">
Shaare
{if="!empty($linkcount)"}{$linkcount}{/if} links
</div>
<span id="shaarli_title"><a href="{$titleLink}">{$shaarlititle|htmlspecialchars}</a></span>
{if="!empty($_GET['source']) && $_GET['source']=='bookmarklet'"}
{ignore} When called as a popup from bookmarklet, do not display menu. {/ignore}
{else}
<a href="?" class="nomobile">Home</a>
{if="isLoggedIn()"}
<a href="?do=logout">Logout</a><a href="?do=tools">Tools</a><a href="?do=addlink"><b>Add link</b></a>
{elseif="$GLOBALS['config']['OPEN_SHAARLI']"}
<a href="?do=tools">Tools</a><a href="?do=addlink"><b>Add link</b></a>
{else}
<a href="?do=login">Login</a>
{/if}
<a href="{$feedurl}?do=rss{$searchcrits}" class="nomobile">RSS Feed</a>
<a href="{$feedurl}?do=atom{$searchcrits}" style="padding-left:10px;" class="nomobile">ATOM Feed</a>
<a href="?do=tagcloud">Tag cloud</a>
<a href="?do=picwall{$searchcrits}">Picture wall</a>
<a href="?do=daily">Daily</a>
{/if}
<div class="clear"></div>

13
tpl/original/page.html Normal file
View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
</div>
You body goes here...
{include="page.footer"}
</body>
</html>

31
tpl/original/picwall.html Normal file
View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
{if="empty($GLOBALS['disablejquery'])"}
<script src="inc/jquery.min.js#"></script>
<script src="inc/jquery-ui.min.js#"></script>
<script src="inc/jquery.lazyload.min.js#"></script>
{/if}
</head>
<body>
<div id="pageheader">
{include="page.header"}
</div>
<div class="picwall_container">
{loop="linksToDisplay"}
<div class="picwall_pictureframe">
{$value.thumbnail}<a href="{$value.permalink}"><span class="info">{$value.title|htmlspecialchars}</span></a>
</div>
{/loop}
</div>
{include="page.footer"}
{if="empty($GLOBALS['disablejquery'])"}
<script>
$(document).ready(function() {
$("img.lazyimage").show().lazyload();
});
</script>
{/if}
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>{include="includes"}</head>
<body>
<div id="pageheader">{include="page.header"}</div>
<div style="background-color:#003;">
{loop="linksToDisplay"}
<div style="float:left;width:48%;border-right:2px solid white;height:120px;overflow:hide;">
<div style="float:left;width:120px;text-align:center">{$value.thumbnail}</div>
<a href="{$value.permalink}" style="color:yellow;font-weight:bold;text-decoration:none;">{$value.title|htmlspecialchars}</a><br>
<span style="font-size:8pt;color:#eee;">{$value.description|htmlspecialchars}</span>
<div style="clear:both;"></div>
</div><br>
{/loop}
</div>
{include="page.footer"}
</body>
</html>

42
tpl/original/readme.txt Normal file
View file

@ -0,0 +1,42 @@
===== Shaarli template organisation =====
Any Shaarli page should conform to this RainTPL template:
-----------------------------------------------------
<html>
<head>{include="includes"}</head>
<body>
<div id="pageheader">{include="page.header"}</div>
You body goes here...
{include="page.footer"}
</body>
</html>
-----------------------------------------------------
If you want to also add something in the page header (in the dark area), do it here:
<div id="pageheader">{include="page.header"}My menu goes here...</div>
Example: "Add new link" form:
-----------------------------------------------------
<html>
<head>{include="includes"}</head>
<body onload="document.addform.post.focus();">
<div id="pageheader">
{include="page.header"}
<div id="headerform">
<form method="GET" action="" name="addform" class="addform">
<input type="text" name="post" style="width:50%;">
<input type="submit" value="Add link" class="bigbutton">
</form>
</div>
</div>
{include="page.footer"}
</body>
</html>
-----------------------------------------------------

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
</div>
<div id="cloudtag">
{loop="tags"}
<span>{$value.count}</span><a href="?searchtags={$key|htmlspecialchars}" style="font-size:{$value.size}em;">{$key|htmlspecialchars}</a>
{/loop}
</div>
{include="page.footer"}
</body>
</html>

71
tpl/original/tools.html Normal file
View file

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>
<head>
{include="includes"}
</head>
<body>
<div id="pageheader">
{include="page.header"}
<div id="toolsdiv">
<ul>
<li>
<a href="{$GLOBALS['config']['UPDATECHECK_DOWNLOAD']}">Version : <span>myshaarli {#myShaarli_version#}</span></a>
</li>
{if="!$GLOBALS['config']['OPEN_SHAARLI']"}
<li>
<a href="?do=changepasswd">Change password : <span>Change your password.</span></a>
</li>
{/if}
<li>
<a href="?do=configure">Configure your Shaarli : <span>Change Title, timezone...</span></a>
</li>
<li>
<a href="?do=changetag">Rename/delete tags : <span>Rename or delete a tag in all links</span></a>
</li>
<li>
<a href="?do=import">Import : <span>Import Netscape html bookmarks (as exported from Firefox, Chrome, Opera, delicious...)</span></a>
</li>
<li>
<a href="?do=export">Export : <span>Export Netscape html bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)</span></a>
</li>
<li>
<a class="smallbutton" onclick="alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');return false;" href="javascript:javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+'&amp;title='%20+%20encodeURIComponent(title)+'&amp;description='%20+%20encodeURIComponent(document.getSelection())+'&amp;source=bookmarklet','_blank','menubar=no,height=450,width=600,toolbar=no,scrollbars=no,status=no,dialog=1');})();">✚Shaare link</a><a href="#" style="clear:none;"><span>&#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Then click "✚Shaare link" button in any page you want to share.</span></a>
</li>
<li>
<a class="smallbutton" onclick="alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');return false;" href="?private=1&post=">✚Add Note</a><a href="#" style="clear:none;"><span>&#x21D0; Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Then click "✚Add Note" button anytime to start composing a (default private) Note (text post) to your Shaarli.</span></a>
</li>
<li>
<a class="smallbutton" onclick="activateFirefoxSocial(this)">✚Add to Firefox social</a><a href="#" style="clear:none;"><span>&#x21D0; Click on this button to add Shaarli to the "Share this page" button in Firefox.</span></a>
</li>
</ul>
<div class="clear"></div>
</div>
</div>
{include="page.footer"}
<script>
function activateFirefoxSocial(node) {
var loc = location.href;
var baseURL = loc.substring(0, loc.lastIndexOf("/"));
// Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
var data = {
name : "{$shaarlititle}",
description : "The personal, minimalist, super-fast, no-database delicious clone.",
author : "Shaarli",
version : "1.0.0",
iconURL : baseURL + "/images/favicon.ico",
icon32URL : baseURL + "/images/favicon.ico",
icon64URL : baseURL + "/images/favicon.ico",
shareURL : baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{description}&source=firefoxsocialapi{/noparse}",
homepageURL : baseURL
};
node.setAttribute("data-service", JSON.stringify(data));
var activate = new CustomEvent("ActivateSocialFeature");
node.dispatchEvent(activate);
}
</script>
</body>
</html>