Page 1 of 1

Icon for a custom profile field

Posted: Mon Jan 18, 2010 10:00 pm
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.

Re: Icon for a custom profile field

Posted: Thu Jan 21, 2010 10:52 pm
by ashras99
Anyone can help me in this matter, how to add an icon for defined custom field?

Re: Icon for a custom profile field

Posted: Mon Jan 25, 2010 12:46 am
by ashras99
Please tell me is this possible or anyone created the mod for this?

Re: Icon for a custom profile field

Posted: Fri Jan 29, 2010 1:49 am
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. ;)

Re: Icon for a custom profile field

Posted: Sat Jan 30, 2010 6:24 am
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.

Re: Icon for a custom profile field

Posted: Sat Jan 30, 2010 1:36 pm
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.

Re: Icon for a custom profile field

Posted: Sat Jan 30, 2010 3:58 pm
by ashras99
yes, that url works, without any problem.

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

Re: Icon for a custom profile field

Posted: Sat Jan 30, 2010 4:34 pm
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 -->

Re: Icon for a custom profile field

Posted: Sat Jan 30, 2010 4:53 pm
by ashras99
I am not using any mod, i am using internal custom field feature.

except images link which other values need to change ?

Re: Icon for a custom profile field

Posted: Sat Jan 30, 2010 5:25 pm
by marian0810
You mean like .jpg or .png? Yes, just change that in the code.

Re: Icon for a custom profile field

Posted: Tue Feb 02, 2010 2:29 am
by stickerboy

Re: Icon for a custom profile field

Posted: Tue Feb 02, 2010 6:05 am
by ashras99
That's interesting, hope this works well. I will surely try.

Re: Icon for a custom profile field

Posted: Tue Apr 06, 2010 3:44 pm
by ashras99
There is any mod released for this task?