Visions
New Member
sonuk pls
Posts: 70
inherit
208514
0
Jun 25, 2014 11:10:30 GMT -8
Visions
sonuk pls
70
April 2014
visionslol
|
Post by Visions on May 16, 2014 9:20:26 GMT -8
Does anyone know how I can change the "-user- likes this" when there's a post that someone has liked?
I'd like to rephrase it to "-user- thinks this post is okay", but I'm assuming I'll need a script to do that?
|
|
inherit
204286
0
Jan 17, 2015 16:12:31 GMT -8
Mr. Undecided
Resident Airsofter
272
January 2014
blacknightbravo
|
Post by Mr. Undecided on May 16, 2014 10:31:13 GMT -8
Does anyone know how I can change the "-user- likes this" when there's a post that someone has liked? I'd like to rephrase it to "-user- thinks this post is okay", but I'm assuming I'll need a script to do that? There is an "easy text switcher" plugin. Search for it in the library, I'm on mobile so I'm not gonna link it unless you can't find it. I use it for other things, I'm not sure if the like button is one of the options but you could ask in the support thread.
|
|
Visions
New Member
sonuk pls
Posts: 70
inherit
208514
0
Jun 25, 2014 11:10:30 GMT -8
Visions
sonuk pls
70
April 2014
visionslol
|
Post by Visions on May 16, 2014 12:30:39 GMT -8
Does anyone know how I can change the "-user- likes this" when there's a post that someone has liked? I'd like to rephrase it to "-user- thinks this post is okay", but I'm assuming I'll need a script to do that? There is an "easy text switcher" plugin. Search for it in the library, I'm on mobile so I'm not gonna link it unless you can't find it. I use it for other things, I'm not sure if the like button is one of the options but you could ask in the support thread. Hey, thanks, but that plugin doesn't support an option for what I want to do. I also don't want to use a plugin for such a small change. Was hoping it could be done a little less intrusively.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on May 22, 2014 23:26:39 GMT -8
<script type="text/javascript"> $(function () { var options = { "likes this" : "cherishes this", "like this" : "cherish this" }, likeItOrNot = function () { var a, b = $(this); for (a in options) { if (b.text().indexOf(a) != -1) { b.contents().each(function (i, e) { if (e.nodeType == 3) { e.data = e.data.replace(a, options[a]) } }) } } } $('.info span.likes').each(likeItOrNot) $(document).ajaxSuccess(function (a, b, c, d, e) { if (c && c.url == "/post/like") { if (d && d.likes_html) { if ("string" == typeof c.data && /post_id=(\d+)/.test(c.data) && (e = $('#post-' + RegExp.$1)).length) { likeItOrNot.call($('.info span.likes', e)[0]) } } } }) }) </script> Change the text to what you want it to say (right now it says "cherish this") then drop it at the bottom of your post list template or in your global footer if you want to affect all themes This is exatly what I was looking for. Too bad I'm too much of a noob to know how to implement it! How do I amend the global footer or post list template? I don't even know what those are. Nevermind... I actually made my own plugin. Holy crap I got lucky in figuring this out. Hey, thanks, but that plugin doesn't support an option for what I want to do. I also don't want to use a plugin for such a small change. Was hoping it could be done a little less intrusively.
|
|
Visions
New Member
sonuk pls
Posts: 70
inherit
208514
0
Jun 25, 2014 11:10:30 GMT -8
Visions
sonuk pls
70
April 2014
visionslol
|
Post by Visions on May 23, 2014 6:51:59 GMT -8
|
|
inherit
222266
0
Jan 20, 2022 9:23:37 GMT -8
xombiemike
41
June 2015
xombiemike
|
Post by xombiemike on Jun 13, 2015 17:56:16 GMT -8
This is exatly what I was looking for. Too bad I'm too much of a noob to know how to implement it! How do I amend the global footer or post list template? I don't even know what those are.
Nevermind... I actually made my own plugin. Holy crap I got lucky in figuring this out.
|
|