Hooked recents up on all menus.

This commit is contained in:
2023-08-07 07:47:44 -05:00
parent d952216aea
commit b292dbc0d6
3 changed files with 33 additions and 16 deletions

View File

@ -15,9 +15,7 @@ In no particular order, here is a semi-current list of things to be done in Info
[ ] Add share button/link on item page
[ ] Menu - change categories to media types and hook to latest list
[ ] Add image (mostly Pixabay) credits
[x] Menu - change categories to media types and hook to latest list
[x] Item pages - Add clickable links on Type

View File

@ -68,6 +68,11 @@ custom_column_1 ON custom_column_1.id = books_custom_column_1_link.value
WHERE
custom_column_1.value = '$typesearch'
ORDER BY books.timestamp DESC");
$types = $db->query("SELECT
value
FROM custom_column_1
ORDER BY value ASC");
?>
@ -176,13 +181,18 @@ ORDER BY books.timestamp DESC");
<div class="fh5co-menu">
<div class="fh5co-box">
<h3 class="heading">Categories</h3>
<h3 class="heading">Recent Additions</h3>
<ul>
<li><a href="#">Books</a></li>
<li><a href="#">Movies</a></li>
<li><a href="#">Television</a></li>
<li><a href="#">Video Games</a></li>
<li><a href="#">Other</a></li>
<?php
while ($row = $types->fetchArray()) {
$row_value = $row['value'];
$row_titlecase = mb_convert_case($row_value, MB_CASE_TITLE, "UTF-8");
echo '<li><a href="recent.php?ty='.$row_value.'">'.$row_titlecase.'</a></li>';
//echo '<li>'.$row_value.'</li>';
}
?>
</ul>
</div>
<div class="fh5co-box">

View File

@ -19,7 +19,6 @@ if (!empty($keywordsearch)) {
$searchtopic = 'Type: '.$socialty;
}
// -------------------- BEGIN DATABASE QUERIES --------------------
// Establish atabase connection
@ -68,6 +67,12 @@ custom_column_1 ON custom_column_1.id = books_custom_column_1_link.value
WHERE
custom_column_1.value = '$typesearch'
ORDER BY books.title ASC");
$types = $db->query("SELECT
value
FROM custom_column_1
ORDER BY value ASC");
?>
@ -176,13 +181,17 @@ ORDER BY books.title ASC");
<div class="fh5co-menu">
<div class="fh5co-box">
<h3 class="heading">Categories</h3>
<h3 class="heading">Recent Additions</h3>
<ul>
<li><a href="#">Books</a></li>
<li><a href="#">Movies</a></li>
<li><a href="#">Television</a></li>
<li><a href="#">Video Games</a></li>
<li><a href="#">Other</a></li>
<?php
while ($row = $types->fetchArray()) {
$row_value = $row['value'];
$row_titlecase = mb_convert_case($row_value, MB_CASE_TITLE, "UTF-8");
echo '<li><a href="recent.php?ty='.$row_value.'">'.$row_titlecase.'</a></li>';
//echo '<li>'.$row_value.'</li>';
}
?>
</ul>
</div>
<div class="fh5co-box">