Jump to content

Community

IPCommerceFan

+Clients
  • Posts

    409
  • Joined

  • Last visited

Reputation Activity

  1. Like
    IPCommerceFan reacted to All Astronauts in Where can I find developer tools for 4.5?   
    Not sure how they can change that to be more obvious, other than maybe altering the language bit there to say "Changelog / Previous Versions".
    Maybe make that an actual button rather than just a subtle link?
    ūü§∑‚Äć‚ôāÔłŹ
  2. Like
    IPCommerceFan reacted to CodingJungle in Form Node Input Issue   
    using an IDE with the proxyclass generator, it will tell you when method signatures change from a parent class, here it puts a squiggly line under the method and when i focus on it, it will tell me its no longer compatible with the parent.
    Phpstorm is an excellent IDE, its very reasonably priced (they offer yearly or monthly subscriptions, and they also offer loyalty discounts. after 3 years phpstorm will be as little as $5 a month or around $50 a year. note: i'm not affiliated with jetbrains, i'm just a crazed fanboi of their products).
    if you don't want to pay for one, there are a few opensource free ones like eclipse or VS Code (if you are afraid MS tracking you thru telemetry which VS Code has, you can opt for the VS Codium which removes all that but still remains compatible with VS Code plugins), and if you are really masochistic, there is netbeans and sublime. note: vs code/sublime aren't true IDE's, they are more advanced text editors that thru plugins you can emulate IDE features, netbeans and eclipse are IDE's, but they all vary in ability and features. 
  3. Like
    IPCommerceFan reacted to CodingJungle in React with IPS4   
    if this for a non-marketplace app, i would load it up thru the interface folder or load it remotely.
    $myJs = \IPS\Output::i()->js('myfolder/myjs.js', 'myapp','interface'); \IPS\Output::i()->jsFiles = array_merge(\IPS\Output::i()->jsFiles,$myJs); or 
    \IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles,[ \IPS\Http\Url::external('http://example.com/something.js') ]); if this is for a MP app, you might have to consider the remote loading as an option, since last i heard the the interface folder doesn't work for the cloud communities and i don't think you can you use the bypass method (which would be loading it thru the resources), cause it probably wont be able to properly map the imports (as imports if i am not mistaken are loaded by relative paths and resources wouldn't be relative). 
  4. Like
    IPCommerceFan reacted to Daniel F in Access to furl controller on private board   
    Hi,
    Do you mean real apiendpoints using the IPS REST API or regular own controllers inside app/modules/front/... ?
    If the latter, then you can use the Application::allowOfflineAccess method to control if the specific page should be accessible even in offline mode.
     
    /** * Can view page even when site is offline * * @param \IPS\Application\Module $module The module * @param string $controller The controller * @param string|NULL $do To "do" parameter * @return bool */ public function allowOfflineAccess( \IPS\Application\Module $module, $controller, $do )  
  5. Like
    IPCommerceFan reacted to Stuart Silvester in Problems with Registration   
    'EX0' is an uncaught exception, essentially it's anything that is unexpected. On registration, it's typically caused by a third party plugin/application.
  6. Like
    IPCommerceFan reacted to hawksfan in Commerce Support - disable?   
    Ah right, of course! Thanks!
  7. Like
    IPCommerceFan got a reaction from Joel R in Commerce Support - disable?   
    Hi,
    You can disable individual modules here:
    AdminCP -> System -> Applications

    Just click where it says "Enabled" to disable it.
  8. Like
    IPCommerceFan reacted to bfarber in How do i download plugins?   
    The tar/xml files are not retained. They are install files and are used to install the resources, and then are removed.
    It is generally against license agreements to purchase a plugin or application and use it on more than one site. If the author of a resource does allow this, then you may be able to reach out to them and ask them for a copy of the resource once you've purchased it to install on another site. If you are speaking of test sites specifically, we have a special -TESTINSTALL key that you can use on your test site which will give you access to your resources purchased for your live site for a test installation.
  9. Like
    IPCommerceFan reacted to SeNioR- in SPAM Protection don't work, how i avoid this IPS?   
    @403 - Forbiddeen Did you add star symbol before the domain name?

     
  10. Like
    IPCommerceFan reacted to bfarber in Comment out Template code   
    You are adding an HTML comment around PHP code. The PHP code will still execute in that context, but the result will be inside an HTML comment that the browser will hide.
    You would need to comment out the PHP code using PHP commenting functionality like
    {{ /* Don't execute this}} {{ $var = 'x';}} {{ */}}  
  11. Like
    IPCommerceFan reacted to sobrenome in Why json_decode() returns empty?   
    I have checked json_last_error() and number 4 pop out: syntax error.
    So I have adopted a different approach to cache the array API data: serialize() and unserialize(). But I had also the same syntax issues, that were solved by base64_encode() and base64_decode().
    To save in the database:
    {{$videos_serialized = base64_encode(serialize($videos));}} To use it again:
    {{$videos = unserialize(base64_decode($videos));}} Hope this helps someone using json APIs and caching the results.
  12. Like
    IPCommerceFan reacted to Dll in Need more granularity for notification settings   
    We're getting complaints from users that although they want notifications for things like replies and mentions, they don't want or need them for reactions to posts. It would be useful to be able to give them that option. 
  13. Haha
  14. Like
    IPCommerceFan reacted to Mark in flag \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS not working   
    It's no longer supported. Do a separate count query:
    {{$total = \IPS\Db::i()->select( 'COUNT(*)', 'cms_custom_database_8', array( 'field_140=?', $record->primary_id_field ) )->first();}}  
  15. Like
    IPCommerceFan got a reaction from sobrenome in flag \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS not working   
    What happens if you echo $select->query, and copy the query into phpmyadmin or some other mysql console?
    Does the query look like you think it should?  Often times I've used this method to figure out a syntax error in the php version of the query.
  16. Like
    IPCommerceFan reacted to Lindy in Why aren't posts numbered within a thread?   
    I'm sorry it's felt that we were dismissive and it's never our intent to insult anyone who are trying to provide us heartfelt feedback. Admittedly, I think our frustration with demands for legacy functionality does bleed through on occasion, for which I apologize. It is taxing at times when you are moving forward, the vast majority of your clients are happy, but there's the occasional desire to pull us backwards and believe me, cluttering up the interface with inconsequential numbers, is by ALL modern web standards - a step backwards.
    I know it sometimes feels like we make decisions in a vacuum and without regard to clients, because you are the client that feels passionately about a given issue - it IS an issue to you and we get and expect that. Nonetheless, I sometimes wish some of you had the vantage point of being in our office and on our internal systems in which we gather collective feedback from various avenues, technician notes, sales notes and see the exhaustive vetting that goes into something. You would see that this, for example, was removed because:
    1) It's 2020 - post 390 right now, may not be 390 5 minutes from now or may not even be 390 right now to another user.

    2) There are legacy forum platforms that have grown to be quite successful in maintaining legacy functions for a niche demographic and that's great for them, but we our goal is not at all to compete with legacy forum platforms. Consider us the FedEx of Communities: Moving Foward. ūüėČ We are a modern community platform and very respectfully, there isn't anything modern social related that uses arbitrary, visual IDs. I can't imagine you would tell a colleague "Hey Bob, check out tweet 9832441068311 on Tim's twitter feed" - nobody does that, right? ūüôā You send a link to the tweet and save Bob 10 minutes of needing to energize the flux capacitor to find content. Same with Facebook, Instagram, Reddit and other platforms the majority of customers and their end users are going to be familiar with.
    3) Because, as noted in #2, it's inconsistent with literally the rest of the Internet, it caused confusion. "How do I remove this?" "Why is this here?" etc. It all prompted the question "why IS this here? it serves no functional purpose beyond familiarity and personally speaking, I would be extremely annoyed if someone sent me an arbitrary ID number for content I'm suppose to find myself when they could literally click the date of the post and send me the link to it.
    I realize it used to exist and at one point, it was a good idea. Hand cranking an old Model A was also a good idea too before electric starters. I think we can mostly agree ehhh, maybe we'd rather just jump in and turn a key and/or push a button. Likewise, most agree they don't need an arbitrary number as a visual cue or as directions to a post - that's not how the 2020 Internet works. Simply click, copy and paste the link. Bob thanks you in advance.
    @BankFodder I could see how that number could be misleading. I just looked, as I was curious too, but there are folks who have downloaded i 10+ times and it counts each one. This is the number of reporting installations that have ever had the plugin:

  17. Like
    IPCommerceFan reacted to sobrenome in Combine ->first() and ->join() on database query   
    There are results. I have changed the query to limit it to one row instead of using ->first();
    {{$select = \IPS\Db::i()->select( 'cms_custom_database_12.field_142 as preco, cms_custom_database_12.field_154 as link, cms_custom_database_12.record_updated as atualizado, cms_custom_database_13.field_143 as loja, cms_custom_database_13.record_image_thumb as logo, cms_custom_database_13.field_160 as cupom, cms_custom_database_13.field_161 as cupom_valor, cms_custom_database_13.primary_id_field as loja_ID', 'cms_custom_database_12', array( array( 'field_156=?', $row->primary_id_field ), array( 'field_141=?', 1 ) ), 'cms_custom_database_12.field_142 ASC', 1)->join( 'cms_custom_database_13', 'cms_custom_database_13.primary_id_field=field_155', 'INNER' );}}  
  18. Like
    IPCommerceFan got a reaction from sobrenome in Combine ->first() and ->join() on database query   
    Underflow exception would indicate there aren't any results for the query, I've seen.
    If it is normal for this query to sometimes not return a result, then you may need to try:
    {{ try { $select = \IPS\Db::i()->select( 'cms_custom_database_12.field_142 as preco, cms_custom_database_12.field_154 as link, cms_custom_database_12.record_updated as atualizado, cms_custom_database_13.field_143 as loja, cms_custom_database_13.record_image_thumb as logo, cms_custom_database_13.field_160 as cupom, cms_custom_database_13.field_161 as cupom_valor, cms_custom_database_13.primary_id_field as loja_ID', 'cms_custom_database_12', array( array( 'field_156=?', $row->primary_id_field ), array( 'field_141=?', 1 ) ), 'cms_custom_database_12.field_142 ASC')->join( 'cms_custom_database_13', 'cms_custom_database_13.primary_id_field=field_155', 'INNER' )->first(); } catch( \UnderflowException $e ) { $select = ''; } }} Do you get any results when you run this query in mysql directly?
    SET @field_156 ='yourdata'; SELECT cms_custom_database_12.field_142 as preco, cms_custom_database_12.field_154 as link, cms_custom_database_12.record_updated as atualizado, cms_custom_database_13.field_143 as loja, cms_custom_database_13.record_image_thumb as logo, cms_custom_database_13.field_160 as cupom, cms_custom_database_13.field_161 as cupom_valor, cms_custom_database_13.primary_id_field as loja_ID FROM cms_custom_database_12 INNER JOIN cms_custom_database_13 ON cms_custom_database_13.primary_id_field = cms_custom_database_12.field_155 WHERE field_156 = @field_156 AND field_141=1 ORDER BY cms_custom_database_12.field_142 ASC LIMIT 1;  
  19. Thanks
    IPCommerceFan reacted to Ryan Ashbrook in Combine ->first() and ->join() on database query   
    As mentioned, you can chain the method calls:
    $select = \IPS\Db::i()->select( ... ) ->join( ... ) ->join( ... ) ->first(); The same applies to forceIndex(), setKeyField(), and setValueField().
  20. Thanks
    IPCommerceFan got a reaction from sobrenome in Combine ->first() and ->join() on database query   
    I hope this isn't stating the obvious, but what happens when you try this?
    {{$select = \IPS\Db::i()->select( 'cms_custom_database_12.field_142 as preco, cms_custom_database_12.field_154 as link, cms_custom_database_12.record_updated as atualizado, cms_custom_database_13.field_143 as loja, cms_custom_database_13.record_image_thumb as logo, cms_custom_database_13.field_160 as cupom, cms_custom_database_13.field_161 as cupom_valor, cms_custom_database_13.primary_id_field as loja_ID', 'cms_custom_database_12', array( array( 'field_156=?', $row->primary_id_field ), array( 'field_141=?', 1 ) ), 'cms_custom_database_12.field_142 ASC')->join( 'cms_custom_database_13', 'cms_custom_database_13.primary_id_field=field_155', 'INNER' )->first();}}  
  21. Like
    IPCommerceFan reacted to bfarber in Has anyone used the Zapier integration?   
    Zapier integration is currently in beta stages and CIC clients can sign up.
  22. Thanks
    IPCommerceFan got a reaction from PPlanet in Help with SLQ Query to replace emoji   
    That should work, however I would verify by testing on a single post first.
    After REPLACE(), add WHERE pid = 1234;   (post ID of a post that contains the emoji you're replacing)
  23. Like
    IPCommerceFan reacted to bfarber in Official SVG header/logo support   
    Well, you have options depending upon your comfort level.
    The simplest solution for most of our clients is to create a PNG image twice the size of your logo (as @Joy Rex just alluded to) and upload that as your logo in the theme. You may or may not need to tinker with some size settings or CSS to ensure the logo displays at the height you want.
    If you're comfortable with CSS and HTML (and our theme manager), you could upload separate regular and 2x sized images using the Manage Theme Resources tool, and then manually reference them in the template correctly (using srcset and sizes attributes).
    Or if you understand SVGs well enough, you could upload those and reference those in the template as well, just the same.
    Basically you have two routes:
    The easy route is to just upload a logo image using the built in uploader The longer route that gives you more control is to manually upload your files to the manage resources page, and then adjust the logo template accordingly
  24. Like
    IPCommerceFan got a reaction from sobrenome in what's wrong? base64_encode API gallery NO_IMAGE   
    Try replacing this:
    $data = file_get_contents($path);
    with this:

    $data = urlencode(file_get_contents($path));

    Reference:
     
     
  25. Like
    IPCommerceFan got a reaction from sobrenome in REST API - POST /downloads/files - Name, URL and Size?   
    This works now!
    The missing link was that we needed to replace this:
    file_get_contents($file_url) with this:
    urlencode(file_get_contents($file_url)) As I understand it, urlencode makes it so that the ampersands are transmitted as '%26', and also converts any other characters that might've broken the URL.
    Here is the complete code for uploading a file from the local file system in conjunction with the Rules app:
    //<?php //Purchase Data $member = $purchase->member->member_id; //REST API URL and KEY $communityUrl = '...'; $apiKey = '...'; //Upload File from filesystem // REST Endpoint $endpoint = '/downloads/files'; $curl = curl_init( $communityUrl . 'api' . $endpoint ); // File Description $file_desc = '<p>File Description</p>'; // File name $filename = 'test.txt'; // Path to file $file_url = '/home/acct/public_html/' . $filename; // Download Page Settings $curl_post_data = array( 'category' => 1, 'author' => $member, 'title' => 'REST Downloads POST', 'description' => $file_desc, 'files' => array( $filename => urlencode(file_get_contents($file_url)) ), 'hidden' => 1, ); // Prepare data for cURL POST $curl_post_data = urldecode(http_build_query($curl_post_data)); // POST Data curl_setopt_array( $curl, array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_USERPWD => "{$apiKey}:", CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $curl_post_data ) ); // Get Response $response = curl_exec( $curl ); // Get file info array $download_file = json_decode($response); return "action complete";  
√ó
√ó
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy