[ABD] Coppermine User Gallery Profile Link - Update.

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
beaniebaby148
Registered User
Posts: 20
Joined: Tue Mar 22, 2005 9:16 pm
Contact:

[ABD] Coppermine User Gallery Profile Link - Update.

Post by beaniebaby148 »

Update: Links are working again, had to clear whole site off. Sorry for inconveniences.
MOD Title: Coppermine User Gallery Personal Profile Link
MOD Description: This mod will add a link to your users gallery if used with the Linking PHPBB2 and Coppermine tutorial. The link will be placed in the Profile area of each user e.g.
Gallery: Username's Gallery -or- Users Gallery: Click Here
MOD Version: BETA 1.0.0

-STANDARD VERSION-
MOD Download: GalleryMod1-0.zip
Last Stable version: 1.0.0

-EXTRAS-
-Inserts a link under the username to the users gallery-
Compatible with Quick Reply - Thanks to Dicky for this!
MOD Download: GalleryMod1-1.zip
Last Stable version: 1.1.0


Demo: Unavailable

Beaniebaby.
Last edited by beaniebaby148 on Thu Aug 18, 2005 12:34 am, edited 5 times in total.
IGGYCORP.com
Registered User
Posts: 16
Joined: Tue Aug 03, 2004 7:49 pm

Post by IGGYCORP.com »

Good MOD! I had bee looking for something like this for a while.

I installed it and it works.

I have been trying to add a link under the avitar under the location in the post body that says "My Gallery", or something.
<---- Right over there.

is that possible?

I tried just running you mod in the viewtopic.php file and in the templates/subSilver/viewtopic_body.tpl, but that didn't work.
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky »

One thing that would be neat, have the ink only appear if the person has an album. It is aggravating to click a link and then find out there is nothing there.
Have you hugged someone today?
IGGYCORP.com
Registered User
Posts: 16
Joined: Tue Aug 03, 2004 7:49 pm

Post by IGGYCORP.com »

Good point. I have a feeling it would complicate things though.
beaniebaby148
Registered User
Posts: 20
Joined: Tue Mar 22, 2005 9:16 pm
Contact:

Post by beaniebaby148 »

Yeah that idea would be prety cool, this is my first mod ever lol. I'm 16 and know bearly anything about php, well i know bits so I was quite pleased with myself.
Iggycorp.com:
This is what your looking for:

In viewtopic.php After

Code: Select all

$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']); 

Add

Code: Select all

//--added PLA 
    

    
if ( $postrow[$i]['user_id'] > 1 ) 
   { 
      $l_gallery_poster_id = ($postrow[$i]['user_id'] + 10000); 
         } 
   else 
   { 
      $l_gallery_poster_id = ($postrow[$i]['user_id'] + 1); 
   } 
After

Code: Select all

'U_MINI_POST' => $mini_post_url, 

Add

Code: Select all

'U_GALLERY_TEXT' => ("'s Photo Gallery"), 
      'L_GALLERY_USER' => $poster, 
      'U_GALLERY_USER' => ('http://www.domain.com/gallery/index.php?cat='.$l_gallery_poster_id), 



Then In viewtopic_body.tpl
After

Code: Select all

<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><a name="{postrow.U_POST_ID}"></a>{postrow.AUTHOR_PANEL}<br> 

Add

Code: Select all

<a href="{postrow.U_GALLERY_USER}" class="gensmall">{postrow.L_GALLERY_USER}{postrow.U_GALLERY_TEXT}</a>



Beanie.
Wyr!H@x!mu$
Registered User
Posts: 802
Joined: Fri Jan 24, 2003 12:06 pm
Location: Koedijk, Alkmaar, The Netherlands
Name: Cees-Jan
Contact:

Post by Wyr!H@x!mu$ »

Sounds and looks nice.

P.S. your topic title is wrong check this topic: http://www.phpbb.com/phpBB/viewtopic.php?t=266307
Section 3 rule B and C.

Grtz,

WyriHaximus
beaniebaby148
Registered User
Posts: 20
Joined: Tue Mar 22, 2005 9:16 pm
Contact:

Post by beaniebaby148 »

