Posted by Steel Rat on March 12, 2007 at 7:03pm
Hello again all,
I want to allow user pictures in posts and comments, but only in the forums. Is there a code snippet I can use in node.tpl.php that will only show user pictures if the Vocabulary = "forum"?
Thanks!
Comments
node-forum.tpl.php
Copy your node.tpl.php and rename the copied file to node-forum.tpl.php.
in the original node.tpl.php find the line:
<?phpif ($picture) print $picture;
?>
and delete that code.
but the node-forum.tpl.php should have it.
It may not be accurately the same code as given above, depending on your theme.
On garland, the code to find is:
<?phpprint $picture
?>
so you'll end up with
And configure your theme: admin » build » themes » settings
to show user pictures on nodes and comments.
Good luck!
John
---------------------------------
http://www.drupalnorge.no
hvor oversettere, utviklere og brukere av Drupal i Norge er som en stor familie!
Thanks! Unfortunately I
Thanks!
Unfortunately I won't know if it works until I can get another problem worked out, which is why $picture is always false.
Steel Rat
Drupal Site: RPGMapShare.com
Steel Rat
Some of My Drupal Sites:
Helm's Deep RPG Network
RPGMapShare.com
Infinite Ordnance
In admin > themes >
In admin > themes > configure, make sure having user pictures show up in posts is checked.
There are two places to
There are two places to insure user pictures work.
user pictures must first be enabled in administer -> user settings -> Pictures
Then they can be enabled at the them layer in administer -> themes -> configure
I had done both of those
I had done both of those (have setup and am running several Drupal 4.7 sites), and it just wasn't working. After I stopped messing with it and went on to other things it suddenly started working. So perhaps it was a cacheing issue.
Anyway, the node-forum.tpl.php fix worked perfectly for what I wanted to do.
Thanks!
Steel Rat
Drupal Site: RPGMapShare.com
Steel Rat
Some of My Drupal Sites:
Helm's Deep RPG Network
RPGMapShare.com
Infinite Ordnance
thx brenda this is exactly
thx brenda this is exactly what worked for me
help on pic and user profile
hi..
wld like to have a user profile..that looks good..a large image there..
and a thumbnail image in posts and comments..and maybe forums..the way u describe it..
can u pls advise how this can be done on 5.1
which modules to use..and how to do it..
also if u can teach how to make a good user profile..that wld be great..since the Drupal default profile leaves a lot to be desired...but its rugged nevertheless...wld be nice if things can be achieved without hacking on code..but as a module..pls guide me.
My internet voluntary services include
1. Helping answer queries on www.krishna.com
2. Learning & Helping in the Vedic section of www.spiritualnectar.com
3. Helped in some aspects to make www.indiapoised.org
4. Learning & ( Helping newbies) on www.
help on pic and user profile
hi..
wld like to have a user profile..that looks good..a large image there..
and a thumbnail image in posts and comments..and maybe forums..the way u describe it..
can u pls advise how this can be done on 5.1
which modules to use..and how to do it..
also if u can teach how to make a good user profile..that wld be great..since the Drupal default profile leaves a lot to be desired...but its rugged nevertheless...wld be nice if things can be achieved without hacking on code..but as a module..pls guide me.
My internet voluntary services include
1. Helping answer queries on www.krishna.com
2. Learning & Helping in the Vedic section of www.spiritualnectar.com
3. Helped in some aspects to make www.indiapoised.org
4. Learning & ( Helping newbies) on www.
=-=
investigate the advanced profile module
beyond that: get your site updated to 5.12 to remain as secure and bug free as possible.