Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: how can i order the albums list in my Index of the last Uploaded  (Read 7055 times)

0 Members and 1 Guest are viewing this topic.

skyangels

  • Coppermine newbie
  • Offline Offline
  • Posts: 9

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...
Logged

Nibbler

  • Guest
Re: How can i get the pic of the Latest upload albums???
« Reply #1 on: October 25, 2005, 05:38:42 pm »

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

skyangels

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: How can i get the pic of the Latest upload albums???
« Reply #2 on: October 25, 2005, 05:49:53 pm »

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"

Code: [Select]
<?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);
?>
« Last Edit: October 25, 2005, 05:51:14 pm by Nibbler »
Logged

skyangels

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
how can i order the albums list in my Index of the last Uploaded
« Reply #3 on: October 25, 2005, 06:25:30 pm »

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/
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #4 on: October 25, 2005, 06:56:32 pm »

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.
« Last Edit: October 27, 2005, 08:48:14 pm by GauGau »
Logged

skyangels

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #5 on: October 25, 2005, 08:15:17 pm »

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
Logged

skyangels

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Me, one more time, i have a problem whit this script
« Reply #6 on: October 25, 2005, 08:36:05 pm »

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

Code: [Select]
<?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);
?>
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Me, one more time, i have a problem whit this script
« Reply #7 on: October 25, 2005, 09:48:50 pm »

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

Dennis
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Me, one more time, i have a problem whit this script
« Reply #8 on: October 25, 2005, 10:30:24 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #9 on: October 25, 2005, 11:44:47 pm »

is your question solved?
Logged

skyangels

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #10 on: October 26, 2005, 01:10:25 am »

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:
Code: [Select]
<?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);
?>
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #11 on: October 26, 2005, 05:59:36 am »

merged the two threads that deal with the same issue.
Logged

skyangels

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #12 on: October 26, 2005, 12:35:40 pm »

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!!!
Logged

skyangels

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Can someone helpme, i need to complete this code
« Reply #13 on: October 27, 2005, 05:45:43 pm »

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!!!

Code: [Select]
<?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);
?>
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #14 on: October 27, 2005, 05:56:55 pm »

Merged with your newly started thread dealing with the same issue

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #15 on: October 27, 2005, 08:56:56 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how can i order the albums list in my Index of the last Uploaded
« Reply #16 on: October 27, 2005, 10:08:57 pm »

...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.
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.