News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

Coppermin phpBB/Nuke integration

Started by ArniesAirsoft, September 29, 2003, 06:22:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ArniesAirsoft

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.

ArniesAirsoft

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

BMWHeaven

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

sengsara

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?
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fbatamweb.net%2F4leechers%2Fsengsaraatgmail.gif&hash=5023c7ba1bc4142435e406735fee30bc611c5a03)