1
jeffgr
How to tweak this php code (to add image size properties)
  • 2007/6/5 20:59

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Hi everyone,

I want to change the following line of code, so that the image that is called (the avatar image) only has a certain dimension, like 100px x 100px for example. I know how to add this image property to a "regular" image link, but how do I do it in php? How do I modify the following code?


".$thisUser->getVar(

Thanks,

Jeff

2
JMorris
Re: How to tweak this php code (to add image size properties)
  • 2007/6/5 21:24

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


If I understood you correctly, this should work.

<img src='".XOOPS_UPLOAD_URL."/".$thisUser->getVar('user_avatar')."'   height='100' width='100' alt='".$thisUser->getVar('uname')."' />


HTH.
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
nachenko
Re: How to tweak this php code (to add image size properties)
  • 2007/6/5 21:47

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Style it.

Apply CSS properties to it.

4
jeffgr
Re: How to tweak this php code (to add image size properties)
  • 2007/6/5 23:11

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Thank you both for your replies!

The second response solved it for me however...I just didn't understand how to do " height='100' width='100' " in php....the code you provided above worked!

Jeff

5
skenow
Re: How to tweak this php code (to add image size properties)
  • 2007/6/5 23:39

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


for compliance, be sure to add px as the units (height='100px'). Only 0 can be used without units.

Login

Who's Online

264 user(s) are online (193 user(s) are browsing Support Forums)


Members: 0


Guests: 264


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