News:

Join the Facebook Fan Page.

Main Menu

Like Posts

Started by vbgamer45, June 29, 2013, 09:29:03 AM

Previous topic - Next topic

Joker™

Quote from: gaurav09 on January 13, 2015, 08:48:40 AM
@margarett
<div id="userbox" class="dropup" style="display: none;">
<ul class="dropdown-menu">
<li>
<a href="'. $scripturl. '?action=profile">
<img src="'. $settings['images_url'] .'/userbox/profile.png" alt="*" />
', $txt['profile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=account">
<img src="'. $settings['images_url'] .'/userbox/account.png" alt="*" />
', $txt['account'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=forumprofile">
<img src="'. $settings['images_url'] .'/userbox/editprofile.png" alt="*" />
', $txt['forumprofile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unread">
<img src="'. $settings['images_url'] .'/userbox/topics.png" alt="*" />
', $txt['unread_topics_visit'], '
</a>
</li>
</ul>
</div>';
}
echo'
</div>';
}
?>



The code provided by margarett looks fine - http://www.simplemachines.org/community/index.php?topic=506743.msg3782684#msg3782684
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

Joker™

Quote from: desiamerican26 on January 16, 2015, 10:13:53 PM
Hi,

I installed Like Posts Mod for my forums. It is working fine everywhere else but it's not opening up too the Guests. I checked at the back end and everything is checked for Guests to click like. Is it because I am using a different Template?

I am using Golove-Gradient Theme. Also, attaching the screenshot from Guest checked section.

Please let me know.

Thank You
Regards,

Nikhil
Hi, does it work fine on default theme?
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

desiamerican26

Thank You for the Reply Joker.

Unfortunately, I was trying to delete some code that I inserted, And I am having the following error message:

my Site:

www.desi-american.com/forum/

Template Parse Error!

It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.


Can you please help me with that. I guess something else got deleted by mistake.

Thank You

Korsar13

trying to install on SMF 2.0.9 via Package Manager

Tests successful, but...

ERROR: syntax error at or near "FROM"
LINE 3: FROM smf_like_post
^
File: /(cut)/forum/Packages/temp/installer/install.php
Line: 155

gaurav09

Quote from: margarett on January 13, 2015, 09:53:08 AM
This should work (untested)

<div id="userbox" class="dropup" style="display: none;">
<ul class="dropdown-menu">
<li>
<a href="'. $scripturl. '?action=profile">
<img src="'. $settings['images_url'] .'/userbox/profile.png" alt="*" />
', $txt['profile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=account">
<img src="'. $settings['images_url'] .'/userbox/account.png" alt="*" />
', $txt['account'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=forumprofile">
<img src="'. $settings['images_url'] .'/userbox/editprofile.png" alt="*" />
', $txt['forumprofile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>
</li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
echo '
<li>
<a href="'. $scripturl. '?action=unread">
<img src="'. $settings['images_url'] .'/userbox/topics.png" alt="*" />
', $txt['unread_topics_visit'], '
</a>
</li>
</ul>
</div>';
}
echo'
</div>';
}
?>


Marg thanks very much, it worked well.
Just i have last wish that please also tell me for other theme also, i cannot find same code which needs to be find, but i found some similar code. Below is that similar code.


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';

gaurav09

#625
i am using this mod : http://custom.simplemachines.org/mods/index.php?mod=2665

but in like posts stats, no image is showing..I found bug first time  :)
proof image attached.

EDIT : and how to fix the overlapping of karma with likes ?

Steve

Be advised Joker won't be around for a little while due to real life taking precedence (it's a good thing in his case). :)
DO NOT pm me for support unless asked to!

margarett

About the question above


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', txt['like_show_notifications'], '</a></li>';
echo '
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

gaurav09

Quote from: margarett on January 22, 2015, 07:44:32 PM
About the question above


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', txt['like_show_notifications'], '</a></li>';
echo '
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';


this time something wrong happened

margarett

Ups :P
No idea where that $ went to...
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
echo '
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

gaurav09

Quote from: margarett on January 23, 2015, 04:36:01 AM
Ups :P
No idea where that $ went to...
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
echo '
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';


thanks  :-*

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

heltinde

In our community we seem to have an issue with the mod: I have some members, who uses iPad. When they press 'You & xx other people liked this' they can't get rid of the box with the names unless they press back on the iPad.
Is this a bug?

Thx for a nice mod, We love the functionality :)

Best Regards

Joker™

Quote from: heltinde on February 14, 2015, 10:15:55 AM
In our community we seem to have an issue with the mod: I have some members, who uses iPad. When they press 'You & xx other people liked this' they can't get rid of the box with the names unless they press back on the iPad.
Is this a bug?

Thx for a nice mod, We love the functionality :)

Best Regards
Thanks for the info, tracked https://github.com/siddhartha-gupta/SMF-Likes/issues/40
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

nax

A very desirable mod, I tried to install it and when parsed everything was ok for the Core theme but not for my installed theme Brightforest.  Not sure how to overcome this.
I'm getting too old for this!

Steve

Did you look at what the failures were (i.e. click the clipboard icons)?
DO NOT pm me for support unless asked to!

nax

I've looked now, here are the two items that failed. Not sure what to do.
I'm getting too old for this!

margarett

The edit to index.template.php should be easy to fix. Basically you need to find the link to "unreadreplies" in your file and adapt the link to "show likes notification.

I can't see where is the the first image you attached from... That seems to be from MessageIndex.template.php but it doesn't show up as failed...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

nax

You are correct, its only the index.template.php I think I would need to change, so should find out where the additional code should go, install the mod then make that addition in the appropriate place (is that how it works?).
I'm getting too old for this!

margarett

Yes, that's it.
First you need to make sure that you are able to do the "failed" changes yourself. Ask for help if you can't ;)
Then install the MOD with errors
Then manually perform the "failed" edits
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: