inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Nov 24, 2012 6:41:35 GMT -8
Hello, I have another question, the plugin I am currently working on my require the user to add a link to the users profile so they would have to do something like this: <li><a href="FORUMURL.freemessageboards.com/user/USERID">Profile</a></i> Except I have no idea how to capture the users url, I know back in v4 I could just link it to index.cgi?action=viewprofile so I was hoping /user/ would just direct them to their profile but apparently not . Or I could just view the source and get the variable pb_username. But can't find that either . Help?
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Nov 24, 2012 6:54:13 GMT -8
I think the variable you're looking for is either $[current_user.name] for display name, $[current_user.username] for their username, or $[current_user.id] for their user number (yours being support.proboards.com/user/180580 for example). =] edit; re-read, fairly certain you're looking for the last one. =P
|
|
inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Nov 24, 2012 7:00:00 GMT -8
Tried that, the user would then have to enter <li><a href="http://forum.freemessageboards.com/user/$[current_user.id]>Profile</a></li> which does not work
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 24, 2012 9:57:44 GMT -8
You will need to use...
proboards.data("user").id
|
|
inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Nov 24, 2012 10:22:32 GMT -8
You will need to use... proboards.data("user").id Thank you! So would I need to put that in my javascript? or in the <a href> ?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 24, 2012 10:44:39 GMT -8
That will need to be put in the JavaScript. Or if you want, you could do... <script>document.write(proboards.data("user").id);</script> ...where you want the ID to be. Depends on the plugin, and how much of it is being built with JavaScript.
|
|
inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Nov 24, 2012 10:54:04 GMT -8
Alright so then it would be like this? <li><a href="FORUMURL.freemessageboards.com/user/<script>document.write(proboards.data("user").id);</script>">Profile</a></li> Or could I just do <script>document.write(<li><a href="/user/proboards.data("user").id);">Profile</a></li></script> Also, I apologize for all the questions it's been about 3 years since I actually touched any of this, all greek to me now ;p ------------------------------ Actually I have a different idea, Can I do something like this: <script> var id= proboards.data("user").id); </script> put that in the plugins Javascript then the user would enter: <script>document.write('<li><a href="/user/'+id+'>Profile</a></li>'); </script> Would that work as well? I would try it but not at home and figured you would reply before I got home
|
|
inherit
58740
0
Aug 20, 2024 7:29:21 GMT -8
®i©hie
I'm not very active here anymore thanks to my full-time job. - 12/27/23
14,036
September 2005
soe
|
Post by ®i©hie on Nov 24, 2012 12:59:51 GMT -8
Alright so then it would be like this? <li><a href="FORUMURL.freemessageboards.com/user/<script>document.write(proboards.data("user").id);</script>">Profile</a></li> Or could I just do <script>document.write(<li><a href="/user/proboards.data("user").id);">Profile</a></li></script> Also, I apologize for all the questions it's been about 3 years since I actually touched any of this, all greek to me now ;p ------------------------------ Actually I have a different idea, Can I do something like this: <script> var id= proboards.data("user").id); </script> put that in the plugins Javascript then the user would enter: <script>document.write('<li><a href="/user/'+id+'>Profile</a></li>');</script> Would that work as well? I would try it but not at home and figured you would reply before I got home first of all, you don't need <script> tags in the plugins javascript, as it just adds it into a .js file use: var id=proboards.data("user").id; and yes the 2nd part will work just fine.
|
|
inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Nov 24, 2012 13:06:36 GMT -8
Ah right, I always forget about that , thanks I will try it in a little bit. ®i©hie , it displayed the ID and I was able to click it and it took me to my profile so it worked, however it made my entire page white and that was the only thing displaying. Have another method?
|
|
inherit
58740
0
Aug 20, 2024 7:29:21 GMT -8
®i©hie
I'm not very active here anymore thanks to my full-time job. - 12/27/23
14,036
September 2005
soe
|
Post by ®i©hie on Nov 24, 2012 13:23:48 GMT -8
Ah right, I always forget about that , thanks I will try it in a little bit. ®i©hie , it displayed the ID and I was able to click it and it took me to my profile so it worked, however it made my entire page white and that was the only thing displaying. Have another method? URL?
|
|
#e61919
2
0
1
Oct 2, 2024 14:45:32 GMT -8
Martyn Dale
$[user.personal_text]
20,088
February 2003
martyn
|
Post by Martyn Dale on Nov 24, 2012 13:26:55 GMT -8
I feel like having /user automatically going to the users profile would not be a problem. Ill have a chat with a couple of the devs tomorrow.
|
|
inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Nov 24, 2012 13:27:44 GMT -8
Ah right, I always forget about that , thanks I will try it in a little bit. ®i©hie , it displayed the ID and I was able to click it and it took me to my profile so it worked, however it made my entire page white and that was the only thing displaying. Have another method? URL? To the forum? justin2.freemessageboards.com/
|
|
inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Nov 24, 2012 13:29:43 GMT -8
I feel like having /user automatically going to the users profile would not be a problem. Ill have a chat with a couple of the devs tomorrow. Thank you. That would make life 200x easier
|
|
inherit
58740
0
Aug 20, 2024 7:29:21 GMT -8
®i©hie
I'm not very active here anymore thanks to my full-time job. - 12/27/23
14,036
September 2005
soe
|
Post by ®i©hie on Nov 24, 2012 13:31:07 GMT -8
for your plugin, under the "components" tab, what components are you using, and what do you have entered in each?
|
|
inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Nov 24, 2012 13:35:56 GMT -8
for your plugin, under the "components" tab, what components are you using, and what do you have entered in each? Permission to PM this info?
|
|