Please upgrade here. These earlier versions are no longer being updated and have security issues.

van2shout messages do not appear

This discussion is related to the Van2Shout addon.
2»

Comments

  • LincLinc Director of Development Detroit Vanilla Staff

    We have a bit of a bug in core currently, sorry.

    peregrine
  • @jackmaessen

    try dropping your shoutbox table.

    and importing this as a test

    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    SET time_zone = "+00:00";
    
    
    /*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */;
    /*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
    /*!40101 SET @[email protected]@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    
    --
    -- Table structure for table `GDN_Shoutbox`
    --
    
    CREATE TABLE IF NOT EXISTS `GDN_Shoutbox` (
      `ID` int(11) NOT NULL AUTO_INCREMENT,
      `UserName` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
      `PM` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
      `Content` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
      `Timestamp` int(11) NOT NULL,
      PRIMARY KEY (`ID`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=11 ;
    
    --
    -- Dumping data for table `GDN_Shoutbox`
    --
    
    INSERT INTO `GDN_Shoutbox` (`ID`, `UserName`, `PM`, `Content`, `Timestamp`) VALUES
    (1, 't', '', 'test', 1399743459),
    (2, 't', '', 'test2', 1399743850),
    (3, 't', '', ':)  testing', 1399744093),
    (4, 't', '', 'test', 1399744465),
    (5, 't', '', 'test', 1399744590),
    (6, 't', '', ':(', 1399744899),
    (7, 't', '', 'test', 1400013922),
    (8, 't', '', 'test', 1400013950),
    (9, 't', '', 'test', 1400014288),
    (10, 't', '', 'test', 1400026685);
    
    /*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
    /*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
    /*!40101 SET [email protected]_COLLATION_CONNECTION */;
    

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

  • jackmaessenjackmaessen ✭✭✭

    @peregrine; i dropped the shoutbox table and did run the query above, but still no result...

  • display the contents of your shoutbox table.

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

  • peregrineperegrine MVP
    edited May 2014

    try this in your console and do you see anything

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

    if so, just add it to the plugin.

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

  • jackmaessenjackmaessen ✭✭✭
    edited May 2014

    nothing changes with the jQuery line; this line is already in discussionscontroller._local.php
    I just don't know why it does not work. When i look at the page of caerostris: http://shoutbox-demo.caerostris.com/index.php?p=/discussions; i can see in the console the lists:

    <div id="van2shoutscroll">
    <ul id="shoutboxcontent">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    <li>
    <style type="text/css">
    </ul>
    </div>
    

    But on my site there are no lists parsed between the ul

    <div id="van2shoutscroll">
    <ul id="shoutboxcontent">
    </ul>
    </div>
    

    There is something wrong with the code block..maybe a moderator can edit it

  • peregrineperegrine MVP
    edited May 2014

    you are searching for solution but I don't think the results you post will not help you solve it.

    you need to deterrmine why you get this error?

    unparsed problem in js.

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

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014

    If all else fails, the old version of this plugin prior to firebase, works well still.

    version 1.03 works in 2.1 just fine...

    Just have to remove the &$Sender and change to $Sender on a all places.

    peregrine
  • jackmaessenjackmaessen ✭✭✭

    Well, i did some important detection: after i tried version 1.03 vrijvlinder told me above, there was still no data displayed but the data was stored in the database i could see. So i thought: lets start clean ( all other plugins disabled) en look what is happening. And: YES, the content appeared in the shoutbox!!! I am going now differentiate to find out which plugin causes the trouble. I will let you know when i found.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I can guess it to be cleditor ...

    You can easily find out is you see the js console error log in web inspector.

    Probably will say syntax error undefined is not an object or something of the sort....There is no error just a conflict with another jquery plugin you may have on.

  • jackmaessenjackmaessen ✭✭✭
    edited May 2014

    it is the plugin peregrine made for me: Indexcategories
    When i try to enable this plugin, there comes a message: " There is a problem with the class methods". Plugin could not be enabled. When i visit the site, the shoutbox disappears and when going back to the dashboard plugins, i can see the plugin is suddely enabled?? When disabling again the content of the shoutbox appears again.

        <?php
         if (!defined('APPLICATION')) exit();
    
        $PluginInfo['IndexCategories'] = array(
        'Name' => 'IndexCategories',
        'Description' => "Adds a categoryicon to discussions list. clone - Based partially on Indexphotos plugin",
        //'Version' => '1.0',
        'Author' => "Peregrine",
        );
        class IndexCategoriesPlugin extends Gdn_Plugin {
        /**
        * Extra style sheet if you want it.
        */
        public function DiscussionsController_Render_Before($Sender) {
        $Sender->AddCssFile($this->GetResource('plugins/IndexCategories/design/indexcategories.css', FALSE, FALSE));
        }
        public function DiscussionsController_BeforeDiscussionContent_Handler($Sender,$Args) {
    
        $DiscArgs = ($Args['Discussion']);
        $catbase = strtolower(getvalue("Category",$DiscArgs));
        $catid = getvalue("CategoryID",$DiscArgs);
    
    
        // base image on Category name
        // comment line below if images are based on categoryid
        //$Image = Img("plugins/IndexCategories/design/images/" . $catbase . ".png", array('class' => "ProfilePhotoSmall"));
    
    
        // base image on categoryID
        // uncomment line below if images are based on categoryid
         $Image = Img("plugins/IndexCategories/design/images/" . $catid . ".png", array('class' => "category_icons"));
    
        echo $Image;
        }
        }
    
        ?>
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014

    I notice something maybe not important, but the last comma in the plugin description list should not be there. After author...

    and the closing php tag at the end should not be there either I don't think

    and this to echo the image maybe so you can add style to it ?

    echo Img($Image, array('class' => 'CatIcon'));

    peregrine
  • and remove the closing ?>

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

  • peregrineperegrine MVP
    edited May 2014

    acutally @jackmaessen

    you altered my original plugin :) if you look at the original, it is not the same as what you posted.
    also you weren't using 2.0.18.9 when the plugin was made :)

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

    vrijvlinder
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Oh? so I guess that makes the warranty void ...

    peregrinecaerostris
  • peregrineperegrine MVP
    edited May 2014

    v said: Oh? so I guess that makes the warranty void ...

    yes, if a bug is introduced with those changes.

    FYI - I loaded the van2shout and the zip in this comment link below and

    both Caticon and Van2shout both work concurrently in vanilla 2.1

    http://vanillaforums.org/discussion/comment/198844/#Comment_198844

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

    vrijvlindercaerostris
  • jackmaessenjackmaessen ✭✭✭

    yes, you both guys are right. I changed a little bit to the plugin but i did it not proper. And yes, that was 2.0.18.9 and now i use it for the 2.1 version. I changed these things you mentioned above and now it is working great with the plugin enabled.
    I appreciate it very much for supporting and thinking about this problem. Thanks very much to @vrijvlinder and @peregrine for the comments!

    peregrinevrijvlindercaerostris
2»
Sign In or Register to comment.