Wyr!H@x!mu$ -> I dont follow, what do I have to name it? Thanks
Can you help, I'm a first time modder lol
Wyr!H@x!mu$
Registered User
Posts: 802
Joined: Fri Jan 24, 2003 12:06 pm
Location: Koedijk, Alkmaar, The Netherlands
Name: Cees-Jan
Contact:

Post by Wyr!H@x!mu$ »

beaniebaby148 wrote: Wyr!H@x!mu$ -> I dont follow, what do I have to name it? Thanks
Can you help, I'm a first time modder lol
It's good now :). (Also reply on your PM that it's now good :))

Grtz,

WyriHaximus
beaniebaby148
Registered User
Posts: 20
Joined: Tue Mar 22, 2005 9:16 pm
Contact:

Post by beaniebaby148 »

Thanks, lol. Kinda figured it out
IGGYCORP.com
Registered User
Posts: 16
Joined: Tue Aug 03, 2004 7:49 pm

Post by IGGYCORP.com »

I tried the second part and it works as well. However, now I see the need that if there is no gallery for a user that the link is not shown.
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Quick Reply MOD Conflict

Post by D¡cky »

In displaying the link on the view topic page, there is a conflict with the Quick Reply MOD. The Quick Reply MOD changes $poster to a javascript link, so I defined a new variable $gallery_poster. This is the modified code from beaniebaby148's code.

Code: Select all

# 
#-----[ OPEN ]--------------------------------------------- 
# 

viewtopic.php

#
#-----[ FIND ]---------------------------------------------
#

$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']);

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# 

//--added PLA
   
if ( $postrow[$i]['user_id'] > 1 )
   {
      $l_gallery_poster_id = ($postrow[$i]['user_id'] + 10000);
         }
   else
   {
      $l_gallery_poster_id = ($postrow[$i]['user_id'] + 1);
   }

#
#-----[ FIND ]---------------------------------------------
#
	//
	// Quick Reply
	//
	
	if ( $show_qr_form )
# 
#-----[ BEFORE, ADD ]-------------------------------------- 
# 

// Begin Coppermine link add - poster name set
	$gallery_poster = $poster;
// End Coppermine link add - poster name set

#
#-----[ FIND ]---------------------------------------------
#

'U_MINI_POST' => $mini_post_url,

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# 

// Begin Coppermine link
	   'U_GALLERY_TEXT' => ("'s Photo Gallery"), 
      'L_GALLERY_USER' => $gallery_poster, 
      'U_GALLERY_USER' => ('http://www.yourdomain.com/gallery/index.php?cat='.$l_gallery_poster_id),
// End Coppermine link

# 
#-----[ OPEN ]--------------------------------------------- 
# 

viewtopic_body.tp

# 
#-----[ FIND ]--------------------------------------------- 
# 

<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><a name="{postrow.U_POST_ID}"></a>{postrow.AUTHOR_PANEL}<br>

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# 

<span class="gensmall"><a href="{postrow.U_GALLERY_USER}" >{postrow.L_GALLERY_USER}{postrow.U_GALLERY_TEXT}</a></span><br />

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
Have you hugged someone today?
beaniebaby148
Registered User
Posts: 20
Joined: Tue Mar 22, 2005 9:16 pm
Contact:

Post by beaniebaby148 »

IGGYCORP.com: I'm working on it lol, I'm back at school so I dont have too much time available. If anyone wants to help out then thanks :) - A great help.

Dicky: Thanks will make changes in a little while.

*hugs you all*
Beanie.
beaniebaby148
Registered User
Posts: 20
Joined: Tue Mar 22, 2005 9:16 pm
Contact:

Post by beaniebaby148 »

Just an Update -> I've uploaded the extra mod that dicky came up with :)

Check the first post.

Beanie.
IGGYCORP.com
Registered User
Posts: 16
Joined: Tue Aug 03, 2004 7:49 pm

Post by IGGYCORP.com »

Any updates on this?
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky »

I am working on it, Iggy. I have some ideas how to do it. I have another project I am working on right now. Hopefully, over the weekend I will get this done.
Have you hugged someone today?
Locked

Return to “[2.0.x] MODs in Development”