Archive for October, 2008

WYSIWYG Editor?

Tuesday, October 28th, 2008

This might not be the best, might not be the lightest, or might not be your favorite !

But I like it..

FCKEditor is my choice.

Download the module here

Download the editor here

Get All Nodes from one taxonomy

Tuesday, October 28th, 2008

Want to get all nodes classified under specific taxonomy?

Here we go:

<?php

 $result = taxonomy_select_nodes(array($node->taxonomy[1]->tid));

 while ($row = db_fetch_object($result)) {

 print $row->nid."<br />";

 }
 
?>

Need to display a node?

Tuesday, October 28th, 2008

Let me introduce you to some Drupal APIs

Node Load

to load a node variables

$node = node_load($nid);

Node View

To load a node teaser/full body view

$node = node_load($nid); 

print node_view($node)
 

Need a Search Engine Friendly URL?

Tuesday, October 28th, 2008

If you need a search engine friendly URL in drupal (who dont need anyway), pathauto is your best friend

Download PathAuto

Required Module: Token

Must Activated Core Module: Path

Lorem Ipsum Generator

Monday, October 27th, 2008

Don’t know what text to put in? Try Lorem Ipsum Generator. Click here

A bit introduction

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

.

Images in a scrolling horizontal div

Monday, October 27th, 2008

Need to put images in horizontal order and in scrolling div?

Here’s the trick

<ul style="overflow: auto; width: 200px; white-space: nowrap;">
		<li style="display: inline">IMG HERE</li>
		<li style="display: inline">IMG HERE</li>
		<li style="display: inline">IMG HERE</li>
		<li style="display: inline">IMG HERE</li>
</ul>

.

Image Cache - Using more than one presets

Monday, October 27th, 2008

If you want to use two presets or more, you can use this code..

Sigh.. Wasting hours looking for this answer.. Silly me !

<?php
print theme('imagecache', $preset, $image['filepath'], $alt, $title, $attributes);
?>

This is the example…

<?php
print theme('imagecache', 'small', 'test.jpg', 'just a test image', 'test image');
?>

..

Contemplate | Drupal Module

Monday, October 27th, 2008

Contemplate module is very useful if you want to make a customized node display.

Download here

Too bad, in Drupal 6 it behaves differently. The template is Blank! We have to manually enter the variables.

New Features in Views 2

Monday, October 27th, 2008

Watch this video

http://www.masteringdrupal.com/screencast/new-features-in-views2/play

Views Introduction in Drupal 6

Monday, October 27th, 2008

I’m a bit confused in the beginning. Hope this video can help