1
NeoPlug
User Avatar in theme.html
  • 2004/4/18 16:51

  • NeoPlug

  • Just popping in

  • Posts: 18

  • Since: 2004/4/18


Hi,

I'm curently trying to integrate a user Avatar to theme.html but i don't know how to do that yet.
I tried to use the avatar menu hack but it needs to use a function located in system_blocks.php that i don't know how to call from theme.html.

> Fonction located in system_blocks.php :
Quote:
/////////////Hack Avatar
$block['user_avatar'] = $xoopsUser->getVar('user_avatar');
/////////////Hack Avatar


> Code from theme.html
Quote:
<{if $block.user_avatar <> ""}>



<{/if}>


Any help is welcome

2
m0nty
Re: User Avatar in theme.html
  • 2004/4/18 17:20

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


not sure this will work but try

<{include file="<{$xoops_url}>/modules/system/blocks/system_blocks.php"}><{if $block.user_avatar <> ""}>



<{/if}>

again my knowledge is limited.. but it's worth a try

3
NeoPlug
Re: User Avatar in theme.html
  • 2004/4/18 17:46

  • NeoPlug

  • Just popping in

  • Posts: 18

  • Since: 2004/4/18


No
Quote:
<{include file="<{$xoops_url}>/modules/system/blocks/system_blocks.php"}>
doesn't seem to work but i guess it must be something like that. I'll keep trying thanks for helping :)

4
JackJ
Re: User Avatar in theme.html
  • 2004/4/18 17:51

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


The user menu is called from:

system admin-->Templates-->system-->system_block_user.html

You can call it like this:



Or something like this near the top:





Or see this post Here

5
NeoPlug
Re: User Avatar in theme.html
  • 2004/4/18 18:58

  • NeoPlug

  • Just popping in

  • Posts: 18

  • Since: 2004/4/18


I'm trying to show users their avatar in my theme and not in a block so I can't use the function $block.avatar. I guess I need to call systemblocks.php but it doesn't seem to work with the method i tried :-/.
Any idea ?

6
CBlue
Re: User Avatar in theme.html

You have to use html code in your theme.html file, php code won't work.

7
NeoPlug
Re: User Avatar in theme.html
  • 2004/4/18 22:27

  • NeoPlug

  • Just popping in

  • Posts: 18

  • Since: 2004/4/18


Yeah i know i can't and that's the problem. Do u think there would be a method to call or include this file (system_blocks.php) so i can get to work.

I ever tried this : <{include file="<{$xoops_url}>/modules/system/blocks/system_blocks.php"}>
but it doesn't seem to work.

8
karuna
Re: User Avatar in theme.html
  • 2004/4/19 12:12

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Hi maybe u can add this smarty variable in the header.php
(I havn't test it myself )

9
phppp
Re: User Avatar in theme.html
  • 2004/4/19 13:44

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


in your php file, add:

$NeoPlug_avatar = $(someXoopsUser)->getVar('user_avatar');
if(file_exists(XOOPS_ROOT_PATH.'/uploads/'.$NeoPlug_avatar))
$NeoPlug_avatar = '';
else $NeoPlug_avatar='';

transfer this value:
$xoopsTpl->assign("NeoPlug_avatar",$NeoPlug_avatar)

theme.html
NeoPlug'avatar:<{NeoPlug_avatar}>

10
NeoPlug
Re: User Avatar in theme.html
  • 2004/4/19 18:50

  • NeoPlug

  • Just popping in

  • Posts: 18

  • Since: 2004/4/18


Could you gimme more details plz phppp cuz i actually added it all in my header right before "?>" cuz i wasn't sure. Maybe i have to add it to antoher file. Well anyway when i do it it gives me a blank page. Have u tried this on your website btw ?

Thanks for trying to help me. If i succeed it could be a cool Theme hack maybe!

(ps: i tried ur idea karuna but it doesn't work neither)

Login

Who's Online

334 user(s) are online (198 user(s) are browsing Support Forums)


Members: 0


Guests: 334


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits