+ 28

Easy way?

I am trying to find a way to improve this code... Then Anthony Quick suggest this: “I suggest you add a link to each mod's profile so people viewing the code can click to go to their profiles? Might be a nice extra touch 😊” Yes I think that’s a great idea! But I just find out that there are so many moderators! Is there a simple way than using the <a> tag for every name of every mods? https://code.sololearn.com/Wu9U9WbTWQMY/?ref=app

9th Jul 2019, 2:38 AM
JTLZ
14 Réponses
+ 13
David Carroll Yes I got all the ID’s I like your idea! Do you mind to share an exemple? I haven’t really work with JS for a long time😅
9th Jul 2019, 1:05 PM
JTLZ
+ 12
JTLZ 🇨🇦 [#NeverGiveUp!] Do you already have the profile IDs? If so, you could dynamically build the HTML links via Javascript. Let me know if you need a working example to see how this can be done.
9th Jul 2019, 3:32 AM
David Carroll
David Carroll - avatar
+ 12
Sonic Yes I will update them... Thanks!
9th Jul 2019, 1:02 PM
JTLZ
+ 12
JTLZ 🇨🇦 [#NeverGiveUp!] Sure... I've been traveling with my kids for college tours. I'll see if I can find a 15 minute break to update your code. Faisal Thanks for sharing an example. I think you'll dig the approach I had in mind. 😉
9th Jul 2019, 3:46 PM
David Carroll
David Carroll - avatar
+ 11
That is an amazing idea! Sorry I don't have any easier way🙁 I really like how hard you working on that project and how much effect you putting on that project 😉 Keep it up 💪😬 I will try my best to help you😉
9th Jul 2019, 3:01 AM
KingDaniel2004
KingDaniel2004 - avatar
+ 11
Adding on to David Carroll 's idea, this was an implementation I quickly whipped up to show how that would work. I'm sure it could be done with Jquery, but I personally like to use vanilla JS when it comes to this stuff haha https://code.sololearn.com/WuRrAA9roeeZ/?ref=app
9th Jul 2019, 5:56 AM
Faisal
Faisal - avatar
+ 11
Faisal Thanks for the exemple! ☺️
9th Jul 2019, 4:12 PM
JTLZ
+ 9
Ok thanks! David Carroll Edit: Do you need me to give you some profile ID’s?
9th Jul 2019, 4:06 PM
JTLZ
+ 7
I was going to recommend but I wouldn't have been able to explain it or mock it up. Thankfully David is here :)
9th Jul 2019, 3:38 AM
Chris Coder
Chris Coder - avatar
+ 7
Just saying that the info about badges maybe a bit outdated as it still lists the Networker badge for example.
9th Jul 2019, 6:24 AM
Sonic
Sonic - avatar
+ 7
JTLZ 🇨🇦 [#NeverGiveUp!] It was a long day of traveling. I'm about to sleep since it's 1am here. I'll try to do show you how to do this tomorrow. Please ping me if you don't see a response within 24 hours from now.
10th Jul 2019, 5:09 AM
David Carroll
David Carroll - avatar
+ 6
There is probably a better way, but I know a way to save some time. You can use this editor to input links and names. Then it will write all the HTML out for you. https://html5-editor.net/
9th Jul 2019, 3:10 AM
Chris Coder
Chris Coder - avatar
+ 3
1. Method other than <a> url.open() with string as value of an object where pairing key identify the particular moderator. 2. Quickest method copy Donthack's code directly https://code.sololearn.com/WUlgg7rjm8r3/?ref=app
10th Jul 2019, 12:29 PM
Gordon
Gordon - avatar
0
Thanks.💙
10th Jul 2019, 1:37 AM
Phan Hoan
Phan Hoan - avatar