Jump to content

The Old Man

Clients
  • Posts

    3,958
  • Joined

  • Last visited

  • Days Won

    11

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by The Old Man

  1. On 4.5.4, I've an established, reputable member who posted a reply to a topic and it needs approval, simple enough, but I have no idea why! I've never had this happen before. The member reported their post wondering why it wasn't appearing as normal.

    There are no links in the post, no bad language. I must be visually impaired, there must be a reason stated somewhere, surely, but I can't see it in the post area or in the moderator CP., aside from it being listed for approval.

    Any idea where the reason is mentioned?

    Thank you.

  2. 9 hours ago, sobrenome said:

    How do you backup s3 files?

    AWS provide a number of technologies so it's kind of tied into budget with store layer savings (warm/cold storage), automation, usage/resilience needs.

    Essentially, Amazon S3 provides features and tools that help maintain data version control, prevent accidental deletions, and replicate data to the same or different AWS Region. So with S3 Versioning, you can preserve, retrieve, and restore every version of an object stored in Amazon S3, which allows you to recover from unintended (malicious?) user actions and application failures. There is AWS Backup, but that's more for egress of data from on site storage to S3.

    You could combine by making use of other features like the Lifecycle rules, same region replicationcross region replication, Intelligent Tiering, S3 Batch Operations.

    One method is to make use of multiple accounts to send objects/files to a bucket owned by a second account where the first account doesn't have delete permissions, and then the 2nd account could  take ownership via S3 Object Ownership.  

    More reading:

    https://docs.aws.amazon.com/AmazonS3/latest/dev/disaster-recovery-resiliency.html

    https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops.html
     

    There's also MFA Delete if you want to add extra protection:

    https://aws.amazon.com/s3/features/

    S3 Object Lock

    The new Storage Lens feature looks interesting, it provides analytics and recommendations.

     

  3. 4 hours ago, sobrenome said:

    So far o good. If I do not use dots in bucket name, how could I use Cloudflare and S3?

    Good question! S3 takes care of it effectively. Each object (file) has a unique Object URL so you can still access it via a browser etc as normal.

    E.g.

    https://cdn-my-bucketname-com.s3-us-west-1.amazonaws.com/android-chrome-144x144.png

    Assuming the object/file itself has been made public and you don't have any of the bucket-wide permission policies preventing public access to it, you would be able to view that file in your browser. Using a CNAME means you can effectively mask half of that long ugly filename, shortening it to say:

    https://cdn-my-bucketname.com/android-chrome-144x144.png

     

  4. 11 minutes ago, sobrenome said:

    If the file is not actually deleted, there is already a security layer against abusive deletion by adminCP account on IPS, and the files can be restored. No need for replication, as long as S3 has multiple files along AZs. Am I right?

    Well the versioning is certainly useful for providing the option to restore a previous version. The replication option offers a different perspective, it might be a bit superfluous depending upon your usage case, for some it may be about geographical and legislative considerations, to others it might provide a quicker response to have a bucket in a region closer to the end user for uploading or perhaps a check had to be made to see if a cached file was still cachable. I haven't done any particular testing with it. 

    I think if you are interested in being able to restore deleted content, bucket versioning certainly and backups would be the way to go.

  5. Just now, sobrenome said:

    And the replication bucket has a copy only rule or a sync rule? If it is sync, if a file is deleted from the main bucket it will also be deleted from the replica.

    Hi,

    Yes, it's all automatic. I also enabled the versioning option, you can set up rules for how long to keep the versions for, and it will log if you want it to. I suppose you could also put a copy in the deep freeze/glacier type S3 storage facilities, if you were so minded (along with frozen onion rings, pizza and cheesecakes!).

     

     

     

  6. Hi Sobrenome,

    My post you quoted was a few years ago. My cdn.example.com CNAME points to my Cloudfront domain, which in turn Cloudfront uses an OAI and an IAM user permission to connect back to the S3 bucket so there are no public permissions. I use the cross origin policy on the bucket so that cross origin webfonts and images work.

    Yes, on my main site I use the S3 Replication option to auto update a bucket in the UK, my main one being in the US.

    I also use Cloudflare with a Page Rule for the CDN CNAME.

    FYIW, I was going to add S3 Acceleration to my Afterburner plugin, but I found with IPS improving the connection with signed urls, it now works fine out the box, you just use the endpoint it tells you to use. My IPS uploads usually upload to S3 around 2.5Mbps, but with the S3 acceleration option it's around double.

    I have found since upgrading to 4.5 that I can't move items back to my IPS web server from S3, it goes completely boobs up. 

    9086B88B-4D67-4C02-A4DF-631658411384.thumb.jpeg.8086f6a70135e8189ba3ae20c89ae1a4.jpeg
     

    1D8B7D8F-9324-475A-A3A1-377B4FCC2224.thumb.jpeg.a909b321fb29fa54e5c25755aeae67f1.jpeg

     

    2C8AEC05-8698-4818-9FFA-9552B9E86732.thumb.jpeg.707a4e97fa8b5a7656f58145566a290e.jpeg

     

    872781D5-6F21-4AAB-819B-DD42DA939F33.thumb.jpeg.64744c50e759bd6875d97b04e4d823b1.jpeg

    True story.

     

  7. Glad to hear you got it resolved. Problems like this can lead to a lot of anxiety.

    The Support Team do indeed do a great job, sometimes you can get the pointy end of the stick and because you are paying for support it smarts. Sometimes I'm sure they get it from the behaviour of the client, as recently demonstrated elsewhere. Sometimes I feel like in most corporate environments it's the system they have to comply with that can create or amplify issues, like aspects of the new 4.5 Marketplace paradigm, it must seem like a thankless task at times for the approval queue staff, but if someone stepped in to take ownership and polish off the rough edges, things could be smoother for everyone on both sides of the IPS castle walls.

  8. Because its now On Sale price, meaning I discounted the price from today, its reduced now but will go back to normal price once the sale ends (next week). Next year it will already be available weeks ahead of Halloween.

     

     

  9. Hi Brandon,

    Actually its a normal Upload type configured as here:

    image.thumb.png.4153cf0742a556ce71c9d1d7cb59c98c.png

     

    which produces this in the AdminCP for the end user:

    image.thumb.png.a39a430d39e2d0802eb29997ddc9d631.png

    It works but the if you have enabled Pixaby, the option to choose a Stock Photo doesn't appear.

    So I tried the Other/Manual type, which fills in the PHP code for you to presumably to get you started:

    image.thumb.png.3a385c5b9fc68c3170890e8d4370c752.png

    It inserts a Text field form helper so I tried changing it to an Upload field, thinking that as its using the form helpers, and Pixabay is enabled, it would detect and show the Pixabay stock photo option:

    <?php
    
    return new \IPS\Helpers\Form\Text( "core_theme_setting_title_{$row['sc_id']}", $value, FALSE, array(), NULL, NULL, NULL, 'theme_setting_' . $row['sc_key'] );

     

    After changing the form helper from text to upload, it saves okay, but when you go to view the Theme Settings I get:

    InvalidArgumentException:  (0)
    #0 C:\xampp\htdocs\dev\ips4\system\Theme\Theme.php(1772) : eval()'d code(1): IPS\Helpers\Form\_Upload->__construct('core_theme_sett...', '', false, Array, NULL, NULL, NULL, 'theme_setting_u...')
    #1 C:\xampp\htdocs\dev\ips4\system\Theme\Theme.php(1772): eval()
    #2 C:\xampp\htdocs\dev\ips4\system\Theme\Theme.php(1733): IPS\_Theme->getCustomSettingField(Array)
    #3 C:\xampp\htdocs\dev\ips4\system\Node\Controller.php(489): IPS\_Theme->form(Object(IPS\Helpers\Form))
    #4 C:\xampp\htdocs\dev\ips4\system\Node\Controller.php(388): IPS\Node\_Controller->_addEditForm(Object(IPS\Theme))
    #5 C:\xampp\htdocs\dev\ips4\system\Dispatcher\Controller.php(90): IPS\Node\_Controller->form()
    #6 C:\xampp\htdocs\dev\ips4\system\Node\Controller.php(62): IPS\Dispatcher\_Controller->execute()
    #7 C:\xampp\htdocs\dev\ips4\applications\core\modules\admin\customization\themes.php(59): IPS\Node\_Controller->execute()
    #8 C:\xampp\htdocs\dev\ips4\system\Dispatcher\Dispatcher.php(152): IPS\core\modules\admin\customization\_themes->execute()
    #9 C:\xampp\htdocs\dev\ips4\admin\index.php(14): IPS\_Dispatcher->run()
    #10 {main}

    this didn't work either:

    <?php
    if ( $form === null )
    		{
    	 		$form = new \IPS\Helpers\Form;
     		}
     		
    if ( \IPS\Settings::i()->pixabay_enabled )
    			{
    				$options['allowStockPhotos'] = TRUE;
    			}
    return new \IPS\Helpers\Form\Upload( "core_theme_setting_title_{$row['sc_id']}", $value, FALSE, array($options), NULL, NULL, NULL, 'theme_setting_' . $row['sc_key'] );

     

  10. Hi, basically that's the full code, but I had to give up the idea so I could try and get my Halloween theme into the market ASAP. The code snippet above I found inside a method in the pixabay class. The dev docs about the 4.5 changes mention a setting has been added to the form upload helper so you can toggle the facility on/off, so I thought I would just need to put the 'allowStockPhotos' option inside the the check if the feature is available, as per the snippet above and then it would appear as an option in the upload type of custom theme setting. I think it may not have been added yet, possibly an oversight.

     

     

     

  11. Thanks @Ehren I really appreciate that insight also because I've been working on my first theme with custom theme settings and being unfamiliar is the enemy! I thought it was meI So I wonder what purpose it actually serves then as a conditional field?

    Re adding a descriptive label, I found it's difficult to keep the label short and so I wondered if there a way to add a description under the custom theme setting like you can when you do a form for say a plugin's settings? In a plug-in form, you would append _desc to your language key and your description appears neatly under the field. I tried this yesterday and got an error message whilst in theme builder mode, it didn't like the _desc appendage on my custom form field at all, which seems odd as supposedly it's a form helper.

  12. According the docs, the Upload Helper form has a setting to toggle on Stock Photos to uploads, but it doesn't appear to be available when using an Upload image custom theme setting.

    if ( \IPS\Settings::i()->pixabay_enabled )
    			{
    				$options['allowStockPhotos'] = TRUE;
    			}

    I tried using a Code/Other type Theme Setting, but it kept throwing errors about the method not being allowed.

    How do I get it to show this optional stock photo picker in my image custom field setting?

    Many thanks!

  13. Is it possible to get this to also apply to Designers Mode? It only seems to work in Dev Mode

    // Disable ACP session timeout?
    				// Disables the ACP session timeout check. Useful for developing where you may
    				// get logged out of the ACP in between requests while working.
    				// Has no effect if IN_DEV is FALSE
    				'DEV_DISABLE_ACP_SESSION_TIMEOUT' => FALSE,

    Many thanks! 😞

×
×
  • Create New...