Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Custom Profile Field help

Aloittaja ryan_dwight, toukokuu 23, 2013, 06:14:32 IP

« edellinen - seuraava »

ryan_dwight

Lainaa<a href="http://website.com/{INPUT}"><img src="{DEFAULT_IMAGES_URL}/icon.gif" alt="{INPUT}" /></a>

on adding custom field there is a box "Show Enclosed Within Text"

i want to have an icon instead of the word to appear on this.

i choose a select box as field type:

example: if i choose team A an icon corresponding this team will appear on the profile
same as if i choose team B and so on.

Thanks in advance and i hope this is the right board

Arantor

Make use of {INPUT} in the URL for the image, e.g. {DEFAULT_IMAGES_URL}/team{INPUT}.png though that only really works best if there aren't any special characters in the team name...
Holder of controversial views, all of which my own.


ryan_dwight

Lainaus käyttäjältä: Arantor - toukokuu 23, 2013, 06:16:03 IP
Make use of {INPUT} in the URL for the image, e.g. {DEFAULT_IMAGES_URL}/team{INPUT}.png though that only really works best if there aren't any special characters in the team name...
thanks for the reply, can you give a sample code so that i will just replace only the team name and the image url. im have no knowledge on stuff like this, thanks again

Arantor

Holder of controversial views, all of which my own.


ryan_dwight


Arantor

So name the images teamAlpha.png, teamBravo.png etc, put them into Themes/default/images/ and use something like:
<a href="http://website.com/{INPUT}"><img src="{DEFAULT_IMAGES_URL}/team{INPUT}.gif" alt="{INPUT}" /></a>

The team's name will then be substituted into the URL for the image.
Holder of controversial views, all of which my own.


ryan_dwight

now i manage to do it, i encountered problems because the filename is not the same as the input words. now its working thank you so much arantor. such a great help

ryan_dwight

I will reopen this thread because i encounter a problem

im using blacknblack theme

i made 2 custom profile field with the option using icon, here i dont have a problem the 2 icons appeared in my profile and in the forum on the left side when you reply or post on a thread.

but when i created another custom field it appeared on my profile but i can't see on the forum.

should i edit something in order to appear in the forum?

emanuele

There is an option when you create the profile field to "Show on Topic View". ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

ryan_dwight

Lainaus käyttäjältä: emanuele - heinäkuu 20, 2013, 10:52:18 AP
There is an option when you create the profile field to "Show on Topic View". ;)
my bad i forgot that one i apologize for that.

emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: