Mailing List Archive

Matahariagung7@gmail.com
Database Dreams
Main Menu
Database Dreams ? Code Library ? Categories : PHP ? Viewing Code Item : Latest Galleries Block
Latest Galleries Block,
Started by DD Admin, Jun 14, 2022, 04:37 AM, Views: 15
DD Admin

Administrator
Jun 14, 2022, 04:37 AM
I have designed this for music & charts home page block, you should edit as required
Requirements:
Full extension in field: image
SQL WHERE c.id_parent = 35 Change or remove line as needed

CodeSelect
global $txt, $smcFunc, $scripturl, $user_info, $context;


// Load the language files
if (loadlanguage('Gallery') == false)
loadLanguage('Gallery','english');

require_once($sourcedir . '/Gallery2.php');

//Get the latest 4 Galleries
$dbquery = $smcFunc['db_query']('', '
SELECT c.id_cat, c.image, c.id_parent, c.title, c.total
FROM {db_prefix}gallery_cat AS c
WHERE c.id_parent = 35 AND LENGTH(c.image) > 0
ORDER BY c.id_cat DESC
LIMIT 4');

if ($smcFunc['db_affected_rows']() != 0)
{
echo '<table border="0" Width="100%"><tbody><tr>';

while($row = $smcFunc['db_fetch_assoc']($dbquery))
{
//Get Each Row
$cat_url = $scripturl . '?action=gallery;cat=' . $row['id_cat'];
$totalpics = GetPictureTotals($row['id_cat'], $row['total']);

echo '<td style="text-align: center;"><a href="' . $cat_url . '"><img title="' . $row['title'] . '" src="' . $row['image'] . '" alt="" /></a><br />';

echo '<span class="details"><strong><a href="' . $cat_url . '">' . parse_bbc($row['title']) . '</a></strong><br />';

// Show total pictures in the category
echo '<span class="totals">', $txt['gallery_text_totalimages'], ': ' . $totalpics . '</span></td>';


}

echo '</tr></tbody></table>';
}
$smcFunc['db_free_result']($dbquery);
Help | Terms and Rules | Go Up ?
SMF 2.1.2 © 2022, Simple Machines
Privacy Policy
{{short description|United States copyright law}}
'''[[Title IX|Title]] 17 of the United States Code''' is the [[United States Code]] that outlines [[United States copyright law]].<ref>{{cite web | publisher= [[Office of the Law Revision Counsel]] | title=United States Code | access-date=November 24, 2015 | url=http://uscode.house.gov}}</ref> It was codified into positive law on July 30, 1947.<ref>{{cite web | title = Circular 1a, United States Copyright Office: A Brief Introduction and History | publisher = U.S. Copyright Office | url =http://www.copyright.gov/circs/circ1a.html | access-date = 31 July 2014 }}</ref> The latest version is from December 2016.

* {{usctc|17|1}}—Subject Matter and Scope of Copyright
* {{usctc|17|2}}—Copyright Ownership and Transfer
* {{usctc|17|3}}—Duration of Copyright
* {{usctc|17|4}}—Copyright Notice, Deposit, and Registration
* {{usctc|17|5}}— [[Copyright infringement|Infringement]] and [[Legal remedy|Remedies]]
* {{usctc|17|6}}—Manufacturing Requirements and Importation
* {{usctc|17|7}}—[[United States Copyright Office|Copyright Office]]
* {{usctc|17|8}}—Proceedings by Copyright Royalty Judges
* {{usctc|17|9}}—[[Semiconductor Chip Protection Act of 1984|Protection of Semiconductor Chip Products]]
* {{usctc|17|10}}—[[Audio Home Recording Act|Digital Audio Recording Devices and Media]]
* {{usctc|17|11}}—Sound Recordings and Music Videos
* {{usctc|17|12}}—[[Digital Millennium Copyright Act|Copyright Protection and Management Systems]]
* {{usctc|17|13}}—Protection of Original Designs
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/