The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Mentions for usernames

3 posters

Go down

Solved Mentions for usernames

Post by TheCrow April 10th 2014, 11:19 am

Hello. I want to add mentions for the usernames in my forum. Someone gave me this code to add to javascript but doesn't seem to work! Can someone help me?

Code:
$(function () {
    var a = $('.name').get();
    for (i = 0; i < a.length; i++) {
        $(a[i].getElementsByTagName('a')[1]).dblclick(function (e) {
            e.preventDefault();
            document.getElementById('text_editor_textarea').value += '@[url=http://' + window.location.host + '/profile?mode=viewprofile&u=' + $(this).text() + ']' + $(this).text() + '[/url]';
        });
    }
});


Last edited by Marios94 on April 11th 2014, 10:02 am; edited 1 time in total
TheCrow
TheCrow
Manager
Manager

Male Posts : 6898
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Mentions for usernames

Post by Van-Helsing April 10th 2014, 7:05 pm

Hi Marios,
Please check this post https://help.forumotion.com/t116032p30-mention-mentioning-a-member-or-user if it is working.

Best Regards,
Dark-Avenger
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Mentions for usernames

Post by TheCrow April 10th 2014, 8:44 pm

I checked it. It's from there that they gave me the code. If someone who knows doesn't help there is no way that this will work. Unfortunately it doesn't work with any code its given in there.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6898
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Mentions for usernames

Post by Van-Helsing April 10th 2014, 9:41 pm

Hi Marios,
Have you check Dom's Tutorial about advanced tagging system at http://fm.domdevelops.com/scripts/advanced-tagging-system.html ? Try this, it maybe works.

With Best Regards,
Dark-Avenger
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Mentions for usernames

Post by TheCrow April 11th 2014, 12:52 am

Τhis is amazing thank you!

Solved
TheCrow
TheCrow
Manager
Manager

Male Posts : 6898
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Mentions for usernames

Post by Jophy April 11th 2014, 1:55 pm

Solved
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

Back to top


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