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.

User ID in HTML tags

View previous topic View next topic Go down

In progress User ID in HTML tags

Post by AnaMi on January 2nd 2012, 3:31 pm

Hi! Hello
I'd like to know if you can help me with this question: just as we've got variables in PHP (smart language) such as USERNAME, USERAGE and USERBIRTHDAY, I wonder if there's also any variable for the User ID (U1, U2, U3, etc.).

If there isn't, I wonder if there's a possibility to create a link in a widget so that the forum member can visit, for example, their very own Visitor messages wall.

Wink Thank you for your help!


Last edited by AnaMi on January 2nd 2012, 3:53 pm; edited 2 times in total

AnaMi
Forumember

Female Posts : 40
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

In progress Re: User ID in HTML tags

Post by Guest on January 2nd 2012, 3:39 pm

I'm afraid it's not possible. Sad

Guest
Guest


Back to top Go down

In progress Re: User ID in HTML tags

Post by AnaMi on January 2nd 2012, 3:52 pm

Aww! Sad I see. So it's impossible to create a link for the user's visitor messages, isn't it? Confused

Thank you anyway, Gassy! Hello
Have a fantastic day!

AnaMi
Forumember

Female Posts : 40
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

In progress Re: User ID in HTML tags

Post by LGforum on January 2nd 2012, 4:14 pm


LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

In progress Re: User ID in HTML tags

Post by AnaMi on January 2nd 2012, 5:07 pm

Thank you, LGForum! ( Embarassed Sorry, I don't know your actual name Razz ) You're very kind! flower

I added this script last week, as there was an alternative shared by Dion for creating this little notification letting the user know when another forum member had written on their visitor message wall. The code you've posted generates an upper link for the user to go to his profile, doesn't it? And it stores the user tag for any other script use. (For example, the welcome message with the ID number on the homepage)

Yet, I don't know how to incorporate that tag/script function into a link. I also tried the Visitor Messages Notification suggested by Dion, but it didn't work for me. Razz
Yeah, I'm an unlucky one. lol!

Is there a possibility to use the tag generated by the User ID Info in a link?

AnaMi
Forumember

Female Posts : 40
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.com

Back to top Go down

In progress Re: User ID in HTML tags

Post by LGforum on January 2nd 2012, 7:57 pm

Once you have added a JS file with the script provided in the link I posted in my last post. And then put the correct stuff in site description as shown in the tutorial then the USER ID will be available for other Javascript. That is all the tutorial does.

The VM notification tutorial, uses that USER ID, so this USER ID tutorial must be installed.
The VM notification won't work without the first tutorial.

Anyway. What I would recommend would be putting this in a Javascript File:
Code:

$(function() {
  $('.uid').html(uid);
  $('.proLink').html('<a href="/u'+uid+'">Profile</a>');
});

Which will put the user ID number inside any element with the className of 'uid' and the users Profile link inside any element with the className of 'proLink'. It is enclosed within a jQuery function so it runs only when the DOM is fully loaded.

So now, if you want to put the USER ID on the page anywhere you can put:
Code:

<span class="uid"></span>

and if you want to put the user profile link anywhere you can put this:
Code:

<span class="proLink"></span>

I hope that makes a little more sense to ya Wink

PS, check again who wrote the VM notifications script...

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

In progress Re: User ID in HTML tags

Post by AnaMi on January 2nd 2012, 9:19 pm

@LGforum wrote:PS, check again who wrote the VM notifications script...
:wouhou: It was you!!!
Razz Sorry for the mistake.

I haven't deleted either the script for all pages nor the script in the forum description. Anyway, I set up the script for the VM Notification right after the other scripts, but I'm now sure what went wrong if all the needed scripts were there. Very Happy

Your explanation's clear enough to me! Wink Thank you very much!
I guess it's good enough to inform users about their ID for any other purpose and future scripts to insert.

If I wanted to insert a link in a user control panel like the one presented in this tutorial, is it possible somehow to use that USER ID info for a direct link to the VM wall?

Very good Thank you, LGForum!! bye
flower

AnaMi
Forumember

Female Posts : 40
Reputation : 2
Language : Spanish, English and Rubbish
Location : [404 - Not Found]

http://english4fun.freeforo.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