Former Member
inherit
guest@proboards.com
221930
0
Mar 28, 2024 11:03:43 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 1, 2016 19:44:50 GMT -8
I was wondering if there was some way we could use js or something else to add in a button on the mini profiles that when clicked, would add the person's @username tag into the quick reply box.
I think this would be a quicker way to tag people instead of hovering over names to see what their username is and typing it in manually.
Example just in case I'm not explaining myself clearly:
My username is seriously. If someone figuratively clicks said button located on the bottom of my mini-profile, @@seriously will populate in the quick reply box and they can type out their reply. Tagging done!
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Apr 1, 2016 23:50:25 GMT -8
@seriously,
If you just hold the ctrl button on your keyboard and click on the name in the mini-profile, it puts the username tag in the quick reply. You want it one..well really a half a step less?
|
|
Former Member
inherit
guest@proboards.com
221930
0
Mar 28, 2024 11:03:43 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 2, 2016 12:09:14 GMT -8
Hey Tumbleweed, The name in the mini-profiles links to their respective profile pages, so naturally when I hold down ctrl and click them, it opens up their profiles on another tab. I'm assuming you meant alt?
|
|
Kami
Forum Cat
Posts: 40,002
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,002
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Apr 2, 2016 12:25:30 GMT -8
Hey Tumbleweed, The name in the mini-profiles links to their respective profile pages, so naturally when I hold down ctrl and click them, it opens up their profiles on another tab. I'm assuming you meant alt? Yes. :X
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Apr 2, 2016 13:05:11 GMT -8
Yes to both of you, (@seriously Kami) I meant ALT. Not sure what is was thinking since I use ALT constantly. I'll have to think about that and whether it would be a easy thing to do or not and maybe play around with some ideas I have churning in my head but meanwhile, if anyone else has a quick way to do this, jump on in.
|
|
Former Member
inherit
guest@proboards.com
221930
0
Mar 28, 2024 11:03:43 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 4, 2016 14:09:21 GMT -8
Bumping.
|
|
Kami
Forum Cat
Posts: 40,002
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,002
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Apr 5, 2016 7:52:54 GMT -8
I've fiddled around with this and I'm not entirely sure there is a way to add it in via templates. Creating a button itself is not the issue, it's getting the on-click function to give you the person's username, rather than the display name, as the only variable I can see available on the mini-profile page is $[user]. Obviously for @ tagging purposes you don't want to @ tag the display name. I'm going to tag Lynx to see if they have any ideas on how this might be accomplished via templates, but it may be something you'd have to request as a plugin.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,768
January 2015
msg
|
Post by Lynx on Apr 5, 2016 11:36:17 GMT -8
Creating a button should be easy and even having the onclick give the user's @username from the mini-profile it was clicked on. The part I don't know how to do is how to have it place that at the cursor's location in the quick reply. If I knew how to do that, I could probably come up with something. Sorry I couldn't be more helpful on this one.
|
|
inherit
187476
0
May 18, 2020 16:00:31 GMT -8
Star's Legacy
1,019
December 2012
starshinelegacy
|
Post by Star's Legacy on Apr 6, 2016 9:14:23 GMT -8
|
|
Former Member
inherit
guest@proboards.com
221930
0
Mar 28, 2024 11:03:43 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 9, 2016 22:15:26 GMT -8
Is there not a way to make a script that when the tag button is clicked on, it mimics someone holding down alt? Star's Legacy; I'm aware, but that doesn't solve my original request of wanting a button in the mini profiles.
|
|
inherit
speedbbb@aol.com
199078
0
Aug 23, 2023 6:57:13 GMT -8
branjita
113
August 2013
branjita
|
Post by branjita on Jul 7, 2016 6:21:33 GMT -8
I would very, very, very much like a button created for this. I'd like to somehow add it next to the Quote button ideally. On my forum, since there are so many users whose display names do not match their usernames, they end up endlessly quoting posts, just to not have to figure out how to tag the user they want to tag.
|
|
inherit
speedbbb@aol.com
199078
0
Aug 23, 2023 6:57:13 GMT -8
branjita
113
August 2013
branjita
|
Post by branjita on Jul 7, 2016 6:50:14 GMT -8
Not sure what to do with this, but this code is in the js file that is loaded, and is what makes the Quote button work. I would think something could be adapted from this:
bind_quote_buttons: function() {
var e = this;
$(".quote-button").each(function() {
if (!$(this).hasClass("guest-prompt")) {
var t = $(this).closest(".post").attr("id").match(/\d+/)[0],
i = "";
"undefined" != typeof proboards.data("thread_id") ? i = proboards.data("thread_id") : proboards.item("post", t).thread_id;
var a = proboards.data("page_url") || "";
$(this).bind("click", function(n) {
var o = $(this).attr("href") + a,
s = e.summary_setup(o);
if (0 != e.selected_posts.length) {
for (var r = "", l = 0; l < e.selected_posts.length; l++) e.selected_posts[l] != t && (r += e.selected_posts[l], r += ",");
r += t, s.setAttribute("action", proboards.route("quote_posts", {
post_ids: r,
thread_id: i
}))
}
return $(s).targetBlank(n), s.submit(), !1
})
}
})
}, Or maybe this is what needs to be adapted:
$(".quote-button").each(function() {
var t = $(this).closest(".message").attr("id").substr(13);
$(this).unbind("click"), $(this).bind("click", function() {
if (0 != e.length) {
var i = "";
for (var a in e) e[a] != t && (i += e[a], i += ",");
return i += t, window.location = proboards.route("quote_messages", {
message_ids: i,
conversation_id: proboards.data("page").conversation.id
}), !1
}
return !0
}) Or this:
$(".quote-button").off("click").on("click", function() {
if (0 != e.length) {
var t = parseInt($(this).closest(".post").attr("id").substr("post-".length));
return -1 == $.inArray(t, e) && e.push(t), window.location = proboards.route("quote_posts", {
post_ids: e.join(","),
thread_id: proboards.data("page").thread.id
}), !1
}
And then on Layout Templates > Thread > Post List, you could hopefully edit the code there to be this:
<div class="controls">
$[post.tag_button]
$[post.quote_button]
$[post.edit_button]
$[post.likes.button]
$[post.select_options]
</div>
|
|
inherit
speedbbb@aol.com
199078
0
Aug 23, 2023 6:57:13 GMT -8
branjita
113
August 2013
branjita
|
Post by branjita on Jul 7, 2016 8:24:42 GMT -8
Just for kicks, I tried my hand at starting this code by just renaming the quote stuff and it didn't work. It might help someone else do it though. I did this directly in the <div class="controls"> div in Layout Templates > Thread > Post List.
I thought it would give me a button that does exactly what Quote does, and then I could start taking code out, but it didn't do that. Looking at the HTML, all that's missing is something to create
<a role="button" href="#" class="button tag-button guest-prompt">Tag</a>
Anyway, here's the code I used, but it isn't creating the button so I can move forward. I also tried putting the scripts in the forum wrapper before the closing head tag, and that didn't solve the problem either. Anybody want to see if they can complete what I started? This isn't a language I'm fluent in.
<div class="controls"> <script>
$(document).ready(function() {
bind_tag_buttons: function() {
var e = this;
$(".tag-button").each(function() {
var t = $(this).closest(".message").attr("id"),
i = t ? t.match(/\d+/)[0] : null;
$(this).unbind("click"), $(this).bind("click", function() {
var t = $(this).attr("href"),
a = e.summary_setup(t);
if (0 != proboards.messageManager.selected_messages.length) {
var n = "";
for (var o in proboards.messageManager.selected_messages) proboards.messageManager.selected_messages[o] != i && (n += proboards.messageManager.selected_messages[o], n += ",");
n += i, a.setAttribute("action", proboards.route("quote_messages", {
message_ids: n,
conversation_id: proboards.data("conversation_id")
}))
}
return a.submit(), !1
})
})
}
});
</script>
<script>
$(document).ready(function() {
bind_tag_buttons: function() {
var e = this;
$(".tag-button").each(function() {
if (!$(this).hasClass("guest-prompt")) {
var t = $(this).closest(".post").attr("id").match(/\d+/)[0],
i = "";
"undefined" != typeof proboards.data("thread_id") ? i = proboards.data("thread_id") : proboards.item("post", t).thread_id;
var a = proboards.data("page_url") || "";
$(this).bind("click", function(n) {
var o = $(this).attr("href") + a,
s = e.summary_setup(o);
if (0 != e.selected_posts.length) {
for (var r = "", l = 0; l < e.selected_posts.length; l++) e.selected_posts[l] != t && (r += e.selected_posts[l], r += ",");
r += t, s.setAttribute("action", proboards.route("quote_posts", {
post_ids: r,
thread_id: i
}))
}
return $(s).targetBlank(n), s.submit(), !1
})
}
})
}
});
</script>
<script>
$(document).ready(function() {
$(".tag-button").each(function() {
var t = $(this).closest(".message").attr("id").substr(13);
$(this).unbind("click"), $(this).bind("click", function() {
if (0 != e.length) {
var i = "";
for (var a in e) e[a] != t && (i += e[a], i += ",");
return i += t, window.location = proboards.route("quote_messages", {
message_ids: i,
conversation_id: proboards.data("page").conversation.id
}), !1
}
return !0
})
});
</script>
<script>
$(document).ready(function() {
$(".tag-button").off("click").on("click", function() {
if (0 != e.length) {
var t = parseInt($(this).closest(".post").attr("id").substr("post-".length));
return -1 == $.inArray(t, e) && e.push(t), window.location = proboards.route("quote_posts", {
post_ids: e.join(","),
thread_id: proboards.data("page").thread.id
}), !1
}
return !0
})
})
});
</script>
$[post.tag_button]
$[post.quote_button]
$[post.edit_button]
$[post.likes.button]
$[post.select_options]
</div>
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,768
January 2015
msg
|
Post by Lynx on Jul 7, 2016 12:07:29 GMT -8
|
|