February 17, 2022, 11:55pm
Add link to profile on User Map
A Nav Pill next to Users Map which takes the user to their profile (/my/preferences/profile).
A user looks at the map (which is promoted heavily to them).
While looking at the map, they decided that they would like to put themselves on it.
To do so, they must visit their profile - which is quite buried in Discourse.
Having ready access to the link ‘just in time’ will likely markedly increase the number of users who add their address.
Hmmm. Not convinced by this.
This is not a Locations scope item.
I agree it’s buried but this is not something that should be considered in this plugin imho.
Looks like a separate job to me.
February 18, 2022, 7:11pm
Fair point, it probably wouldn’t be helpful for all.
In our situation, we have a lot of not-very-discourse savvy folk who we are introducing the concept to. For them it could be very helpful.
In order to fork it, I can see that this is the file that sets those buttons:
Can you suggest what to put in there in order to get the button I’m after called “Profile” going to
@merefield - any chance you can suggest something to try? I haven’t messed with plugins before and they are a few metres deeper than I’ve been before. And harder to test when you mess with them, with greater consequences!!!
I was thinking this might work:
I’m very keen to have this in the context of the User list / map. My workaround will of course just have a prominent Profile button in the header, but that will clutter things up quite a bit.
Hi Nathan, I think you may need to provide the
link-to helper with a user object so it knows which profile …
The next challenge you may have is that the user object doesn’t exist in that route’s model …
Darn it! That looks horribly complicated and way beyond my simple hacking.
The thing is that a simple url would do the trick if I just knew how to get it in there!!!
Oh that’s interesting. That link actually works. I was expecting it to require a genuine user id but apparently not!!
Yeah, it is clever trick that Discourse has had for ages but takes a while to stumble across!
Any idea how I’d drop that in the code to make it work?
Sorry no time to look at this atm, Nathan, apologies
Definitely try to reverse engineer it using existing plugin and Theme Component eco-system for existing examples.
Well, success! Once it tweaked that I could just insert any old html in there I was away. But it turned out that I was looking at the wrong file. The one above refers to the /u page, and I had to hack this one here instead.
Here is my forked version:
And the result:
Awesome, well done Nathan!
We are accepting applications for Pavilion btw