TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,234
  • Total Topics: 21,353
  • Online today: 565
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 246
  • Total: 246

Exclude categories from a gallery block

Started by dimdom, November 24, 2008, 01:14:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dimdom

I use this code to a front page block in Tiny Portal  ( 0.9.8 ) to show recent images in SMF Gallery.


global $scripturl,$db_prefix,$modSettings,$boardurl;
 echo'<table cellspacing="0" cellpadding="3" border="0" align="center" width="90%"><tr>';
 if(empty($modSettings['gallery_url']))
 {
   $modSettings['gallery_url'] = $boardurl . '/gallery/';
 }
 $request = db_query("SELECT thumbfilename,ID_PICTURE FROM {$db_prefix}gallery_pic GROUP BY thumbfilename ORDER BY date DESC LIMIT 6", __FILE__,__LINE__);
 while ($row = mysql_fetch_assoc($request))
 echo' <center><td align="center" colspan="3"><a href="', $scripturl, '?action=gallery;sa=view;id=',
 $row['ID_PICTURE'], '"><img src="',  $modSettings['gallery_url'] .

 $row['thumbfilename'] ,'" /></a></center>';
 echo'</td></tr>';
 echo'</table></br>';
 mysql_free_result($request);


How can I exclude certain categories from fetching pictures to that block?


Thank you in advance!

G6Cad

By using Thurnoks code for the SMF gallery he have posted in our block code and snippets board, search his posts in that board and you will find it  :up:


This website is proudly hosted on Crocweb Cloud Website Hosting.