View Single Post
  #1  
Old 09-23-2017, 02:15 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,633
Dinocanid is on a distinguished road
Default Replacing shoutbox with Discord

Discord is the "all-the-rage" shoutbox now. It works on all devices, is easy to use, it's free, nice to look at, works in-browser and client, requires no coding skills, painless, and all that good stuff. Now, it is also possible to embed it in websites thanks to TitanEmbeds! It's in beta, but so far it works great and I highly recommend it as a replacement.

  Spoiler: Screenshots 


(Main site)

(SMF forum)


-Steps-
  1. Have a discord server set up
  2. Go to https://titanembeds.com/
  3. Click "start here" and follow the tutorial
  4. When you reach the User Dashboard, you should see your server listed. Click "Modify".

Now replace your entire shoutboxview.php with this:
PHP Code:
<?php

class ShoutboxView extends View{
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;
        
$document->setTitle("Shoutbox");
        
$document->add(new Comment("IFRAME EMBED"));
    }
}
?>
Copy-paste the iframe embed html code given by TitanEmbeds and use it inside the comment. Make sure you either escape the quotation marks with slashes or replace them with apostrophes (')
Experiment with iframe sizes to see what works for you. For a responsive iframe, make sure you have width set to 100%, or any % depending on your css, just stay away from px for the width. Most of the time it will not scale well with all devices. Using percents ensures it will. You can set the height to whatever works for you. (I use 700px)

No more woes about having seperate shoutboxes for the main site and forum (if you use mybb, smf, or any other forum software). Just use the handy embed code and everyone will see the same chat.

It is also possible to use custom css and colors for the shoutbox, but you have to follow the instructions provided on the site.
__________________
Reply With Quote