owner name to link to user profile

gallos

Joined: 2007-07-12
Posts: 2
Posted: Thu, 2007-07-12 09:56

hi all,

im using gallery module on my drupal site. i want the owner names with albums or photos should be links to their user profiles. i want to know if there are settings for it or should i modify the code.

all help is greatly appreciated.

Thanks in advance.

I.X.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2007-07-12 13:08

- you need to edit one or more g2 theme templates (.tpl files), changing the owner string to be a link.
- g2 when embedded in drupal has access to drupal's API since drupal is always started first and then it calls G2 within drupal.
- i guess the owner strings in g2 come from the ItemInfo block. edit modules/core/templates/blocks/ItemInfo.
- i guess you need drupal's userId. you can get it via drupal's API / session. (don't know how, would have to google)
- you can use php in g2's .tpl files within {php}echo "moo";{/php} tags.
you could also put the php into your g2 theme and assign the data you need to render to template vars and use the template vars in the ItemInfo.tpl file.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Thu, 2007-07-12 14:03
 
gallos

Joined: 2007-07-12
Posts: 2
Posted: Fri, 2007-07-13 06:37

Many Thanks valiant and profix898,

I've tried the solutions you have suggested here. But i could not access the theme variables as suggested in http://drupal.org/node/155195. i think im missing something. should i declare goblal $theme or something similar in .tpl file to access $theme.drupaluser var.

thanks for your help guys,

 
james789

Joined: 2005-11-10
Posts: 96
Posted: Thu, 2008-01-24 19:29

gallos, did you ever solve this one? It's the same thing I am loking to do, both linked from owner names, but also from comment authors where they are logged in members. Thanks, James

 
james789

Joined: 2005-11-10
Posts: 96
Posted: Sat, 2008-02-09 19:25

bump!

 
djpumpkin

Joined: 2006-12-06
Posts: 135
Posted: Thu, 2009-05-28 23:14

I am also trying to achieve this. Did anyone ever get this to work?