Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4267
Latest: ramiroelliot
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 43538
Total Topics: 7565
Most Online Today: 40
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 49
Total: 49

Author Topic: Random Image in Block?  (Read 153141 times)

0 Members and 1 Guest are viewing this topic.

Offline ~Alex

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Random Image in Block?
« Reply #90 on: March 21, 2007, 07:25:01 pm »
I managed to get some code to work on my site for a random images.

   
global $scripturl,$db_prefix,$modSettings,$boardurl;

echo'<table cellspacing="0" cellpadding="1" border="0" align="center" width="90%"><tr>';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$request = db_query("SELECT thumbfilename, ID_CAT, ID_PICTURE FROM {$db_prefix}gallery_pic WHERE ID_CAT = '1' GROUP BY thumbfilename ORDER BY RAND() LIMIT 10", __FILE__, __LINE__);
   
$row = mysql_fetch_assoc($request);
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);

I have it on my boardindex.template just below the set of tabs. The only thing I don't like about the code is my picturres repeat themselves. Really I don't know how they look in someone elses browser and I don't know any php at all. I just played around until something worked. Well I think it worked. I would like to have the pictures in a matching table but I lack the skills to make one. I hope someone will visit my site and tell me if it is ok in their browser. I didn't use any ssi. ssi to me is something disabled people get?.! No clue. ;)
http://www.craftervillage.com/board/

I like the way that code sets the images across the top, in a row, but how can I do this in a column? And does it work on TP .98 w/ SMF 1.1.2?

Offline craftervillage

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 10
    • View Profile
Re: Random Image in Block?
« Reply #91 on: March 21, 2007, 08:48:38 pm »
Quote from: ~Alex

I like the way that code sets the images across the top, in a row, but how can I do this in a column? And does it work on TP .98 w/ SMF 1.1.2?

I don't even know what tp is. Maybe someone else can help you. As for a column....I don't have a clue. I am new to all this and am just learning as I go. I am still tring to figure out why my gallery buttons don't work. The template file I downloaded didn't work. If it was in html I could write the code myslef. This php stuff is just too hard. I hope you find your answer for your forum and share your forum link. I would like to see it.

Offline ~Alex

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Random Image in Block?
« Reply #92 on: March 24, 2007, 06:04:27 pm »
that's ok. :D

hey, i found what i needed and i'd like to share it, but i'm not sure if i'm allowed to post links to other forums that offer support for SMF and TP...but um...it's from TP.

Hi

Nothing much to it...

1. Create a directory on your server anywhere you want

2. Download this file (rightclick and save as)

3. Unzip and Upload the file you downloaded to your directory

4. Upload the images to the same directory - dosent matter what their names or format or size or dimensions are...as long as its a png, gif or jpg file

5. add this code to a SCRIPT / HTML block

Code: [Select]

<img src="http://www.mysite.com/myfolder/rotate.php" alt="A Random Image" />


Be sure to change www.mysite.com/myfolder to your website addy and folder path!

Each time your page loads it will display a random image from your folder :)
And thats all - enjoy :)

Details of how this thing works and its homepage can be found HERE

it works just as i needed. :D

Offline CRONUS

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 4
    • View Profile
Re: Random Image in Block?
« Reply #93 on: May 24, 2007, 03:40:03 am »
ok.. i had to code myself (i'm not good realy on that) cause i didn't find exactly what i needed so looked at all your codes and thats the result :)

