See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

Scale an image to the specified size using GD adding colored edges to exactly match the given size.

Hi,

I'm sorry if I am in the wrong forum, but I did not find a better place.

I often want to scale images in an other way, than the drupal core image resize function does. I want the border-length to always be same. For example the profile images should always be 160x250 and not only in the best case. If I use Drupals resize function, it might also come to a 30x250 image. I could just resize the image to the given size without watching the ratio, but this way, images will look stupid.
This is why I think the following function might be good to be added to the core-image functionality. It downscales an image to match best into a given imagesize and fills the rest of the new image with a color of choice. It is somehow like Ebay does with the userimages.

If there is already such a functionality or I am the only one, who needs it or it is the wrong area to post this code, I'm sorry and I ask you, to kindly move the code where it belongs.

Markus


/**
* Scale an image to the specified size using GD adding colored edges to exactly match the given size.
*/
function image_gd_resize_to_fill_space($source, $destination, $totalwidth, $totalheight, $color=array(255, 255, 255)) {
if (!file_exists($source)) {
return false;
}
$base = image_get_info($source);
if (!$base) {
return false;
}

You should not remove modules or features from core !

Hi,
I was quite upset to realize, after upgrading from 4.7 to 5.1 that the content types workflow "Moderation queue" box was removed from drupal 5.

Removing features from core products is usually avoided by plague by developers, I wish it would be the same for drupal, because it could throw your users into troubles.

Cordially,
Brakkar

Image menu items as primary links

I am in urgent need for a quick solution. Kindly help.

I want to have menus (primary and secondary links) as images. The menus should appear as images instead of text which is the default format. Kindly supply the detailed steps and code (if any required) to achieve the task. The version of Drupal I am using is 5.1. I have gone through some blogs and articles but are not convincing and moreover failed to achieve the task. There are less articles/discussions related to this topic. Can someone kindly help me AEAP.

Drupal did you mean

I think Drupal built-it search needs the did you mean ability.

I mean if you try to use the Google or YouTube, you will find a feature called did you mean. It suggests a word that is close to the word that you search for. For example:-

If I type tailloring in the search box, I will get a message look like this -> Did you mean: tailoring ?

Wouldn't it be nice if we can have one like this?

Change node/add content

Hello!

I'd like to custom the "node/add" drupal page to something different, such as adding images to links and make different arranging on the page.

How can I do that?

Thanks!

taxonomy_get_vocabularies returns nothing

I'm trying to build an install profile which adds vocabularies and hierarchical terms to the system and I'm having trouble getting the vocabulary list.

I doesn't seem like there's an easy way to add a term to a named vocabulary so I build an array of terms with a key of parent name. I then use taxonomy_get_vocabularies to get an array of vocabularies which I can loop through adding the relevant terms for each vocabulary.

The problem is that taxonomy_get_vocabularies isn't returning anything. I can't see why although this line (line 643):

db_query(db_rewrite_sql('SELECT v.*, n.type FROM {vocabulary} v LEFT JOIN {vocabulary_node_types} n ON v.vid = n.vid ORDER BY v.weight, v.name', 'v', 'vid'));

adds a WHERE v.vid IS NULL clause to the query which may be a problem. Having said that I'm sure this function works elsewhere in Drupal so I can't believe there's a problem with it.

My code is:

<?php
$terms = array(
array(
'name' => 'John Smith',
'description' => '',
'vocab' => 'Publisher',
'parent_terms' => '', // Single parent name term - can technically be an array but note that the routine that adds the terms below doesn't support this
'weight' => 0
)
);
$vocabularies = array();
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vid => $vocabulary) {
foreach ($terms as $term)
{

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core