While creating rather simple JavaScript widget today, based on Date object I faced a tiny and small problem; As you all know Date objects prototype function getMonth(), returns a numeric representation of month. It means January = 0 and December of course is 11.
But lets take a simple example - You are building a drop down selection calendar, with 3 selection boxes; Year, Month and Day.
So, your month's will be not numbers but strings. Problem, how to map this with getMonth() numeric representation? Here is a
"Passim" web management
Unusual web problem solutions
Friday, 27 May 2011
Returning Javascript array keys - numeric array
Labels:
HTML,
javascript
Friday, 25 March 2011
Drupal - Content construction kit (CCK) field information
Hi,
Days ago I was in need for quick access to CCK field table information in order to query Drupal data base. So searching through CCK modules function library I found couple of ones;
1. content_fields() - returns information about content fields - see more for options - http://api.lullabot.com/content_fields
2. content_database_info() - returns database information about particular field - more goes here - http://api.lullabot.com/content_database_info
So having a bit of brainstorming I've created this small
Days ago I was in need for quick access to CCK field table information in order to query Drupal data base. So searching through CCK modules function library I found couple of ones;
1. content_fields() - returns information about content fields - see more for options - http://api.lullabot.com/content_fields
2. content_database_info() - returns database information about particular field - more goes here - http://api.lullabot.com/content_database_info
So having a bit of brainstorming I've created this small
Saturday, 12 March 2011
Drupal breadcrumb custom settings
Some time ago, working on Dev-factory project project, I had a problem to display customized breadcrumb in a way that user can navigate back to parent page while reading child page of specific menu.
Please have a look at this Child Page, as you can see breadcrumb just below the main navigation displays option to navigate back to parent Menu items, and this is only on pages where menus have children.
Took I vile to get decision and
Please have a look at this Child Page, as you can see breadcrumb just below the main navigation displays option to navigate back to parent Menu items, and this is only on pages where menus have children.
Took I vile to get decision and
Thursday, 24 February 2011
Helper function to get taxonomy name based on Drupal arg
Hi,
I found it might be useful to publish this function I,ve created. Since some times you need an extra information in Your pages $title variable.
You can use this in your themes to add additional information on your taxonomy/term/x pages or for whatever else you need to pull something out based on Drupal's argguments ok here
I found it might be useful to publish this function I,ve created. Since some times you need an extra information in Your pages $title variable.
You can use this in your themes to add additional information on your taxonomy/term/x pages or for whatever else you need to pull something out based on Drupal's argguments ok here
Wednesday, 19 January 2011
Spanning headings in HTML anchor tag
Hi,
Yesterday doing some staff on just to be launched DevFactory project I struggled with problem, how to get in "<a>" tag headings and paragraphs.
After couple of minutes - easy;
Easy and great, happy html"ing".
Yesterday doing some staff on just to be launched DevFactory project I struggled with problem, how to get in "<a>" tag headings and paragraphs.
After couple of minutes - easy;
Ok staring with a
<a>
<!--The the idea is to span the paragraphs and headings so-->
<span>
<!--then adding--> <p>Your cool text<p/>
<h2>Super heading</h2>
</span>
</a>
Easy and great, happy html"ing".
Labels:
HTML
Tuesday, 11 January 2011
MSSQL VS MySQL Test for reports
Hi,
This might be helper for for all of us, just imagined toady that some times we need different analytical data to dispose.
Like counting page hits or search results, so it might be a challenge run all through database table with 1000K+ records to find data.
So, today working and expecting to created simple report took me some time to discover simple SQL queries for thsi problem, so here
This might be helper for for all of us, just imagined toady that some times we need different analytical data to dispose.
Like counting page hits or search results, so it might be a challenge run all through database table with 1000K+ records to find data.
So, today working and expecting to created simple report took me some time to discover simple SQL queries for thsi problem, so here
Wednesday, 10 November 2010
Creating customized language switcher block on Drupal website in PHP.
Hi,
Tonight I want to share some ideas how to customize or even create you own language switcher block on your Drupal based website. Live example I am using is Aisc.com.
Some things you need for that;
1. Enable locale module - you can find under core/optional modules
2. Internationalization or i18n custom module from drupal.org/project/i18n.
At first install I18n module and enable all multilingual support what is required - in my case these are all options, because I needed all site content
Tonight I want to share some ideas how to customize or even create you own language switcher block on your Drupal based website. Live example I am using is Aisc.com.
Some things you need for that;
1. Enable locale module - you can find under core/optional modules
2. Internationalization or i18n custom module from drupal.org/project/i18n.
At first install I18n module and enable all multilingual support what is required - in my case these are all options, because I needed all site content
Subscribe to:
Posts (Atom)