• In Chat
  • About
  • Contact
  • Browse

    Latest Coding

    Latest Daily

    Latest Health

    Featured Story

Coding 2018

| Begin | File Bank |  Register | Reply | Search | Statistics | Manual |
Site Coding Coding / Site Coding /  
 

Forums now have like buttons

 
Author Admin
Admin


#1 | Posted: 25 Oct 2018 16:29 | Edited by: Admin 
I tried to add buttons by using code I found on the net but it was not an easy task. Minibb forum is a bit of an head scratcher when you are not familiar with it. It will not run php code unless you create all sorts of variables. Anyway I managed to find a site that offers an instant service . Simply one lot of javascript did the trick. Well I did have to create one variable so as to make it work with each post. Not so hard, thankfully. Anyway I think they look great. There are loads of designs so I can change them if I wish.

They are free for 7 days then a small monthly - yearly or one time payment is required. It won't break the bank. Quite worth it my opinion.

If you like this post please tick below
Website Designer

Author Admin
Admin


#2 | Posted: 27 Oct 2018 18:08 | Edited by: Admin 
For those who might be interested in adding these buttons to your own minibb forum ...

Step 1
I added this to the parseMessage function found in bb_plugins.php file ...

/* Likes addon */
$GLOBALS['likes']="{$GLOBALS['cols'][6]}";
/* --Likes addon */

Step 2
Then I added 2 variables into the data-identifier of the supplied javascript ...

{$topicName}{$likes}

And placed the whole code in the appropriate part of main_posts_cell.html file - under the 'postedText' div.

The 2 variables add the topic tile and the message number to keep the identifier unique. This is essential for accurate likes and dislikes recording.

The above is all it took.
Website Designer

Your Reply Click this icon to move up to the quoted message


 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

 

 
Coding Powered by Forum Software miniBB ®
Online now: Guests - 1
Members - 0
Max. ever online: 33 [10 May 2019 12:44]
Guests - 33 / Members - 0
No Of Posts

  • Latest Daily Post ...

  • Latest Health Post ...

CONTACT

Phone: +01 0775 8107 427

sport4u2018@gmail.com

WEBMASTER

email icon Mark Jones

Latest Story

RANDOM CODING

  • Copyright © 2018 MKJ Brainwaving
↑ TOP