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: Custom Field - Album/Thumbnails Page  (Read 2059 times)

0 Members and 1 Guest are viewing this topic.

dustyb

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Custom Field - Album/Thumbnails Page
« on: April 23, 2004, 07:35:22 pm »

I'm weak on PHP and the way that functions and template extracts work, so please forgive. I've integrated Coppermine with vBulletin and I'm just finishing off the links between each Forum and its Coppermine Photo Gallery and vice versa. I want to have a link in thumbnails.php that says somethign like "Back to the Forum" The problem is that the aid and the forum ids are different.

I figured I'd just add a field to the albums table, forumid, and then do a query like:

if (is_numeric($album)) {
    $result = db_query("SELECT forumid FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='$album'");
    if (mysql_num_rows($result) > 0) {
        >>$CURRENT_ALBUM_FORUM = mysql_fetch_array($result);
        >>$forumurl = "http://linktoforum?forum=$CURRENT_ALBUM_FORUM['forumid']";
        >> Do something with $forumurl to make it available in themes.php
      }
    }

I guess I'd like to have it available in this section:

// HTML template for title row of the thumbnail view (album title)
$template_thumb_view_title_row = <<<EOT

Can anybody point me in the right direction, where to stick the query and how to pass $forumurl up to the $template_thumb_view_title_row template? I might have a real general concept, but past that I'm kind of lost. Many, many thanks.

Dusty
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Custom Field - Album/Thumbnails Page
« Reply #1 on: April 23, 2004, 08:13:57 pm »

Why don't you just add a html link in your theme/yourtheme/theme.php.  That will show on every page as it will be in the standard menu.
There is plenty of advice how to in the docs and on the boards.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

dustyb

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Custom Field - Album/Thumbnails Page
« Reply #2 on: April 23, 2004, 08:39:53 pm »

Hi Casper. No, it's not static. Each Coppermine album id is mapped to a vBulletin forum id and the two ids are not the same. That's why I figured I needed a field in albums to store that forum id, which is unique to each album.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 16 queries.