Author Topic: [Add-On] [FREE] Winks - Let Your Users Send and Receive Winks  (Read 8568 times)

KHDev

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 510
  • Karma: +43/-2
  • Etano Contributor (Skins & Mods)
INTRODUCING
Winks

MOD Version : V1.03| Script Compatibility: Etano 1.23 / 2.00 / 2.10 / 2.30 | Released : 29th April 2015 | Last Updated : 19th July 2016



Winks can be great ‘ice breakers’ or allowing your members to show interest in another member with a single click.

But isn’t that what Flirts are for?
Flirts are defined by admins which might not meet that users needs. Winks are universal so they fit in with pretty much any type of site.

Unwanted Winks?
No problem! If a sender has been blocked by the receiver then winks will not go through and the sender will be notified they are not permitted to send winks to that user.

Winks Flooding?
No Problem! Only 1 wink is logged in the database and displayed to the user no matter how many winks the user sends to the same user. Each additional wink will simply update the original winks date to push it to the top keeping users wink lists fresh and up-to-date.

Notification Ready!
When a user gets sent a new wink they will get a notification just like when they get a new message or friend request. Also if they have new winks when the user visits the My Winks page new winks will be highlighted. (Note! New winks are only highlighted on the first page.)

Responsive Ready!
Whether you have a responsive skin or a fixed width skin this mod will work out the box. Simply delete 2 lines from the css file and the mod is responsive! (Information is provided in the user manual available in the download and online)






Download
IMPORTANT!! If you have installed a previous version (V1.00 or V1.01) please contact me if you plan on adding the automatic purge of old winks mentioned in the new user manual / Winks  V1.02 as you'll need to create a new admin setting so you can set how long winks will be kept before been deleted by the purge cron which wasn't automatically created in previous releases.

Click Here









KHDev

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 510
  • Karma: +43/-2
  • Etano Contributor (Skins & Mods)
Re: [Add-On] Winks (Let Your Users Send and Receive Winks )
« Reply #1 on: May 07, 2015, 06:44:41 PM »
MANUAL UPDATE!
Seems i missed the instructions on adding the coding for when a users account is deleted to also delete related winks.

NOTE! Online manual and included manual (new sales) have been updated.

View Updated Manual >> Click Here see Purge Old Data tab


Open tools > cron > jobs > 120 > 1delete_members.php
Now add the following around line 27

Code: [Select]
$query="DELETE FROM `{$dbtable_prefix}winks` WHERE `to_user` IN ('".join("','",$all_uids)."') OR `from_user` IN ('".join("','",$all_uids)."')";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}


Open admin > processors > member_delete_now.php
Now add the following around line 39
Code: [Select]
$query="DELETE FROM `{$dbtable_prefix}winks` WHERE `to_user` IN ('".join("','",$all_uids)."') OR `from_user` IN ('".join("','",$all_uids)."')";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1005
  • Karma: +56/-7
Re: [Add-On] Winks (Let Your Users Send and Receive Winks )
« Reply #2 on: May 12, 2015, 12:15:28 PM »
I added this to my site since I thought it was a great idea. I am wondering if it's possible for the site to send an email notice to the member who receives a wink.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

KHDev

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 510
  • Karma: +43/-2
  • Etano Contributor (Skins & Mods)
Re: [Add-On] Winks (Let Your Users Send and Receive Winks )
« Reply #3 on: May 12, 2015, 05:02:10 PM »
I added this to my site since I thought it was a great idea. I am wondering if it's possible for the site to send an email notice to the member who receives a wink.

Yeah should be fairly simple :) ill take a look and post it for you ( Wednesday sometime as im away from the computer at the moment)

KHDev

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 510
  • Karma: +43/-2
  • Etano Contributor (Skins & Mods)
Re: [Add-On] Winks (Let Your Users Send and Receive Winks )
« Reply #4 on: May 13, 2015, 10:05:56 AM »
I added this to my site since I thought it was a great idea. I am wondering if it's possible for the site to send an email notice to the member who receives a wink.

Heres a simple email notification for new winks (with user setting so they can opt-out of them)

Step 1 - Add user setting so they can opt out of new wink emails

Access your database and run a SQL (CHANGE `YOURDATABASE` to whatever your database is called)

Code: [Select]
INSERT INTO `YOURDATABASE`.`dsb_site_options3` (`config_id`, `config_option`, `config_value`, `config_diz`, `option_type`, `choices`, `fk_module_code`, `per_user`) VALUES (NULL, 'notify_me_winks', '1', 'Send me email notifications when I receive new winks?', '9', '', 'def_user_prefs', '1');

Now open processors > send_wink.php
Code: [Select]

#### ON LINE 39 ADD THE FOLLOWING ####

$notify_receiver=get_user_settings($input['uid'],'def_user_prefs','notify_me_winks');
if ($notify_receiver) {
$query="SELECT `email` FROM `{$dbtable_prefix}user_accounts` WHERE `user_id`='".$input['uid']."'";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}
$input['email']=mysql_result($res,0,0);
send_template_email($input['email'],'You have received a new wink','new_wink.html',get_my_skin(),$input);
}



####### JUST ABOVE THE FOLLOWING ########

$topass['message']['type']=MESSAGE_INFO;
$topass['message']['text']= 'Your wink has been sent!';



Now in your skins folder go to the emails folder and make a copy of new_message.html and name it new_wink.html

Open emails/new_wink.html

