The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

PM IMG PROFILE IMG and others

3 posters

Go down

Solved PM IMG PROFILE IMG and others

Post by nextlevelgaming 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
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 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
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: PM IMG PROFILE IMG and others

Post by nextlevelgaming 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
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 October 9th 2012, 9:32 pm

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

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: PM IMG PROFILE IMG and others

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

Thanks LG worked like a charm Smile
nextlevelgaming
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 October 10th 2012, 6:16 am

Topic Solved & Locked


PM IMG PROFILE IMG and others Slgray10

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

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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