drupal

Drupal 6 Imagefield and some sort of jquery callback when the field has uploaded

Hi all, I'm totally stuck trying to find a way of moving the imagefield preview of a Drupal 6 cck form to another div on the page. The desired process using a cck form and some javascript: click browse, click upload, imagefield widget uploads the file then creates a an image preview. Once this is done I need to triger a javascript func...

Drupal - no self-linking

I'm using the built-in Path module to change Drupal Page links from a format like "/node/1234" to "/about-us". The latter link format is easier to read and is SEO friendly. At the top of every page is the primary navigation. Currently when viewing the /about-us page the primary navigation links are displayed as follows: Home | About...

Drupal theme preprocess function - primary links and suckerfish menus

I have a preprocess function that works fine when the menu is single level list. However I would like it to work w/ suckerfish menus. I want to add a class to the top level menu item so that I can style it. This is the code I used for the single level menu: function cti_flex_preprocess_page(&$vars, $hook) { // Make a shortcut for th...

How do I use a custom #theme function to a fieldset in a drupal module?

I have a module that builds a form that includes a fieldset. Instead of using the <legend> element to render the fieldset title, I want to place this content in a <div> element instead. But I want to change the behavior only for the form returned by my module, so I don't want to place any new functionality into my theme's template.php ...

Drupal: How to modify menu items with hooks?

I need to add the URL 'user/7/orders' to a particular menu. As this requires PHP for the UID (7), how do I write a script to add an item to a particular menu? ...

Edit and create nodes in a view?

We are storing people's class attendance information to Drupal. We would like to show this in a grid/chart, where the first column of each row shows person's name, and rest of the columns (ca. 20) either a checkbox or "X" if the user attended a class, or otherwise an non-checked box or empty column: (dates here) Jack X XXX X X Jill XX X...

iCal for authenticated users

I am using the calendar module with its iCal support for Drupal 6. I have made my event type which appears on the iCal feed. However, I want to make the event content type private, so only authenticated users can read it. By doing this they will not show on the iCal feed. Is there any way that I could get the iCal feed to still show thes...

Validation on user registration form ?

Hey Guys, i have made module in which i am trying to add validation like if the user had entered the characters in "Phone No" text filed and same on "Mobile No". This will run when user had open the user registration form. I have made this.... <?php function form_intro_form_alter($form_id,&$form){ if($form_id == 'user_register' || ...

Connecting a django application to a drupal database?

I have a 3 - 4000 nodes in a drupal 6 installation on mysql and want to access these data through my django application. I have used manage.py inspectdb to get a skeleton of a model structure. I guess that there are good/historical reasons for drupal's database schemes, but find that there are some hard to understand structure and that t...

Drupal sessions table getting huge

Over the last few months, my drupal sessions table has ballooned to several GB. It seems to have started when I upgraded to drupal 5.20 (previously I thought drupal automatically cleaned out old sessions). So I created a cron job to delete sessions older than two weeks, but this takes far too long to execute (the sessions table grows b...

Drupal: CCK API Docs

Any good CCK API docs out there? I have seen http://api.audean.com/, but can't find what I want there. Basically, I need a function that takes a field name and returns what node type has that field. I wrote my own, but would rather make an API call. ...

Druapl & Regular PHP Integration

I'm building a new website which has one core application and many content pages. Content pages are mostly dynamic and I require a way to manage this dynamic content on a regular basis. The core application's main functionality is a 3 step process or reading user data (input page), reading data from MySQL (product page) and submitting an...

Drupal: empty CCK Text Area are shown with tag <br />

hi, I'm using several CCK Text Area in my content page. The fields are optional, but if I don't fill them, I see them on the page anyway, and the content is .. i.e. FieldName: <br /> I would like to make them disappear instead.. I found out the problem is that CCKEditor add a even if I've never typed in that window. How can I disa...

Drupal image management

Please suggest how should I approach these requirements. What ready-to-use solutions (modules) are best suited to achieve something like this: What I need is an image library that has searchable, tagged images that are already resized when we publish them. If the author searches the library and the image he needs isn’t there, he can upl...

Is it possible to use big5 character set in Drupal?

A potential client of ours wants to use the big5 character encoding on their new website. Is it possible to use the Drupal CMS to make a site in big5? Its possible this questions does not make sense because I don't find many google results with big5 drupal as a keyword... Please help! ...

How do I display a view as if it's the front page via a module?

I have a simple view that feeds a home page. I have a custom module that registers some specific URLs in hook_menu that I pass into my module so I can pass them as arguments into the view. I can get the module to display the view all right, but it doesn't use the teaser/is_front view that outputs when I access the home page. I looked th...

How to fix Drupal SwfTools player path error

I've placed the players in "sites/all/libraries/" but I'm still getting this message when I go to admin/settings/swftools/handling, "FlexPaper - Missing sites/all/libraries/flexpaper/FlexPaperViewer.swf" Anyone having the same issue? On a side note when I setup the swftools profile and then assign the CCK formater and then goto the page...

hook_form for multiple content types defined by the same module

A new module 'foo' implements foo_node_info() where one or more new content types can be defined. If foo_node_info() defines two content types, namely a content type 'footypea' and a content type 'footypeb', how does one go about implementing hook_form() (what should the name of the "hook" be?) to configure each node's editing form? In...

How can I load the title of parent item in Drupal

I want to extend Nodes with the title of the parentnode so I can display a hierarchy link. I have a solution that sometimes works: function modulename_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { switch ($op) { case 'view': loadParentTitle($node); break; } } function loadParentTitle(&$node) { ...

Drupal print module: controlling layout in PDF files?

Using the print module and tcpdf I'm trying to fix the layout of the PDF files for a specific content type. I'm messing around in the tpl.php file and can't find a way to modify individual fields. There's just the massive $print['content'] variable that contains all of the page content. So, is there a way to access each field? Basicall...