Jump to content
Sign in to follow this  

[Модуль] Дополнение к разделу друзья как у вк

Recommended Posts

Обновленная система друзей
1. В таблицу friends_demands добавить поле old_demands int(11)

2. Сделать запрос в бд

CREATE TABLE IF NOT EXISTS `vii_friends_list` (
  `user_id` int(11) NOT NULL,
  `list_id` int(11) NOT NULL,
  `list_name` varchar(50) NOT NULL,
  `list_edit` int(11) NOT NULL,
  `friends` text NOT NULL,
  `bg_color` varchar(25) NOT NULL

3. В profile.tpl под $(document).ready(function(){ поставить Friends.show_list(user_id);
В этом же файле после [/friends] ставим <div id="friends_list"></div>

4. В main.tpl после {js} добавить <script type="text/javascript" src="/templates/Default/js/friends.js"></script>

5. Залить friends.js в папук js, newfriends.php и friends.php в папку modules, подключить newfriends.php

6. Заменить в .htaccess #Друзья на 
RewriteRule ^friends(/?)+$ index.php?go=newfriends [L]
	RewriteRule ^friends&section=list([0-9]+)(/?)+$ index.php?go=newfriends&section=list&list_id=$1 [L]
	RewriteRule ^friends&section=online(/?)+$ index.php?go=newfriends&section=online [L]
	RewriteRule ^friends&section=requests(/?)+$ index.php?go=newfriends&section=requests [L]
	RewriteRule ^friends&section=all_requests(/?)+$ index.php?go=newfriends&section=all_requests [L]
	RewriteRule ^friends&section=out_requests(/?)+$ index.php?go=newfriends&section=out_requests [L]
	RewriteRule ^friends&act=find(/?)+$ index.php?go=newfriends&act=find [L]
	RewriteRule ^friends&section=phonebook(/?)+$ index.php?go=newfriends&section=phonebook [L]
	RewriteRule ^friends&user_id=([0-9]+)&section=list([0-9]+)(/?)+$ index.php?go=newfriends&section=list&user_id=$1&list_id=$2 [L]
	RewriteRule ^friends&user_id=([0-9]+)&section=online(/?)+$ index.php?go=newfriends&section=online&user_id=$1 [L]
	RewriteRule ^friends&user_id=([0-9]+)(/?)+$ index.php?go=newfriends&user_id=$1 [L]
Установка закончена, грац.

Автор Developer.Sloopy

[Модуль] Дополнение к разделу друзья.rar

175611ssq3un0sncqqq3uf (1).jpg



Edited by kphp
  • Upvote 2

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this