0 Members and 1 Guest are viewing this topic.

*

CBG

  • *****
  • 915
    • osDate Forum
  • osDate Version: osDate Evo v1.2
[FREE] Friends Mod - CBG
« on: July 10, 2017, 08:33:43 AM »
Mod Name: Friends
Version: 1.0

This is the first version, so things may change in future versions.

First please BACKUP your files and database


Step 1.
Open phpMyAdmin and go to the database you install osDate into.
Then click on Import and add the following in the box:
- I am persuming you are using osdate as your database prefix, if not change it.

Code: [Select]
CREATE TABLE `osdate_friends` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `fuid` int(11) NOT NULL,
  `status` varchar(250) NULL,
  `ts` varchar(250) NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Step 2.
Open: /temp/myconfigs/config.php

Find:
Code: [Select]
define('GIFTS_CATEGORIES_TABLE', DB_PREFIX . '_gifts_categories');

Add After:
Code: [Select]
define('FRIENDS_TABLE', DB_PREFIX . '_friends');

Step 3.
Open: /language/lang_english/lang_main.php

Find
Code: [Select]
303 => 'Invalid Time Zone'

Change to:
Code: [Select]
303 => 'Invalid Time Zone',
2000 => 'Already in your friend list, or pending.',
2001 => 'Your friend request has been sent.',

Find:
Code: [Select]
?>
[/code

[b]Add Before:[/b]
[code]
//
$lang['friends_cancel_request'] = 'Cancel Request';
$lang['friends_accept'] = 'Accept';
$lang['friends_reject'] = 'Reject';
$lang['friends_gender'] = 'Gender';
$lang['friends_seeking'] = 'Seeking';
$lang['friends_location'] = 'Location';
$lang['friends_view_profile'] = 'View Profile';
$lang['friends_remove'] = 'Remove';
$lang['friends_list'] = 'Friends List';
$lang['friendslist'] = 'My Friends List';
$lang['friendsrequests'] = 'Friends Requests';
$lang['friendsrequestsout'] = 'Friends Requests Sent';
$lang['addtofriendslist'] = 'Add to Friends List';
$lang['friends_request_subject'] = 'SITENAME Message: You have received a friend request';
$lang['friends_request_message']['html'] = 'Hi,<br><br>The member #SenderName# wants to be your friend! To accept or deny this request, please log in to <a href="#LoginLink#">#LoginLink#</a> and access the Friends section.<br><br>To access the friends request section:<br>Hover your mouse over: My Lists.<br>Click on Friends Requests.<br><br>Good Luck!<br>#AdminName#<br>SITENAME';
$lang['friends_request_message']['text'] = 'Hi,

The member #SenderName# wants to be your friend! To accept or deny this request, please log in to <a href="#LoginLink#">#LoginLink#</a> and access the Friends section.

To access the friends request section:
Hover your mouse over: My Lists.
Click on Friends Requests.

Good Luck!
#AdminName#
SITENAME';

Step 4.
Open: /templates/default/nickpage_navi.tpl

Find:
Code: [Select]
<li><a href="#" onclick="javascript:window.location='buddybanlist.php?act=buddy&amp;ref_id={$user.id}&amp;rtnurl=showprofile.php';" >{lang mkey='addtobuddylist'}</a></li>

Add Above:
Code: [Select]
<li><a href="#" onclick="javascript:window.location='friends_list.php?act=friends&amp;ref_id={$user.id}&amp;rtnurl=showprofile.php';">{lang mkey='addtofriendslist'}</a></li>

Find:
Code: [Select]
<li><a href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='addtobuddylist'}</a></li>

Add Above:
Code: [Select]
<li><a href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='addtofriendslist'}</a></li>

Step 5.
Open: /templates/default/dropdownpanelmenu_big.tpl

Find:
Code: [Select]
<a href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='winks'}</a>
{/if}

After Add:
Code: [Select]
<li><a href="{$docroot}friends.php">{lang mkey='friendslist'}</a></li>
<li><a href="{$docroot}friends_request.php">{lang mkey='friendsrequests'}</a></li>
<li><a href="{$docroot}friends_request_out.php">{lang mkey='friendsrequestsout'}</a></li>

