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.

Deactivate link in contact fields

Go down

Solved Deactivate link in contact fields

Post by Hert on September 5th 2015, 3:23 pm

Hello,

I've posted a question before that was solved: http://help.forumotion.com/t141861-is-it-possible-for-the-user-to-put-an-image-in-the-contact-field
However, there have been some complains about something regards this option: if one clicks on the image that is put in it will link them to a page where only the image is shown (the URL of the image I guess).
I was wondering if this could be somehow disabled or if it's even possible to let it link to the user in question profile's?

Greetings,
Hert


(I will tagg @Ange Tuteur, since you helped me in the previous topic so maybe you already know the answer ^^)


Last edited by Hert on September 5th 2015, 6:46 pm; edited 1 time in total
avatar
Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Deactivate link in contact fields

Post by brandon_g on September 5th 2015, 3:39 pm

Hello,

I do not think there is a way to do this via the default options in the ACP.

Have you removed the image itself from that profile field yet?

-Brandon


Remember to mark your topic when a solution is found.
avatar
brandon_g
Support Moderator
Support Moderator

Male Posts : 6636
Reputation : 600
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

Solved Re: Deactivate link in contact fields

Post by Ange Tuteur on September 5th 2015, 3:43 pm

Hi @Hert,

Replace your script with this :
Code:
$(function() {
  for (var a = document.getElementsByTagName('A'), i = 0, j = a.length, c; i < j; i++) {
    c = a[i].firstChild;
    if (c && c.tagName == 'IMG' && a[i].href == c.alt) {
      c.src = c.alt;
      c.className += ' contactImage';
     
      a[i].href = '';
      a[i].onclick = function(e) { e.preventDefault() };
    }
  }
});

It'll remove the link URL, and should prevent any clicking events that normally occur. Smile
avatar
Ange Tuteur
Forumaster

Male Posts : 13193
Reputation : 2904
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Deactivate link in contact fields

Post by Hert on September 5th 2015, 6:46 pm

Yes it worked, thank you very much!

This is solved now :>
avatar
Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Deactivate link in contact fields

Post by SLGray on September 5th 2015, 7:42 pm

Topic solved and archived


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

avatar
SLGray
Administrator
Administrator

Male Posts : 42686
Reputation : 3003
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Back to top


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