HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
trying to display 2 rows of pictures
Post new topic   Reply to topic    HTML Help Forum -> PHP
View previous topic :: View next topic  
Author Message
adacom



Joined: 03 Mar 2009
Posts: 1

PostPosted: Tue Mar 03, 2009 7:22 am     trying to display 2 rows of pictures Reply with quote

trying to display a row of pictures as 2 rows - someone elses code - its for a vbulletin chat board

you can define the number of pictures in a variable and it has been suggested that the single row can be split with a 'wrap' tag - but i am lost - i cannot programme - i sort of understand the logic but altering it is beyond me

the 3 elements of the program are a php file and 2 templates within the vb software

thanks in advance for any help

tony




Quote:
<?php


// set how many to display

$tot = '3';


//dateline
//rand(NOW())

// replace dateline below with rand(NOW()) if you want it random
$orderby = "rand(NOW())";


$lpictures = $db->query_read("
SELECT albumpicture.*, album.*, user.username, user.usergroupid,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM " . TABLE_PREFIX . "albumpicture AS albumpicture
LEFT JOIN " . TABLE_PREFIX . "album AS album ON(album.albumid = albumpicture.albumid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = album.userid)
WHERE album.state = 'public'
ORDER BY $orderby DESC LIMIT 0, $tot
");
$cols = $db->num_rows($lpictures);

while ($lpicture = $db->fetch_array($lpictures))
{
//$lpicture['musername'] = fetch_musername($lpicture);
//$lpicture['title'] = trim(strip_quotes($lpicture['title']));
eval('$albumpics .= "' . fetch_template('adv_portal_albumsbits') . '";');
}

eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_albums') . '";');



adv_portal_albums

Quote:
<tr>
<td class="alt1" colspan="$cols">
<table width="100%" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" border="0">
<tr>

$albumpics
</tr>
</table>
</td>
</tr>
<td class="thead"><span class="mallfont"><strong><center>Click on any picture to see a larger view.</center></strong></span></td>



adv_portal_albumsbits

Quote:
<td class="alt1" align="center">
<a href="$vboptions[bburl]/album.php?albumid=$lpicture[albumid]&amp;pictureid=$lpicture[pictureid]">
<td>
<img title="$lpicture[title]" class="inlineimg" src="$vboptions[bburl]/picture.php?pictureid=$lpicture[pictureid]&amp;albumid=$lpicture[albumid]&amp;thumb=1" border="0" alt="$lpicture[title]" />
</a>

</td>

Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> PHP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial