Simple Pokes

Started by Diego Andrés, February 02, 2011, 02:07:52 PM

Previous topic - Next topic

Diego Andrés

Link to the mod




Simple Pokes
Developed by Diego Andrés
Original Developer: Berat "grafitus" Dogan




Introduction
Simple Pokes provides a functionality that emulates the FB Pokes system.

Features
  • List of pokes received
  • Send pokes
  • Ignore pokes
  • Disable/enable alerts when receiving a poke


Changelog
GitHub

SMF Tricks - Free & Premium Responsive Themes for SMF.

chinaren

It installed okay, but where is it?  I can't find any poking.
The Opus Path - The Next Generation of the Written Word

grafitus

I've added a few images about using of the modification.

chinaren

Ah, thanks I see the pokes at the top now, but not on people's profiles.  I  have Ultimate Profile mod loaded though, would that affect things?
The Opus Path - The Next Generation of the Written Word

grafitus

#4
Ooo, okay. I guess we need to add Ultimate Profile support. You can add manuel with below. And I'll add to package soon.

./Themes/default/UltimateProfile.template.php
Code (Find) Select
// Can they add this member as a buddy?
Code (Replace) Select
// I'll poke myself... This is rot, right?!
if (!$context['user']['is_owner'])
echo '
<a href="', $scripturl, '?action=poke;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['poke_confirm'], '\');">[', $txt['poke_button'], ']</a><br />';
// Can they add this member as a buddy?


Edit: Spelling mistake.

kaung

Somehow, all the poke times at my site are saying: December 31, 1969, 04:00:00 PM
Is it happening the same to you all, or probably just a conflict with one of my mods?
Thanks.

live627

Sounds like the timestamps aren't being saved or retrieved properly.

chinaren


Thanks!  I'll give it a go.

Quote from: grafitus on February 03, 2011, 10:39:35 AM
Ooo, okay. I guess we need to add Ultimate Profile support. You can add manuel with below. And I'll add to package soon.

./Themes/default/UltimateProfile.template.php
Code (Find) Select
         // Can they add this member as a buddy?
Code (Replace) Select
         // I'll poke myself... This is rot, right?!
         if (!$context['user']['is_owner'])
            echo '
                  <a href="', $scripturl, '?action=poke;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['poke_confirm'], '\');">[', $txt['poke_button'], ']</a><br />';
         // Can they add this member as a buddy?


Edit: Spelling mistake.
The Opus Path - The Next Generation of the Written Word

winloze99

Quote from: kaung on February 03, 2011, 06:48:13 PM
Somehow, all the poke times at my site are saying: December 31, 1969, 04:00:00 PM
Is it happening the same to you all, or probably just a conflict with one of my mods?
Thanks.

I have the same problem, but my site say 1 januari 1970 kl. 01:00:00

Masterd


grafitus

Quote from: winloze99 on February 06, 2011, 11:41:30 AM
Quote from: kaung on February 03, 2011, 06:48:13 PM
Somehow, all the poke times at my site are saying: December 31, 1969, 04:00:00 PM
Is it happening the same to you all, or probably just a conflict with one of my mods?
Thanks.

I have the same problem, but my site say 1 januari 1970 kl. 01:00:00
I don't know why. But 'time' column is '0', that is the exact.

I guess mod didn't like you. ^^

chinaren


Thanks!  The below worked fine. 


Now, two three more little things if you would:


Is there any way of adding the poke to the avatar area on the side of the posts? 
Is there any way of making it a small graphic poke button?  (Just throwing some random ideas out here)

For the current profile poke, how can I change it to say: Poke this member  ?


Thanks for your hard work!  Appreciated.
;D



Quote from: chinaren on February 03, 2011, 07:21:03 PM

Thanks!  I'll give it a go.

Quote from: grafitus on February 03, 2011, 10:39:35 AM
Ooo, okay. I guess we need to add Ultimate Profile support. You can add manuel with below. And I'll add to package soon.

