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.
Posts: 32509
- 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
Posts: 135
see http://drupal.org/node/155195
Posts: 2
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,
Posts: 96
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
Posts: 96
bump!
Posts: 135
I am also trying to achieve this. Did anyone ever get this to work?