and change the text to something like

Code: [Select]
<body>
<table>
<tr>
<td>
<p>Hello</p>
<p>You have been sent you a new wink at {tplvars.sitename}.</p>
<p></p>
<p>To view who from check your winks : <a href="{tplvars.baseurl}/my_winks.php">{tplvars.baseurl}/my_winks.php</a></p>
</td>
</tr>
</table>
<div id="footer">
Edit your <a href="{tplvars.baseurl}/my_settings.php">notification preferences</a>. <a href="{tplvars.baseurl}">{tplvars.sitename}</a>
</div>
</body>

and that should be it.

KHDev

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 510
  • Karma: +43/-2
  • Etano Contributor (Skins & Mods)
Winks V1.01 - Now Available!
« Reply #5 on: July 03, 2015, 05:28:57 PM »
Heres the latest version of Winks for Etano.

What's New?
  • Responsive Design
  • Avoid users sending winks to their own account - Previously it was possible if the user modified the send wink link with their account id
  • Updated user manual for users who are using Etano 2.10 and want to user URL Friendly profile links

Existing Wink Owners - This update is optional!
Please visit the Claim Update page and request the updated files.

PLEASE NOTE! This was a minor update so there is no need to re-install the mod. Only 3 files have been edited so simply follow the instructions in the update_guide.txt file that will be included in the update sent to you. (Please allow upto 24 hours from requesting to delivery)

jmonroe

  • Active Member
  • ***
  • Posts: 63
  • Karma: +1/-0
Re: [Add-On] Winks - Let Your Users Send and Receive Winks
« Reply #6 on: July 03, 2015, 07:56:48 PM »
Awesome! I just sent in my claim. Thanks for the update

KHDev

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 510
  • Karma: +43/-2
  • Etano Contributor (Skins & Mods)
Re: [Add-On] Winks - Let Your Users Send and Receive Winks
« Reply #7 on: July 04, 2015, 07:37:35 AM »
Awesome! I just sent in my claim. Thanks for the update

Thanks.

You should have the update in you inbox now.

KHDev.

jmonroe

  • Active Member
  • ***
  • Posts: 63
  • Karma: +1/-0
Re: [Add-On] Winks - Let Your Users Send and Receive Winks
« Reply #8 on: July 04, 2015, 07:49:47 AM »
Thanks. I did receive the email.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1005
  • Karma: +56/-7
Re: [Add-On] Winks - Let Your Users Send and Receive Winks (Suspended)
« Reply #9 on: January 01, 2016, 04:22:12 PM »
I thought about adding a new wink notification in the header next to the new message notification under class="active-links" in frame.html.
Code: [Select]
<!--opt name="tplvars.new_winks"--><li class="new_w"><a id="newwink-link" href="{tplvars.relative_url}my_winks.php"><img src="{tplvars.tplurl}/images/email_alert.gif" alt="New winks" title="New winks" /></a></li><!--/opt name="tplvars.new_winks"-->
The only problem I have is that the "sign out" button gets pushed down below the friend request button. What should I edit to bring it back up to the top in line with those other notification buttons?
The notification buttons that I have are: new wink | new message | new friend request

I have the deano deluxe 3.00 skin.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1005
  • Karma: +56/-7
Re: [Add-On] Winks - Let Your Users Send and Receive Winks (Suspended)
« Reply #10 on: January 01, 2016, 08:21:40 PM »
Oh Never mind. I found the css solution.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

jmonroe

  • Active Member
  • ***
  • Posts: 63
  • Karma: +1/-0
Re: [Add-On] Winks - Let Your Users Send and Receive Winks (Suspended)
« Reply #11 on: January 01, 2016, 08:54:26 PM »
Glad you found it. I was going to play around with it in a few to see if I had the answer. I knew it would be in the styling but didn't know exactly which lines to add or edit.

Hornyflings

  • Prime Member
  • ****
  • Posts: 196
  • Karma: +3/-0
    • AsiasHeart
Re: [Add-On] Winks - Let Your Users Send and Receive Winks (Suspended)
« Reply #12 on: January 05, 2016, 02:34:20 AM »
Quote
Oh Never mind. I found the css solution.

Hi Marble,
is it possible to get the solution ?

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 1005
  • Karma: +56/-7
Re: [Add-On] Winks - Let Your Users Send and Receive Winks (Suspended)
« Reply #13 on: January 05, 2016, 05:53:32 AM »
Quote
Oh Never mind. I found the css solution.

Hi Marble,
is it possible to get the solution ?

Here is how I customized it.
In header.css, under the notifications section, I first added this code for the new button:
Code: [Select]
#session ul li.new_w {
     width: 20%;
     float: left;
}
a#newwink-link {
     display: block;
     position: relative;
     margin: 15px auto;
}

#session ul li.new_w img {
     width: 35px;
     height: 26px;
}

To fix the problem with the Sign Out button I adjusted the width to 40%. Code:
Code: [Select]
#session ul li.sign_out {
     width: 40%;
     float: right;
}

Does this answer your question?
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

Hornyflings

  • Prime Member
  • ****
  • Posts: 196
  • Karma: +3/-0
    • AsiasHeart
Re: [Add-On] Winks - Let Your Users Send and Receive Winks (Suspended)
« Reply #14 on: January 05, 2016, 07:04:45 AM »
Thanks Marble,
will add your mod to KHDev's wink addon.
Thanks a lot for sharing.