how can i order the albums list in my Index of the last Uploaded how can i order the albums list in my Index of the last Uploaded
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

how can i order the albums list in my Index of the last Uploaded

Started by skyangels, October 25, 2005, 05:34:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

skyangels

I got an script which can show the 5 latest upload albums, but i don't know how can i get the picture of each album, this is mi example http://skyangels.boulderhost.com/LatestAlbum.php, but if you see only are the links, so i need the code to get the "Album thumbnail" for each album, if someone know how to do it, i'll be thankful to it...

Nibbler

The `thumb` field in the albums table holds the pid of the album thumbnail.

skyangels

#2
this is my code, how can i do it tho show the thumbnail???, probably I lose an instruction to call the determinate Instruction into the Table "Albums"

<?php require_once('Latest_album_connect.php'); ?>
<?php
$maxRows_Latest_album 
5;
$pageNum_Latest_album 0;
if (isset(
$_GET['pageNum_Latest_album'])) {
  $pageNum_Latest_album $_GET['pageNum_Latest_album'];
}
$startRow_Latest_album $pageNum_Latest_album $maxRows_Latest_album;

mysql_select_db($database_Latest_album_connect$Latest_album_connect);
$query_Latest_album "SELECT * FROM cpg_albums ORDER BY aid DESC";
$query_limit_Latest_album sprintf("%s LIMIT %d, %d"$query_Latest_album$startRow_Latest_album$maxRows_Latest_album);
$Latest_album mysql_query($query_limit_Latest_album$Latest_album_connect) or die(mysql_error());
$row_Latest_album mysql_fetch_assoc($Latest_album);

if (isset(
$_GET['totalRows_Latest_album'])) {
  $totalRows_Latest_album $_GET['totalRows_Latest_album'];
} else {
  $all_Latest_album mysql_query($query_Latest_album);
  $totalRows_Latest_album mysql_num_rows($all_Latest_album);
}
$totalPages_Latest_album ceil($totalRows_Latest_album/$maxRows_Latest_album)-1;
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Latest Albums</title>
</head>

<body>
<?php do { ?>
<a href="Galeria/thumbnails.php?album=<?php echo $row_Latest_album['aid']; ?>"><img src="Galeria/thumbnails.php?album=<?php echo $row_Latest_album['thumb']; ?>" border="0"></a><br>
<?php } while ($row_Latest_album mysql_fetch_assoc($Latest_album)); ?>
</body>
</html>
<?php
mysql_free_result
($Latest_album);
?>

skyangels

I have my galery, but the last album always is showed in the 2nd or 3rd page of that category, how can i order in every category each album from the last uploaded http://www.skyangels.boulderhost.com/Galeria/

Joachim Müller

albums within a category are not sorted by last upload date, but in the order you specify in coppermine's album manager. Dynamic sorting of albums within a category hasn't been coded yet, nor has there been a mod to accomplish this so far.
However, I don't get the point: imo you have over-categorized your site: there are way to many empty categories for my taste. Why don't you create the categegories just before you need them, not way in advance.
I'm not sure if I understand you correctly though: if you're refering to the "last uploads" meta album, I guess you just have a custom sort order stored in your cookie. Delete your cookie if this is the case and everything should be well.

skyangels

thanks, is necesary that i have a lot of categories, because my gallery is not of only one singer, but that i need is: how to order the albums which are into every category, but also thanks for your help

skyangels

The problem is that it doesn't show the image of every album, so i don't know what can i do, it is working at http://skyangels.boulderhost.com/LatestAlbum.php, but i don't know which one are the instructions i need to add for show the image of every album, i'll be thankful if someone can help me

<?php require_once('Latest_album_connect.php'); ?>
<?php
$maxRows_Latest_album 
5;
$pageNum_Latest_album 0;
if (isset(
$_GET['pageNum_Latest_album'])) {
  
$pageNum_Latest_album $_GET['pageNum_Latest_album'];
}
$startRow_Latest_album $pageNum_Latest_album $maxRows_Latest_album;

mysql_select_db($database_Latest_album_connect$Latest_album_connect);
$query_Latest_album "SELECT * FROM cpg_albums ORDER BY aid DESC";
$query_limit_Latest_album sprintf("%s LIMIT %d, %d"$query_Latest_album$startRow_Latest_album$maxRows_Latest_album);
$Latest_album mysql_query($query_limit_Latest_album$Latest_album_connect) or die(mysql_error());
$row_Latest_album mysql_fetch_assoc($Latest_album);

if (isset(
$_GET['totalRows_Latest_album'])) {
  
$totalRows_Latest_album $_GET['totalRows_Latest_album'];
} else {
  
$all_Latest_album mysql_query($query_Latest_album);
  
$totalRows_Latest_album mysql_num_rows($all_Latest_album);
}
$totalPages_Latest_album ceil($totalRows_Latest_album/$maxRows_Latest_album)-1;
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Latest Albums</title>
</head>

<body>
<?php do { ?>
<a target="_blank" title="<?php echo $row_Latest_album['aid']; ?>" href="Galeria/thumbnails.php?album=<?php echo $row_Latest_album['aid']; ?>"><img src='<? echo $thumb_url; ?>' name='Thumb' class='image' border='0'></a><br>
<?php } while ($row_Latest_album mysql_fetch_assoc($Latest_album)); ?>
</body>
</html>
<?php
mysql_free_result
($Latest_album);
?>

