PDA

View Full Version : img question



StarBuG
Mon 14th Jan '02, 3:03pm
Hi!

How or where can I change the Buddylist offline/online image without changing the img in the main index???

Greetings

StarBuG

pattox
Tue 15th Jan '02, 6:31am
im thinkin youre gonna have to edit a template and change the php code so the img src= changes?

:confused:

c-prompt
Tue 15th Jan '02, 7:48am
Here is a quick way to do this.

In forumhome_forumbit_level1_post and forumhome_forumbit_level2_post

Find:


img src="images/$forum[onoff].gif


Replace with


img src="images/onoff/$forum[onoff].gif


*NOTE: REPLACE "images" with { imagesfolder }. minus spaces

Now make a new folder in the images folder called, "onoff". Put inside of it the on and off images for the main page to display.

Then you can change the on and off images in the main images directory to whatever you want for the buddys list and the postbit templates.

ja5es
Tue 15th Jan '02, 11:51am
There is a less hassle way to do it. Just go to the postbit_online and postbit_offline and change the img src to whatever images you want.

c-prompt
Tue 15th Jan '02, 8:51pm
Originally posted by ja5es
There is a less hassle way to do it. Just go to the postbit_online and postbit_offline and change the img src to whatever images you want.

Thats for postbit. Not the buddy on and off which is what his main concern is. The on and off images for the buddy are hard coded into the usercp.php file.

ja5es
Wed 16th Jan '02, 3:10am
You sure? This is how I think I changed mine at my site. I created some new images named online.gif and offline.gif and just changed the templates to display that pic instead of the on.gif or off.gif

c-prompt
Wed 16th Jan '02, 7:08am
What you are talking about changes only the image in the postbit template. It has no effect on the buddy list in the user cp. Like I said, those are hard coded in the usercp.php file. You can't just change the link in the usercp.php file either because it uses the same name for the image as for what the alt tag says.

ie. If I change the image name from on.gif to on1.gif. The alt tag will display

"This user is on1-line"

It uses the image name as the name for it. So without making it having to do with hacking, the way I listed works fine and dandy.

ja5es
Wed 16th Jan '02, 7:58am
Hmmm... I see. So it would probably be easier to use a differnt image on the forumhome huh?

c-prompt
Wed 16th Jan '02, 8:09am
Um, isn't that what I just said 5 posts ago?

ja5es
Wed 16th Jan '02, 9:40am
yeah, I guess so. Sorry about that.

c-prompt
Wed 16th Jan '02, 3:12pm
lol no prob.