Silverstripe uses TinyMCE for its HTMLEditorField. By default, the editor is rendered relatively tall. But how do we change the height to make it smaller without having to alter Silverstripe core file? Silverstripe provides setRows() function to modify HTMLEditorField height. So you can make it smaller or bigger (if you think the default is not big enough). As usual, you can chain the function after ::create() like below: [crayon-673f0a606a0dd217075330/]
Author: Stephanus Yanaputra
By default, Silverstripe gives 10 attempts for user to sign in. The easiest way to modify the lock out delay and number of attempt in Silverstripe 3 is through config.yml Go to mysite/_config/config.yml and add the following code: [crayon-673f0a606a5d9628079592/] And voila, your silverstripe lock out system is updated without the need to update the Silverstripe’s core. If you ever need to access Member’s attribute regarding to lock out, you can use the following: (assuming $member is an instance of Member class) $member->LockedOutUntil …
When building forms, there are times when we want to display helpful information regarding the field. There are a couple of ways to do this: by using LiteralField or using setDescription() in the field object. Silverstripe provides setDescription() function in a field object to help generating text underneath a field. This field can be chained with other function. So you can set the description on creation like below: [crayon-673f0a606a7b4602900790/] Or when you adding a field to a tab: [crayon-673f0a606a7bd960264686/] …
Photography plays a lot of roles in web design. Good design with bad images is a no go situation. As a web developer, there are times when I need to use great photos to make my mockup looks alive or when building web templates. Thankfully, there are a good number of websites with fascinating stock photo popping up all over the web. And they’re free. About Licensing Many of these photographs are free from copyright restrictions or licensed under creative commons public …
When your ACF Repeater exceeds more than hundreds of rows, ACF Repeater will only save the data up to certain point and discard the rest of it. This issue is caused by PHP’s max_input_vars, max_input_nesting_level, post_max_size and max_input_time. To fix this issue, we just have to increase our PHP configuration to a higher level. By default PHP sets those variables to a certain point for security reason. So we’re about to breach that protocol because we need our site to work. Below is an …
I have an issue with iOS Photo recently not being displayed properly after uploading. After googling around, I’ve managed to found a workaround for this issue. Imagine this scenario: You have a working website with file uploader and then strange phenomenon happens when you upload a photo from iPhone in portrait. The photo is uploaded properly, but the orientation is landscape. What is the problem with iOS Photo? The problem was that image rotation was added to the photo as EXIF …
As mentioned in my other post about Google AdWords and Contact Form 7: Google AdWords Conversion Tracking in Contact Form 7, Contact Form 7 does not create a thank you page after form submission. But we still want to track it in Analytics. There are some ways to track form submission by using: Google Analytics – Event Google Analytics – Page Views Tracking using Google Analytics Event To do this, you have to go to the contact form and open Additional …
By default, jQuery UI Datepicker’s year dropdown shows only 10 years. It is alright if we are using Datepicker to select recent date, but what if user needs to go way back (like 50 years)? This will create a big inconvenience if we are using jQuery UI Datepicker for birthdate. The solution is to add yearRange option when initializing jQuery UI Datepicker. This will extend the amount of years generated on the dropdown. See the full snippet below: [crayon-673f0a606ad87501985078/]
The good thing about K2 is you can customize your layout according to your will. But what if you need to display some modules? Unfortunately K2 does not allow you to just use <jdoc:include> [crayon-673f0a606af2a462056773/] Therefore, we have to go a different way by fetching module using JModuleHelper. The snippet below will allow K2 to display all modules that have popup-form position. The if statement is there to allow fail safe when there is no module [crayon-673f0a606af2e844240522/] If you want …
You’re using WordPress and Contact Form 7 and everything seems great. But one day, you need to track in Google AdWords how many people use the contact form to see the conversion rates. Unlike some contact form plugins, Contact Form 7 does not generate a thank you page after submitting the form. This will make it hard to embed Google AdWords Conversion Tracking Code. The good news is Contact Form 7 allows you to attach a function call after form …