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.

Social Login and counting comments

Hi
After my first install I´ve noticed that the number of comments from a user loged via twitter is not getting counted.
The user is displayed at member list only his comments are not.
Any clue?
Thx

«1

Comments

  • peregrineperegrine MVP
    edited March 2013

    the membership plugin pulls info out of the user table, see if the comment count matches what show up in your database user table versus the membership plugin. If they are different there may be an issue. if they are the same it is because commentcount in table is not being updated via twitter (which is out of my plugins realm and nothing my plugin deals with).

    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 March 2013

    and @Peregrine sez again:

    the membership plugin pulls info out of the user table, see if the comment count matches what show up in your database user table versus the membership plugin.

    Frankly from the looks of your image - the right image - it show 1 discussion, 0 comments

    and the that is what the membership table is showing. If your database is not correct there is nothing my plugin can do to fix it. It just reads results, it doesn't write them.

    No offense, but It is getting pretty tiring asking people what version of vanilla they are using (I may stop responding in the future if the questioner doesn't present the version of vanilla in the question, because of having to ask what version is getting tiresome!!!!!!!!!!!!!!!!!!!!!!)

    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 March 2013

    I don't use twitter, facebook, etc. but if the user table and membership plugin show the comment count the same but the number of comments from a user is incorrect.

    Perhaps - the twitter and facebook logins don't correctly update the comment count correctly in the user table, just an idea.

    As I said, i don't know what vanilla version you use or the version of the plugin you are using.

    Also see -

    http://vanillaforums.org/discussion/23242/vanilla-2-0-18-4-user-discussions-and-comments-count-has-stopped

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

  • SrggamerSrggamer HardCore Gamer ✭✭✭

    @wilsoncortez said:
    Hi
    After my first install I´ve noticed that the number of comments from a user loged via twitter is not getting counted.
    The user is displayed at member list only his comments are not.
    Any clue?
    Thx

    This happens to me as well, But I can do nothing about it (Vanilla 2.0) I would just let it go.

  • peregrineperegrine MVP
    edited March 2013

    I seem to remember at least in one version of vanilla, if the user never posted a discussion, but did make comments , the comments tab wouldn't even show up in the profile until the user posted a discussion, maybe this is related.

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

  • I´m away for a while- sorry

    Regarding the Vanilla version:
    Version 2.0.18.4

  • what about the user table - use phpmyadmin?

    your results are:

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

  • screenshot from my statistic´s dashboard (after some flashing tries finally it stoped)
    The screenshot shows correct numbers.

    Peregrine i´ll be back in a minute with some mySql news
    Please note that this is still a test forum with only 4 users including myself the admin

  • "GDN_User" table

    -- phpMyAdmin SQL Dump

    -- version 3.4.11.1

    -- http://www.phpmyadmin.net

    -- Máquina: localhost
    -- Data de Criação: 30-Mar-2013 às 14:53
    -- Versão do servidor: 5.5.30
    -- versão do PHP: 5.2.17

    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    SET time_zone = "+00:00";

    /!40101 SET @CHARACTER_SET_CLIENT */;
    /
    !40101 SET @CHARACTER_SET_RESULTS /;
    /
    !40101 SET @COLLATION_CONNECTION /;
    /
    !40101 SET NAMES utf8 */;

    --

    -- Base de Dados: fabrica7_van1


    --

    -- Estrutura da tabela GDN_User

    DROP TABLE IF EXISTS GDN_User;
    CREATE TABLE IF NOT EXISTS GDN_User (
    UserID int(11) NOT NULL AUTO_INCREMENT,
    Name varchar(50) COLLATE utf8_unicode_ci NOT NULL,
    Password varbinary(100) NOT NULL,
    HashMethod varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
    Photo varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    About text COLLATE utf8_unicode_ci,
    Email varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    ShowEmail tinyint(4) NOT NULL DEFAULT '0',
    Gender enum('m','f') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'm',
    CountVisits int(11) NOT NULL DEFAULT '0',
    CountInvitations int(11) NOT NULL DEFAULT '0',
    CountNotifications int(11) DEFAULT NULL,
    InviteUserID int(11) DEFAULT NULL,
    DiscoveryText text COLLATE utf8_unicode_ci,
    Preferences text COLLATE utf8_unicode_ci,
    Permissions text COLLATE utf8_unicode_ci,
    Attributes text COLLATE utf8_unicode_ci,
    DateSetInvitations datetime DEFAULT NULL,
    DateOfBirth datetime DEFAULT NULL,
    DateFirstVisit datetime DEFAULT NULL,
    DateLastActive datetime DEFAULT NULL,
    LastIPAddress varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
    DateInserted datetime NOT NULL,
    InsertIPAddress varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
    DateUpdated datetime DEFAULT NULL,
    UpdateIPAddress varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
    HourOffset int(11) NOT NULL DEFAULT '0',
    Score float DEFAULT NULL,
    Admin tinyint(4) NOT NULL DEFAULT '0',
    Banned tinyint(4) NOT NULL DEFAULT '0',
    Deleted tinyint(4) NOT NULL DEFAULT '0',
    CountUnreadConversations int(11) DEFAULT NULL,
    CountDiscussions int(11) DEFAULT NULL,
    CountUnreadDiscussions int(11) DEFAULT NULL,
    CountComments int(11) DEFAULT NULL,
    CountDrafts int(11) DEFAULT NULL,
    CountBookmarks int(11) DEFAULT NULL,
    PRIMARY KEY (UserID),
    KEY FK_User_Name (Name),
    KEY IX_User_Email (Email)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ;

    --

    -- Extraindo dados da tabela GDN_User

    INSERT INTO GDN_User (UserID, Name, Password, HashMethod, Photo, About, Email, ShowEmail, Gender, CountVisits, CountInvitations, CountNotifications, InviteUserID, DiscoveryText, Preferences, Permissions, Attributes, DateSetInvitations, DateOfBirth, DateFirstVisit, DateLastActive, LastIPAddress, DateInserted, InsertIPAddress, DateUpdated, UpdateIPAddress, HourOffset, Score, Admin, Banned, Deleted, CountUnreadConversations, CountDiscussions, CountUnreadDiscussions, CountComments, CountDrafts, CountBookmarks) VALUES
    (1, 'admin', '$P$BRrgeTOUTSlBSHa7Ht9e2vUizIOrhU1', 'Vanilla', 'userpics/313/QG85U6IWQ8VV.jpg', NULL, 'wcortezribeiro@yahoo.com.br', 0, 'm', 1, 0, 0, NULL, NULL, 'a:4:{s:16:"PreviewThemeName";s:0:"";s:18:"PreviewThemeFolder";s:0:"";s:26:"Plugins.Voting.CommentSort";s:0:"";s:17:"ShowAllCategories";b:1;}', '', 'a:1:{s:12:"TransientKey";s:12:"6BHVL7OF5RL3";}', NULL, '1975-09-16 00:00:00', '2013-03-22 03:05:56', '2013-03-30 14:42:14', '74.220.198.72', '2013-03-22 03:05:56', NULL, '2013-03-30 14:42:14', '189.33.29.174', 3, NULL, 1, 0, 0, NULL, 5, NULL, 0, 1, 0),
    (2, '[Deleted User]', 'YJCPAQ5AFG', 'Vanilla', NULL, '', 'user_2@deleted.email', 0, 'm', 0, 0, 0, NULL, '', NULL, '', 'a:1:{s:5:"State";s:7:"Deleted";}', NULL, NULL, '2013-03-22 17:30:49', '2013-03-22 17:30:49', '189.33.29.174', '2013-03-22 17:30:49', NULL, '2013-03-22 17:48:48', '189.33.29.174', 0, NULL, 0, 0, 1, 0, 0, 0, 0, 0, 0),
    (3, 'wilson', '$P$BIzjjpjj.rz8vQF.cloPJ4/dfqCHUj0', 'Vanilla', NULL, NULL, 'wilsoncortezribeiro@gmail.com', 0, 'm', 0, 0, 0, NULL, NULL, NULL, '', 'a:3:{s:12:"TransientKey";s:12:"5HUSPOO5LLEZ";s:21:"CountCommentSpamCheck";i:1;s:20:"DateCommentSpamCheck";s:19:"2013-03-22 17:53:19";}', NULL, NULL, '2013-03-22 17:50:27', '2013-03-22 17:50:27', '189.33.29.174', '2013-03-22 17:50:27', NULL, NULL, NULL, 3, NULL, 0, 0, 0, NULL, 0, NULL, 1, NULL, 1),
    (4, 'bellaReporter', '$P$BLzir2sZrWj3uSqH5dGSnBJ9nL43uB.', 'Vanilla', 'http://a0.twimg.com/profile_images/826216584/twitterLogo_normal.jpg', NULL, 'bellaReporter@via.twitter.com', 0, 'm', 0, 0, 0, NULL, NULL, 'a:1:{s:26:"Plugins.Voting.CommentSort";s:0:"";}', '', 'a:5:{s:12:"TransientKey";s:12:"6H5YKSXNER7A";s:21:"CountCommentSpamCheck";i:1;s:20:"DateCommentSpamCheck";s:19:"2013-03-29 17:43:23";s:24:"CountDiscussionSpamCheck";i:1;s:23:"DateDiscussionSpamCheck";s:19:"2013-03-29 20:58:56";}', NULL, NULL, '2013-03-22 18:17:02', '2013-03-29 20:59:47', NULL, '2013-03-22 18:17:02', NULL, '2013-03-29 20:59:47', '189.33.29.174', 3, NULL, 0, 0, 0, NULL, 1, NULL, 0, 1, NULL),
    (5, 'SampaSul', '$P$BHw5O17LYvUBWU1NvpX4cDDP6NjmVS/', 'Vanilla', 'userpics/983/4KKFZ8RX8VIX.jpg', NULL, 'wilson@sampasul.net', 0, 'm', 0, 0, 0, NULL, NULL, NULL, '', 'a:5:{s:12:"TransientKey";s:12:"ERR136IYOCXU";s:21:"CountCommentSpamCheck";i:1;s:20:"DateCommentSpamCheck";s:19:"2013-03-30 14:05:25";s:24:"CountDiscussionSpamCheck";i:1;s:23:"DateDiscussionSpamCheck";s:19:"2013-03-30 14:08:16";}', NULL, NULL, '2013-03-23 03:01:38', '2013-03-30 14:03:08', '189.33.29.174', '2013-03-23 03:01:38', NULL, '2013-03-30 14:03:08', '189.33.29.174', 3, NULL, 0, 0, 0, NULL, 1, NULL, 0, 1, NULL);

    /!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /
    !40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
    /
    !40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;<

  • Here follows the "GDN_UserComment" note that this seems to be wrong

    -- phpMyAdmin SQL Dump

    -- version 3.4.11.1

    -- http://www.phpmyadmin.net

    -- Máquina: localhost
    -- Data de Criação: 30-Mar-2013 às 15:12
    -- Versão do servidor: 5.5.30
    -- versão do PHP: 5.2.17

    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    SET time_zone = "+00:00";

    /!40101 SET @CHARACTER_SET_CLIENT */;
    /
    !40101 SET @CHARACTER_SET_RESULTS /;
    /
    !40101 SET @COLLATION_CONNECTION /;
    /
    !40101 SET NAMES utf8 */;

    --

    -- Base de Dados: fabrica7_van1


    --

    -- Estrutura da tabela GDN_UserComment

    DROP TABLE IF EXISTS GDN_UserComment;
    CREATE TABLE IF NOT EXISTS GDN_UserComment (
    UserID int(11) NOT NULL,
    CommentID int(11) NOT NULL,
    Score float DEFAULT NULL,
    DateLastViewed datetime DEFAULT NULL,
    PRIMARY KEY (UserID,CommentID)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

    --

    -- Extraindo dados da tabela GDN_UserComment

    INSERT INTO GDN_UserComment (UserID, CommentID, Score, DateLastViewed) VALUES
    (1, 1, 1, NULL),
    (1, 3, 1, NULL);

    /!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /
    !40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /;
    /
    !40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

    PS. let me know if you need another one.
    Thank you

  • try this it is all you need to find out...

    SELECT Name, CountComments
    FROM `GDN_User`
    LIMIT 0 , 30
    

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

  • Seems that the table is not getting updated

    INSERT INTO GDN_User (Name, CountComments) VALUES

    ('admin', 0),
    ('[Deleted User]', 0),
    ('wilson', 1),
    ('bellaReporter', 0),
    ('SampaSul', 0);>

  • peregrineperegrine MVP
    edited March 2013

    @wilsoncortez said:
    Seems that the table is not getting updated

    it seems were running at cross-purposes a bit. If you want to show the results of the select I gave you that would be cool, other wise you are on your own, and I'm out of here.

    Also - this really is beginning to look like it has nothing to do with Membership Enhanced 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.

  • edited March 2013

    it seems were running at cross-purposes a bit. If you want to show the results of the select I gave you that would be cool, other wise you are on your own, and I'm out of here.>

    Well peregrine i've runned your query and the results spotted is what i´ve posted above. If that´s not what you´ve asked please sorry but that is what i have:

    ('admin', 0), ('[Deleted User]', 0), ('wilson', 1), ('bellaReporter', 0), ('SampaSul', 0);
    which i´m uderstanding stats for (´user´, num. of comments)

    As i´m not a php/plugin developer, maybe I´m too stupid to understand. I´ve just posted this under Members List Enhanced thread because I´ve thought, im my deep ignorance, that this fact could be related to the plugin itself and not with vanilla core, ok? Just a super small feedback.

    I´m also aware that you are one of the top posters/developers around Vanilla community and maybe you might be a bit tired of telling the same things again and again to stupid newbies like me and others. I´am very grateful for your time and free support. You and "vrijevlinder" are among the helpful and patient people around :-)

    But to get things easier: if I can not display the number of comments made by users logged in via twitter, facebook, etc.. due to plugin or core, no problem. I´ll just disable this feature in the control panel and we do not talk about anymore.

    No problem at all.

    I apologize for any inconvenience and I prefer to delete a plugin or a function instead of lose a friend ;-)

    Thx;-)

    BTW> I have 8 years of experience on messing with lots of cms and forum softwares and I must say Vanilla is not for the weak, at least at this point of development IMHO.

  • peregrineperegrine MVP
    edited March 2013

    @wilsoncortez said

    ('admin', 0), ('[Deleted User]', 0), ('wilson', 1), ('bellaReporter', 0), ('SampaSul', 0); which i´m uderstanding stats for (´user´, num. of comments)

    thanks - thats what I was looking for:

    Sorry, i didn't mean to be harsh, I usually ask specific questions, that help me figure out the issue, and when I don't get the answers to the specific questions, I feel like a dog chasing its tail. :)

    so theoretically in the membership view.

    you would see only wilson has 1 comment, and everyone else has 0 comments.

    'wilson', 1

    So, the membership plugin seems to reflect exactly what your user table has. So, it could be the twitter login. I would be interesting if you find they increment after removing the social plugins.

    @wilsoncortez said
    BTW I have 8 years of experience on messing with lots of cms and forum softwares and I must say Vanilla is not for the weak, at least at this point of development IMHO.

    I had no php, css, jquery, or MVC, or object-oriented programming experience prior to two years ago. I started learning a bit of vanilla, MVC and object-oriented programming about a year and half ago. I think the learning curve for Vanilla is a good 3-6 months. I just tore apart plugins about a year ago and experimented. That for me is the way to learn - experiment and test and reload software when you change it beyond recognition.

    So keep up hope - you will be there, if you keep on trying.


    Vanilla, does have a steep learning curve to write code for it, but once you get a bit more experience, you will love it, and realize the fantatic flexibility it has. It is a great learning tool for improving your programming and computer skills.


    The way to do it is pick a simple plugin and keep modifying it till you understand it, and the same with themes and don't forget the tutorial and the wiki.


    The other thing is reading discussions that seem like they pertain to you, vastly improves your knowledge. The people who just focus on their own questions and ignore all the other discussions will not learn nearly as much, if at all.

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

  • edited March 2013

    so theoretically in the membership view.

    you would see only wilson has 1 comment, and everyone else has 0 comments.

    'wilson', 1>

    Wondering where from is this data pushed

    https://us.v-cdn.net/5018160/uploads/FileUpload/0b/d361c27376ad71c37e504aee4a305c.jpg

  • peregrineperegrine MVP
    edited March 2013

    I don't see that on mine. Maybe it is vanilla analytics totalling things for you.

    or it totals up for each user. Try this and see what it gives you for bella reporter

    SELECT Count( CountComments )
    FROM GDN_UserDiscussion
    WHERE UserID = 4

    I don't know - maybe it is fixed in vanilla 2.1 - you could give that a try.

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

  • That´s the result:

    Count( CountComments )
    4
    The result is wrong by the way

    I´ve also expanded the query to UserID=1: (the admin)
    and te results:
    Count( CountComments )
    6

    which is also wrong . The correct would be just 1 comment and 5 discussions

    And for UserID=3 (wilson)
    The results are CORRECT
    Count( CountComments )
    1

    By the results above i would say that sometimes comments are jointed with discussions and the very only user, wilson, which registerd by Vanillas´regular reg form get the correct results

    Wierd isn´t it?

    I´ll try to delete all users make some cleanup, repair tables via phpmyadmin and start again just to see if thing go better.

    thx

  • I led you on a red herring (V must be rubbing off on me :)

    The

    SELECT Count( CountComments ) FROM GDN_UserDiscussion WHERE UserID = 4

    just tells all comments by anybody in in discussions where the userid participated. The best I can tell.

    I still believe the user table is the place where the accurate discussion and comment count is reflected, and i don't know why yours is off, unless the social login plugins impact it.

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

Sign In or Register to comment.