Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
1 to 12 of 12
I know that you want to have different files named a.php, b.php, c.php, etc. to pull in galleries starting with those letters only.
Did you want it to pull a list of 'albums' only or 'albums & collections'? Or is it when you navigate to a certain collection, you have a list of 26 letter links at the top to allow you to split the albums by initial letter?
Are these files separate from the regular gallery page or a part of it (i.e. is this a list on some other page on your site like a site map)?
Is this just a list of albums, or did you want thumbnails associated with each album/collection?
<ul>
<?php
include_once("absolute_path_to_plogger/plog-globals.php");
include_once("absolute_path_to_plogger/plog-load_config.php");
include_once("absolute_path_to_plogger/plog-functions.php");
global $config;
//change this to the letter you want the album to start with
$letter = "a";
$query = "SELECT * from plogger_albums WHERE `name` LIKE '".$letter."%' ORDER BY `id` ASC";
$result= mysql_query($query) or die
("Could not execute query : $query." . mysql_error());
$i=0;
while ($row=mysql_fetch_array($result)){
$id = $row['id'];
$name = $row['name'];
$count = $i+1;
$class = ($count%2) ? "color-1" : "color-2";
echo "<li class=\"".$class."\"><a href=\"".$config['gallery_url']."?level=album&id=".$id."\">".$name."</a></li>\n";
$i++;
}
if ($i==0){
echo "<li class=\"color-1\">No '".$letter."' galleries found!</li>\n";
}
?>
</ul>
echo "<tr>
<td width=\"40%\" class=\"".$class."\"><a href=\"".$config['gallery_url']."?level=album&id=".$id."\" class=\"menu\">".$name."</a></td>
</tr>\n";
Posted By: dimeThank you very much! You excellent understood what I meant and this your code is making what I wanted. I customized it with my previous code which made list as in above pictureGreat!
Posted By: dime1) this code doesn't makes alphabetical list of albums, but instead makes list of albums in order as they were createdSorry about that. I should have checked my code better. Find:
$query = "SELECT * from plogger_albums WHERE `name` LIKE '".$letter."%' ORDER BY `id` ASC";
and replace with:$query = "SELECT * from plogger_albums WHERE `name` LIKE '".$letter."%' ORDER BY `name` ASC";
Posted By: dime2) I use "craft-free" URLs and this script makes old style of URLs, so if it is possible to make them "craft-free"Find:
.$config['gallery_url']."?level=album&id=".$id.
and replace with:.generate_url("album",$id).
Posted By: dimeAs I said in my first comment, I'm ready to reward for effort on this if there is need, either personally or to Plogger developmentThat is up to you, but if you do wish to pay someone, make a donation to Plogger (instead of me).
Posted By: dimeEven without this, I planed that in next couple of days write comment about some my suggestions of Plogger future development and to report bugs on Trac which I already reported on this forum last summer, before I stopped participating in forum half a year ago (I saw that there are made some steps forward in development in recent months;Sure thing. I can check your bug reports on the forums as well to see if they have already been taken care of
Posted By: dimebtw which username is used on Trac, I couldn't access with this from forum, but see that people who reported bugs have some usernames?)Registered usernames are only given to the development team so bugs can be assigned to different members. You don't have to login to Trac to report bugs however. Just fill out your username or email in the text box indicated. If you wish to receive emails regarding that ticket, add your email to the CC: list.
<a href=\"".generate_url("album",$id)."\" class=\"menu\">".$name."</a>
global $config;
define("PLOGGER_EMBEDDED","0");
$config['base_url'] = $config['gallery_url'];
Posted By: DeeJayOdieI wonder if it is possible to have a similar script as pagination, but for letters. To sort albums into letters.You could do pagination if you want. I'll see if I can find some time too and we can compare notes. :D
global $config;
define("PLOGGER_EMBEDDED","0");
$config['base_url'] = $config['gallery_url'];
//change this to the letter you want the album to start with
$letter = "a";
include_once("../plogger/plog-globals.php");
define("PLOGGER_EMBEDDED",0);
include_once("../plogger/plog-load_config.php");
$config['embedded'] = 0;
$config['use_mod_rewrite'] = 1;
include_once("../plogger/plog-functions.php");
global $config;
$config['baseurl'] = $config['gallery_url'];
//change this to the letter you want the album to start with
$letter = "a";
include_once("../plogger/plog-globals.php");
include_once("../plogger/plog-load_config.php");
$config['embedded'] = 0;
$config['use_mod_rewrite'] = 1;
include_once("../plogger/plog-functions.php");
global $config;
$config['baseurl'] = $config['gallery_url'];
//change this to the letter you want the album to start with
$letter = "a";
<ul>
<?php
include_once("absolute_path_to_plogger/plog-globals.php");
include_once("absolute_path_to_plogger/plog-load_config.php");
$config['embedded'] = 0;
$config['use_mod_rewrite'] = 1;
include_once("absolute_path_to_plogger/plog-functions.php");
global $config;
$config['baseurl'] = $config['gallery_url'];
//change this to the letter you want the album to start with
$letter = "a";
$query = "SELECT * from plogger_albums WHERE `name` LIKE '".$letter."%' ORDER BY `name` ASC";
$result= mysql_query($query) or die
("Could not execute query : $query." . mysql_error());
$i=0;
while ($row=mysql_fetch_array($result)){
$id = $row['id'];
$name = $row['name'];
$count = $i+1;
$class = ($count%2) ? "color-1" : "color-2";
echo "<li class=\"".$class."\"><a href=\"".generate_url("album",$id)."\">".$name."</a></li>\n";
$i++;
}
if ($i==0){
echo "<li class=\"color-1\">No '".$letter."' galleries found!</li>\n";
}
?>
</ul>
1 to 12 of 12