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

View previous topic View next topic 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

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.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5352
Reputation : 489
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

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

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 :>

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.


SLGray
Administrator
Administrator

Male Posts : 36657
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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