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 [ ] Add share button/link on item page
[ ] Menu - change categories to media types and hook to latest list [x] Menu - change categories to media types and hook to latest list
[ ] Add image (mostly Pixabay) credits
[x] Item pages - Add clickable links on Type [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 WHERE
custom_column_1.value = '$typesearch' custom_column_1.value = '$typesearch'
ORDER BY books.timestamp DESC"); 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-menu">
<div class="fh5co-box"> <div class="fh5co-box">
<h3 class="heading">Categories</h3> <h3 class="heading">Recent Additions</h3>
<ul> <ul>
<li><a href="#">Books</a></li> <?php
<li><a href="#">Movies</a></li> while ($row = $types->fetchArray()) {
<li><a href="#">Television</a></li> $row_value = $row['value'];
<li><a href="#">Video Games</a></li> $row_titlecase = mb_convert_case($row_value, MB_CASE_TITLE, "UTF-8");
<li><a href="#">Other</a></li> echo '<li><a href="recent.php?ty='.$row_value.'">'.$row_titlecase.'</a></li>';
//echo '<li>'.$row_value.'</li>';
}
?>
</ul> </ul>
</div> </div>
<div class="fh5co-box"> <div class="fh5co-box">

View File

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