From 4a151acb1883bb6e204c9a90e31d824b38690038 Mon Sep 17 00:00:00 2001 From: RealAngeleno Date: Sat, 5 Aug 2023 15:11:21 -0700 Subject: [PATCH 1/5] allow cyclical images to be set separately from stickies --- inc/config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/config.php b/inc/config.php index 82e596a8..8e604adc 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1318,7 +1318,8 @@ // $config['font_awesome'] is false (default). // $config['image_sticky'] = 'static/sticky.png'; // $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. // This will override $config['root'] and $config['dir']['...'] directives. "%s" will get replaced with From ea08c250fa568a09994cf85468184ecffc9610f5 Mon Sep 17 00:00:00 2001 From: RealAngeleno Date: Sat, 5 Aug 2023 15:32:46 -0700 Subject: [PATCH 2/5] Add mod.php logic --- js/catalog-link.js | 69 +++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/js/catalog-link.js b/js/catalog-link.js index 05ee9efb..2a3a8853 100644 --- a/js/catalog-link.js +++ b/js/catalog-link.js @@ -13,46 +13,51 @@ */ 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 bottom = document.getElementsByClassName('boardlist bottom')[0] -var subtitle = document.getElementsByClassName('subtitle')[0]; + var pages = document.getElementsByClassName('pages')[0]; + var bottom = document.getElementsByClassName('boardlist bottom')[0]; + var subtitle = document.getElementsByClassName('subtitle')[0]; -var link = document.createElement('a'); -link.href = catalog_url; + var link = document.createElement('a'); + link.href = catalog_url; -if (pages) { - link.textContent = _('Catalog'); - link.style.color = '#F10000'; - link.style.padding = '4px'; - link.style.paddingLeft = '9px'; - link.style.borderLeft = '1px solid' - link.style.borderLeftColor = '#A8A8A8'; - link.style.textDecoration = "underline"; + if (pages) { + link.textContent = _('Catalog'); + link.style.color = '#F10000'; + link.style.padding = '4px'; + link.style.paddingLeft = '9px'; + link.style.borderLeft = '1px solid'; + link.style.borderLeftColor = '#A8A8A8'; + link.style.textDecoration = "underline"; - pages.appendChild(link) -} -else { - link.textContent = '['+_('Catalog')+']'; - link.style.paddingLeft = '10px'; - link.style.textDecoration = "underline"; - document.body.insertBefore(link, bottom); -} + pages.appendChild(link); + } else { + link.textContent = '['+_('Catalog')+']'; + link.style.paddingLeft = '10px'; + link.style.textDecoration = "underline"; + document.body.insertBefore(link, bottom); + } -if (subtitle) { - var link2 = document.createElement('a'); - link2.textContent = _('Catalog'); - link2.href = catalog_url; + if (subtitle) { + var link2 = document.createElement('a'); + link2.textContent = _('Catalog'); + link2.href = catalog_url; - var br = document.createElement('br'); - subtitle.appendChild(br); - subtitle.appendChild(link2); -} + var br = document.createElement('br'); + subtitle.appendChild(br); + subtitle.appendChild(link2); + } } if (active_page == 'thread' || active_page == 'index') { - $(document).ready(catalog); + $(document).ready(catalog); } From 4d3ca11b91d7166d74fcb4849c13fb6ae7a01552 Mon Sep 17 00:00:00 2001 From: RealAngeleno Date: Sat, 5 Aug 2023 15:35:28 -0700 Subject: [PATCH 3/5] allow cyclical images to be set independently of stickies --- inc/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/functions.php b/inc/functions.php index 77c1da30..7c9b35bf 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -207,6 +207,8 @@ function loadConfig() { $config['image_bumplocked'] = $config['dir']['static'] . 'sage.gif'; if (!isset($config['image_deleted'])) $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($config['uri_thumb'])) From b8190dfd06c38b19c7dcd4e86c7e29d0d429c3d4 Mon Sep 17 00:00:00 2001 From: RealAngeleno Date: Sat, 5 Aug 2023 15:38:31 -0700 Subject: [PATCH 4/5] allow cyclical images to be set independently of stickies --- templates/post_thread.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/post_thread.html b/templates/post_thread.html index b17b3cdd..e9c5cc12 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -45,7 +45,7 @@ {% if config.font_awesome %} {% else %} - Cyclical + Cyclical {% endif %} {% endif %} {% if index %} From dd5d8830d777da7d9e077bf7de17eaca5e7ca836 Mon Sep 17 00:00:00 2001 From: RealAngeleno Date: Sat, 5 Aug 2023 15:41:24 -0700 Subject: [PATCH 5/5] Add image for cyclical posts From Wikimedia (Public domain) --- static/cycle.png | Bin 0 -> 460 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 static/cycle.png diff --git a/static/cycle.png b/static/cycle.png new file mode 100644 index 0000000000000000000000000000000000000000..84c9301e4f0f03db4934ef9b067b749403a1795b GIT binary patch literal 460 zcmV;-0W;7L?27NG_L)XEK?CY&LrYbKy@YkN7hDwPZ5cP0iqW zUI>RTV4m2!>$+j)_%M=G5NqJ~nwp_lEcQcquZg%j<`SztXrPl6iA16o!75il z!Wabrx*Z)6U5{E~QHVMxr2wGVh`GmEQoz|2qDrkH1nq}h`lhYmNTMIURB8dxKFVnG zwj;gh-&86!OaVZ#2(&dhGj2OtFf(sc0MNyhd9@z98eHL3FC4--pDsGUP4nm|b}TQv z=l2pTW;JT?mn@&p=LZn4>I#9c`0gABA-FZkzHxZSj1xyE4M}o`|AWnDk3w`Qi5~O? z`Rhge$?VxFDT2OSR9rV>#}K=Lox={{@1tlRwF7_kidMmA&eB}~0000r literal 0 HcmV?d00001