Step 6.
Open: /templates/default/dropdownpanelmenu_mid.tpl

Find:
Code: [Select]
<li><a href="#" onclick="javascript:insufficientPrivileges();">{lang mkey='winks'}</a></li>
{/if}

After Add:
Code: [Select]
<li><a href="{$docroot}friends.php">{lang mkey='friendslist'}</a></li>
<li><a href="{$docroot}friends_request.php">{lang mkey='friendsrequests'}</a></li>
<li><a href="{$docroot}friends_request_out.php">{lang mkey='friendsrequestsout'}</a></li>

Step 7.
Upload Friends mod files and all changed files

Login into the osDate Admin
Click on Manage Languages
Click on the Language Drop down and pick English
Click on Load Language
« Last Edit: July 14, 2017, 01:53:15 PM by CBG »
Regards,
CBG (Garry)
osDate: 2.6.5, 2.7 & Evo
PHP: 5.5.x/5.6.x (5.3.x to 5.6.x) | MySQL: 5.5.34-cll

*

Pharg

  • *****
  • 2,790
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: [FREE] Friends Mod - CBG
« Reply #1 on: July 13, 2017, 10:51:42 PM »
Hi members,

I am aware this mod has a few errors and are working on a update to the files, they will be done soon.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Pharg

  • *****
  • 2,790
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: [FREE] Friends Mod - CBG
« Reply #2 on: July 14, 2017, 03:10:20 AM »
Hi Members,

I have fully updated this mod for osDateEvo v1.2.

This mod only works in the osDateEvo v1.2 templates, it will not work with the FreshDate template yet.

Here are some pics so you can see what it looks like.

Follow the instructions in the first post to add the missing text and the changes in the config.php file.
I have done the rest for you and have included the database SQL file, just upload it into you database, make sure your database prefix is the same, if not change it.

Changes I have made to the menus.
Add to Buddies and Add to Watched lists have been removed, Buddies has been replaced with this Friends Requests since they need to be accepted now, and nobody needs the Watched lists, there are enough stalkers online.

Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

CBG

  • *****
  • 915
    • osDate Forum
  • osDate Version: osDate Evo v1.2
Re: [FREE] Friends Mod - CBG
« Reply #3 on: July 14, 2017, 01:54:17 PM »
I have put an updated .zip in the first post to file filename error in the template files.
Regards,
CBG (Garry)
osDate: 2.6.5, 2.7 & Evo
PHP: 5.5.x/5.6.x (5.3.x to 5.6.x) | MySQL: 5.5.34-cll

*

Pharg

  • *****
  • 2,790
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: [FREE] Friends Mod - CBG
« Reply #4 on: July 14, 2017, 11:09:38 PM »
Hi CBG,

Good one, as you can see I have made it compatible for osDateEvo and it brings with it a lot of new possible
changes to other files.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

KHDev

  • *****
  • 83
  • Releasing stuff and learning on the way!
    • KH Web Development
  • osDate Version: osDate Evo v1.0
Re: [FREE] Friends Mod - CBG
« Reply #5 on: September 06, 2017, 04:00:46 PM »
Hey,

Has this been added to the main osDate Evo package?

:P

*

Pharg

  • *****
  • 2,790
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: [FREE] Friends Mod - CBG
« Reply #6 on: September 06, 2017, 10:42:08 PM »
Hi KHDev,

No it hasn't be added yet, I plan to do it soon, will be removing the old myfriends plugin and the Watched links, who needs starkers in a dating site lol and other stuff like it also.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

KHDev

  • *****
  • 83
  • Releasing stuff and learning on the way!
    • KH Web Development
  • osDate Version: osDate Evo v1.0
Re: [FREE] Friends Mod - CBG
« Reply #7 on: September 15, 2017, 12:36:55 AM »
Cool. Haha yeah you're right about the stalkers 😂

Also just to let users know if they want to use this mod and are using one of my templates you can get the required files/modifications from me so that they are compatible with the mod.