Jump to content

Martin A.

Clients
  • Posts

    4,230
  • Joined

  • Last visited

  • Days Won

    21

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by Martin A.

  1. Sorry about that, didn't realize that was your HAVING clause. I don't see an easy way for us to add HAVING to that query. For @Daniel F & co on the other hand... 🙂
  2. What's your reason for adding all the entries to an array and then use that in a custom table, instead of $table = new \IPS\Helpers\Table\Db( 'customtable_log', $url, $where ); $table->selects = [ 'customtable_log.device', 'MAX(customtable_log.user_id) AS user_id']; $table->joins = [ [ 'select' => 'GROUP_CONCAT(DISTINCT core_members.name SEPARATOR ", ") AS shared_by', 'from' => 'core_members', 'where' => 'customtable_log.user_id = core_members.member_id' ] ]; $table->groupBy = 'COUNT(customtable_log.user_id) > 1'; ? I haven't tested this, but you should be able to use the Db class even if you need to use a query out of the ordinary.
  3. Yeah, looks like there's a method in the editor parser (\IPS\Text\Parser::isAllowedImageUrl()) that will convert an illegal image element to <span> if the image source is not allowed. The first condition in this method is if the source is a valid URL.
  4. This is not an issue with JS files that follow the coding standards of the software. The framework will halt the execution for us. I rarely, or rather never(?), need to wrap anything in an onload event. You might be better off creating a plugin or an app if you plan on adding lots of javascript to the PHP block.
  5. That was the norm a couple of years ago, but it's not the practice anymore for speed and SEO reasons. https://levelup.gitconnected.com/all-about-script-87fea475b976
  6. Wait for DOM to be loaded before doing anything in your JS. jQuery is loaded at the end of the document, which is why it isn't available at the time your PHP block is executed. Loading a second set of jQ libraries is not the solution here.
  7. Really wish there was a certain Slack channel where we could share things like this 🤔 😉
  8. Someone's gotta ask: What's the reason for this?
  9. Yes, you can remove the posting permission in the pre-made "Members" category. That way you'll only get markers from the integrations you enable.
  10. Sounds like you want to transform this into something that acts like Airbnb. This will require way too much modification from its current state to make it worth it. Better to have something custom made for your specific needs.
  11. This ^ Nginx + PHP-FPM and Cloudflare will make wonders for your site. Moving uploads to S3 may help tremendously too. This must be done in combination with Cloudflare as most S3 providers doesn't have server locations in ZA, except for AWS. CF have two and these will cache your uploaded images for you. This will also free up space on your VPS and possibly lower the RAM usage as more than 50% of the requests will be handled by Cloudflare. If you reach out to @ASTRAPI he may be able to do a one-time optimization for you. I can assist you with moving your uploads to S3 should you need that.
  12. A new version have been submitted that fixes this. @iacas This will also include the improved country selector 🙂
  13. $membersCountryMember = \IPS\memberscountry\Member::load( $this->author()->member_id ); $membersCountryMember->country = mb_strtolower( $country ); $membersCountryMember->country_changed = 0; $membersCountryMember->save(); Like this then?
  14. Sounds like you have "Member's Country" by Adriano installed. @Adriano Faria Have you made any changes to this recently? $membersCountryMember = \IPS\memberscountry\Member::load( $this->author()->member_id ); $membersCountryMember->mc_country = mb_strtolower( $country ); I use the column prefix here. Have you added this to \IPS\memberscountry\Member::$databasePrefix instead now?
  15. Make sure members have permission to add markers to the marker group "Members". That's the only thing that controls the visibility of that button.
  16. In the next release it will be changed to something like this instead That should be easier to navigate. Not pushing out an update just for this right now. It'll be part of an upcoming maintenance release.
  17. Yes, this have been brought up before, but that's a long time ago. This is most likely caused by your members being too vague when writing their location in their profile. It's not a secret that a lot of (smaller) US cities and town have "stolen" their name from cities in Europe. If they just write "London" or "Manchester", it may be obvious to you and your members that they mean London, Kentucky and Manchester, Tennessee. The search engine will however return the UK locations, as these are larger. Have a look at the "Limits the location search to specific countries" setting. You can set this to United States. Believe this will solve this issue for you. VPN is not an issue, as the IP is not taken into consideration.
  18. Hence <script> document.addEventListener("DOMContentLoaded", function() { console.log( ips.getSetting( 'member_formattedName' ) ); }); </script> Doesn't really help, as member_id and member_formattedName is something added by the online/active users blocks. Unless one of those blocks is on the page, those variables are unavailable. But there's always a way to get what you want. <script> document.addEventListener("DOMContentLoaded", function() { const name = $( '#elUserLink' ).text(); const member_id = $( '#cUserLink' ).find( 'a[href*="/profile/"]' ).attr( 'href' ).match( /profile\/(\d+?)-/ )[1]; }); </script>
  19. Both member name and ID is available in JS. ips.getSetting( 'member_formattedName' ); ips.getSetting( 'member_id' ); Depending on where GA is added to the source you may have to wrap it in a DOM loaded event as the above variables/settings are added quite a bit down in the page source.
  20. I'd need to see more details. Open one of them and post the backtrace here or in a private message.
  21. You can do that with a template edit. Let me know how you want it and in which category and I'll give you the complete instructions.
  22. Hello, Lots of clubs are showing up in your map now, including Barnet WFT 🙂 Guess this was a caching issue.
  23. If you need this for development purposes you can use this constant define( 'DEV_DISABLE_ACP_SESSION_TIMEOUT', TRUE ); That'll disable the timeout when IN_DEV.
  24. They are gonna get more confused when you tell them to fix something that doesn't need fixing. One would think that everyone knows that a > either shows that this box is collapsed and/or you can click it to open and reveal more information. Even showing a magnifying glass would be better than "Fix This". That button text will also overflow if there's a lot of info, or smaller screen size, showing only "Fix ..." which is even more confusing.
  25. We did 🙂 Gotta spend some to earn some. If the income isn't enough to cover the cost you are either not here for the money, don't have a big enough demand, or not pricing it "correctly". Keep in mind that this also ensures that you can't purchase from someone who have left the "scene", leaving you with a file that will probably not be supported. Should it be taken over by someone else, you will most likely have to purchase it again. This is not true anymore. An app or plugin would be compatible with the entire major version ( 4.x ) in the beginning of the 4 series. In the past few years changes to a central method signature happens more often, breaking backwards compatibility, even if it's "correctly made". They are even introducing brand new functionality in the middle of a major version. So there could be stuff out there that is compatible with 4.6.x but not 4.6.y. This is stuff they wouldn't have done back in the days. This is why we, the 3rd party developers, have to keep our licenses up to date to keep up with these changes.
×
×
  • Create New...