Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Aleksandar Arsovski

    (@alekarsovski)

    From what I understand, the post_class filter is used to add the user-has-not-earned class to the body tag (the outermost HTML element for a post (at least in our theme structure)).

    It’s been quite a while since I’ve written any plugins and done any WordPress dev work, but from what I gathered in the codex and by looking at badgeos_add_earned_class_single function in the content-filters.php file it seems to me that either the user-has-earned or the user-has-not-earned class is passed back regardless of whether or not the post or page itself is an achievement/badge or just a regular post or page. The get_post_class function then adds the user-has-not-earned class to any post or page that is not an achievement because of the ternary operation $classes[] = badgeos_get_user_achievements( array( 'user_id' => $user_ID, 'achievement_id' => get_the_ID() ) ) ? 'user-has-earned' : 'user-has-not-earned'; where it will resolve to user-has-not-earned.

    Does this make any sense or am I misunderstanding the code?

    It does get awkward when the body tags of random posts and pages have this class added as it makes the class difficult to use at all, which is a shame as otherwise it would be very useful.

    Thread Starter Aleksandar Arsovski

    (@alekarsovski)

    Just to add to this as it is somewhat relevant:

    I was just looking at the profile interface (my own profile as an administrator) in the dashboard where you can award an achievement and in this interface it is also possible to award any badge as many times as you would like regardless of what the maximum times for earning that badge is set as.

    Thread Starter Aleksandar Arsovski

    (@alekarsovski)

    Thanks! I’m afraid I don’t have a dev clone of the site as I am mostly working on styling and support on the site, but my current responsibility is to test out BadgeOS on a cloned test site (again, no local copy though) before we deploy it for all users which is why I’ve been looking into this.

    I spoke with some of the support team that are running the CMS and we agreed that it looks like it’s not a BadgeOS issue in any case even if it turns out the Domain Mapping plugin is not the culprit so I’ll mark this as resolved.

    Thank you again for all your help!

    Thread Starter Aleksandar Arsovski

    (@alekarsovski)

    So I’ve been doing some more digging to see if I could figure out what might be causing all of this and I came across this: https://www.ads-software.com/support/topic/patch-for-admin_url-filter-respecting-relative-urls

    As far as I can tell, this is the domain mapping plugin that our WordPress CMS is using – it’s not on the plugin list I can see because I imagine it’s only under Super Admin control, but the language in the actual dashboard interface seems to match the plugin so I’m 99% certain it is the one.

    If this is the case, then it seems quite likely that this plugin is what’s causing the ajax_url to have ‘https://’ prepended even though you have set the URLs to relative (I was thrown off about this as well as I looked at your GitHub repo and saw you used relative). I’ll double check this with someone on the Super Admin side as soon as I can and if the issue turns out to be the plugin I’ve linked to then I will mark this as resolved.

    Sorry for the possible false alarm and thank you for all your help!

    Thread Starter Aleksandar Arsovski

    (@alekarsovski)

    I’m afraid the site I’m working on is not public and will likely never have any public facing content. It is an internal self-paced career development course and all users are given a login and password prior to starting. There is confidential data on the site; therefore, I cannot provide any access. This is why I also opted to remove the base URL from my previous message – it’s a private site so there’s no reason to drive any unwanted traffic to it.

    I took a look at the view-source of the page where the particular error included in my previous message occurred and here are the footer scripts that I think are relevant to BadgeOS and which included an ajax_url value:

    <script type=’text/javascript’ src=’https://[base-url]/wp-content/plugins/badgeos/js/credly-badge-builder.js?ver=1.3.0′></script&gt;
    <script type=’text/javascript’>
    /* <![CDATA[ */
    var badgeos_feedback_buttons = {“ajax_url”:”http:\/\/[base-url]\/wp-admin\/admin-ajax.php”,”user_id”:”6764″};
    var badgeos_feedback_buttons = {“ajax_url”:”http:\/\/[base-url]\/wp-admin\/admin-ajax.php”,”user_id”:”6764″};
    var BadgeosCredlyData = {“ajax_url”:”http:\/\/[base-url]\/wp-admin\/admin-ajax.php”,”message”:”Would you like to display this badge on social networks and add it to your lifelong badge collection?”,”confirm”:”Yes, send to Credly”,”cancel”:”Cancel”,”share”:”Share on Credly!”,”localized_error”:”Error:”,”errormessage”:”Error: Timed out”};
    var badgeos = {“ajax_url”:”http:\/\/[base-url]\/wp-admin\/admin-ajax.php”,”type”:”all”,”limit”:”10″,”show_filter”:”true”,”show_search”:”true”,”group_id”:”0″,”user_id”:”0″,”wpms”:”false”,”orderby”:”date”,”order”:”DESC”,”include”:[],”exclude”:[],”meta_key”:””,”meta_value”:””};
    /* ]]> */
    </script>
    <script type=’text/javascript’ src=’https://[base-url]/wp-content/plugins/badgeos/js/badgeos-achievements.js?ver=1.1.0′></script&gt;

    One other thing I failed to mention earlier which may be useful is that the site is on a multi-site install which may be a factor. Thank you for looking into this and please let me know if there’s any other information you need. I’m afraid I don’t have super admin privileges so I may not be able to answer all your questions, however. It’s also been quite a while since I’ve worked on WordPress plugins and done any PHP in general so apologies if something I’ve said doesn’t make sense – please let me know if that’s the case.

    Thread Starter Aleksandar Arsovski

    (@alekarsovski)

    Hi Michael,

    Sorry for the late response, I completely forgot to reply! I’m afraid I can’t offer a link to the site as it is a private install and I do not have the authority to give anyone access.

    Here is the error Chrome’s dev tools spits out however:
    Mixed Content: The page at 'https://[base-url]/badgetest/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'https://[base-url]/wp-admin/admin-ajax.php?action=get-achievements&type=all&limit=10&group_id=0&user_id=0&wpms=false&offset=0&count=0&filter=all&search=&orderby=date&order=DESC&meta_key=&meta_value='. This request has been blocked; the content must be served over HTTPS.

    Hope this helps

    Plugin Author Aleksandar Arsovski

    (@alekarsovski)

    Hi Missy,

    Sorry for just getting back to you now, for some reason I did not get a notice when you posted on the support thread.

    Anyway, what kind of ad are we talking about? There should be absolutely no way that my plugin puts an advertisement on your website. Is the ad inside the yellow wp dash message box on the dashboard (the administration overview area)? If so, I’m afraid I’m not quite sure how an ad could have appeared in there, but I can assure you there is no part of the plugin that is meant to add any sort of advertisement anywhere on your website.

    Could you perhaps link to a screenshot of the problem?

    I’ve heard that WordPress.com sites sometimes have ads put on them unless the user has paid for an ad-free website, but I was also under the impression that you were not able to install this plugin on a WordPress.com website.

    In any case, I’d really appreciate it if you could give me a bit more feedback about the issue as I definitely don’t like the idea of advertisements being placed on the dash message area.

    Regards,

    Alek

    Plugin Author Aleksandar Arsovski

    (@alekarsovski)

    I have not worked on this plugin in a very long time, but before I check for bugs, I just wanted to make sure that you have updated to the later version of the plugin. If the issue still persists (or happened in the first place) on the newest version, I’ll see what I can do about it. Thanks for the feedback.

    Regards,

    Alek

    Plugin Author Aleksandar Arsovski

    (@alekarsovski)

    Hi,

    Apologies for such a late reply and I realize my response may be irrelevant to you at this point, but I wanted to respond if at least to thank you for your kind words.

    Unfortunately, the organizational chart plugin I created is mostly an interface for users to be able to easily take advantage of the Google made Organizational Chart tool. As such, most of the actual code for creating the charts is part of the Google code found here: https://developers.google.com/chart/interactive/docs/gallery/orgchart

    From what I understand, there is currently no feature provided by the Google tool to make the org charts in a horizontal format although it seems to be a commonly requested feature. You can take a look at this issue tracking thread as the feature may be completed sometime soon in the future: https://code.google.com/p/google-visualization-api-issues/issues/detail?id=47

    If the feature is completed, you’re welcome to notify me and I will try my best to add the feature to this plugin as well depending on my availability. However, due to my current time constraints, I am unable to create the feature myself.

    The best I could do for now is recommend that you try to apply some CSS styling to your chart such that the box margins and the whitespace on your chart are minimized. A great plugin you can use to add CSS code can be found here: https://www.ads-software.com/extend/plugins/imporved-simpler-css/

    Furthermore, if you are new to CSS, here is an excellent tutorial that can take you through the basics and will have you styling your webpage in no time: https://www.w3schools.com/css/ Google Chrome’s developer tools can also help you take a look at your existing styling and you can play with values and see the changes in real time without the fear of accidentally changing something on your live website. Simply hit F12 in a Google Chrome browser to access the developer tools. (The Firefox equivalent is a plugin called Firebug.)

    I want to thank you for your feedback, and I apologize that I cannot be of much help to you at this time. I wish you all the best and hope that you can find a solution that works for you. Lastly, if you discover that the feature has been added to the Google Organizational Charts, let me know and hopefully I will be able to add a quick fix to implement the feature.

    Regards,

    Aleksandar

    Thread Starter Aleksandar Arsovski

    (@alekarsovski)

    Anyone? I’d really like to get my screenshot page back to normal. Should I be posting this in another topic?

    Thread Starter Aleksandar Arsovski

    (@alekarsovski)

    Hi again,

    I apologize for the mix-up. It seems that our team had forgotten to record their changes to the core Network Privacy plugin. I did check the changelog initially and there was no mention of the removal of the function, but the changelog is simply generated by the readme file. What I should have done is looked at the development log and all of this would have most likely been averted.

    Unfortunately, the Network Privacy plugin that is currently found on www.ads-software.com does not work with the Feed Key Generator plugin. I’ve left a more detailed comment/request on https://ronandandrea.com/contact. If you could please take a look at my request, it would be greatly appreciated.

    Once again, I apologize for the mix-up – version 0.1.1 works as expected and the bugs I’ve discovered are due to changes introduced by our team.

    Regards,

    Aleksandar

Viewing 11 replies - 1 through 11 (of 11 total)