Code: [Select]
function ssi_gallerylast($limit, $appr, $orient)
{
  global $scripturl,$db_prefix,$modSettings,$boardurl;
  if(empty($modSettings['gallery_url']))
  {
    $modSettings['gallery_url'] = $boardurl . '/gallery/';
  }

  $request = db_query("SELECT thumbfilename,ID_PICTURE,approved
                                FROM {$db_prefix}gallery_pic WHERE approved = {$appr}
                                ORDER BY ID_PICTURE DESC LIMIT {$limit}", __FILE__, __LINE__);

  $result = db_query("SELECT COUNT(*)
FROM {$db_prefix}gallery_pic
    WHERE approved = {$appr}
    LIMIT {$limit}", __FILE__, __LINE__);
  list ($len) = mysql_fetch_row($result);
mysql_free_result($result);

  if ( $len > 0 ) {
  echo '<table>';
  if ($orient == 0) {
    if ($appr == 0) {
      echo '<tr><td style="font-size: 8px; text-align: center; letter-spacing: 3px;" colspan="'. $limit .'">UNAPPROVED</td></tr>';
    }
    echo '<tr>';
  }
  elseif ($orient == 1 && $appr == 0) {
    echo '<tr><td style="font-size: 8px; text-align: center; letter-spacing: 3px;">UNAPPROVED</td></tr>';
  }
  while ($row = mysql_fetch_assoc($request))
  {
    if ($orient == 1) echo '<tr>';
    echo '<td style="text-align: center; width: '. 100/$len .'%;"><a href="'. $scripturl .'?action=gallery;sa=view;id='. $row['ID_PICTURE'] .'"><img src="'.  $modSettings['gallery_url'] . $row['thumbfilename'] .'" /></a></td>';
    if ($orient == 1) echo '</tr>';
  }
  if ($orient == 0) echo '</tr>';
  echo '</table>';
  }

  mysql_free_result($request);
}

then put
Code: [Select]
ssi_gallerylast(5,1,1);where you want pictures to be shown.

the numbers are: limit, not/approved, orientation

limit explains itself
not/approved - if you want to show approved images put 1, if unapproved - 0
orientation - if you want to show images in a row, then put 0, if in a column - 1

it shows last approved or not images.
If you want random then replace
Code: [Select]
  $request = db_query("SELECT thumbfilename,ID_PICTURE,approved
                                FROM {$db_prefix}gallery_pic WHERE approved = {$appr}
                                ORDER BY ID_PICTURE DESC LIMIT {$limit}", __FILE__, __LINE__);
to
Code: [Select]
  $request = db_query("SELECT thumbfilename,ID_PICTURE,approved
                                FROM {$db_prefix}gallery_pic WHERE approved = {$appr}
                                ORDER BY RAND() LIMIT {$limit}", __FILE__, __LINE__);

example:

ssi_gallerylast(3,0,0) would return:
Code: [Select]
<table><tr>
<td colspan="3">UNAPPROVED</td>
</tr><tr>
<td>unapproved image</td>
<td>unapproved image</td>
<td>unapproved image</td>
</tr></table>

or ssi_gallerylast(3,1,1) would return:
Code: [Select]
<table>
<tr><td>approved image</td></tr>
<tr><td>approved image</td></tr>
<tr><td>approved image</td></tr>
</table>

Hope someone will get use of it ;)
« Last Edit: May 25, 2007, 04:52:14 am by CRONUS »

Offline stormlrd

  • Full Member
  • ***
  • Posts: 136
    • View Profile
    • Expanding Tiny Portals
Re: Random Image in Block?
« Reply #94 on: May 24, 2007, 01:34:49 pm »
Nice job

Offline CRONUS

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 4
    • View Profile
Re: Random Image in Block?
« Reply #95 on: May 25, 2007, 04:53:32 am »
updated SSI code so that if no pictures it doesn't show anything and now table cells have same width ;)

Offline RWL

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • RWL
Re: Random Image in Block?
« Reply #96 on: May 25, 2007, 06:21:05 am »
Use this snippet from Thurnock over at TP - works great for me!

Code: [Select]
////////////////////////////////////////////////////
// SMF Gallery Random Picture - ver. 1.7.1        //
////////////////////////////////////////////////////
//
// Developed by Thurnok
// Thurnok -AT- tinyportal .DOT. net
// November 30, 2006
//
// Updated 5/9/2007
// 1.7.1
// - quick fix to parsing the url
//
// Updated 5/9/2007
// 1.7
// - added option to view pics that members on your buddy list posted
//
// For list of all previous updates history, see the UPDATES.TXT attached file
// in the post where you got this code, or the .ZIP file if you downloaded it
//
// Used in a TinyPortal phpblock or Article.
// This block displays random picture(s) from
// the SMF Gallery mod along with other information
//
//////////////////////////////////////////////

global $scripturl, $db_prefix, $modSettings, $boardurl, $ID_MEMBER, $user_info, $context;

/*
****************************************
****************************************
***    !! Admin Config Section !!    ***
****************************************
****************************************
*/

//   *****   LAYOUT OPTIONS   *****
// how many pictures do you want to show?  0 = all!
$gal_numpics = 1;

// use random, or most recent pics?
// 0 = random, 1 = most recent, 2 = most viewed, 3 = most commented
$gal_showtype = 0;
// sort :: 0 = Descending, 1 = Ascending
$gal_sort = 0;

// enable profile pics display?
// 0 = disable, 1 = enable --- if enabled, and you are viewing a member profile, show pics from that member only
// other options still apply (showtype, sort order, etc)
$gal_profile = 1;

// only show pics from buddies?
// 0 = disable, 1 = enable --- if enabled, will only show pics posted by members in your buddy list
$gal_buddies = 0;

// use Normal Size Text, or Small Size Text? (0 = Normal Size, 1 = Small Size)
$gal_smalltext = 1;

// put pictures in how many columns?  (1 for left/right block, more for centerblock / article if you wish)
$gal_columns = 1;

// information display flags (0 = No, 1 = Yes)
// display picture title?
$gal_dispTitle = 1;
// display membername who posted pic?
$gal_dispMember = 1;
// display posted date?
$gal_dispDate = 1;
// display category the picture is in?
$gal_dispCategory = 1;
// display number of views?
$gal_dispViews = 1;
// display dimensions?
$gal_dispDimensions = 1;
// display filesize?
$gal_dispSize = 1;
// display picture description?
$gal_dispDescription = 0;


//   *****   SECURITY CONFIGURATION   *****
// do not allow the following category numbers to be displayed
// example: $gal_disallowCats = "4,2,7" - don't show categories 2, 4, or 7
$gal_disallowCats = "";
// select only from the following cats - leave empty for all - NOTE:($gal_disallowCats overrides)
// example: $gal_allowCats = "1,3,4" - show only categories 1, 3, and 4
$gal_allowCats = "";
// Require the user has allowedTo('smfgallery_view') permission to view random pics thumbnails in block?
$gal_viewPermission = 1;

/*
****************************************
****************************************
***  !! END Admin Config Section !!  ***
****************************************
****************************************
*/

//###############################################
//###############################################
//   You shouldn't change anything below here
//###############################################
//###############################################

if (empty($modSettings['gallery_url'])){
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}

$gal_textclass = empty($gal_smalltext) ? "normaltext" : "smalltext";

// get this user's buddy list
$gal_buddylist = implode(",", $user_info['buddies']);

// prep for our switch routine
if (empty($gal_showtype))
$gal_showtype = 0;

// sort text
if (empty($gal_sort)){
$gal_sort_text = 'DESC';
} else {
$gal_sort_text = '';
}

// are we viewing a member profile and $gal_profile is enabled?
if (!empty($gal_profile) && strtolower($context['current_action']) == "profile"){
$gal_member = empty($_GET['u']) ? $ID_MEMBER : $_GET['u'];
}
// allow member to view random pic based on security settings
if (empty($gal_viewPermission) || allowedTo('smfgallery_view')){
$gal_query = '
SELECT
thumbfilename,
ID_PICTURE,
ID_MEMBER,
date,
title,
description,
views,
filesize,
height,
width,
commenttotal,
ID_CAT
FROM '.$db_prefix.'gallery_pic
WHERE approved = 1
'.(empty($gal_member) ? (empty($gal_buddies) ? "" : (empty($gal_buddylist) ? "AND ID_MEMBER = NULL " : "AND ID_MEMBER in ($gal_buddylist)")) : "AND ID_MEMBER = $gal_member" ).'
'.(empty($gal_disallowCats) ? "" : " AND ID_CAT NOT IN ($gal_disallowCats)").'
'.(empty($gal_allowCats) ? "" : " AND ID_CAT IN ($gal_allowCats)").'
GROUP BY thumbfilename ';

switch ($gal_showtype){
// most/least recent
case 1:
$gal_query .= '
ORDER BY date '.$gal_sort_text;
break;

// most/least viewed
case 2:
$gal_query .= '
ORDER BY views '.$gal_sort_text;
break;

// most/least commented
case 3:
$gal_query .= '
ORDER BY commenttotal '.$gal_sort_text;
break;

default:
$gal_query .= '
ORDER BY rand() '.$gal_sort_text;
break;
}
$gal_query .= (empty($_GET['gal_viewall']) && !empty($gal_numpics)) ? ' LIMIT '.$gal_numpics : '';
$gal_result = mysql_query($gal_query);
if (!$gal_result){
// error retrieving information from database
if (mysql_errno() == 1146){
echo '<p />Error, no database found!<p />';
} else {
echo '<p />MySQL error:'.mysql_error().'<p />';
}
} else {
echo "\n".'<table cellspacing="0" cellpadding="5" border="0" align="center" width="90%">'."\n";

$gal_colcnt = 1;
echo " <tr>\n";
while ($row = mysql_fetch_assoc($gal_result)){
if ($gal_colcnt > $gal_columns){
// close out the row and start a new row
echo " </tr>\n <tr>\n".' <td colspan="'.$gal_columns.'"><hr /></td>'."\n </tr>\n <tr>\n";
// reset count to column 1
$gal_colcnt = 1;
}
echo ' <td class="'.$gal_textclass.'" align="center">'."\n";
// display title if enabled, make edit link if viewing user is picture poster
if (!empty($gal_dispTitle)){
echo " ".($ID_MEMBER == $row['ID_MEMBER'] ? ('<a href="'.$scripturl.'?action=gallery;sa=edit;id='.$row['ID_PICTURE'].'">'.$row['title'].'</a>') : $row['title'])."<br />\n";
}
// display the picture thumbnail and link it to gallery full picture
echo ' <a href="'.$scripturl.'?action=gallery;sa=view;id='.$row['ID_PICTURE'].'"><img src="'.$modSettings['gallery_url'].$row['thumbfilename'].'" /></a><br />'."\n";
// display poster's name and posted date if enabled
if (!empty($gal_dispMember) || !empty($gal_dispDate)){
echo 'Posted';
if (!empty($gal_dispMember)){
// display the membername who posted pic?  need to get name based on ID_MEMBER
$gal_tmp = mysql_fetch_assoc(mysql_query("SELECT memberName FROM ".$db_prefix."members WHERE ID_MEMBER = ".$row['ID_MEMBER']));
echo ' by <a href="'.$scripturl.'?action=profile;u='.$row['ID_MEMBER'].'">'.$gal_tmp['memberName'].'</a>';
}
if (!empty($gal_dispDate)){
// display the date it was posted
echo ' on '.date("d M Y", $row['date']);
}
echo "<br />\n";
}
// display category if enabled
if (!empty($gal_dispCategory)){
// get category name based on category id
$gal_tmp = mysql_fetch_assoc(mysql_query("SELECT title FROM ".$db_prefix."gallery_cat WHERE ID_CAT = ".$row['ID_CAT']));
echo '<br />in<br /><a href="'.$scripturl.'?action=gallery;cat='.$row['ID_CAT'].'">'.$gal_tmp['title']."</a><br /><br />\n";
}
// display number of views if enabled
if (!empty($gal_dispViews)){
echo "Viewed ".$row['views']." times<br />\n";
}
// display dimensions if enabled
if (!empty($gal_dispDimensions)){
echo $row['width']."w X ".$row['height']."h<br />\n";
}
// display filesize if enabled
if (!empty($gal_dispSize)){
echo $row['filesize']." bytes<br />\n";
}
// display description if enabled
if (!empty($gal_dispDescription)){
echo "<br />".$row['description']."<br />\n";
}
echo " </td>\n";
$gal_colcnt++;
}
mysql_free_result($gal_result);
echo " </tr>\n</table>\n";
if (!empty($gal_member) && empty($_GET['gal_viewall']))
echo '<br /><a href="'.$boardurl.'/index.php?action=profile;u='.$gal_member.';gal_viewall=1">View all pics from this member</a>';
if (!empty($gal_buddies) && empty($_GET['gal_viewall'])){
// build the link
$gal_querystring = $context['TPortal']['querystring'];
$gal_querystring .= empty($gal_querystring) ? 'gal_viewall=1' : ';gal_viewall=1';
echo '<br /><a href="'.$boardurl.'/index.php?'.$gal_querystring.'">View all pics of buddies</a>';
}
}
} else {
echo 'Sorry, you do not have permission to view pictures!';
}
RewindLancs.com Management


Offline craftervillage

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 10
    • View Profile
Re: Random Image in Block?
« Reply #97 on: June 29, 2007, 11:00:13 am »
Does anyone know what I can add here to make the members name appear below thier picture.

I managed to get some code to work on my site for a random images.

   
global $scripturl,$db_prefix,$modSettings,$boardurl;

echo'<table cellspacing="0" cellpadding="1" border="0" align="center" width="90%"><tr>';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$request = db_query("SELECT thumbfilename, ID_CAT, ID_PICTURE FROM {$db_prefix}gallery_pic WHERE ID_CAT = '1' GROUP BY thumbfilename ORDER BY RAND() LIMIT 10", __FILE__, __LINE__);
   
$row = mysql_fetch_assoc($request);
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);


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: Random Image in Block?
« Reply #98 on: June 29, 2007, 08:45:56 pm »
Code: [Select]
You would need to do another join

Find
[code]
db_query("SELECT thumbfilename, ID_CAT, ID_PICTURE FROM {$db_prefix}gallery_pic WHERE ID_CAT = '1' GROUP BY thumbfilename ORDER BY RAND() LIMIT 10", __FILE__, __LINE__);
Change to
db_query("SELECT m.ID_MEMBER, m.realName, p.thumbfilename, p.ID_CAT, p.ID_PICTURE FROM {$db_prefix}gallery_pic as p, {$db_prefix}_members as m  WHERE p.ID_MEMBER = m.ID_MEMBER AND p.ID_CAT = '1' GROUP BY thumbfilename ORDER BY RAND() LIMIT 10", __FILE__, __LINE__);
[/code]

so you can then use the realName returned by the query in the display part
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline deezin

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 1
    • View Profile
Re: Random Image in Block?
« Reply #99 on: October 12, 2007, 07:21:36 pm »
Any idea how to implement the same thing in drupal ... i.e. creating a recent SMF Gallery Pro images block for Drupal.

Thank you for your help.
Rachel

Offline Raji

  • Member
  • *
  • Posts: 10
    • View Profile
Re: Random Image in Block?
« Reply #100 on: November 23, 2007, 04:33:43 am »
oh that code won't work since SSI requires that it be loaded before all php


You would need to replace ssi_galleryrandom(); in your index.template.ph with something like
Code: [Select]
global $scripturl,$db_prefix,$modSettings,$boardurl;

  if(empty($modSettings['gallery_url']))
  {
    $modSettings['gallery_url'] = $boardurl . '/gallery/';
  }
 
  $request = db_query("SELECT thumbfilename,ID_PICTURE,filename FROM

{$db_prefix}gallery_pic GROUP BY thumbfilename ORDER BY RAND() LIMIT 1", __FILE__,

__LINE__);
  $row = mysql_fetch_assoc($request);
  mysql_free_result($request);
  echo' <center><a href="', $scripturl, '?action=gallery;sa=view;id=',

$row['ID_PICTURE'], '"><img src="',  $modSettings['gallery_url'] .

$row['thumbfilename'] ,'" /></a></center>'

;
?><script language="javascript" type="text/javascript">
<!--
function linkingcodes() {
  newwindow2=window.open('','name','height=250,width=800,scrollbars=yes');
  var tmp = newwindow2.document;
  tmp.write('<html><head><title>Linking codes</title>');
  tmp.write('');
  tmp.write('</head><body bgcolor="#FFFFFF"><center><font color="#000000" size="1" face="verdana">');
  tmp.write('HTML For Websites:</br><form><textarea rows="2" cols="90">&lt;a href="<?echo $modSettings['gallery_url'].$row['filename']; ?>"&gt;&lt;img src="<?echo $modSettings['gallery_url'].$row['thumbfilename'];?>"&gt;&lt;/a&gt;</textarea></form> ');
  tmp.write('</br></br>BBC For Forums</br><form><textarea rows="2" cols="90">[url=<?echo $modSettings['gallery_url'].$row['filename']; ?>][img]<?echo $modSettings['gallery_url'].$row['thumbfilename'];?>[/img][/url]</textarea></form>');
  tmp.write('</font></center></body></html>');
  tmp.close();
}
// -->
</script><center><form>
</br><input type="button" onClick="return linkingcodes()" value="Linking codes!">
</form></center>
<?


I have added this mod before
function template_main_below()

but its showing fetal errror :( I need your help to fix this problem.

Thanks in advance for your support.

Regards
Raji


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: Random Image in Block?
« Reply #101 on: November 23, 2007, 03:34:01 pm »
That code won't work in that case since its a mix of php/html code and was meant for a block not to be stuck inside a template.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Kesk

  • Member
  • *
  • Posts: 1
    • View Profile
Re: Random Image in Block?
« Reply #102 on: November 27, 2007, 07:51:31 am »
I am wanting to add a random image to my welcome menu in the header. I am using the default theme. I would like to place it next to the small ad that you can see here:

http://www.deathknight.info

I have tried both the SSI codes and the other codes thatSMFHACKS posted. I cant seem to get the code placed right and still work (it will only work in certain places of the index.template   file. anyone have a clue?

Offline smartmouse

  • Member
  • *
  • Posts: 21
    • View Profile
Re: Random Image in Block?
« Reply #103 on: December 19, 2007, 07:53:14 pm »
Nice work,

I updated it a little
Code: [Select]
function ssi_grandom ($cat)
{
global $scripturl,$db_prefix;
$cat = (int) $cat;

$request = db_query("SELECT thumbfilename, ID_CAT, ID_PICTURE FROM {$db_prefix}gallery_pic WHERE ID_CAT = $cat GROUP BY thumbfilename ORDER BY RAND() LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);
echo' <a href="', $scripturl, '?action=gallery;sa=view;id=', $row['ID_PICTURE'], '"><img src="/gallery/', $row['thumbfilename'] ,'" />'

;}


Hello i'm new here. How to set more than 1 cat?
Is it possible?

Thank you.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16561
    • View Profile
Re: Random Image in Block?
« Reply #104 on: December 19, 2007, 09:29:09 pm »
Change
WHERE ID_CAT = $cat
To
WHERE ID_CAT = $cat OR ID_CAT = anothercategorynumber
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
6370 Views
Last post June 18, 2010, 09:18:00 am
by dvera
2 Replies
9489 Views
Last post October 15, 2010, 04:03:02 pm
by Rafferty
1 Replies
5581 Views
Last post October 16, 2016, 12:12:51 pm
by exit
5 Replies
5561 Views
Last post July 12, 2017, 03:45:34 pm
by donk
8 Replies
7505 Views
Last post December 04, 2017, 09:41:20 pm
by Boomslanger

+- Recent Topics

Gallery Pro reinstalation by Lirorobert
October 06, 2024, 04:16:25 pm

quoting part of message by Lirorobert
October 04, 2024, 03:21:40 pm

Does SMF Gallery support by SMFHacks
October 02, 2024, 06:14:26 am

Restoring a deleted photo by Monocero
September 28, 2024, 04:12:20 am

Item count on Gallery Tab shows double by SMFHacks
September 26, 2024, 12:59:20 pm

Forum post missing when image over 4000x pixels is uploaded to gallery by Michel68
September 24, 2024, 01:37:17 pm

Setting a photo as invisible by Monocero
September 17, 2024, 02:11:56 pm

Two gallery names by SMFHacks
September 15, 2024, 02:17:49 pm

Bar during the regeneration of miniatures by Monocero
September 15, 2024, 12:35:08 pm

Error on upgrade by SMFHacks
September 14, 2024, 09:54:07 pm

Powered by EzPortal