JustAskVin Insights

Ideas for leading and building technology well.

Practical writing on delivery, architecture, CMS migrations, digital growth, and the decisions that shape strong web experiences.

Latest

Page 9 of recent writing

All insights home →

Drupal

drupal clean URLs not working? with tilde sign

If your site is developed in Drupal and your URL looks like this: If your site URL looks like this: http://[domain name OR IP Address]/~[accountname]/anyFolder/ Example http://example.com/~xyzaccount/somefolder/ http://xxx.xxx.xxx.xxx/~xyzaccount/somefolder/ Then you need to set RewriteBase!in your .htaccess file that

Aug 8, 2015

Read article

htaccess Setting

Force HTTPS url with .htaccess

RewriteCond %{HTTPS} off # First rewrite to HTTPS: # Don’t put www. here. If it is already there it will be included, if not # the subsequent rule will catch it. RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Now, rewrite any request to the wrong domain to use www. RewriteCond %{HTTP_HOST} !^www\. Rewrit

Jul 30, 2015

Read article

ffmpeg

create high quality video using ffmpeg

You can use the open source ffmpeg program to convert a media file from low quality to high quality format [shellprompt]# /fullpath/to/ffmpeg/ffmpeg -i source.mp4 -c:v libx264 -crf 19 destinationfile.flv OR [shellprompt]# /fullpath/to/ffmpeg/ffmpeg -i source.mp4 -c:v libx264 -ar 22050 -crf 28 destinationfile.flv Parame

Nov 23, 2013

Read article

ffmpeg

convert video from one format to another using ffmpeg

You can use the open source ffmpeg program to convert a media file from one format to another. Below is an exmple: [shellprompt]# /fullpath/to/ffmpeglibrary/ffmpeg -i InputFile.FLV OutputFile.mp3 There are various other options you can use to specify the attribute of the output file. Here are few of the examples code h

Nov 23, 2013

Read article

ffmpeg

create video thumbnail using ffmpeg

You can use the open source ffmpeg program to extract a frame to use as a thumbnail for a video. Below is an exmple: [shellprompt]# /fullpath/to/ffmpeglibrary/ffmpeg -i InputFile.FLV -vframes 1 -an -s 400×222 -ss 30 OutputFile.jpg -i = Inputfile name -vframes 1 = Output one frame -an = Disable audio -s 400×222 = Output

Nov 23, 2013

Read article

CMS

Set widget label from action file in symfony 1.4

In Action File ========================================================== $this->form = new youFormclassname(); To set individual Label $this->form->getWidget(‘widgetname’)->setLabel(‘widget Custom label’); To set multiple field label $this->form->getWidgetSchema()->setLabels(array( ‘field_name_1’ => ‘Field 1 Custom La

Aug 31, 2012

Read article

HTML

Replace any text from html text by tag name in php

function replace_tag_text($tagName,$subjectStr,$replaceStr) { $tagName = preg_quote($tagName); preg_match_all(‘{<‘.$tagName.'[^>]*>(.*?)</’.$tagName.’>}’,$subjectStr,$matches,PREG_PATTERN_ORDER); $result = str_replace($matches[1],$replaceStr,$subjectStr); return $result; } Usage : Say for Example $ActualStr : ‘<div><sp

Aug 2, 2012

Read article

CMS

Create template specific to node in drupal 6

If you want to have custom templates for your node. You can create templates specific to node ID as follows. Add the below function in your template.php if its not exists. function yourcurrentthemename_preprocess_node(&$vars, $hook) { $node = $vars[‘node’]; $vars[‘template_file’] = ‘node-‘. $node->nid; } If the functio

Mar 9, 2012

Read article

HTML

How to fix flash object z-index

If any of your html element is getting hide behind the flash object such as youtube video player, or any flash player/object Then you should call this function on body load. function fix_flash_z_index() { // loop through every embed tag on the site var embeds = document.getElementsByTagName(’embed’); for (i = 0; i

Feb 26, 2012

Read article