Database only bootstrap

Hi drupalers,

when you want to access the Drupal database from an outside script, this will work with Drupal 6:

chdir('/my/drupal6/path/');
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);

But when I tried with a Drupal 7 install, it failed:

How to add image watermark on Drupal 7?

I have image uploading on my website. Each image uploaded scaled then Watermark added to it.
I don't know how to add watermark while i can't find it in image styles and effects.

Image Cache Actions module has no version for drupal 7.

Then how can i add the watermark?

Thank :)

Taxonomy: Parent terms of a related term

You know Taxonomy related terms. I created a view to get all the nodes having the related terms; Now I want the reverse of it.

For the related terms view I used the following Validator PHP code with the Arguments = Taxonomy: Term ID

$list = array($argument);
foreach (taxonomy_get_related($argument) as $term) {
  $list[] = $term->tid;
}
$handler->argument = implode('+', $list);
return TRUE; 

And it shows the nodes having the related terms.

[Zen] Conditional javascripts for IE/css3 and sub-theme.info

I'd like to add some conditional javascripts to my sub-theme using Keith Clark's ie-css3.js, NWMatcher and iePNGFix to help make my theme more backward-compatible.

I'd like to do this the 'Drupal' way, so I'm asking here.

This is the code, as added into /sites/all/themes/my-zen-sub-theme/templates/html.tpl.php just before the < body> tag with all necessary documents placed in their respective places:

<!--[if lt IE 8]>
<script src="/sites/all/libraries/iepngfix/iepngfix_tilebg.js"></script>
<![endif]-->
<script type="text/javascript" src="/sites/all/libraries/NWMatcher 1.2.2.js"></script>
<!--[if (gte IE 5.5)&(lte IE 8)]>
  <script type="text/javascript" src="/sites/all/libraries/ie-no-css3.js"></script>
  <noscript><link rel="stylesheet" href="" /></noscript>
<![endif]-->

I'd rather add them in the zen-sub-theme.info document instead because it's cleaner, but I don't see a method for calling javascripts conditionally -- only for stylesheets.

Also, I don't see a way to reference /sites/all/libraries or their subfolders within the .info system.

Programmatic node creation in Drupal 7

I haven't been able to find information on how to programmaticly create a node in Drupal 7. Migrate module lookd like it can do it, but it is a bit overkill to learn just for this.

I have a Drupal 6 blog, and want to upgrade it to Drupal 7. Unfortunately, updating is not working, and I refuse to try updating again until the update path is more clearly defined with a beta release of D7.

So, instead I:

3 languages

Hi,

I would need to have a Drupal 7.x site in 3 languages (Finnish, Swedish and English), but i do not understand how to create the different languages. Can anyone help me?

Thanx in advance
J

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x