Garmin Vivoactive – Review

Many sport people say: no matter with what device you start with, but you finish with Garmin. And I think it’s true. Last time I decided to replaced my phone by sport tracking device. After some searches I found that the best option for me is Garmin Vivoactive. Now I can write short review and describe my experiences for about month of workouts and one MTB race. TL;DR: No, it isn’t ideal device, but much better than using phone or strange and complicated software for Android.

Continue reading “Garmin Vivoactive – Review”

MyBB – Fancybox Thumbnails

I was looking for someting like Fit on page for MyBB 1.8, but without good results. Build-in autoscaling is good, but not comfortable for me. I tried some code and find better solution. We can you Fancybox (or potential, any other similar JS library) to load images on demand in good-looking dialogs. Let’s do this.

1. Edit theme CSS

Just edit your theme CSS and add this code:


That 400px is only an example. You should use best value for your board.

2. Download Fancybox

You must download Fancybox 3.0 from official site and upload files to your board root directory:

http://fancyapps.com/fancybox/3/

Let’s say, that your index.php file is on /index.php.

You should move files from fancyBox-3.0/dist to /fancybox on your server (please create new directory).

3. Add Fancybox to posts images

Log in into board ACP and edit your theme headerinclude template. Add this code after {$stylesheets}:

This code will add links to all board images and enable Fancybox for them.

4. Add Fancybox to thumbnails

Log in into board ACP and edit your theme postbit_attachments_thumbnails_thumbnail template. Change:

to:

This code will enabled Fancybox for your thumbnails in posts. We use post ID to provide images grouping.

5. Optional: move Fancybox CSS

You don’t have to use Fancybox CSS file from third point of that instruction. You can always copy Fancybox CSS code and add it to your theme CSS or add new stylesheet with that. It’s nice solution, because you can modify that code quickly and directly from your ACP.

It’s all!

It’s all. Just save all templates and test Fancybox on your MyBB board!

[HTML][JS] Input + datalist with validation instead of selects

Last time I implemented something like mix of select and input fields. User can type name, but should value in field should be from defined group. It should not only provide selection dropdown menu, but also suggestions during typing. There are a lot of ready solutions, but I decided to use native HTML5 tag – datelist. It’s very nice, so I decided to describe its and some issues with browsers.

Continue reading “[HTML][JS] Input + datalist with validation instead of selects”

From Android to iOS – few months later

I used to use Android and it was so for many years and many different devices. In most cases it was something from Nexus series: Nexus S, Galaxy Nexus, Nexus 4 or Nexus 5. Why? Because software has been delivered directly from Google, with instant updates without other companies additional layers and many unnecessary applications. But last year, last fall I decided to change everything… and replaced Android phone to iPhone 7. I also replaced Android tablet to iPad Mini 4 two months later. What can I say after few months with iOS? Is this system better, or worst than Android? Can I do the same things faster, or slower? I can explain my experiences and invite you to comment and describe yours.

Continue reading “From Android to iOS – few months later”

PHP/Mongo – Nested set model

Last time I created some structure for linking different elements from similar groups. This project needed high performance and easy way to get elements hierarchy, but changes are not often. After consideration I decided to implement nested set tree model to do this. All is based on PHP and use Mongo database and I would like to show you some basis operations with that. It can be helful in some cases, and that model is very efficient in read operations.

Continue reading “PHP/Mongo – Nested set model”