Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
How concatenate {avatar) + any code?

 
Reply to topic    Forum Index » Help View previous topic
View next topic
How concatenate {avatar) + any code?
Author Message
Geahn



Joined: 13 Mar 2007
Posts: 13

Post How concatenate {avatar) + any code? Reply with quote
I need to use the command {avatar} inside a code, but don't works, look my code and running:

Original Code:
Code:
<img scr="code.php?{avatar},morecode" />


Running in my page:
Quote:
,morecode (this is a text ok?)


How i can to concatenate the {avatar} whit more codes?
Wed Jul 02, 2008 5:59 am View user's profile Send private message
Guest








Please login to hide the ads.

SolidSnake2003



Joined: 31 Jul 2007
Posts: 54

Post Reply with quote
all you need to display the avatar is {avatar}
Wed Jul 02, 2008 8:19 am View user's profile Send private message
Geahn



Joined: 13 Mar 2007
Posts: 13

Post Reply with quote
I know, but I need concatenate the code whit {avatar}, my question isn't how to display an avatar.
Wed Jul 02, 2008 8:41 am View user's profile Send private message
SolidSnake2003



Joined: 31 Jul 2007
Posts: 54

Post Reply with quote
I guess I just don't understand what you mean by concatenate
Wed Jul 02, 2008 11:51 pm View user's profile Send private message
Syrion



Joined: 02 Aug 2006
Posts: 172

Post Reply with quote
He wants to include the output of {avatar} in a longer string of code.

_________________
Mini-me
Thu Jul 03, 2008 10:33 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
Can't you edit it directly in inc/show.news.php?

Code:
$output = str_replace('{avatar}', ($row['avatar'] ? '<img src="'.$row['avatar'].'" alt="" border="0" align="absmiddle">' : ''), $output);


Or use {avatar-url} which shows just the url instead of {avatar} which shows the whole image code.
Fri Jul 04, 2008 2:01 pm View user's profile Send private message
nam



Joined: 23 Dec 2006
Posts: 67

Post Reply with quote
This works for me but face problem with certain titles.

When titles has a doublequote string, the page will not be dispalyed correctly and the XHTML validator will also show error message.

For example with the following title: UN says: "poverty is global"

The HTML code will be:

<img src="http://www.yoursite.com/data/upimages/un.jpg" alt="UN says: "poverty is global"" border="0" align="absmiddle">

Which causes the problem.

Any solution?
Mon Jul 07, 2008 4:12 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
Quote:
Or use {avatar-url}


Since when? Do I need to modify code to use that or was that always there?

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Tue Jul 08, 2008 6:56 pm View user's profile Send private message Visit poster's website AIM Address
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
nam wrote:
When titles has a doublequote string, the page will not be dispalyed correctly and the XHTML validator will also show error message.

I don't understand why your title is in the alt tag of the image? Please explain.
Thu Jul 10, 2008 6:45 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
scottdallas wrote:
Quote:
Or use {avatar-url}


Since when? Do I need to modify code to use that or was that always there?

It was always there. Smile
Thu Jul 10, 2008 6:47 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.