Advertisement:

Author Topic: Like Posts  (Read 314268 times)

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #40 on: July 27, 2013, 07:24:53 AM »
Screenshots updated.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline drfun

  • Jr. Member
  • **
  • Posts: 191
  • Gender: Male
    • All Student Forum
Re: Like Posts
« Reply #41 on: July 27, 2013, 03:48:16 PM »
Thanks @ Joker you kept to your word, i have install the like and it is working very well now. Remain blessed for your effort.
Is it possible for quest to view the like button but cant like/unlike and if they click on the like button it prompt them to register or redirect them to the login page?
All students forum -Global Online community for Students, Ex-Students and their friends

Offline MechSpecs

  • Jr. Member
  • **
  • Posts: 131
Re: Like Posts
« Reply #42 on: July 27, 2013, 05:58:57 PM »
This is coming along nicely!

I will see if I can eventually adapt this to the layout/images and color scheme that I am using on my test server.

Offline Tikkuy

  • Semi-Newbie
  • *
  • Posts: 50
Re: Like Posts
« Reply #43 on: July 28, 2013, 12:01:28 AM »
I just install the mod to my live site www. allstudentforum.com now that is running on a vertex theme and i noted the following, though the installation went fine.

1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change
4. On the message index, the LIKE superimpose on the little sticky image

i notice it does not make any form of changes from what it was previously. Also on the mobile version of my site which also run on the Anaconda theme, it does not display any LIKE link at all.

NOTE: from my previous post
Quote
when some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)
This was tested on my system with the default smf theme

got exact same issue on all themes
shame not many "like" mods that will even install on the latest version of the forum software

Make that three. :'(

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #44 on: July 28, 2013, 01:37:59 AM »
This is coming along nicely!

I will see if I can eventually adapt this to the layout/images and color scheme that I am using on my test server.

Thanks @ Joker you kept to your word, i have install the like and it is working very well now. Remain blessed for your effort.
Is it possible for quest to view the like button but cant like/unlike and if they click on the like button it prompt them to register or redirect them to the login page?
Yup, but I'm not sure how many forum admins would like this feature. If more people ask for this, then I can include this in the mod.
Thanks for the appreciation guys :).


I just install the mod to my live site www. allstudentforum.com now that is running on a vertex theme and i noted the following, though the installation went fine.

1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change
4. On the message index, the LIKE superimpose on the little sticky image

i notice it does not make any form of changes from what it was previously. Also on the mobile version of my site which also run on the Anaconda theme, it does not display any LIKE link at all.

NOTE: from my previous post
Quote
when some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)
This was tested on my system with the default smf theme

got exact same issue on all themes
shame not many "like" mods that will even install on the latest version of the forum software

Make that three. :'(
Is this also happening with version 1.1? Forum link? Test account?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline barnaby jonez

  • Semi-Newbie
  • *
  • Posts: 16
Re: Like Posts
« Reply #45 on: July 29, 2013, 09:41:17 AM »
Wow, I was just assuming you would do a simple count of likes on the profile, but the fact it shows the actual post is MUCH better.

Great job, Joker.

Is it possible to not allow Likes on the board view? I'd rather have the users like posts only inside the threads themselves.

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #46 on: July 29, 2013, 10:42:38 AM »
Wow, I was just assuming you would do a simple count of likes on the profile, but the fact it shows the actual post is MUCH better.

Great job, Joker.

Is it possible to not allow Likes on the board view? I'd rather have the users like posts only inside the threads themselves.
Thanks for the kind words :).

Sounds like a nice add-on. Lets add this in next version.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline MechSpecs

  • Jr. Member
  • **
  • Posts: 131
Re: Like Posts
« Reply #47 on: July 29, 2013, 11:46:02 AM »
I played with this on my sandbox and have a couple of suggestions; shot you a PM

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #48 on: July 29, 2013, 12:09:36 PM »
I played with this on my sandbox and have a couple of suggestions; shot you a PM
Ahh forgot to reply to that. Please provide me a test account also. Thanks in advance :).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #49 on: July 29, 2013, 01:24:54 PM »
I played with this on my sandbox and have a couple of suggestions; shot you a PM
Ok seen the UI of buttons and looks nice.

Well I have made certain UI changes with Like/Dislike buttons and still waiting to hear from you guys :P.

Major thing with this mod is that it makes usage of ajax to interact with server, so in terms of UI it need to show some sort of fadeIn/fadeOut sort of effect etc. Lol, using bit more of jQuery this time I have introduced slide + fade effect.

Still I'm all ears, and if you guys have suggestions please do post them :).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,327
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
    • Study Force
Re: Like Posts
« Reply #50 on: July 29, 2013, 04:01:21 PM »
This is quickly becoming SMF #1 modification, congrats Joker™.

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #51 on: July 30, 2013, 01:51:15 PM »
This is quickly becoming SMF #1 modification, congrats Joker™.
Thanks a lot, this is one of the best comment I've received so far for my work on SMF :).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Hypnos76

  • Semi-Newbie
  • *
  • Posts: 25
Re: Like Posts
« Reply #52 on: August 12, 2013, 04:08:49 PM »
What file contains the color setting for the text in this part of the MOD.

Ex:


As you can see it's way to dark on my forum and I can't seem to find what css file it is in to change the Text color.

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #53 on: August 13, 2013, 10:01:40 AM »
What file contains the color setting for the text in this part of the MOD.

Ex:


As you can see it's way to dark on my forum and I can't seem to find what css file it is in to change the Text color.
themes/default/css/LikePosts.css
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Hypnos76

  • Semi-Newbie
  • *
  • Posts: 25
