• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Adding avatars into nick list does not work for me

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
6 posts • Page 1 of 1

Postby wanted » Mon Dec 12, 2011 11:42 am

Hi

I just would like to put random avatars on my nick list but i can't make it work. I've been searching during a long time on this website looking for a way to do it but nothing helped me.
There is an easy exemple in the demos, but it doesnt work for me, i still see the same default picture..

Actually the $param in the demo is this :
$params["nickmeta"] = array("avatar" => "demo50_data/avatar".rand(1,9).".jpg");

Maybe i forgot something ?
wanted
New member
 
Posts: 7
Joined: Fri Dec 09, 2011 9:48 am
Top

Postby re*s.t.a.r.s.*2 » Mon Dec 12, 2011 6:02 pm

Hi,
this might be of help, assuming you have a folder with the images in "/themes/default/images/" then this code should work, works fine in my environment tests.

Code: Select all
$params["nickmeta"]['avatar']    = '<img src="./themes/default/images/avatar'.rand(1,9).'.jpg"/>';

please rehash for the changes to take effect.

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby wanted » Tue Dec 13, 2011 6:47 am

still not working for me :s

My folders looks like this :

<FTP>
--->[chat]
--->[themes]
--->[mytheme]
--->[images]
--->[avatars]
--->number.png
--->index.php (containing my chat)

My index contain what you gave me :
$params["nickmeta"]['avatar'] = '<img src="./images/avatars/'.rand(1,9).'.png"/>';

I played with "." and "/" (for exemple: "/images.." or "../images" etc). I tried also your parameter with the demo on a new installation with no success.
And yes i /rehash everytime, sometimes i change the serverid, i try in local, on my ftp... still the same
Last edited by wanted on Tue Dec 13, 2011 6:54 am, edited 1 time in total.
wanted
New member
 
Posts: 7
Joined: Fri Dec 09, 2011 9:48 am
Top

Postby re*s.t.a.r.s.*2 » Tue Dec 13, 2011 7:18 am

Hi,

Leave a public URL for me to check, in my environment works fine..

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby wanted » Tue Dec 13, 2011 7:28 am

french website

http://www.square-tempest.com/the_best_killer/
wanted
New member
 
Posts: 7
Joined: Fri Dec 09, 2011 9:48 am
Top

Postby wanted » Thu Dec 15, 2011 2:54 pm

Still no ideas ? i keep looking but I can't make it work...
This is really strange that it's working for you. Are you sure this $param is all i need to add ?

Why the code you gave me is different than the one in the demo ?
(demo) -------> $params["nickmeta"] = array("avatar" => "./themes/default/images/avatar".rand(1,9).".jpg");
(your code) --> $params["nickmeta"]['avatar'] = '<img src="./themes/default/images/avatar'.rand(1,9).'.jpg"/>';

Because for me, adding or not the "<img..." must change something.

I found some demos on this website showing how to change avatars :
http://www.phpfreechat.net/src/1.x/demo ... tadata.php
http://www.phpfreechat.net/src/1.x/demo ... d_html.php

All these demos still show me the same default blue avatar. I tried with firefox 8, internet explorer, google chrome and safari and i asked to some friends to try these demos, they see like me this blue avatar. I don't see how can I make it work on my personnal website if it doesnt work on the officials demos...

And another last question about this link :
http://www.phpfreechat.net/customize#cu ... -nick-list
Can this link help me ? because i don't really understand how it work.

I hope I don't bore you with my questions. I know I'm a beginner here but I'm doing my best. This avatar feature is one of the first steps for me after installed correctly the chat, then after i will begin to integrate it with my smf forum...

Thanks you for your help !
Last edited by wanted on Thu Dec 15, 2011 3:49 pm, edited 1 time in total.
wanted
New member
 
Posts: 7
Joined: Fri Dec 09, 2011 9:48 am
Top


Post a reply
6 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 16 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub