Moving album title and description - problems

TheWraith
TheWraith's picture

Joined: 2003-06-16
Posts: 24
Posted: Sun, 2003-06-22 22:59

I've hacked up my "inline_albumthumb.frame" file so that sub-albums are listed with some MAC-ish imagery I created. I want to integrate the Album title and Description into this cosmetic hack, but this information is seemingly displayed through the "view_album.php" file. This is the code that displays the information:

if ($gallery->album->isAlbumName($i)) {
     $myAlbum = new Album();
     $myAlbum->load($gallery->album->isAlbumName($i));
     $myDescription = $myAlbum->fields['description'];
     $buf = "";
     $buf = $buf."<b>Album: ".$myAlbum->fields['title']."</b>";
     if ($myDescription != "No description") {
               $buf = $buf."<br>".$myDescription."";
    } echo($buf."<br>");
}

I've tried manually cutting and pasting the ".$myAlbum->fields['title']." into the "inline_albumthumb.frame" file, but that apparently doesn't carry the value over. Below is a screenshot of what the cosmetic hack looks like, and where I want the information moved. The problem, is the "album frame" is facilitated through a different file than the "album name and description".

I haven't been successfuly in getting the variables from the "view_album.php" subroutines to insert into the "inline_albumthum.frame" file. I'm new to PHP and am unfamiliar with its structure. Is there some "include" statement I can insert into the "inline_albumthumb.frame" file so that the variables in the other are carried over? I'm at a total loss. I'd appreciate any insight on how I could combine the functions of these two separate files, into one cosmetic hack. Thanks in advance.

 
TheWraith
TheWraith's picture

Joined: 2003-06-16
Posts: 24
Posted: Sun, 2003-06-22 23:05

Forgot to mention, I've noticed a list of variables in the "inline_albumthumb.frame" I'm trying to hack up.

//-- shorten the variables for convinience ---
$borderWidth = $gallery->html_wrap['borderWidth'];
$borderColor = $gallery->html_wrap['borderColor'];
$pixelImage = $gallery->html_wrap['pixelImage'];
$thumbWidth = $gallery->html_wrap['thumbWidth'];
$thumbHeight = $gallery->html_wrap['thumbHeight'];
$tag = $gallery->html_wrap['thumbTag'];
$href = $gallery->html_wrap['thumbHref'];
$base = $gallery->app->photoAlbumURL . '/images';

$imageTR = "$base/albumthumb_TR.gif";
$imageRR = "$base/albumthumb_RR.gif";
$imageBL = "$base/albumthumb_BL.gif";
$imageBB = "$base/albumthumb_BB.gif";
$imageBR = "$base/albumthumb_BR.gif";

Do I need to add the associated Title and Description variables in that section? I've tried...to no avail.

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Tue, 2003-06-24 08:23

Well the problem is that code will need to be moved from view_album.php into the inline_albumthumb.frame code. Notice that below the call in view_album.php for this other page, there's the "caption row". You'll probably want to move all of that into the other page somehow. This will take a good bit of mucking about with the code, but it should look great once it's done.

As for including variables, all the variables you have in view_album.php are readily available to you inside the included file! So it *should* just be a matter of moving some of the PHP code over into the other file. Give it a shot, and let us know if you get stuck.

-Beckett (

)