Jump to content

Martin A.

Clients
  • Posts

    4,230
  • Joined

  • Last visited

  • Days Won

    21

Reputation Activity

  1. Like
    Martin A. reacted to Nathan Explosion in How to turn off compressed quotes?   
    You've mentioned this twice - are you sure about that? Reason I ask is the truncate functionality looks like it is applied with JS, via ips.ui.quote.js, at the time of post display:
    /* Set the event handler for opening/closing */ elem.find('> .ipsQuote_citation').on( 'click', _toggleQuote ); elem.find('> .ipsQuote_contents') .addClass('ipsClearfix') .attr('data-ipsTruncate', true) .attr('data-ipsTruncate-type', 'hide') .attr('data-ipsTruncate-size', '7 lines') .attr('data-ipsTruncate-expandText', ips.getString('expand_quote')); I've sussed out how to play with the above but if this somehow controlled via a theme template then I'd love to know which one so I could take a closer look at it for something I'm working on to assist with this 'issue'
     
     
  2. Like
    Martin A. reacted to TSP in CSS bug using rgb/rgba for Safari 10/11 in some properties   
    @Rikki @Ehren
    Safari 10 and 11 apparently have an issue with the use of rgb() / rgba() in combination with --css-variables within certain CSS properties like border and box-shadow. I found one specific bug in your default theme that you can fix, other than that I just want to make you aware of this, as I had to spend quite a lot of time debugging this myself. 
    After an upgrade from 4.4 I got a number of complaints about how there was now a grey circle covering the reaction button and the number of likes. People reported having the issue on desktop, mobile and tablet. Initially I was unable to reproduce and started to ask for more details. One of the users provided me with a user agent string which led me to reproduce the issue and discovering another one.
    This image displays two of the issues I found in our theme:

     
    This image displays how it looked in Safari 9(!), Safari 12+ and other browsers:

    How to reproduce issue 1 on a community: 
    You need to be logged in with a member account that's able to give reactions, and: 
    The reaction setup: In my case only the standard like-reaction is enabled, all other reactions disabled. We use the upvote-image for the like-reaction. Reaction display is set to Overall reaction value.
    Reproduced with: Browserstack -> Mac -> High Sierra -> Safari 11.1 (or other environments with Safari 10 or 11)
    Please note: only issue 1 can be reproduced in the default theme, but I'm also mentioning my second issue just to provide an additional example. 
    Cause/solution for Issue 1 / Bug in default theme) Grey circle covering like button and reaction value
    This is caused by the following CSS rule in applications/core/dev/css/global/framework/engagement.css
    a.ipsReact_reaction:after { position: absolute; top: 50%; width: 70px; height: 70px; border-radius: 50%; content: ''; display: block; opacity: 1; pointer-events: none; box-shadow: inset 0 0 0 35px rgba( var(--theme-text_color), 0 ); } More specifically the issue is with the box-shadow line at the bottom. Unless I'm missing something, this rule is the equivalent of:
    box-shadow: inset 0 0 0 35px transparent;
    Changing the value of box-shadow to "inset 0 0 0 35px transparent" at least fixes the issue. But I guess this might affect the animation styles you have further below in the same stylesheet. I don't know what a better solution would be, but I at least think you should make sure that the reaction button and reaction value are available in Safari 10 and 11, which they are not currently. 
    Cause/solution for Issue 2) Black color instead of lighter border color around posts
    So the second issue was caused by custom CSS from me, but I'm including it since it highlights the rgb/rgba problem with another CSS property as well. 
    My CSS-rule was: 
    article.ipsComment { border: 1px solid rgb(var(--theme-ehm_grey2)); border-radius: 10px; } The solution here was to instead use border-style and border-width and then add:
    border-color: rgb(var(--theme-ehm_grey2));
    So rgb() + --css-var worked within the value of the border-color property, but not within the border property.
    Note that if you do not use a variable within rgb for the border-property, then it would also use the correct color: border: 1px solid rgb(235,235,235); 
    Meaning it's the combination of rgb/rgba-function and --css-variables that is causing the issue. Not the rgb-function on it's own
    In summary / other findings / questions:
    1) Safari 10 and 11 apparently have an issue with the use of rgb() / rgba() in combination with --css-variables within certain properties. In most cases it probably doesn't cause too much trouble, but I think you should at least fix the reaction styling issue and also just be aware of this issue. 
    2) I personally found it very weird this issue is not in Safari 9. It seems it worked as it should Safari 9, then they broke it for Safari 10&11, before it was fixed again for Safari 12 and newer. Unless you have some kind of compatibility CSS rules or javascript that kicks in for Safari 9 but not 10/11?
    3) I did a quick search on google about this and found a note about this from 2018 in another software project: https://github.com/ionic-team/ionic-framework/issues/16123
    They gave an alternate way to debug and solve this (which I haven't tested myself): 
     
  3. Like
    Martin A. reacted to Adriano Faria in guest view, limit access   
  4. Like
    Martin A. got a reaction from CheersnGears in How to embed Tiktok videos?   
    You'd have to do a request to the URL if it's "vm.tiktok.com". That will do a 301 redirect to the proper URL. The final URL is supported by the oEmbed endpoint.

    I don't see an immediate way to get the final URL from the response object, without trying to get it form the HTML response.
  5. Like
    Martin A. reacted to Vegan Gaymer in Anyone else scolded for using Plugins, Themes, etc?   
    Just a quick update that after a month of third-party resources being blamed, it turns out (yet again) that it was an Invision issue. That's okay. I don't have any problem with any bugs or issues discovered in any application or Invision, but I have to say that I think this could have been resolved much sooner if there wasn't this uncomfortable bias against 3rd Party resources. I am just happy that the issue is being resolved, but after going through this so many times, it can get very frustrating. I say that with great affection because I am in awe of all of you who do this kind of work. I just don't want to go through this again.
  6. Like
    Martin A. reacted to TSP in Move logic of moderation tools etc. away from templates   
    I discussed this briefly with @Daniel F and @Martin A. a week ago, but I'm creating this topic to make sure it's not forgotten and it can hopefully be added to some todo-list for a future version.
    I realize there might be good reason for why you've done something like you've done, but in that case I would happy to hear about the reasoning and maybe get some discussion on it.
    Example 1: Badges
    This is part of your template code in forums/front/topics/post.phtml:
    <div class='ipsResponsive_hidePhone ipsComment_badges'> <ul class='ipsList_reset ipsFlex ipsFlex-jc:end ipsFlex-fw:wrap ipsGap:2 ipsGap_row:1'> {{if ! $comment->isFirst() and $comment->author()->member_id AND $comment->author()->member_id == $item->author()->member_id}} <li><strong class="ipsBadge ipsBadge_large ipsComment_authorBadge">{lang="author"}</strong></li> {{endif}} {{if $comment->author()->hasHighlightedReplies()}} <li><strong class='ipsBadge ipsBadge_large ipsBadge_highlightedGroup'>{expression="\IPS\Member\Group::load( $comment->author()->member_group_id )->name" raw="true"}</strong></li> {{endif}} {{if ( $comment->item()->isSolved() and $comment->item()->mapped('solved_comment_id') == $comment->pid )}} <li><strong class='ipsBadge ipsBadge_large ipsBadge_positive ipsBadge_reverse'><i class='fa fa-check'></i> {lang="this_is_a_solved_post"}</strong></li> {{endif}} {{if $comment->isFeatured()}} <li><strong class='ipsBadge ipsBadge_large ipsBadge_popular'>{lang="this_is_a_featured_post"}</strong></li> {{endif}} {{if ( settings.reputation_enabled and settings.reputation_highlight and $comment->reactionCount() >= settings.reputation_highlight ) }} <li><strong class='ipsBadge ipsBadge_large ipsBadge_popular'>{lang="this_is_a_popular_post"}</strong></li> {{endif}} </ul> </div> I have a plugin where I want to remove the "Author"-badge in some circumstances. In order to do this, I have to choose the following hook point and do a replace: div[data-controller='core.front.core.comment'] div.ipsComment_badges > ul > li > strong.ipsComment_authorBadge
    The problem here is that the element I really would want to target is the li-element, but I can't. The consequence is that I leave an empty li-element behind and this creates extra spacing in the theme (which may or not be visible depending on whether there's another badge next to it)
    My solution to this is: 
    public function post( $item, $comment, $editorName, $app, $type, $class='' ) { $return = parent::post( $item, $comment, $editorName, $app, $type, $class ); return str_replace( "<li>\n<!-- Post anonymously: removed author-badge -->\n</li>", '<!-- Post anonymously: removed author-badge and empty li-tag -->', $return ); } But this will more likely be something that will cause issues on an upgrade.
    It would be better if there was a getBadges()-function that would provide the badges and I could override. 
    Example 2: Ellipsis menu and/or moderation tools:
    You also have an awful lot of logic in your templates that has to do with moderation tools. Look at all this stuff, from the same template: 
    <ul id='elControls_{$comment->$idField}_menu' class='ipsMenu ipsMenu_narrow ipsHide'> {{if $comment->canReportOrRevoke() === TRUE}} <li class='ipsMenu_item'><a href='{$comment->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report_post"}" data-action='reportComment' title='{lang="report_content"}'>{lang="report"}</a></li> {{endif}} {{if $comment->mapped('first') }} <li class='ipsMenu_item'><a href='{$comment->item()->url()}' title='{lang="share_this_post"}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-content='#elSharePost_{$comment->$idField}_menu' data-ipsDialog-title="{lang="share_this_post"}" d='elSharePost_{$comment->$idField}' data-role='shareComment'>{lang="share"}</a></li> {{else}} <li class='ipsMenu_item'><a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->$idField ) )}' title='{lang="share_this_post"}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-content='#elSharePost_{$comment->$idField}_menu' data-ipsDialog-title="{lang="share_this_post"}" id='elSharePost_{$comment->$idField}' data-role='shareComment'>{lang="share"}</a></li> {{endif}} {{if $comment->canEdit() || ( !$comment->mapped('first') and ( $comment->canPromoteToSocialMedia() || $comment->item()->canSolve() || $comment->canDelete() || $comment->canHide() || $comment->canUnhide() || $comment->canSplit() || $item->canFeatureComment() || $item->canUnfeatureComment() || ( $comment->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') ) ) )}} <li class='ipsMenu_sep'><hr></li> {{endif}} {{if $comment->canEdit()}} {{if $comment->mapped('first') and $comment->item()->canEdit()}} <li class='ipsMenu_item'><a href='{$comment->item()->url()->setQueryString( 'do', 'edit' )}'>{lang="edit"}</a></li> {{else}} <li class='ipsMenu_item'><a href='{$comment->url('edit')}' data-action='editComment'>{lang="edit"}</a></li> {{endif}} {{endif}} {{if $comment->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content')}} <li class='ipsMenu_item'><a href='{$comment->url('restore')->csrf()}' data-confirm data-confirmSubMessage='{lang="restore_as_visible_desc"}'>{lang="restore_as_visible"}</a></li> <li class='ipsMenu_item'><a href='{$comment->url('restore')->csrf()->setQueryString( 'restoreAsHidden', 1 )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li> <li class='ipsMenu_item'><a href='{$comment->url('delete')->csrf()->setQueryString( 'immediately', 1 )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li> {{else}} {{if $comment instanceof \IPS\Content\Hideable}} {{if !$comment->hidden() and $comment->canHide()}} <li class='ipsMenu_item'><a href='{$comment->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li> {{elseif $comment->hidden() and $comment->canUnhide()}} <li class='ipsMenu_item'><a href='{$comment->url('unhide')->csrf()}'>{lang="unhide"}</a></li> {{endif}} {{endif}} {{if $comment->canSplit()}} <li class='ipsMenu_item'><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li> {{endif}} {{if $comment->canDelete()}} <li class='ipsMenu_item'><a href='{$comment->url('delete')->csrf()->setPage('page',\IPS\Request::i()->page)}' data-action='deleteComment' data-updateOnDelete="#commentCount">{lang="delete"}</a></li> {{endif}} {{if $comment->isFeatured() AND $item->canUnfeatureComment()}} <li class='ipsMenu_item'><a href='{$comment->url('unfeature')->csrf()->setPage('page',\IPS\Request::i()->page)}' data-action="unrecommendComment">{lang="unrecommend_content"}</a></li> {{endif}} {{if !$comment->isFeatured() AND $item->canFeatureComment()}} <li class='ipsMenu_item'><a href='{$comment->url('feature')->csrf()->setPage('page',\IPS\Request::i()->page)}' data-ipsDialog data-ipsDialog-title='{lang="recommend_post"}' data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-action="recommendComment">{lang="recommend_content"}</a></li> {{endif}} {{if ( ! $comment->mapped('first') and $comment->canPromoteToSocialMedia() )}} <li class='ipsMenu_item'>{template="promoteLink" app="core" group="global" params="$comment"}</li> {{endif}} {{endif}} </ul> In my opinion a lot of this logic should rather come from new and more sentralized functions like: $comment->getModeratorOptions() or something that would return a list of prepared <a>-elements or an array or object with the necessary components to also set things like 'data-ipsDialog' etc. for some items. 
  7. Like
    Martin A. reacted to svit in Community Map   
    Hello, thank you I've tested it today again and the blocks started showing, perhaps the reason could be some cashing issue..
  8. Like
    Martin A. reacted to Unlucky in Community Map   
    These new additions are going to take this app to the next level - Amazing stuff.
    Bet it won't be long before it's one of the top market place sellers ever!
  9. Like
    Martin A. got a reaction from crmarks in gmail accounts with dots in names - fix it, please!!!   
    Think this is better left off to be dealt with by the spam service. If they changed that to strip the dots and plus signs and all other things that providers typically ignore, and then add a score on that stripped email address.
  10. Like
    Martin A. got a reaction from svit in Community Map   
    v1.1.0 have been submitted, and here's a list of what you can expect in that version
    Custom fields You're finally able to add your own fields to the markers. These can be all the kinds of fields you're used to in both profiles and in Pages databases. There is a group setting to define the fields that is available for the group There is also a group setting where you choose the fields that's visible in the marker popup. This replaces the global setting where you could select member profile fields. This will also replace the "privacy setting" where you could choose to not show any information in the popup Grid layout in marker listing You can not show your markers in a grid pattern instead of the default list. This is a group setting You can define a "grid card image", similar to forums. This can be from a custom field. If a custom field isn't selected, or the field is empty, the authors cover photo will be used. Fixed bugs Fixed a bug where the marker pin color for member groups wasn't honored. Fixed more bugs with PHP 7.1 Fixed a bug where the marker popup wouldn't open in MacOS Safari. Fixed an issue with the location import task. The location import task could try to import the same members over and over again. Fixed an issue with the .kml/.kmz importer. Markers inside a nested folder with other folders was not imported.
      
  11. Thanks
    Martin A. got a reaction from Adriano Faria in Template -> forums -> index -> forumGridItem   
    Can confirm. Don't think it likes it when the classes are spread over multiple lines.
    div.ipsBox.ipsBox--child.cForumGrid > div.cForumGrid__hero > div.cForumGrid__forumInfo.ipsFlex.ipsFlex-ai:center > div.ipsFlex-flex:11 > h3.cForumGrid__title.ipsType_reset.ipsTruncate.ipsTruncate_line That selector does not work.
    div.ipsBox.ipsBox--child > div.cForumGrid__hero > div.cForumGrid__forumInfo.ipsFlex.ipsFlex-ai:center > div.ipsFlex-flex:11 > h3.cForumGrid__title.ipsType_reset.ipsTruncate.ipsTruncate_line This does.
     
    <div class="ipsBox ipsBox--child cForumGrid cForumGrid--unread ipsDataItem_unread cForumGrid--forum" data-forumid="2"> Must be because of that.
  12. Like
    Martin A. got a reaction from Unlucky in Community Map   
    v1.1.0 have been submitted, and here's a list of what you can expect in that version
    Custom fields You're finally able to add your own fields to the markers. These can be all the kinds of fields you're used to in both profiles and in Pages databases. There is a group setting to define the fields that is available for the group There is also a group setting where you choose the fields that's visible in the marker popup. This replaces the global setting where you could select member profile fields. This will also replace the "privacy setting" where you could choose to not show any information in the popup Grid layout in marker listing You can not show your markers in a grid pattern instead of the default list. This is a group setting You can define a "grid card image", similar to forums. This can be from a custom field. If a custom field isn't selected, or the field is empty, the authors cover photo will be used. Fixed bugs Fixed a bug where the marker pin color for member groups wasn't honored. Fixed more bugs with PHP 7.1 Fixed a bug where the marker popup wouldn't open in MacOS Safari. Fixed an issue with the location import task. The location import task could try to import the same members over and over again. Fixed an issue with the .kml/.kmz importer. Markers inside a nested folder with other folders was not imported.
      
  13. Like
    Martin A. reacted to Dknelson in Community Map   
    Just a public thanks to Martin A for helping me get my map sorted out.  My import from VBulletin caused some of the features to not work exactly as they should.  Martin went about and beyond to get it right.  I've rarely seen such great support for any software.  Thanks much for your help.  My members love the map.
  14. Like
    Martin A. got a reaction from Dknelson in Community Map   
    v1.1.0 have been submitted, and here's a list of what you can expect in that version
    Custom fields You're finally able to add your own fields to the markers. These can be all the kinds of fields you're used to in both profiles and in Pages databases. There is a group setting to define the fields that is available for the group There is also a group setting where you choose the fields that's visible in the marker popup. This replaces the global setting where you could select member profile fields. This will also replace the "privacy setting" where you could choose to not show any information in the popup Grid layout in marker listing You can not show your markers in a grid pattern instead of the default list. This is a group setting You can define a "grid card image", similar to forums. This can be from a custom field. If a custom field isn't selected, or the field is empty, the authors cover photo will be used. Fixed bugs Fixed a bug where the marker pin color for member groups wasn't honored. Fixed more bugs with PHP 7.1 Fixed a bug where the marker popup wouldn't open in MacOS Safari. Fixed an issue with the location import task. The location import task could try to import the same members over and over again. Fixed an issue with the .kml/.kmz importer. Markers inside a nested folder with other folders was not imported.
      
  15. Like
    Martin A. reacted to JohnDar in Community Map   
    Thank you. The hidden group thing is no biggie. I must have dreamt it.
    I have noticed that the "Allow filtering by this group?" setting, which hides a group from filters such as the online user list and member search is not honoured.
    I look forward to the marker colours coming back soon. 🙂
  16. Like
    Martin A. got a reaction from Justin Stellman in Community Map   
    That runs as a background task, and will process 100 members per day. The limit is set in order to now exhaust your free MapQuest API usage.
    You can manually run the task "locationSync" if you want to make sure it works.

  17. Thanks
    Martin A. got a reaction from bfarber in Can't update secondaryGroups using the API   
    Looks like the API input need to be an array.
    if( isset( \IPS\Request::i()->secondaryGroups ) AND \is_array( \IPS\Request::i()->secondaryGroups ) ) { foreach( \IPS\Request::i()->secondaryGroups as $groupId ) { ....  
     
    $endpoint = '/core/members/1'; $curl = curl_init( $communityUrl . 'api' . $endpoint . '?key=' . $apiKey ); $postData = [ 'secondaryGroups' => [ 7, 8 ] ]; curl_setopt_array( $curl, array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => http_build_query( $postData ), ) ); $response = curl_exec( $curl );
  18. Like
    Martin A. reacted to Adriano Faria in Community Map   
    See 
     
  19. Like
    Martin A. reacted to odevriese in Community Map   
    Solved!
    Thank you Martin for your help.
  20. Thanks
    Martin A. got a reaction from odevriese in Community Map   
    The localStorage for your site in your browser is full. The storage quota in Windows appears to be 5200k, which is 5.2MB. The amount needed for your markers is 134kB. Either the storage quota on Mac is way lower than Windows, or you have something else that takes up quite a lot of space.
    You can safely clear out everything in the local storage. What needs to be there will be rebuilt and added the next time it's needed.
    Here's how you do that in the Chrome DevTools

    Right click on your domain, do not worry about the other domains that may appear in the list.
  21. Like
    Martin A. got a reaction from Chuck Passaro in Community Map   
    Looks like that is a bug. I'll get that fixed in the next release.
  22. Like
    Martin A. got a reaction from CodingJungle in csrfCheck question   
    But nothing here stops me from creating and sharing a regular URL for these methods, creating a GET request for it.
    So I'm gonna say you do need it in every method. Or you need all state changing methods in its own controller where you run the csrfCheck regardless of request method.
  23. Like
    Martin A. got a reaction from Adriano Faria in Community Map   
    You're using a PHP version less than 7.3? A fix will be released shortly.
    Daniel, Adriano and other developers: PHP 7.2 and below will throw an error if you have a trailing comma in your function calls. What I had here was two calls like this:
    array_merge( $array, $input, $input2, ); PHP 7.3 and above will ignore that.
     
    The post he linked to is in a forum only accessible to contributors.
  24. Thanks
    Martin A. got a reaction from Daniel F in Community Map   
    You're using a PHP version less than 7.3? A fix will be released shortly.
    Daniel, Adriano and other developers: PHP 7.2 and below will throw an error if you have a trailing comma in your function calls. What I had here was two calls like this:
    array_merge( $array, $input, $input2, ); PHP 7.3 and above will ignore that.
     
    The post he linked to is in a forum only accessible to contributors.
  25. Haha
    Martin A. got a reaction from WP V0RT3X in Files in the "interface" folder and CIC clients.   
    The arrow points at Monday.
×
×
  • Create New...