Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Tutorials and Tips (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=27)
-   -   Replacing shoutbox with Discord (http://www.mysidiaadoptables.com/forum/showthread.php?t=5515)

Dinocanid 09-23-2017 02:15 PM

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.



-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.


All times are GMT -5. The time now is 12:14 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.