jaanlo.com - A How to site
mulogic - August 26, 2008 - 15:11
jaanlo.com is a "how to" site for Indians. The idea is to encourage community to contribute "how to" articles for solving day to day problems.
Site URL: http://jaanlo.com
Drupal is awesome. It's so flexible and gives enormous power to the developer. Let me know, what you guys think.
Modules used
cck
Views
Views Bulk Operations
Views Bookmark
ImageCache
Pathauto
Global Redirect
Node Radioactivity
Bio
CAPTCHA
Fivestar
and many more

Well done! Pealse describe
Well done!
Pealse describe how you did the category pages and the howto page!
Looks nice!
-----------------------------------------
Joep
CompuBase, Drupal, websites and webdesign
The category pages are
The category pages are created by altering the default taxonomy term view. It accepts tid as argument.
I wrote a small snippet to print the categories in a vocabulary as a block. The categories in this block link to the taxonomy view with the categories term id as argument.
The "howto" page was done using "Taxonomy Image" and "Taxonomy List" modules.
The presentation is achieved by tweaking css.
Thanks. I will have a look
Thanks. I will have a look at those modules.
-----------------------------------------
Joep
CompuBase, Drupal, websites and webdesign
childs of the category
The website is very nice, I like the color and it's easy to navigate.
Can you show the snippet to print the categories in a vocabulary as a block?
Thanks
Hi, There are a few taxonomy
Hi,
There are a few taxonomy related modules, that can do this for you.
Taxonomy context
Taxonomy Blocks
Tax'o'Menu
Panels Taxonomy
and may be a few others
Since none of them were suitable for my requirements (either they did a lot more (or) were doing something different, than what was needed ), i wrote this small function.
function custom_get_term_list($vid, $baseurl = 'taxonomy/term'){$items = array();
$terms = taxonomy_get_tree($vid, 0, -1, 1);
foreach ( $terms as $term ) {
$items[] = l($term->name, "$baseurl/$term->tid");
}
drupal_add_css(drupal_get_path('module', 'custom_blocks') . '/category_block.css');
return theme('item_list', $items);
}
here $vid - the vocabulary id
but, it's always better to look for a contributed module, rather than writing it yourself.
hope this helps.
Thanks
Thanks for the snippet. I will make a photo gallery and was looking for the best way to present the albums.
I found your site and like the using of the taxonomy. How did you display the sub-categories in the category
( for example: Hair Care(0) ) in the view?
hi, check out the following
hi,
check out the following snippet.
use "taxonomy_get_children" to get a array of children for the term $term_id. taxonomy_term_count_nodes() can get the number of nodes for a term.
function custom_get_subcategory_list($term_id, $type = 'howto') {
//echo "The term id is $term_id";
$children = taxonomy_get_children($term_id);
if(count($children) <= 0)
{
// no children for this term
return;
}
$children_list = array();
foreach ($children as $child_term){
$term_text = $child_term->name .'('. taxonomy_term_count_nodes($child_term->tid, $type) .')';
$children_list[] = array('data' => l($term_text, taxonomy_term_path($child_term)), 'class' => 'subcategory');
}
$term = taxonomy_get_term($term_id);
$title = '<h3 class = "subcat_list_title">Categories in '. $term->name . '</h3>';
return $title. '<div id = "subcategory_list">' . theme('item_list', $children_list) . '<div class="subcat_list_footer"></div></div>';
}
it works !
Thank you very much !
This was the missing piece of my puzzle.
Very much like your site,
Very much like your site, well done and a great theme to boot.
May I enquire as to why the site is in English - is that because there are so many languages in India or because you are appealing to expats in English speaking countries?
I am happy that, you like
Hi,
thanks for your comments... I am happy that, you like the site...
Yes, as you said, india has almost one mother tongue for each state. An article will be useful to most number of people, if written in English.
Even in India, English is the common medium of communication for people from different states.
Thanks for your feedback,
Thanks for your feedback, much appreciated! I have a friend from Calcutta, he's a travelling salesman, he speaks 9 languages fluently AND English... yikes!
That is very
That is very interesting...
No wonder you guys are fluent in English.
-----------------------------------------
Joep
CompuBase, Drupal, websites and webdesign
I'm from New Zealand and a
I'm from New Zealand and a Kiwi mate, I like to think my English is OK... granted its not actually my first language but I do alright:)
Nice site. What module are
Nice site. What module are you using for the adsense sharing?
Andrew
Hi Andrew, I used the
Hi Andrew,
I used the "AdSense core and API" module for displaying ads. However, for revenue sharing, i have specific needs. So i wrote a small custom module on top of the api.
What theme?
What theme did you use?
I like it - it's very clean.
Hi, It's a custom theme,
Hi,
It's a custom theme, built from garland. I know garland may not be right theme to start with to built a custom one. However, i had a good understanding of garland theme. so i made my modifications on top of it.
I am running this site on a shared host. so to improve performance, i have implemented most of the background using css sprites. In this theme, almost all the buttons or the boxes with curved corners use a single long sprite image. It helped in improving the yslow score.