Best way to do requirements checking on CCK or profile fields
Hi everyone,
I have code popping up like this in a few of my modules ... basically I go through and check all of the hardcoded profile and CCK fields I use actually exist.
It seems like there could be a better way to do it, any ideas?
<?php
function example_requirements($phase) {
$requirements = array();
if ($phase === 'runtime') {
// Check for the profile category
$categories = profile_categories();
$category_exists = FALSE;
foreach ($categories as $category) {
if ($category['name'] === EXAMPLE_PROFILE_AFFILIATE_CATEGORY) {
Read more Buttons on Nodes
I'm looking for a way to add a button to the end of a node that actually does something.
Rendering the button is easy:
<?php
function button_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'view':
$node->content['button'] = array(
'#type' => 'button',
'#value' => t('A Button!'),
);
break;
}
}
?>The hard part is getting the button to DO something!
....
Glenn
Read moreImpromptu DimDim Session about Emfield + Imagecache
I'm going to do a quick, impromptu Dojo session on DimDim about using Embedded Media Field in conjunction with Imagecache. Because I feel like it. Sorry about the short notice; I'll post deets here for interested people who want to know but missed the show... For Drupal 6. Join #drupal-dojo in IRC.
Read moreDrupalMedia.org Launched for the Sprint!
As a supplement to the Media group, I launched Drupal Media today to help with the ongoing Media sprint efforts. On its front page, you'll see a map to the next sprint (which is at Mansueto - 7 World Trade Ctr, New York, NY this Friday-Saturday, October 23-24, from 9-5). Tabs are also available for discussions (add your own), videos, and a feed to the Media module issue queue. Please give me any feedback or desired functionality that would be useful for the site. (Including long-term plans for the useful domain, contributed by the good folks at Development Seed.)
Don't forget that you have to pre-register if you plan to come to the sprint, with your full name. Hope to see you there, or at #drupal-media in IRC!
Read morePassing an Argument from the URL to view block
I am not sure if this is an appropriate discussion topic to post here. If not, my apologies. I saw how others had posted views arguments solutions here and thought if I could get this resolved, it would make a nice addition to the dojo.
I just created a forum help request on D.O at http://drupal.org/node/544884 and was wondering if anyone was familiar with the challenge of passing a URL argument to a view block.
I look forward to any advice you can share.
Thanks
c
How to disable false communication when working on DEV?
we have a LIVE website, with active (recurring) paid subscribers...
every month - they get charged on their credit card through paypal.
(so far - all good)
now - while creating the next version, updates, etc -
on DEV - we migrated all live user info and started working with it
(ouch)
and then - all our paid subscribers - got a false message - that their credit card cannot be charged!
my question is -
moving forward, as we are going to have automatic notification on content added, newsletters, recurring payment, etc.
is there any safe method / workflow -
Read moreCode Development: A Drupal Learning Track
Last updated by silverwing on Thu, 2011-07-14 22:18
[This is a wiki - please don't hesitate to update, revise, and contribute your ideas!]
Overview: Learn the latest techniques in site development. / simpletests, coding practices, scalability, deployment and so on.
Audience: hobbyist, consultant, web developer
Goals
- Create a foundation for development and deployment of Drupal sites
- Rapidly create a site with a Drupal specific workflow
- Build sites without coding
- Use Drupal as a platform
Media Sprint Update: March Madness
The Media module is progressing along nicely! We have a FAQ and a Roadmap in place, and an Alpha launch planned for the Sprint at the Open Media Camp in Denver.
This session will give a brief demo and overview of current progress. We'll also spend some time talking about how YOU can participate!
Where
Read moreProgress of Media Sprint
This will be a progress report for the ongoing Media Sprint, for the Media Module, including How You Can Get Involved™!
Note this immediately follows 8Tracks & Emfield.
Where
We're using Dojo's Dimdim - click this link at the time of the session.
When: Tuesday, March 24, 2009 at 4:00 PM (EST)
Read more8Tracks & Emfield
We'll have a short session integrating 8Tracks into Embedded Media Field. Following this will be a Media Sprint Progress Report.
Where
We're using Dojo's Dimdim - click this link at the time of the session.
When: Tuesday, March 24, 2009 at 3:30 PM (EST)
Read more

