The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

PM IMG PROFILE IMG and others

View previous topic View next topic Go down

Solved PM IMG PROFILE IMG and others

Post by nextlevelgaming on October 9th 2012, 5:20 am

Hey guys I need to figure out how to get Add text to the PM Profile Email.

Generated html is

Code:
<img src="www.i65.servimg.com/blah blah blah" title="whatever" alt="whatever"/>


What I want generated is

Code:
<img src="www.i65.servimg.com/blah blah blah" title="whatever" alt="whatever">WHAT I WANT</img>


The HTML we have is

Code:
{postrow.displayed.PROFILE_IMG} {postrow.displayed.PM_IMG} {postrow.displayed.EMAIL_IMG} <!-- BEGIN contact_field --> {postrow.displayed.contact_field.CONTENT}<!-- END contact_field --> {postrow.displayed.ONLINE_IMG}

So how do I add the text to the link? or can we not do that???

Need this for phpbb2 and punbb just in case


Last edited by nextlevelgaming on October 10th 2012, 6:09 am; edited 1 time in total

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Solved Re: PM IMG PROFILE IMG and others

Post by LGforum on October 9th 2012, 4:25 pm

@nextlevelgaming wrote:
Code:
<img src="www.i65.servimg.com/blah blah blah" title="whatever" alt="whatever">WHAT I WANT</img>
Why would you want to do that ^ it's invalid HTML and won't produce anything Razz

Yes as Rideem says, just wrap em in a span tag.
Swap: {postrow.displayed.PM_IMG} for <span class="pm_user">{postrow.displayed.PM_IMG}</span>
Or something similar, and you'll find it easier to work with.

Personally, I'd swap it for this:
Code:
<script>document.write( '{postrow.displayed.PM_IMG}'.replace(/<img.*?>/, 'WHAT YOU WANT') );</script>
Removing the image and swapping it for text while the page is loading.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: PM IMG PROFILE IMG and others

Post by nextlevelgaming on October 9th 2012, 8:21 pm

Ill try it LG.

It worked LG, anyway to change up the coding so that it adds the text next to the IMG? like i tried .add(

Though it did not work, of course .add works but not for what I need (or the way the code was written) I get what is going on here, just maybe if I wanted to add the Img and text link Smile

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Solved Re: PM IMG PROFILE IMG and others

Post by LGforum on October 9th 2012, 9:32 pm

Try this:
Code:
<script>document.write( '{postrow.displayed.PM_IMG}'.replace(/<\/a>/, 'WHAT YOU WANT</a>') );</script>

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: PM IMG PROFILE IMG and others

Post by nextlevelgaming on October 10th 2012, 6:01 am

Thanks LG worked like a charm Smile

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Solved Re: PM IMG PROFILE IMG and others

Post by SLGray on October 10th 2012, 6:16 am

Topic Solved & Locked


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35627
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum