module like by nato (mas)

657
.
Na[T]o
My old account is mas. I've introduce about this function. All you need is follow the instruction.

DOWNLOAD

Attention: backup your /forum/index.php file before apply this mod.

This is an Add-on. You can remove it easily.
Прикрепленные файлы:
.
demo img 2
Прикрепленные файлы:
.
(\/)____o_O____(\/)
Na[T]o, Кнопка мне нравится
.
Koenig
(\/)____o_O____(\/)
sql
CREATE TABLE IF NOT EXISTS `vote` (
  `user` int(11) NOT NULL,
  `vote` int(11) NOT NULL,
  `type` varchar(32) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


// add to file //
include('../incfiles/classes/vote.php');
$vote = new Vote($user_id, array('my_post', 'my_ava'));


while ($row = mysql_fetch_array($sql)) {  
// ... //
// view //
echo $vote->view($row['id'], 'my_post');  // add first button like
echo $vote->view($row['id'], 'my_ava'); // add second button like


edit vote.php // class
public $ver = 4; // 4+ (5+) version
.
Reversion 1.0 released 1/12/2014
Прикрепленные файлы:
.
demo reversion 1.0
Прикрепленные файлы:
.
# Na[T]o (01.12.2014 / 09:02)
demo reversion 1.0
Give the code for index.php index.php I have another
.
# _azasoft_ (01.12.2014 / 11:48)
Give the code for index.php index.php I have another
If you want code open file optional.txt
.
# Hokage (01.12.2014 / 13:54)
If you want code open file optional.txt
This is not a complete
.
# _azasoft_ (01.12.2014 / 14:33)
This is not a complete
- first thing, the necessary file is like.php, unlike.php, like.png, unlike.png and database.sql.gz
- second thing, index.php on forum is for who use default johncms (not edited anything). If you don't want that, read file optional.txt, that all code need on index.php that you need. copy each part and paste it to where you want to show.
- third thing, you need basic experience of write code and read code to exploit this mod as way as you want.
Всего: 15