In Drupal you can create your own nodetype in a custom module. Doing this you get to create your own form which is all very nice.
However if you want to add js the form things get a bit more tricky. If you add the js in the form, the js will only be added form the form when it is loaded. If the user would post the form with validation e...
I need to be able to grant viewing access to specific nodes on my site to a specific user but not anonymous users, and then the rest of the site open to all.
...
Hi, I'm using the following code with cURL:
function _getStatsDataXMLString($url) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729)');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setop...
I have a custom Drupal FAPI form that supports a fairly complex workflow and I would like to add a Nodereference field to it. Although I've found people who have included Nodereference fields on custom forms, I have been unable to find any examples of the FAPI declaration for the field (other than this question which uses a text field w...
I need to write a module that sends order data to an epayment service, similar to say, paypal. They need the data to be submitted from a form with elements that look something like this (notice the duplicate name):
<input name="ORDER_PNAME[]" type="hidden" value="CD Player">
<input name="ORDER_PNAME[]" type="hidden" value="Geanta voiaj ...
Hello,
Is it possible to create a filter in a Drupal 6 View that is only applied for registered users?
For one filter I need I'm using the user vote (With fivestar and votingapi) to know if they user already voted this node or not, and when the user is annonymous, is working as if all the votes from all the annonymous users where from...
I'm creating an admin module for my client that gives them access to some administration functionality concerning their content. I'm starting off by adding some permissions in my module by implementing hook_perm:
function mymodule_perm()
{
return array(
'manage projects',
);
}
I can then create my menu by adding to th...
Hello.
I have been developing a Drupal 6 site on my PC using XAMPP. I'm done now, and everything looks peachy.
Problem is, I need to put all my content (including custom modules and themes) up onto a staging server which only has a fresh Drupal 6 install on it. I can't imagine having to set up all my custom content types and whatnot al...
Hello, just started creating my own module. below is my code for the admin.inc file. in the administrative settings im looking to be able to enter numbers into a series of textfields.
ideally this data is represented into a table format, however ive found this process to be very long winded and although it does as i want, i still feel i...
I'm using Drupal 6 and its core comment module.
I want to run a custom funcion every time a user posts a comment, but I don't want to mess with the comment.module for obvious reasons.
Is there a practical way I can do this in a custom module? If not, what are the alternatives as I don't want to write my own commenting system.
...
I have a cck field that needs to allow a different number of values depending on the role of the currently logged in user.
I'd like to find where the "number of values" data is stored for a cck field so that it can be dynamically changed when the node edit form is displayed.
...
I've created a content type that has a CCK text field.
When I select the text field using the Drupal Themer widget it tells me the last function called was
theme_text_formatter_default() , which I found in the CCK text.module
It also tells me that it's parents were;
content-field.tpl.php < theme_markup < theme_markup < node.tpl.php ...
We're building a small sub-site that, on the front page, has a one input box form that users can submit. From there, they're taken to a page with a few more associated form fields (add more details, tag it, etc.) with the first main form field already filled in. This works splendidly, thus far.
The problem comes for users that are not l...
Hi everyone,
How would I go around overriding a theme function with a .tpl file? I know how to override a .tpl file with a theme function but not the other way round. I can't seem to find anywhere that tells me so, so maybe it's not possible or not good practice.
For example if there was a theme function defined in a module called supe...
Hi,
I want to create a view where all 5 of my taxonomy terms are displayed and it then displays the latest node published but this is limited by 1. For Example:
Tax Term 1
Latest node published
Tax Term 2
Latest node published
etc etc
Currently I'm grouping by taxonomy term so it's displaying all nodes published then sorted by publi...
Hi there,
What's the difference between using the two options below to output link HTML?
theme('links', $primary_links, array('class' => 'links primary-links'))
theme_links($primary_links, $attributes = array('class' => 'links primary-links'))
Many thanks
...
I have a drupal page (content type page) that should accept GET values using clean urls.
I put the following code in the page body using the php code input format.
<?php
$uid = $_GET['uid'];
$user = user_load($uid);
print $user->name;
?>
Now the following link http://www.example.com/mypath/?uid=5 results in user 5's name being ...
I'm writing a custom module and I'd like to use $form_state of the current form in another non-form api function -> custom_facet_view_build().
any help is appreciated :)
<?php
/**
* Implementation of hook_perm().
*/
function custom_facet_perm() {
return array(
'access foo content',
'access baz content',
);
}
/**
* Imp...
hi,
I've installed http://drupal.org/project/spamspan module for Drupal (drupal.org/project/spamspan), in order to obfuscate the e-mail addresses on my website.
However I'm not sure it is working. I can see the email url from source html and I think the module is not filtering anything.
I've added some e-mails in the text editor CKEdi...
Hi all,
I've created a custom menu item in my Drupal 6 website by defining it in a custom module. This is an extremely simple MENU_NORMAL_ITEM menu item. The menu item is defined as
/**
* Implementation of hook_menu().
*/
function menu_test_menu() {
$items['menu_test'] = array(
'title' => 'Menu Test',
'page callback' => 'me...