Elsewhere
Mearra: Some tools to aid your Drupal admin pain
I think we have all felt the pain at least sometimes when doing admin tasks on the Drupal backend. Trying to find your way to the right admin page without knowing the correct path, trying to find some module in the modules page and activate it etc. With the built-in basic tools it can be pretty frustrating. But worry no more because here I present you some cool modules to aid your admin pain!
Administration menu Administration menu provides a theme-independent administration interface. This module is a real time saver for all types of users. You get fast access to all the sub admin pages through the CSS/JS-based dropdown menu at the top on all pages of your site. But the functionality presented doesn't limit to just regular menu items — tasks and all kinds of actions are also listed in the menu. This enables fast access to your every day tasks. You can find a demonstration of this module from here http://www.unleashedmind.com/drupal/admin_menu/.[http://drupal.org/project/admin_menu]
AlohaAloha module integrates the excellent HTML5 wysiwyg editor Aloha Editor (http://aloha-editor.org/) to Drupal. With Aloha you don't have to press the edit link of an page or article when you want to make small changes but you can do it straight in the front end! Fixing typos and adding some text hasn't been this easy&fast before. Think how much time you can save while using this module! You can find a demonstration of this module from here http://aloha.dev.mearra.com.
[http://drupal.org/project/aloha]
CoffeePerformance junkies like me like to do most of the tasks from the keyboard without the need to use your mouse/touchpad/whatever. For example in OS X people use tools like Spotlight, Alfred or LaunchBar to do all kind of tasks just using the keyboard. Well now you can use the same behavior in Drupal too! Just install Coffee and press alt+d (alt + shift + D in Opera, alt + ctrl + D in Windows Internet Explorer) and you get a Alfred-like popup where you can just start typing page names or whatever where you want to navigate. You can even define your own commands in your module with hook_coffee_command() see coffee.api.php for further documentation. You can see Coffee module in action in this screencast http://www.youtube.com/watch?v=ikGJl69jPJw.
[http://drupal.org/project/coffee]
Module filterWhile the module listing on modules page can get pretty long Module filter module comes in the rescue! With this module you can filter the modules list by either typing some keywords or using the module category listing to limit the amount of modules shown. With this module you can quickly find the module(s) you were trying to find and enable/disable them. A real life saver when handling modules!
[http://drupal.org/project/module_filter]
So what are your favorites? Are there some other modules that fall into this category and belong to your basic stack of modules that you use on every page you administer?
Drupalize.Me: Adding Product Displays
Now that we have created our products we'll dive into the Product display content type so that we can display our products to our users. In this instance we'll start out be re-using the nodes created by Commerce Kickstart, then we create two new displays for our remaining items. We finish up by rearranging the fields on the content type using Drupal 7's manage display configuration.
8m Publication date February 22, 2012 - 7:00amChristian Perrier: 2012 update 11 for Debian Installer localization
- Estonian reaches 100% in level 1
- 24 other languages back to 100% in level 1 and 6 are again fully complete
- Irish progress in level 1
- Catalan progress in level 1
- Tamil progress in level 2
- 25 languages 100%: bg bs cs de el eo es et fa fr gu id it ja kk mr nl pl pt ru sk sr th tr zh_CN
- 12 languages 99%: ar ast hi km kn ko nb si sv ta te uk
- 1 language 97%: eu
- 3 languages 96%: be ga he
- 5 languages 95%: bn da dz ro zh_TW
- 1 language 94%: ca
- 3 languages 93%: hu is lo
- 1 language 92%: sl
- 2 languages 91%: pa vi
- others are 90% or below
Status for D-I level 2 (packages that have localized material that may appear during default installs, such as iso-codes, tasksel, etc.):
- 23 languages 100%: bg cs da de eo es fa fr he id is it ja kk nl pl pt ru si sk tr uk zh_CN
- 4 languages 99%: be sl sv th
- 6 languages 98%: ast dz ca eu pt_BR ro
- 1 language 97%: ta
- 1 language 96%: nb
- 2 langauges 95%: el fi
- 5 languages 94%: ar gl hr vi zh_TW
- 6 languages 92%: bn bs hu ko ne sr
- 8 languages 91%: ga gu ka km lt mk mr te
- others are 90% or below
Status for D-I level 3 (packages that have localized material that may appear during non-default installs, such as win32-loader)
- 31 languages 100%: be bg bs ca cs de el eo es fa fi fr ga gl he id is it ja kk nb nl pl pt ru sk sr sv th tr zh_CN
- 2 languages 98%: hu uk
- others are 90% or below
Michal Čihař: Secure your phpMyAdmin
phpMyAdmin is quite popular software (to give some numbers let's mention 10000 downloads daily on SourceForge.net or 122685 reports in Debian's popcon) and as such is quite attractive target for various scripted attacks. If you run phpMyAdmin installation somewhere you should really make sure it is enough secured, so that these script kiddies don't get through.
In past month I've looked at what kind of attacks are these guys trying and in all cases these are pretty old vulnerabilities, some of them fixed years ago. So the first thing you should do is to update. It is always good to run latest stable version, but in case you can not for whatever reason, try at least taking the most important fixes and using them.
In ideal world your distribution would do this job for you, but in case it did not, you can for example take patches from Debian, which is pretty good at taking our patches (surprisingly it is not much related to my involvement there). To check which patches they have applied you can use excellent patch-tracker tool, which exposes patches from all released packages.
To give you overview of which issues are mostly being attempted to exploit by script kiddies right now, here is the list:
- PMASA-2010-3 - yes, more than two years old, but still unpatched in some places
- PMASA-2011-5 - "only" half year old
- PMASA-2011-6 - only useful together with wrongly configured PHP
If you have fixed these, you should be pretty safe for now, but follow our security announcements for possible future issues (you can use RSS feed or subscribe to news mailing list, where all security issues are announced as well).
However there are more things you can do to keep you safer:
- remove setup directory from phpMyAdmin, you will probably not use it after initial setup
- prevent access to libraries directory from browser, as it is not needed, supplied .htaccess file does this
- properly choose authentication method - cookie is probably the best choice for shared hosting
- in case you don't want all MySQL users to be able to access phpMyAdmin, you can use AllowDeny rules to limit them
- consider hiding phpMyAdmin behind authentication proxy, so that MySQL credenticals are not all users need to login
So these are the basic steps which will help you against possible compromise, I might return to some of these in more details in future posts.
Filed under: Debian English Phpmyadmin Suse | 0 comments | Flattr this!
Rowlands Group: Programmatically Insert Local Files to Managed Files
As numerous posts out there state, this is the way to programmatically add files into Drupal 7's file module tables.
<?php
// Load the files contents
$image = file_get_contents(<path to file>);
// Returns the new file object
$file = file_save_data($image, 'public://<filename>', FILE_EXISTS_RENAME);
?>
However after working on the module CCTV (Currently getting approval for Full Project) I found that this was not enough.
For some background details, CCTV is a module that turns your Drupal site into a IP Camera capture application. Based on the users preference the application can save files up to 1 day in file size (which equates to a very large file). Due to the large file sizes generated by CCTV php runs into memory both max file php configuration and local allocated memory issues. So how do we get around this?
After digging through the file modules documentation I found the following solution.
<?php
$handle = fopen('<path to local file>', 'r');
$file = file_save_data(fopen($handle, 'r'), 'public://<filename>');
fclose($handle);
?>
This opens the file in read only mode and using the file module's function file_save_data it copies the file to the public:// file system. This not only makes your code more efficient, but also allows for bypassing around php's max file size constraints.
Category: Drupal Planetvar switchTo5x=true; stLight.options({publisher:'dr-5d208cf3-1548-8519-cb10-a07ce4f152ee'});Cyril Brulebois: Wrench days
Thanks to the nice Debian Swiss Knives initiative!
Fixing softwareBesides trying to maintain the whole X stack as usual, and preparing the funky wayland, mesa, and weston (currently in NEW) trio for experimental, I got myself into other areas.
Debugging gzipJakup Wilk noticed a while ago that some multiarchified packages couldn’t be co-installed due to gzipped files being different between architectures. That was reported as #647522 against the gzip package.
While some developers consider the lack of determinism (as in: it’s not in the gzip specification, and the current implementation generates different packages anyway!) as a dead-end for the multiarch experiment, it didn’t look like undebuggable or unfixable. And indeed, as confirmed by a quick analysis: a lack of clean-up when several files are processed at once can lead to different results, depending on the order in which files are specified on the command line; the patch for that is trivial, and was later made smaller and the need for it was explained.
Working in the Release TeamI reviewed/approved a few packages for squeeze, but also took care of handling or finishing a few transitions (as seen in my hints file), among which the funny iceweasel9/libmozjs ones; release tools are nice, but one gets to learn lots of stuff at once (which isn’t a negative aspect). I hacked a tiny “collision detector” so that packages involved in several transitions can be easily spotted. Given the huge number of ongoing transitions we had lately, that didn’t look overkill.
Squashing bugsIt had been a very long time since my last working on totally random RC bugs. The Bug Squashing Party organized at IRILL was a very nice opportunity to get back to totally crazy bugs in unknown packages, but also to meet with other Debian contributors; sponsoring maintainers with good patches on their first try was nice, but walking other contributors through their first patches sent to the BTS or through their first NMUs was nice too.
Waving good bye to yadaBack in the Mérida QA meeting I attended in 2007, there were already jokes about how bad yada was, and how it should die in a fire etc. When I started looking at the RC bug list, I quickly switched to scrolling it backwards, and I wondered how much work was left. The details can be seen in #660548, and the result is: yada is gone! sanity++;
packages.debian.orgBoth long descriptions and translations for packages in some suites disappeared after the switch to Description-md5. Thanks to a quick and reduced packages.debian.org setup (mostly: en+de for squeeze+sid+experimental), I managed to find my way through Perl and DB files to propose patches for #657557. I’m still waiting for a confirmation, but in case it works fine, we could even get a fix for DDTP/DDTSS.
Drupalcon: DrupalCon Training: Making the Switch (for Experienced Developers Moving to Drupal)
If you are an experienced developer ready to dive into Drupal, then take a look at the pre-conference training session “Making the Switch to Drupal.” This March 19, day long course is led by Jeff Beeman, Josh Brauer, and Chris Porter - three experts from the Drupal powerhouse Acquia. With years of experience in both Drupal development and training, you can be confident that you’ll leave with a great perspective on what Drupal can do for you - and you’ll have a great time in the process.
Through hands-on activities, several key topics in Drupal site building will be covered:
- Identification of skills needed for Drupal development.
- Strategies for building maintainable, scalable web sites.
- Module selection, configuration, and customization.
- Explanation of the different Drupal data types and when to employ them - including content types, taxonomies, and views.
- Best practices for Drupal code development.
- Navigation of the Drupal community and how to find help.
Although no prior Drupal experience is required, it will be helpful to have knowledge of CSS, HTML, as well as a programming language such as PHP, .NET, or Java.
This pre-conference training session is held on Monday, March 19, 2012 - the day before the conference begins. Therefore, you won’t have to worry about missing any valuable conference events if you decide to enroll in this course.
Visit Acquia’s blog for more detail, or visit the bottom of the registration page if you’re ready to sign up.
LevelTen Interactive: Quick Enhancements to Make Drupal Content Admin Dirt Simple
There is no doubt that Drupal 7's admin is light years better from a usability perspective. Yet, even with all the enhancements, we find site admins still stumbling to manage their content. Over the last few months we have worked out a set of enhancements that have made our clients lives much easier. So we thought we would share.
Drupal core announcements: Drupal 8 feature freeze: December 1st, 2012
For those who missed it, the Drupal 8 feature freeze date was announced at http://buytaert.net/drupal-8-feature-freeze-december-1st-2012 as December 1, 2012. That means if there's something you want to see in Drupal 8, now is the time to make it happen. By this time next year, we'll be in polishing and bug fix phase.
CoreEvolving Web: Understanding the Entity API Module
Entities in Drupal 7 simplify and centralize common logic that, in earlier versions of Drupal, was duplicated in several places, or only usable in specific modules. There are, however, many features (such as saving entities!) that did not make it into Drupal 7. The Entity API module fills in these missing gaps in the core and goes a step farther by simplifying definition of new entity types, and integration with contrib modules such as Views, Rules, and Features.
braahm: Combine several select queries into one with union
I wanted to create a view which lists all nodes of different content types that link to the current node displayed on the page. The nodes link via node reference. Since node references only work in one way, and I wanted to get the node references of different content types linking to the current node, I couldn't (didn't know) how to achieve this easily with just a plain view.
The solution I came about was to embed a view to display the different nodes that link to the current one, and feed that view a list of node ids of the linked nodes.
Four different content types with four different node reference fields linked to our node. To get the nids we need to query four different tables.
To get the nids from the four tables in one trip to the database, we can use the union syntax.
Drupal DatabaseAPI union syntax- Create the different select queries.
- Union the queries to each other like below
$subquery_1->union($subquery_2)->union($subquery_3)->union($subquery_4); - Execute the first query.
Below you find the actual queries to query four different node reference tables.
/** * field_data_field_col_ref_place * field_data_field_entity_ref_place * field_data_field_occ_ref_place * field_data_field_place_ref_place */ $subquery_1 = db_select('field_data_field_col_ref_place', 'cp') ->condition('cp.field_col_ref_place_target_id', $nid, '=') ->fields('cp', array('entity_id')); $subquery_2 = db_select('field_data_field_entity_ref_place', 'ep') ->condition('ep.field_entity_ref_place_target_id', $nid, '=') ->fields('ep', array('entity_id')); $subquery_3 = db_select('field_data_field_occ_ref_place', 'op') ->condition('op.field_occ_ref_place_target_id', $nid, '=') ->fields('op', array('entity_id')); $subquery_4 = db_select('field_data_field_place_ref_place', 'pp') ->condition('pp.entity_id', $nid, '=') ->fields('pp', array('field_place_ref_place_target_id')); $subquery_1->union($subquery_2)->union($subquery_3)->union($subquery_4); $nids = $subquery_1->execute()->fetchCol(); Remarks
The items you retrieve need to be of the same type (for example integers) or a union won't be possible.
Tags: drupaldatabaseAPIplanet drupalDoug Vann: Announcing Blue Drop Awards 2012
We are inviting YOU, The Drupal Community, to join us for the first ever
CiviCRM Blog: Webforms for CiviCRM 4.1
If you've recently upgraded to CiviCRM 4.1, you'll need to upgrade your webform_civicrm as well. Versions 2.3 and below are not fully compatible with Civi 4.1. Version 2.4 is, and will be released in the next couple of days, especially if I get a few comments on this post from people who have sucessfully tested it! The latest -dev is stable and working, so please feel free to download it and try it out on your 4.1 site!
Note: webform_civicrm 2.4 is not backwards-compatible with older versions of CiviCRM, and should only be used with 4.1.x
New Features In webform_civicrm 2.4- Adds contact image and language pref fields
- More options for matching/updating existing activities
- Support for new multi-valued contact sub-type
- Improved group and tag fields
- Can include the entire webform submission in the activity details, as well as an edit link
- Can generate a contact checksum for use in webform-generated emails
- Supports cid1=0 in URL, so the "not you" link no longer logs you out
- Support custom data for cases
This version also has some behind-the-scenes enhancements to improve efficiency, compatibility, and pave the way for future improvements. As always, Drupal 6 and 7 are both supported :)
Tree House Agency: 'OR' Queries with EntityFieldQuery
As we outlined in a previous post about building the Energy.gov platform without Views, extending EntityFieldQuery (EFQ) is essential to our development philosophy.
Cocomore: What to look forward to in Drupal 8
I was already planning to provide an overview of what’s been going on in the various Drupal 8 initiatives even before last week, when Dries announced the timeline for Drupal 8, which includes a “feature freeze” for Drupal 8 in only a little more than nine months from now, and planned release at the DrupalCon Europe, in late August 2013.
Drupal 7’s Plateau of Productivity?While most of the top Drupal 6 modules are now available, in some state or another, for Drupal 7, and I would certainly choose Drupal 7 for a large Drupal-based project that is not expected to be deployed for some time, from the outcry of protests I think there are a lot of people who would not agree that Drupal 7 is yet at its Plateau of Productivity. There is still plenty of reason to build sites on Drupal 6, especially if you need particular features (e.g Nodewords / Metatag functioning properly, among others) and if you need to deploy the site now, with those features ready for use. Dries indicated that he thought Drupal 6 reached its Plateau of Productivity in late 2009, about 18 months after its initial release. At that point, there were fewer than 20,000 sites using Drupal 5 and more than 200,000 sites using Drupal 6. While this order-of-magnitude-greater-usage is not likely to ever be seen comparing Drupal 7 vs Drupal 6 usage (at least not before Drupal 8 is released), I do think that it’s significant that Drupal 7 usage has finally overtaken Drupal 6. That said, I don’t think we are truly at Drupal 7’s Plateau of Productivity, the point where building a new site on Drupal 6 would be “pointless”. Both in terms of time-after-release and usage statistics, it is arguably premature to say we are quite to that point yet.
Quibbling aside, I also don’t think it matters whether we believe we have reached the Plateau of Productivity for Drupal 7, or not — and it certainly doesn’t matter whether we are all in agreement about that. I do think we are ready to see core development for Drupal 8 get kicked into high gear and I don’t think it will significantly delay the development of the contrib modules or resolving core issues in Drupal 7 which are the final barrier, in my view, to truly reaching its Plateau of Productivity. Additionally, many of the fixes and features going into Drupal 8 are regularly being back-ported to Drupal 7, and there is increased discussion of relaxing the criteria for what can be back-ported to Drupal 7, so I see the increased attention to Drupal 8 core development as exciting: a win-win for the whole Drupal community. We now have a release date for Drupal 8, which is important for business decisions, and a better timeline to facilitate a roadmap for the final stages of determining feature inclusion.
Drupal 8 Core InitiativesCurrently there are 6 official Drupal 8 Core Initiatives which are working on various aspects of desired improvements to core. There are others likely to be added to the list as soon as a bit more progress has been made on the current list and/or as qualified individuals step up to take on some of the other “top 10” desired improvements we had on our collective community wishlist. Some of the improvements require fixes to issues plaguing Drupal 7 and 6 and have been backported. Most of the others involve dozens, if not hundreds, of related issues. Following is a brief summary of each of the current core initiatives and what their priority goals are for Drupal 8. In the interest of brevity, the explanations leave out a lot of juicy details, but for those who haven’t been paying close attention and who might like to get involved, I hope this summary is useful:
Web Services and Context Core InitiativeThe Web Services and Context Core Initiative (WSCCI, pronounced “Whiskey”), formerly referred to as the “Butler” project, is a core initiative led by Larry Garfield of Palantir.net, aka “Crell” on Drupal.org. While the traditionally typical HTTP request has been for HTML pages, the modern Web has brought with it the need for HTTP services which deliver information which is not necessarily in the form of HTML. This is especially true for mobile applications, but also applies to feeds and other communications via HTTP. The goal is to “take Drupal from being a first-class Web CMS to being a first-class REST server which includes a first-class Web CMS”. Really, this initiative spans a huge range of related issues and without writing an article many times the length of this one, I could not possibly cover everything, but…
Matthew Saunders: Drupalcon Denver - Feb 21, 2012 - LAST DAY FOR EARLY BIRD PRICING
Want to save $50? If you're planning on going to Drupalcon Denver today is the last possible day to get in at the early bird pricing. At midnight Mountain Time, the price goes from $350 to $400. That extra $50 in Denver would a REALLY nice meal for a couple of people with drinks. It could get two people into the official party. It is an Association membership with $20 left over. Come on? What are you waiting for? REGISTER today to access more than 104 sessions including core conversations, three GREAT keynotes, more Birds of a Feather conversations than you can shake a stick at. That does not even include the networking opportunities.
If you register today, that comes to $70/day. That increases by $10/day tonight (February 21/2012) at midnight.
Aigars Mahinovs: Le Camp Le DebConf Le 2013!
The meeting was as long as the kernel changelog, the decision was as difficult as a Debian release, but in the end Le Camp has won in the voting 5 to 4. It was lucky that one member of the 10 man committee was not present or we could have had a tie, just like there was one in the first round of voting.
Well, congratulations to the poor sods of the Swiss team, who will now have to fulfil what they promised and also all the small things that everyone always forgets that also need to be done for every Debconf!
I think that I will try again for 2015, but before that we will try to get a few people from Latvian community to go to Debconf13 to get the Debconf and Debian experience and exposure.
Meanwhile, it looks like I will be skipping this years Debconf12 – it is very far away for me and as I could not find a reasonable business rationale for me being there, it would be a far and expensive vacation for me. I don’t think there is enough benefit from me being there to ask for any Debian funds for this either, especially hearing how tight money is this year. So – if you’re going, make sure to take a camera and take a bunch of pictures, so we at home can see it too
Commerce Guys: Commerce Module Tuesday: Commerce Product Display Manager
Discover Commerce Product Display Manager (shortname: commerce_pdm) in this new Commerce Module Tuesday screencast and see how to make product management easier for your commerce website.
Commerce Product Display Manager enables two UI features, the first one displays a widget in the product creation form and allows us to create a product display right from there or associate our product with an already created product display. The second feature of this module provides a dedicated administration screen with drag and drop capabilities to help managing products and displays.
Also in this screencast you'll find how to create product displays from product by using the rules provided here, and an alternative solution for the more code-like watchers that proposes a more advanced solution.
ComputerMinds.co.uk: Quick tips: Adding an empty master branch
When I create a git repository for a new project on Drupal.org I don't bother to create a master branch, branches named 6.x-1.x or 7.x-1.x have special meanings and are the ones that we're encouraged to use. However, drupal.org doesn't allow us to change the default branch on d.o itself, so even though there may be no branch called 'master', it's still the default branch, so sometimes cloning a repo will fail:
git clone http://git.drupal.org/sandbox/darthsteven/1268648.git Cloning into 1268648... remote: Counting objects: 177, done. remote: Compressing objects: 100% (176/176), done. remote: Total 177 (delta 103), reused 0 (delta 0) Receiving objects: 100% (177/177), 41.22 KiB, done. Resolving deltas: 100% (103/103), done. warning: remote HEAD refers to nonexistent ref, unable to checkout.This is a bit nasty, and you can force people to use the branch name when cloning:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/darthsteven/1268648.gitWhich is what drupal.org will tell people to do on the version control tab.
The real fixThe correct way to get this fixed would be to get this issue about setting a default branch committed and deployed to Drupal.org. But, who knows when that will happen?
A workaroundAs an interim workaround that will mean that people cloning your repo don't get an error if they don't specify a branch you can create and push a master branch to the repo.
The best way to do this is to follow the instructions below which basically creates an entire new git tree to work in and pushes that into the master branch. This means that your actual branches and the master branch share no commits at all.
Get yourself a nice clean checkout of your repo, and make sure you really don't have a master branch (if you do you don't need to follow these instructions anyway!)
Then run:
cd /path/to/repo git symbolic-ref HEAD refs/heads/master rm .git/index git clean -fdx echo "Real code is not kept on the master branch, see one of the other versioned branches instead" > README.txt git add README.txt git commit -m "Add a master branch." git push origin masterYou will then have a master branch that contains a single commit, with a single file that tells people to look elsewhere for the code.
Michal Čihař: Cleaning up websites, say goodbye to Twitter
Finally I've found some time to do small cleanup on my websites. First of all I've removed links to my Twitter and Identi.ca profiles as they are dead and I don't think I'm going to make them alive any time soon. I never really got into this business and only used it as one interface to feed posts to Facebook (via Identi.ca's app there). Together my mostly read only Facebook usage, there is nothing going on there.
While touching the website code, I also did some cleanup on Wammu website (where Twitter and Identi.ca still stays as announcement media for new versions). Most notable change is that I've reduced usage of external (and in times heavy) javascript and links to social media are now just static HTML, which also nicer fit into website layout. It did indeed remove several options, but I don't think these were worth of the load it introduced.
Filed under: English Gammu | 0 comments | Flattr this!