Icon for a custom profile field

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Icon for a custom profile field

Post by ashras99 »

I like to add an icon to custom profile field which takes the twitter addess from users... but i want if that filled then show as an icon on viewtopic page and not as link.

User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: Icon for a custom profile field

Post by ashras99 »

Anyone can help me in this matter, how to add an icon for defined custom field?

User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: Icon for a custom profile field

Post by ashras99 »

Please tell me is this possible or anyone created the mod for this?

User avatar
jmaraujo
Registered User
Posts: 240
Joined: Fri Jun 01, 2007 9:48 pm
Location: Rivera - Uruguay
Name: Juan

Re: Icon for a custom profile field

Post by jmaraujo »

Maybe I can help you. I did a similar thing to have country flags on viewtopic. Does you Twitter custom profile have the full URL (starting with http://...)?

Try to add this on your profile info block on viewtopic_body.html:

Code: Select all

<a href="{postrow.PROFILE_CPNAME_VALUE}"><img src="(URL to Twitter image)" alt="{postrow.POST_AUTHOR}'s Twitter account" /></a> 
You have to change "CPNAME" with your custom profile name. For example, if you cpf is TWITTER, then change it to {postrow.PROFILE_TWITTER_VALUE}. And also you have to replace "(URL to Twitter image)" with the URL to your Twitter icon/image.

I hope that this works for you. ;)

User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: Icon for a custom profile field

Post by ashras99 »

Thanks for Helping but this will not work like this...

Because like this... twitter account is added or not... but icon will be shown.. secondly when we enable the custom field then url will also show + this icon (which you suggested)+ no control from ACP.

But in reality url must be replace with image and full control from ACP.

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: Icon for a custom profile field

Post by marian0810 »

ashras99 wrote:then url will also show
And then that url actually works? Because in my experience custom profile fields only work when using internal links. I'm guessing you'd need some kind of mod that parses bbcodes in cpf's first.
You and me, time and space. You watch us run!

User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: Icon for a custom profile field

Post by ashras99 »

yes, that url works, without any problem.

But that's a fact too, we need mod.

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: Icon for a custom profile field

Post by marian0810 »

What mod did you use for that?

Could you try if this works for the image in viewtopic_body.html?

subsilver2

Code: Select all

					<!-- BEGIN custom_fields -->	
						<!-- IF postrow.custom_fields.PROFILE_FIELD_ID eq "twitter" --><br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> <a href="{postrow.custom_fields.PROFILE_FIELD_VALUE}"><img src="images/yourfolder/{postrow.custom_fields.PROFILE_FIELD_VALUE}.gif" alt="{postrow.custom_fields.PROFILE_FIELD_VALUE}" title="{postrow.custom_fields.PROFILE_FIELD_VALUE}" /></a><!-- ENDIF -->
					<!-- END custom_fields -->
prosilver

Code: Select all

      <!-- BEGIN custom_fields -->
         <!-- IF postrow.custom_fields.PROFILE_FIELD_ID eq "twitter" --><dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> <a href="{postrow.custom_fields.PROFILE_FIELD_VALUE}"><img src="images/yourfolder/{postrow.custom_fields.PROFILE_FIELD_VALUE}.gif" alt="{postrow.custom_fields.PROFILE_FIELD_VALUE}" title="{postrow.custom_fields.PROFILE_FIELD_VALUE}" /></a></dd><!-- ENDIF -->    
      <!-- END custom_fields -->
You and me, time and space. You watch us run!

User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: Icon for a custom profile field

Post by ashras99 »

I am not using any mod, i am using internal custom field feature.

except images link which other values need to change ?

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: Icon for a custom profile field

Post by marian0810 »

You mean like .jpg or .png? Yes, just change that in the code.
You and me, time and space. You watch us run!

User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: Icon for a custom profile field

Post by stickerboy »

I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red

User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: Icon for a custom profile field

Post by ashras99 »

That's interesting, hope this works well. I will surely try.

User avatar
ashras99
Registered User
Posts: 441
Joined: Mon Dec 19, 2005 9:09 pm

Re: Icon for a custom profile field

Post by ashras99 »

There is any mod released for this task?

Locked

Return to “[3.0.x] MOD Requests”