Submitted by ivan on Mon, 01/06/2009 - 20:28
The user relationship module can be used to create relationships between users on your drupal site. In this example we’ll be creating a single relationship called “Friends”.
Submitted by ivan on Sat, 15/11/2008 - 13:16
When writing articles about drupal or anything that requires code to be shown, its great to have syntax highlighting just to liven up the page.
Submitted by ivan on Sun, 28/09/2008 - 20:54
A WYSIWYG makes life a lot easier for anyone wanting to create large articles in drupal. In this tutorial i'll show you how to install FCK Editor on drupal 6.
Submitted by ivan on Tue, 16/09/2008 - 20:33
Customising views is even easier with Theme Wizard.
Submitted by ivan on Tue, 16/09/2008 - 20:28
NOTE:This is a old unpublished article which i wrote a fair while old but never published it. I might as well publish it, if it helps somebody out there it's done it job.
Imagefield gives you the ability to add images to your content type, but image field alone can't handle resizing and generating thumbnails, that's why we'll use Imagecache to handle the resizing and thumbnails.
Imagecache allows you to a create preset to manipulate images on the fly. You'll understand a lot more about imagecache once we start playing with it.
Submitted by ivan on Sun, 03/08/2008 - 20:55
The following:
$columns = array();
foreach($form as $f)
{
$columns += array($f['form_field_id'] => $f['label']);
}
Will create.
Array
(
[] =>
[J] => J
[1] => Title
[3] => Recruiter
[2] => Description
[4] => Job_Type
[5] => Segment
[6] => Owner
)
And this will create:
$columns = array();
foreach($form as $f)
{
$columns[] = array($f['form_field_id'] => $f['label']);
}
Submitted by ivan on Sun, 03/08/2008 - 20:55
Just when you think you know php. You find these helpful array function.
in_array()
http://au2.php.net/in_array
array_key_exists()
http://au.php.net/array_key_exists
more array functions:
http://au.php.net/manual/en/ref.array.php
$value = array( [0] => 6 [1] => 5 [2] => 4 );
$k = 4;
$checked = false;
if(is_array($value))
{
if(in_array($k, $value))
{
$checked = true;
}
else
{
$checked = false;
}
}
Submitted by ivan on Sun, 03/08/2008 - 20:53
If you ever need to change a select box via javascript use the code below.
document.myFormName.mySelectName.options[2] = new Option("label", "value", true);
For more information go here http://www.javascriptkit.com/javatutors/selectcontent.shtml and http://www.javascriptkit.com/jsref/select.shtml#section2
Submitted by ivan on Sun, 03/08/2008 - 20:53
This zips all files and directories
- -r:Includes all files and directories -> Files
- drupal.zip:The zip file you want to create
- html:The folder you are targetting or use * if your currently in the folder.
Submitted by ivan on Sun, 03/08/2008 - 20:52
Here is an example of import sql files from ssh
# mysql -uPutYourUserHere -pPutYourPasswordHere -hlocalhost PutYourUserHere_databaseName < database.sql
# mysql -u username -p dbname < data.sql