A long-standing frustration for any Mac web developer has been testing our sites in Internet explorer.
To run our sites in Internet Explorer developers need to either:
A long-standing frustration for any Mac web developer has been testing our sites in Internet explorer.
To run our sites in Internet Explorer developers need to either:
When writing CSS most people use short hand because it saves space and thought.
For instance below says make a white backgorund with a horizontally repeating background image body_bgrd.png
background: #FFFFFF url(../images/body_bgrd.png) 0 0 repeat-x;
That works fine for your site's CSS but paste that into your HTML Mail template and your in for a surprise. :)
Instead you have to write the CSS out in long hand.
Setting the length of teasers in Drupal 6 is easy when you have only one layout. Go to "Post Settings" on the admin page:
/admin/content/node-settings
Set the "Length of trimmed posts" to your desired length 200 characters , 600 characters etc.
If you have two different layouts on your site you have to get a bit trickier and use code.
I've created this could in a new block set to allow PHP input.
First enable user profile pictures built into the drupal core.
triberising.com/admin/user/settings
Now set drupal's theme to display profile pictures on your nodes: Administer > Themes > Configure tab > Global Settings
So you want to create a longtext field in your custom schema.
You've noticed node revisions use this to store the long text in descriptions.
So, you've changed the type in the schema to read 'type' => 'longtext' but no luck. The table doesn't install and you have an error in your face.
You could try 'type' => 'blob' which works but this isn't what you want either. Blobs aren't the same as text in mysql. Blobs are binary so they are case sensative. Searching for 'drupal' will not return 'Drupal'.
Coding along minding your own business syncing to your repository using svnX on your Mac you may hit an error saying:
svn: Working copy locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
You look through the svnX menu items and commands in vain. Where do you click? Where is this cleanup? Right click doesn't work. How do I remove these locks?
The answer is there is no where to click.
Instead you must open the terminal.
As documented here: http://www.php.net/manual/en/mysqli-result.num-rows.php
To count how many elements are returned by a call against your database simply use:
$result->num_rows;
For example:
$result = db_query ("SELECT * from {node});
$row_cnt = $result->num_rows;
$row_cnt will equal the total number of nodes in your Drupal MySQL database.
Previously node_save() returned the $nid but not anymore... so what do we do?
It's deceivingly simple.
You have just saved a variable as your node.
$n In this example:
node_save($n);
Now call $n->nid :) its that easy!
$nid = $n->nid;
get yur tribe on!
Tribe Rising © 2011
Tribe Rising Pty Ltd | ABN 53 137 743 376 | ACN 137 743 376
Tel: +61 2 8006 4493
Office: 181 Riverview Rd Avalon NSW 2107
Post: PO Box 878 Avalon Beach NSW 2107
info@triberising.com
