Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Is there a way to add the chat box into another page?

Is that possible with this application: http://vanillaforums.org/addon/basicpages-application

If so, how?

Thanks!

Comments

  • peregrineperegrine MVP
    edited May 2014

    I am going by your title "Is there a way to add the chat box into another page?"

    yes, using the extrapage plugin and putting the shoutbox in panel.

    with these settings.

    $Configuration['Plugin']['Van2Shout']['ContentAsset'] = '';
    $Configuration['Plugins']['ExtraPage']['WithPanel'] = '1';

    I'm sure someone can provide you with a solution via basic pages. addon if you post under that add-on.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:
    I am going by your title "Is there a way to add the chat box into another page?"

    yes, using the extrapage plugin and putting the shoutbox in panel.

    with these settings.

    $Configuration['Plugin']['Van2Shout']['ContentAsset'] = '';
    $Configuration['Plugins']['ExtraPage']['WithPanel'] = '1';

    I'm sure someone can provide you with a solution via basic pages. addon if you post under that add-on.

    By using that plugin it will add the shoutbox on the sidebar, what i'm looking for is add it in the main section.

  • peregrineperegrine MVP
    edited May 2014

    worked for me shoutbox in content.

    add this to the extrapage plugin in the create function.

    $Sender->AddModule('van2shoutdiscussionsmodule','Content');
    
    change this in the extrapagea.php file
    
    // $this->AddCssFile('exp.css', 'plugins/Extrapage');?>
    
    to 
    
    // $this->AddCssFile('exp.css', 'plugins/Extrapage');?>
    <script>
      jQuery(document).ready(function($) { UpdateShoutbox(); });
    </script>
    
    
    change this in defualt.php or extrapage...
    
    from this 
    
    $Sender->Render($this->GetView('extrapagea.php'));
    
    to this
    
    
     $Sender->AddModule('van2shoutdiscussionsmodule','Content');
        $Sender->Render($this->GetView('extrapagea.php'));
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:
    worked for me shoutbox in content.

    add this to the extrapage plugin in the create function.

    $Sender->AddModule('van2shoutdiscussionsmodule','Content');

    change this in the extrapagea.php file

    // $this->AddCssFile('exp.css', 'plugins/Extrapage');?>

    to

    // $this->AddCssFile('exp.css', 'plugins/Extrapage');?>

    jQuery(document).ready(function($) { UpdateShoutbox(); });



    change this in defualt.php or extrapage...

    from this

    $Sender->Render($this->GetView('extrapagea.php'));

    to this


    $Sender->AddModule('van2shoutdiscussionsmodule','Content');
    $Sender->Render($this->GetView('extrapagea.php'));

    On the console it says this:

    Uncaught ReferenceError: Firebase is not defined
    Uncaught ReferenceError: UpdateShoutbox is not defined

    And when I type a message:

    Uncaught TypeError: Cannot read property 'child' of undefined

  • joscplanjoscplan
    edited May 2014

    So insted of adding

    $Sender->AddModule('van2shoutdiscussionsmodule','Content');

    in defualt.php

    I added

        $Session = GDN::Session();
        if($Session->CheckPermission('Plugins.Van2Shout.View'))
        {
            //Include firebase script?
            if(USE_FIREBASE)
            {
                $Sender->Head->AddString("\n<script src='https://cdn.firebase.com/v0/firebase.js'></script>");
            }
    
            //Display the delete icon?
            if($Session->CheckPermission('Plugins.Van2Shout.Delete'))
            {
                $Sender->AddDefinition('Van2ShoutDelete', 'true');
            }
    
            include_once(PATH_PLUGINS.DS.'Van2Shout'.DS.'modules'.DS.'class.van2shoutdiscussionsmodule.php');
            $Van2ShoutDiscussionsModule = new Van2ShoutDiscussionsModule($Sender);
            $Sender->AddModule($Van2ShoutDiscussionsModule);
        }
    

    And didn't had to add

    <script> jQuery(document).ready(function($) { UpdateShoutbox(); }); </script>

    to extrapagea.php

    And now it works :)

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @Linc here is your first "Solutionsayer" Badge nominee !!! :D

  • LincLinc Detroit Admin

    @vrijvlinder Thanks, done.

  • peregrineperegrine MVP
    edited May 2014

    if you wanted to include emotify you need to include the js - you might need to cut and paste from that line from van2shout create method to the extrapage create as well.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine said:
    I am going by your title "Is there a way to add the chat box into another page?"

    yes, using the extrapage plugin and putting the shoutbox in panel.

    with these settings.

    $Configuration['Plugin']['Van2Shout']['ContentAsset'] = '';
    $Configuration['Plugins']['ExtraPage']['WithPanel'] = '1';

    I'm sure someone can provide you with a solution via basic pages. addon if you post under that add-on.

    I tried that, and it works. But is it possible to ONLY add it to that extrapage Ive set up? Currently it shows on all pages. I just want it to show in that extrapage. Thanks!

  • peregrineperegrine MVP
    edited June 2014

    I tried that, and it works. But is it possible to ONLY add it to that extrapage Ive set up? Currently it shows on all pages. I just want it to show in that extrapage. Thanks!

    start with clean code from both plugins.

    yes. the only page you want it to show is ExtraPageA.

    modify class.van2shout,plugin.php

    comment out the line indicated with //

    // force to Content.
    // if(C('Plugin.Van2Shout.ContentAsset', true))
    //{
        define('VAN2SHOUT_ASSETTARGET', 'Content');
    //}
    //else
    //{
    //  define('VAN2SHOUT_ASSETTARGET', 'Panel');
    //}
    
    
    and
    
    //  public function DiscussionsController_Render_Before($Sender) {
    //      if(VAN2SHOUT_ASSETTARGET != 'Content')
    //          return;
    
    //      $this->includev2s($Sender);
    //  }
    

    in default.php in ExtraPages plugin

    change
    $Sender->Render($this->GetView('extrapagea.php'));
    }

    to

        // get the van2shout and view to show in extrapagea
        $this->AddVan2Shout($Sender);
    
        $Sender->Render($this->GetView('extrapagea.php'));
    }
    

    and add this routine

        public function AddVan2Shout($Sender) {
            $Session = GDN::Session();
            if($Session->CheckPermission('Plugins.Van2Shout.View'))
            {
            //Include firebase script?
            if(USE_FIREBASE)
            {
            $Sender->Head->AddString("\n<script src='https://cdn.firebase.com/v0/firebase.js'></script>;");
            }
            //Display the delete icon?
            if($Session->CheckPermission('Plugins.Van2Shout.Delete'))
            {
            $Sender->AddDefinition('Van2ShoutDelete', 'true');
            }
            include_once(PATH_PLUGINS.DS.'Van2Shout'.DS.'modules'.DS.'class.van2shoutdiscussionsmodule.php');
            $Van2ShoutDiscussionsModule = new Van2ShoutDiscussionsModule($Sender);
            $Sender->AddModule($Van2ShoutDiscussionsModule);
            }
    
        }
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • r0obertr0obert
    edited June 2014

    @peregrine thank you!

    Can I use Extra Page with Roles/Permissions?

  • peregrineperegrine MVP
    edited June 2014

    Can I use Extra Page with Roles/Permissions?

    yes, but that would be a new discussion topic under extrapages plugin with you version number of vanilla (assuming you want me to answer the question).

    so you would need to follow protocol :)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • r0obertr0obert
    edited June 2014

    @peregrine thanks a lot for 3.1 - permissions are working now!

    The van2shout is also working well, just need to remove a " ; " from this code, after the script tag:

    $Sender->Head->AddString("\n<script src='https://cdn.firebase.com/v0/firebase.js'></script>;");

    (lol for some reason I cannot remove the " ; " when I put code tags, it's simply added automatically)

    ..and also maybe comment out this css from exp.css so you don't mess the header/navbar:

    /* Body {
          padding-left: 5px; 
          } 
    

    Thank you very much for your help!

Sign In or Register to comment.