CPG User Gallery Link at phpBB 3.0 profile

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
User avatar
Frejer Stolz
Registered User
Posts: 19
Joined: Wed Jan 07, 2009 11:22 pm

CPG User Gallery Link at phpBB 3.0 profile

Post by Frejer Stolz »

Hi all!
I have searched for mod, which will add a link to users albums in the coppermine gallery to his profile and under the custom profile field in viewtopic.

I have found at this forum only this about that mod:
SRC_DK wrote:I've succesfully bridged phpBB3 and Coppermine, and everything appears to be working just fine! :)
Following that I was looking for a way to integrate CPG into phpBB3's user-profile. Just a simple link in user-profile that'll take you to the user's private gallery.
I did find a way to do this from viewtopic.php:

Adding

'CPG_GAL_LINK' => $poster_id != ANONYMOUS ? ('/coppermine/index.php?cat=' . (10000 + $poster_id)) : '',

into viewtopic.php's $postrow = array

and adding

<a href="{postrow.CPG_GAL_LINK}">

into my style's viewtopic_body.html

This adds a functional link to the user's private gallery from viewtopic - however, this was not quite what I was looking for. Instead of adding the link to viewtopic I wanted it inside the user-profile.
One of you guys must be brighter than me! :ugeek:
:oops: Help.... :oops:
But my knowledge in programming is not enough to finish this mod...

Help pleeez? :)
edengp
Registered User
Posts: 18
Joined: Thu Oct 23, 2008 5:42 pm

Re: CPG User Gallery Link at phpBB 3.0 profile

Post by edengp »

I have just got this to work.
PHPBB3 - COPPERMINE bridge, this one http://forum.coppermine-gallery.net/ind ... 678.0.html
Coppermine installed in web root and phpbb3 in /forum
using Subsilver2 style

Display a link to all of a users uploaded images in the phpbb3 user profile.
In PHPBB3
Find in memberlist.php

Code: Select all

			'U_REMOVE_FOE'		=> ($foe) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&mode=foes&usernames[]=' . $user_id) : '',
Add after

Code: Select all

	'CPG_GAL_LINK' => $user_id != ANONYMOUS ? ('../thumbnails.php?album=lastupby&uid=' . ($user_id)) : '',
Find in styles/subsilver2/template/memberlist_view.html

Code: Select all

<!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
				<tr>
					<td class="genmed" align="center">[ <!-- IF U_ADD_FRIEND and U_ADD_FOE--><a href="{U_ADD_FRIEND}">{L_ADD_FRIEND}</a> | <a href="{U_ADD_FOE}">{L_ADD_FOE}</a><!-- ENDIF --><!-- IF U_REMOVE_FRIEND --><a href="{U_REMOVE_FRIEND}">{L_REMOVE_FRIEND}</a><!-- ENDIF --><!-- IF U_REMOVE_FOE --><a href="{U_REMOVE_FOE}">{L_REMOVE_FOE}</a><!-- ENDIF --> ]</td>
				</tr>
Add After

Code: Select all

<tr>
					<td class="genmed" align="center">[<a href="{CPG_GAL_LINK}">View all uploaded images</a>]</td>
				</tr>
Thanks SRC_DK or giving me the idea.
Last edited by edengp on Fri Jan 16, 2009 9:48 pm, edited 1 time in total.
User avatar
Frejer Stolz
Registered User
Posts: 19
Joined: Wed Jan 07, 2009 11:22 pm

Re: CPG User Gallery Link at phpBB 3.0 profile

Post by Frejer Stolz »

La cucaracha... Image

It really works! Big thank!

But something more:

1 - If I replace the text "View all uploaded images" using at least one cyrillic symbol, I see an error. Can we use the language file here?

2 - I'd like to see a link to the users albums (index.php?cat=10061). Is it possible?

3 - How can I insert the link to the user albums in the viewtopic_body.html? (I will find a place in the code, but what should be the code of the link?)


Very big thanks for your job!!
edengp
Registered User
Posts: 18
Joined: Thu Oct 23, 2008 5:42 pm

Re: CPG User Gallery Link at phpBB 3.0 profile

Post by edengp »

I have put answers in bold text within your quote.
Frejer Stolz wrote:La cucaracha... Image

It really works! Big thank!
:)

But something more:

1 - If I replace the text "View all uploaded images" using at least one cyrillic symbol, I see an error. Can we use the language file here?
Yes you can, use this code in styles/subsilver2/template/memberlist_view.html

Code: Select all

	<td align="center">[<b><a class="gen" href="{CPG_GAL_LINK}">{L_VIEW_UPLOADED}</a>]</b></td>
and add the L_VIEW_UPLOADED variable to the /language/YOUR LANUAGE/common.php like this
find

Code: Select all

	'VIEW_TOPIC_STICKY'			=> 'Sticky: ',
add after

Code: Select all

    'VIEW_UPLOADED'             => 'YOUR TEXT',
[/b]


2 - I'd like to see a link to the users albums (index.php?cat=10061). Is it possible?

yes, use this code instead in memberlist.hp


Code: Select all

   'CPG_GAL_LINK' => $user_id != ANONYMOUS ? ('../index.php?cat=' . (10000$user_id)) : '',
[/b]

3 - How can I insert the link to the user albums in the viewtopic_body.html? (I will find a place in the code, but what should be the code of the link?)

Sorry I have not tried this yet
Very big thanks for your job!!
Locked

Return to “[3.0.x] MOD Requests”