mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 01:10:51 +01:00
Merge pull request #615 from vichan-devel/stickyfix
Allow image for cyclical posts to be set independently // Add mod.php logic to catalog links
This commit is contained in:
commit
237c5c4d4b
@ -1318,7 +1318,8 @@
|
|||||||
// $config['font_awesome'] is false (default).
|
// $config['font_awesome'] is false (default).
|
||||||
// $config['image_sticky'] = 'static/sticky.png';
|
// $config['image_sticky'] = 'static/sticky.png';
|
||||||
// $config['image_locked'] = 'static/locked.gif';
|
// $config['image_locked'] = 'static/locked.gif';
|
||||||
// $config['image_bumplocked'] = 'static/sage.png'.
|
// $config['image_bumplocked'] = 'static/sage.png';
|
||||||
|
// $config['image_cyclical'] = 'static/cycle.png';
|
||||||
|
|
||||||
// If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain.
|
// If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain.
|
||||||
// This will override $config['root'] and $config['dir']['...'] directives. "%s" will get replaced with
|
// This will override $config['root'] and $config['dir']['...'] directives. "%s" will get replaced with
|
||||||
|
@ -207,6 +207,8 @@ function loadConfig() {
|
|||||||
$config['image_bumplocked'] = $config['dir']['static'] . 'sage.gif';
|
$config['image_bumplocked'] = $config['dir']['static'] . 'sage.gif';
|
||||||
if (!isset($config['image_deleted']))
|
if (!isset($config['image_deleted']))
|
||||||
$config['image_deleted'] = $config['dir']['static'] . 'deleted.png';
|
$config['image_deleted'] = $config['dir']['static'] . 'deleted.png';
|
||||||
|
if (!isset($config['image_cyclical']))
|
||||||
|
$config['image_cyclical'] = $config['dir']['static'] . 'cycle.png';
|
||||||
|
|
||||||
if (isset($board)) {
|
if (isset($board)) {
|
||||||
if (!isset($config['uri_thumb']))
|
if (!isset($config['uri_thumb']))
|
||||||
|
@ -13,36 +13,41 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function catalog() {
|
function catalog() {
|
||||||
var board = $("input[name='board']");
|
var board = $("input[name='board']");
|
||||||
|
var boardValue = board.first().val();
|
||||||
|
|
||||||
var catalog_url = configRoot + board.first().val() + "/catalog.html";
|
var catalog_url = '';
|
||||||
|
if (window.location.href.includes('mod.php?/')) {
|
||||||
|
catalog_url = configRoot + 'mod.php?/' + boardValue + '/catalog.html';
|
||||||
|
} else {
|
||||||
|
catalog_url = configRoot + boardValue + '/catalog.html';
|
||||||
|
}
|
||||||
|
|
||||||
var pages = document.getElementsByClassName('pages')[0];
|
var pages = document.getElementsByClassName('pages')[0];
|
||||||
var bottom = document.getElementsByClassName('boardlist bottom')[0]
|
var bottom = document.getElementsByClassName('boardlist bottom')[0];
|
||||||
var subtitle = document.getElementsByClassName('subtitle')[0];
|
var subtitle = document.getElementsByClassName('subtitle')[0];
|
||||||
|
|
||||||
var link = document.createElement('a');
|
var link = document.createElement('a');
|
||||||
link.href = catalog_url;
|
link.href = catalog_url;
|
||||||
|
|
||||||
if (pages) {
|
if (pages) {
|
||||||
link.textContent = _('Catalog');
|
link.textContent = _('Catalog');
|
||||||
link.style.color = '#F10000';
|
link.style.color = '#F10000';
|
||||||
link.style.padding = '4px';
|
link.style.padding = '4px';
|
||||||
link.style.paddingLeft = '9px';
|
link.style.paddingLeft = '9px';
|
||||||
link.style.borderLeft = '1px solid'
|
link.style.borderLeft = '1px solid';
|
||||||
link.style.borderLeftColor = '#A8A8A8';
|
link.style.borderLeftColor = '#A8A8A8';
|
||||||
link.style.textDecoration = "underline";
|
link.style.textDecoration = "underline";
|
||||||
|
|
||||||
pages.appendChild(link)
|
pages.appendChild(link);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
link.textContent = '['+_('Catalog')+']';
|
link.textContent = '['+_('Catalog')+']';
|
||||||
link.style.paddingLeft = '10px';
|
link.style.paddingLeft = '10px';
|
||||||
link.style.textDecoration = "underline";
|
link.style.textDecoration = "underline";
|
||||||
document.body.insertBefore(link, bottom);
|
document.body.insertBefore(link, bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subtitle) {
|
if (subtitle) {
|
||||||
var link2 = document.createElement('a');
|
var link2 = document.createElement('a');
|
||||||
link2.textContent = _('Catalog');
|
link2.textContent = _('Catalog');
|
||||||
link2.href = catalog_url;
|
link2.href = catalog_url;
|
||||||
@ -50,7 +55,7 @@ if (subtitle) {
|
|||||||
var br = document.createElement('br');
|
var br = document.createElement('br');
|
||||||
subtitle.appendChild(br);
|
subtitle.appendChild(br);
|
||||||
subtitle.appendChild(link2);
|
subtitle.appendChild(link2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (active_page == 'thread' || active_page == 'index') {
|
if (active_page == 'thread' || active_page == 'index') {
|
||||||
|
BIN
static/cycle.png
Normal file
BIN
static/cycle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 460 B |
@ -45,7 +45,7 @@
|
|||||||
{% if config.font_awesome %}
|
{% if config.font_awesome %}
|
||||||
<i class="fa fa-refresh" title="Cyclical"></i>
|
<i class="fa fa-refresh" title="Cyclical"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
<img class="icon" title="Cyclical" src="{{ config.image_sticky }}" alt="Cyclical" />
|
<img class="icon" title="Cyclical" src="{{ config.image_cyclical }}" alt="Cyclical" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if index %}
|
{% if index %}
|
||||||
|
Loading…
Reference in New Issue
Block a user