artistsinhawaii

You are calling the variable,  $thumb_url,   but I don't see it defined anywhere.

Dennis
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

skyangels

Hey denni, thanks, but i don't know how to define it, can you help me, please, help me to complete it, please!!! i'll be thankful to you

Joachim Müller


skyangels

No yet, that i need is order my albums (into whatever category) from the latest to the first added, but i don't know how to do it, and also y have a problem with my webcode of Coppermine http://skyangels.boulderhost.com/LatestAlbum.php, in this address you can see that i don't know how to show the picture of every album, this is the code I'm using:
<?php require_once('Latest_album_connect.php'); ?>
<?php
$maxRows_Latest_album 
5;
$pageNum_Latest_album 0;
if (isset(
$_GET['pageNum_Latest_album'])) {
  
$pageNum_Latest_album $_GET['pageNum_Latest_album'];
}
$startRow_Latest_album $pageNum_Latest_album $maxRows_Latest_album;

mysql_select_db($database_Latest_album_connect$Latest_album_connect);
$query_Latest_album "SELECT * FROM cpg_albums ORDER BY aid DESC";
$query_limit_Latest_album sprintf("%s LIMIT %d, %d"$query_Latest_album$startRow_Latest_album$maxRows_Latest_album);
$Latest_album mysql_query($query_limit_Latest_album$Latest_album_connect) or die(mysql_error());
$row_Latest_album mysql_fetch_assoc($Latest_album);

if (isset(
$_GET['totalRows_Latest_album'])) {
  
$totalRows_Latest_album $_GET['totalRows_Latest_album'];
} else {
  
$all_Latest_album mysql_query($query_Latest_album);
  
$totalRows_Latest_album mysql_num_rows($all_Latest_album);
}
$totalPages_Latest_album ceil($totalRows_Latest_album/$maxRows_Latest_album)-1;
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Latest Albums</title>
</head>

<body>
<?php do { ?>
<a target="_blank" title="<?php echo $row_Latest_album['aid']; ?>" href="Galeria/thumbnails.php?album=<?php echo $row_Latest_album['aid']; ?>"><img src='<? echo $thumb_url; ?>' name='Thumb' class='image' border='0'></a><br>
<?php } while ($row_Latest_album mysql_fetch_assoc($Latest_album)); ?>
</body>
</html>
<?php
mysql_free_result
($Latest_album);
?>

Joachim Müller


skyangels

Thanks for helping me, but Really i don't know what to do because i did it (that code) with Dreamweaver and a Manual, so i don't know instructions or something like that so I'll be thanful if someone can help to me to complete my code please!!!

skyangels

Hi all the people, me one more time bothering, but i need help, i don't know PHP so much, neither MySQL, but i did the code with a guide and Dreamweaver, so i need someone who can complete it, i don't know how to call the Thumb of every album, please help me to complete it please!!!

<?php require_once('Latest_album_connect.php'); ?>
<?php
$maxRows_latest_album 
5;
$pageNum_latest_album 0;
if (isset(
$_GET['pageNum_latest_album'])) {
  
$pageNum_latest_album $_GET['pageNum_latest_album'];
}
$startRow_latest_album $pageNum_latest_album $maxRows_latest_album;

mysql_select_db($database_Latest_album_connect$Latest_album_connect);
$query_latest_album "SELECT * FROM cpg_albums ORDER BY aid DESC";
$query_limit_latest_album sprintf("%s LIMIT %d, %d"$query_latest_album$startRow_latest_album$maxRows_latest_album);
$latest_album mysql_query($query_limit_latest_album$Latest_album_connect) or die(mysql_error());
$row_latest_album mysql_fetch_assoc($latest_album);

if (isset(
$_GET['totalRows_latest_album'])) {
  
$totalRows_latest_album $_GET['totalRows_latest_album'];
} else {
  
$all_latest_album mysql_query($query_latest_album);
  
$totalRows_latest_album mysql_num_rows($all_latest_album);
}
$totalPages_latest_album ceil($totalRows_latest_album/$maxRows_latest_album)-1;
?>

<html>
<head>
<title></title>
</head>

<body>
<?php do { ?>
<a title="<?php echo $row_latest_album['title']; ?>" target="_blank" href="Galeria/thumbnails.php?album=<?php echo $row_latest_album['aid']; ?>"><img src="<?php echo $thumb_url['thumb']; ?>" border="0"></a><br>
<?php } while ($row_latest_album mysql_fetch_assoc($latest_album)); ?>
</body>
</html>
<?php
mysql_free_result
($latest_album);
?>

Stramm

Merged with your newly started thread dealing with the same issue

Joachim Müller

stop posting new threads or you'll get banned. In fact, you say you have no idea of coding, yet you want to accomplish extraordinary things. After all, your request is "can somebody code this feature for me?". Not respecting board rules by re-posting over and over again certainly won't make people more inclined to do some work for free. I certainly won't do this for you, as I don't see the point in the first place, and I don't believe in helping people who don't respect the rules.

Joachim Müller

...and stop PMing me or any other devs with exactly the same thing >:(. Re-consider your attitude, you're banned from posting for three days. During this time, you should read http://forum.coppermine-gallery.net/index.php?topic=22469.0 and the site refered there.