./Themes/default/UltimateProfile.template.php
Code (Find) Select
         // Can they add this member as a buddy?
Code (Replace) Select
         // I'll poke myself... This is rot, right?!
         if (!$context['user']['is_owner'])
            echo '
                  <a href="', $scripturl, '?action=poke;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['poke_confirm'], '\');">[', $txt['poke_button'], ']</a><br />';
         // Can they add this member as a buddy?


Edit: Spelling mistake.
The Opus Path - The Next Generation of the Written Word

grafitus

Quote from: chinaren on February 06, 2011, 06:35:53 PMIs there any way of adding the poke to the avatar area on the side of the posts?
Quote from: chinaren on February 06, 2011, 06:35:53 PMIs there any way of making it a small graphic poke button?
./Themes/{default|your_theme}/Display.template.php
Code (Find) Select
// Don't show an icon if they haven't specified a website.
Code (Replace) Select
// I'll poke myself... This is rot, right?!
if ($context['user']['id'] != $message['member']['id'])
echo '
<li><a href="', $scripturl, '?action=poke;u=', $message['member']['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['poke_confirm'], '\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/poke.png" alt="' . $txt['poke_button'] . '" />' : $txt['poke_button']), '</a></li>';

// Don't show an icon if they haven't specified a website.

And copy attached poke.png to ./Themes/{default|your_theme}/images. ;) Finally, poke everyone!!! ^^

Quote from: chinaren on February 06, 2011, 06:35:53 PMFor the current profile poke, how can I change it to say: Poke this member  ?
./Themes/defalut/languages/Modification.{your_language}.php
Code (Find) Select
$txt['poke_button'] = 'Poke';
Code (Find) Select
$txt['poke_button'] = 'Poke This Member';

grafitus

Solved time issue. And a few more things. So v1.1 have been released!

chinaren

Quote from: grafitus on February 07, 2011, 04:30:47 PM
Solved time issue. And a few more things. So v1.1 have been released!


Thanks Grafy!  I'm in HK at the moment, but when I return I'll sort this out.  Can I just install over the top of the old version, or should I unistall first?
The Opus Path - The Next Generation of the Written Word

ukhalik2

haha.. Really nice mod.. A new little thing to socialize your forum..

Good Work!
Thanks!

grafitus

Quote from: chinaren on February 08, 2011, 07:39:56 AMThanks Grafy!  I'm in HK at the moment, but when I return I'll sort this out.  Can I just install over the top of the old version, or should I unistall first?
You should uninstall the old version first. Then install the new version. ;)

Thanks to all of the incoming thanks!

Exochat

Would be good if this could be extended in future so that you could actually poke people with items or even images.
So for example :

Person X just poked you with a sharp stick!

and

Person Z just poked you with a policeman's truncheon!

Maybe allow it so each forum owner can invent their own range of items and they just have to add the ending part of it so its set up for "Person X just poked you with" and then the Admin defines the next part, and it is available on the poke screen?

Just a few ideas to extend what is currently a very good but extremely limited feature :)

kaung

#18
Quote from: grafitus on February 07, 2011, 04:30:47 PM
Solved time issue. And a few more things. So v1.1 have been released!

Thank you very much!!!
The installation went smooth as usual and enjoying the new features!
The time fix also work great with the relative time (x min or hour ago) mod! :)

Two tiny things.
- Can you make pokers return to the page they're on after poke?
Currently in display.temp (post page) after poke, they're redirected to profile.
- Also not sure if it's because of cache but i'm having "Ghost pokers". Poke said there are pokes but the poke page said none there.

Thanks! :)

grafitus

@Exochat, this is just a simple poke mod. If I add this feature,  the simplicity will be eliminated..

@kaung, I'm working on another mod now. I'm going to make 'redirect', when I finished new project.
And sorry, I don't understand what you mean about "Ghost pokers".

Advertisement: