a 5 mins help for someone that knows PHP

Started by Alex' Manson, October 19, 2010, 12:48:22 PM

Previous topic - Next topic

Alex' Manson

i just installed the default avatar mod and heres the code in index.template to put the default avatar:
// Show Default avatar for Lazy members :D
if (!empty($modSettings['enable_default_avatar_head']) && empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">
<img src="' . $settings['images_url'] . '/default_avatar.png"  alt="" border="0" />
</td>';

before the
if (!empty($context['user']['avatar']))
and heres the result:



so the image is in the wrong side, how to make it go a little to the right so it's in the right position?
as you see, the PM and Email Images are before it..


-Thanks

mighty_joe_young

td class="windowbg" valign="middle">

Chang the middle to right

Paul_Pauline

You can't  have valign="right"   ???

valign is top, middle or bottom
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.


xenovanis

I think they changed that after 1998 :P

For as far as I know it's not valid html.
"Insanity: doing the same thing over and over again and expecting different results."

kat

What about php?

You have to use a div, now?

Paul_Pauline

I thought by definition valign was top, middle, bottom

align was left, center, right  :-\
"In every life, no matter how full or empty one's purse, there is tragedy. It is the one promise life always fulfills.
Happiness is a gift and the trick is not to expect it, but to delight in it when it comes and to add to other people's store of it."
Pauline was one of those rare people who increased the store of happiness in the world.

xenovanis

With my limited coding skills I'm still convinced it's html. :P Combined with php, as well.

Quote from: K@ on October 19, 2010, 04:17:39 PM
What about php?

You have to use a div, now?

No, not for the align and valign properties for tables. I'm not sure what you mean by using a div? For what?
"Insanity: doing the same thing over and over again and expecting different results."

kat

For aligning.

You can tell I'm no expert, cantcha? :P

Quote from: Paul_Pauline on October 19, 2010, 04:20:12 PM
I thought by definition valign was top, middle, bottom

align was left, center, right  :-\

You might be right.

I've used it in a few places and it works.

Just because it might be deprecated, who cares? ;)

xenovanis

For aligning you can use

<div align="center">For centering images, tables, etc</div>
<td align="center">For centering the content of a table cell</td>
<div style="text-align: center;">For centering text (paragraph). </div>


There's probably more, but I'm too tired to come up with them :)
"Insanity: doing the same thing over and over again and expecting different results."

kat

* K@ decides it would be best not to ask Xen why she's tired... ;)

Thanks for sharing that, though. :)

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

kat

Poor love.

I'd offer you somewhere to sleep, but you know what minds this lot have... ;)

mighty_joe_young

#13
ALIGN = LEFT | CENTER | MIDDLE | RIGHT
VALIGN = TOP | MIDDLE | CENTER | BOTTOM | BASELINE
Horizontal alignment (left, center, right) within the table cell

Sorry i got mixed up due to my knowledge of php is naff ::)

Alex' Manson

hmm need help here,
nothing is fixin my issue.

Drunken Clam

#15
Quote from: Kill Me on October 20, 2010, 11:19:09 AM
hmm need help here,
nothing is fixin my issue.

Perhaps if you put the SMF and Simpleportal copyrights back it may work?? (Tongue in cheek)

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

Alex' Manson

kindred alredy Pm'ed me and we talked about it, Pm him if u want.

Drunken Clam

Quote from: Kill Me on October 20, 2010, 03:24:06 PM
kindred alredy Pm'ed me and we talked about it, Pm him if u want.

I don't need to speak to anyone, it's your problem. I just think you have a nerve asking for help on what is, currently, a site that is not displaying the required copyrights.

Alex' Manson

just to inform you, i dont have conrol on the files (FTP) , so all my work is in local host until my friend get's back
,
i talked with kindred about this, when my friend receives my work, he will update the files = copyright too

Advertisement: