coppermine-gallery.com/forum

Support => Older/other versions => cpg1.1d PHPnuke Support (deprecated) => Topic started by: ArniesAirsoft on September 29, 2003, 06:22:54 PM

Title: Coppermin phpBB/Nuke integration
Post by: ArniesAirsoft on September 29, 2003, 06:22:54 PM
On the old ChezGreg site someone posted the code to add a link in someone's forum profile to link to their gallery if they had one that was active.

Has anyone got that code at all? I don't want to have to write it all by scratch if I don't have to.
Title: Coppermin phpBB/Nuke integration
Post by: ArniesAirsoft on September 29, 2003, 08:01:01 PM
Sod it.. did it myself.

In usercp_viewprofile.php around lin 189 add the following code after

$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

Add this:

//add gallery info here
$temp_ad = 10000 + $profiledata['uid'];
$sql =  "SELECT aid, category FROM cpg_albums WHERE 1 AND category = ".$temp_ad;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if ( $row['category'] == $temp_ad )
{
        $gallery_img = '<a href="modules.php?name=coppermine&cat='.$temp_ad.'"><b>Available here</b></a>';
}
else {
        $gallery_img = "no gallery yet";
}
//end gallery mod


Now you need to modify your language file and template.


In viewbody.tpl (for whichever gallery you use) add

<tr>
<td nowrap align="right">{GALLERY}:</td>
<td>{GALLERY_IMG}</td>
</tr>


after  

<tr>
<td nowrap align="right">{L_ICQ_NUMBER}:</td>
<td>{ICQ_IMG}</td>
</tr>


around line 75

In lang_main.php in language/lang_english add

$lang['Photo Gallery'] = 'Photo Gallery';

somewhere - I stuck mine in at line 533 after

$lang['Interests'] = 'Interests';

Basically now if you look at someone's profile and they have a photogallery it'll show it in their profile.

You can replace my coded text to include a linked image if you liked. I'm working on including similar code into the forums themselves like the ICQ/IAM icons. Will post when it's finished
Title: Coppermin phpBB/Nuke integration
Post by: BMWHeaven on September 29, 2003, 11:09:33 PM
Great :)....
I've been doing some upgrades to phpBB in phpnuke, to get it to show the galleries a user has.
Look here: http://bmwheaven.bmwsport.net/newdesign/phpnuke/modules.php?name=Forums&file=viewtopic&t=1

Ilir Dibrani (my user account) doesn't show any galleries, while testuser (also my user account, but for testing), does show it's galleries.

It has been some work, you need a patch for phpnuke, so that the tpl files of phpbb can handle php...
If you want to know it, pm me.

Ilir
Title: Coppermin phpBB/Nuke integration
Post by: sengsara on September 30, 2003, 10:59:40 AM
Why PM? Why can't you just post it here where everybody can see it?
Isn't that what this forum all about?
Support and helping eacch other?