PDA

View Full Version : [album] latest album at forumhome


bartek24m
03-25-2009, 08:39 AM
I installed moditication vbadvanced which shows the latest picture of all my albums on my forumhome page

i would like to place the newest albums, just the same as in mysite.com/album.php

http://up.clubbers.pl/img/69rua.png

but i cant figure out how to change the my sql query acually i have this:

file: modules/coveralbums.php
<?php
// set how many to display
$tot = '4';
//dateline
//rand(NOW())
// replace dateline below with rand(NOW()) if you want it random
$orderby = "dateline";


$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') . '";');

?>

and 2 new template:

adv_portal_albums

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

adv_portal_albumsbit


<td class="alt1" align="center">
<a href="$vboptions[bburl]/album.php?albumid=$lpicture[albumid]&amp;pictureid=$lpicture[pictureid]">
<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>
<br />
<a href="$vboptions[bburl]member.php?u=$lpicture[userid]">$lpicture[musername]</a>
<br />
$lpicture[title]
</td>




Does anyone could help me ?

TNCclubman
03-25-2009, 08:20 PM
Very interested in the solution to this as well. Want to display latest albums from 1 user (me) on a new vb powered page.

bartek24m
03-25-2009, 08:38 PM
yeah !
like this modification:
https://vborg.vbsupport.ru/showthread.php?t=192696

but it works only @ forumhome page