drupal-6

Why does drupal_get_title() return empty on a Views page?

I have used the menu_breadcrumb module as the basis for a module that produces a breadcrumb based on the current URL path. It works great on regular nodes, but on any pages that are rendered by the Views module, the breadcrumb cannot get the title of the page. The module's call to drupal_get_title() returns an empty value. I wouldn't be...

Disabling /node view and other hidden views in Drupal?

Many long nights spent on my site, and now I've started doing all sorts of security checks and stumbled upon the following: www.mysite.com/node That shows the latest x nodes that a user has access to. I DON't want this view visible to users. And I certainly don't want any other views similar to this available. So, my questions are: ...

Removing [nid:n] in nodereference autocomplete

Using the autocomplete field for a cck nodereference always displays the node id as a cryptic bracketed extension: Page Title [nid:23] I understand that this ensures that selections are unique in case nodes have the same title, but obviously this is a nasty thing to expose to the user. Has anyone had any success in removing these bra...

Drupal6: Embedding a region in a view .tpl.php file

Anyone have any ideas on how I might embed a region into a view .tpl.php file? I accomplish it easily enough in a node .tpl.php by adding something like this to theme_preproces_node(): $vars['promos'] = theme('blocks', 'promos'); No problem at all. However, there obviously isn't a theme_preprocess_view() function, and I get memory e...

How do you migrate CCK fields between environments in Drupal?

The Content Construction Kit (CCK) is one of the most useful Drupal modules. It allows you to easily add custom fields to a content type. However, these new fields are created through Drupal itself and stored in the database. This means that if you change a CCK field in your development environment you need to manually make the same cha...

Detect which other modules are enabled in a new Drupal module

I'm creating a Drupal module which doesn't necessarily depend on other modules, but could offer other options if, for example, the Path module is enabled. What I'd like to know, and can't seem to find by searching, is whether it is possible to detect which modules are currently enabled from another module so that that module can offer o...

HTML\rich text in Drupal's node title?

I need the node titles to be able to display some text formatting. As far as I understand, Drupal's title field is just plain text, it doesn't allow html or any other input format. Is that true? Is there a way to override this, or another solution? I am working with Drupal 6. ...

Drupal linking a Username to a Node

In Drupal I wish to create a content type as a bio for a user. When you click on a a user name on the site it takes you to there bio. An example I have found online is below. This article has the authors name Jeff Robbins. Jeff Robbins name links to his profile. How would you go about doing something similar? It does not seem be using t...

How can I theme the template for edit or add a node for a specific content type?

I want to theme the template for edit or add a node for a specific content type. For example, to theme all the content type forms I use the file page-node-{add|edit}.tpl.php (depending what I need to do add or edit). But I didn't found the template name for a custom node type, for example Products. I need to theme only for Products, bu...

Drupal 6: Render Views 2 data in a page tpl file.

I think the answer might be obvious but I can't seem to figure it out. How do I render a view I've created in Views 2 (Drupal) in a page-pagename.tpl.file? My thought was that it would be some sort of PHP snippet but I can't find documentation about it. Any thoughts that might steer me in the right direction. ...

Drupal 6 CCK: export/import content types

I've been having a problem with a certain content type. (Any time I try to access a node of that type, I get a page not found error.) So I thought I'd export and re-import, to see if that changes anything. I went to admin/content/types/export, and selected the content type in question. Then I deleted that type. Next, I went to admin/co...

Drupal6: Content Access Permissions can't be rebuilt

I created a new content type, so it wants me to rebuild content permissions. I clicked the link to do so. It progressed through but seemed to get hung up towards the end. It stayed in the same position for 20 minutes, so hit refresh. I got the following error message: The content access permissions have not been properly rebuilt. What ...

Possible to save a node using a multi-step form?

I'm building a Drupal based site that requires the communication of a node ID to a seperate web service. This web service handles the uploading of files to a seperate server (from the one Drupal is on). This creates a problem where in if I create a new node, the Node ID is not generated until the form is submitted - meaning I can't att...

Translating string in Drupal

I've developed a site in english (admin & front end) but the site needs to be in a Dutch. Locale and i18n modules have been installed. Dutch has been added to the list of languages and set as default in admin/settings/language. I'm now wondering how I can translate strings like the date output? For ex, when I print out a date from a v...

Drupal: Views titles

I have a View that outputs a page. Under Basic Settings I set a "title". When I load the page, I see that title as the page title (at top of the browser) - all good. How can I print this value out in the "Display output" .tpl file? The $title variable doesn't seem to hold any value here. Do I need to use a preprocess function? Thanks ...

Drupal View/Block not displaying

Another Drupal question: I have a View of type Term that outputs a block. It shows taxonomy items from a single vocabulary and the Preview of the View shows this content correctly. Whatever region I assign this block to, nothing displays. I've set a title and empty text in the View but those don't show either. I created several blocks t...

Drupal Imagecache not working

I created an Imagecache setting that just resizes to 125px wide. First issue is that the preview image is 404. Then I want to print out an image via <?php print theme('imagecache', 'imported_image', $node->picture, 'test', 'test', $attributes); ?> 'imported_image' being the preset and $node->picture is a correct path. The html prin...

Drupal issue accessing custom content type

I'm having an issue where a certain content type is not accessible by standard user accounts and anon users. The content type is Page (not the Drupal one but one I created). It contains nothing special, just static text. When I try and view a page I see the title displayed but below that, the html from the tpl isn't included. So the iss...

How do you name a function in template.php to get picked up by theme() calls in page.tpl.php?

I have a Drupal 6 site with a simple theme I'm creating called NPT. In page.tpl I have this: <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?> That successfully calls this function in template.php: npt_links() However, I also have this in page.tpl.php: <?php print theme('clinks', $secondary_lin...

Update Drupal views argument via AJAX

Hello, I have a request concerning Drupal 6.x I'd like to have this behaviour: imagine to have 2 columns, on the left a list of nodes (only titles for example) and on the right a view showing just one of the contents on the left. My idea would be to achieve this with an AJAX-fashion: clicking a link in the list on the left updates the v...