Re: Like Posts
« Reply #54 on: August 13, 2013, 02:55:34 PM »
What file contains the color setting for the text in this part of the MOD.

Ex:


As you can see it's way to dark on my forum and I can't seem to find what css file it is in to change the Text color.
themes/default/css/LikePosts.css

You will have to show me where in that file because I used Photoshop to try and find the color and it couldn't then I changed every color in he file to #fff000 (bright yellow) and that didn't work...

Code: [Select]
.like_posts_overlay {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.4);
    z-index: 101 !important;
}

.like_posts_member_info_box {
    position: relative;
    width: 50%;
    line-height: 15px;
    font-size: 13px;
    z-index: 102;
    -webkit-border-radius: 5px;
    -webkit-box-shadow: -1px 2px 12px rgba(0, 0, 0, 0.9);
    border: 2px solid #ECEDED;
    color: #fff;
    background: #e0eaf1;
    color: #4a6b82;
    margin: 100px auto 0;
}

.like_posts_member_info {
    padding: 5px 10px;
    border-top: 1px solid rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    overflow: hidden;
}

.like_posts_member_info img.avatar{
    width: 30px;
    box-shadow: 1px 1px 5px #000;
    float: left;
    position: relative;
}

.like_posts_member_info .like_posts_member_info_details {
    float: left;
    position: relative;
    padding-left: 10px;
}

.like_post_box {
    line-height: 22px;
    position: relative;
}

.like_unlike_link {
    background: #122a33;
    padding: 1px 5px;
    color: #9fc7db !important;
    position: relative;
border: 1px solid #1ffcf6;
}

.subject_details {
    background-color: #e7eaef;
    color: #000;
    display: none;
    position: absolute;
    padding: 10px;
    border: 1px solid #C9C9C9;
    border-radius: 5px;
}

.display_none {
    display: none;
}

/*for firefox*/
.display_inline {
    display: inline !important;
}

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #55 on: August 14, 2013, 09:28:28 AM »
What file contains the color setting for the text in this part of the MOD.

Ex:


As you can see it's way to dark on my forum and I can't seem to find what css file it is in to change the Text color.
Lol the colors are so dark that I can't figure that for which part you want to change colors. Can you take a screen shot on default theme and point out the region of which you want to change the color.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Offline Hypnos76

  • Semi-Newbie
  • *
  • Posts: 25
Re: Like Posts
« Reply #56 on: August 17, 2013, 01:37:16 PM »
Here you go:



Trying to change the color of "No. of Likes"

Offline lois_tc

  • Newbie
  • *
  • Posts: 1
Re: Like Posts
« Reply #57 on: August 19, 2013, 11:31:54 AM »
Excellent mod, Joker™, how put No. of Likes in display post users, for example


Offline Exsharaen

  • Semi-Newbie
  • *
  • Posts: 68
Re: Like Posts
« Reply #58 on: August 20, 2013, 03:16:39 AM »
Hi Joker,

I have the same issue as drfun:
1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change

This was tested on my system with the default smf theme

I decided to look at Chrome's console and discovered this:

(whoops sorry for that Steam popup :D)

I'm not really familiar with JavaScript, but a quick search reveals that it is a use of jQuery. I checked my head section and did not discover any external script link to jQuery (and I didn't remember I used one). Does this mod use jQuery?

As a temporary remedy while waiting for your answer, I tried to manually edit my Load.php by changing your code from this:
Code: [Select]
if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';
    }
into this:
Code: [Select]
if (isset($_GET['board']) || isset($_GET['topic']) || (isset($_GET['area']) && $_GET['area'] == 'likeposts')) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';
$context['html_headers'] .= '<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>'; // maybe this one can be omitted?
    }
and LikePosts.php from this:
Code: [Select]
if (!window.jQuery) {
document.write("<script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"><\/script>");
}
into this:
Code: [Select]
if (!window.jQuery) {
document.write("<script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-1.10.2.min.js\"><\/script>");
}
and now it works like a charm.

Except that somehow my likes on message lists are reset on page refreshes, although my profile still keep tracks of it. Still don't know why this happens and how to fix it.

Thank you anyway for this mod, I like it!

EDIT:
Silly me, I missed your statement here:
I played with this on my sandbox and have a couple of suggestions; shot you a PM
Ok seen the UI of buttons and looks nice.

Well I have made certain UI changes with Like/Dislike buttons and still waiting to hear from you guys :P.

Major thing with this mod is that it makes usage of ajax to interact with server, so in terms of UI it need to show some sort of fadeIn/fadeOut sort of effect etc. Lol, using bit more of jQuery this time I have introduced slide + fade effect.

Still I'm all ears, and if you guys have suggestions please do post them :).

Guess this is what I get when skipping breakfast :D

I'm on SMF 2.0.5 by the way.
« Last Edit: August 20, 2013, 03:40:47 AM by Exsharaen »

Offline Joker™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,914
  • Gender: Male
    • siddhartha-gupta on GitHub
Re: Like Posts
« Reply #59 on: August 20, 2013, 09:24:14 AM »
Here you go:



Trying to change the color of "No. of Likes"
Ohh that text color comes from index.css of:

- Either the theme you are using, or
- Default theme

You need to make change in this css class ".titlebg, .titlebg2, tr.titlebg th, tr.titlebg td, tr.titlebg2 td"

Moreover you can use chrome developer tool to see the exact class and make changes accordingly.


Excellent mod, Joker™, how put No. of Likes in display post users, for example


Nice nice. For that we need a sql query and I see that as a nice feature for next release.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved