This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

cron job to add content/username and password variables?

I created a module for importing some content and would like to run it as a cron job. But it appears that I need to hardcode user name and password into the module that the cron job could have permission to add content.

I tried declaring

global $user, $pass;
$user = "My Name";
$pass = "password";

but it doesn't work. What are the correct variables for user name and password in Drupal 5? Or what would be the correct way of setting a cron job that has to have administrative permissions?

Thank you.

Search engine/Web Spider Integration

Has anyone worked on trying to integrate a spider or other search engine into Drupal..

I was looking at trying integrate something like spihder or other web crawler into one of my sites to allow searching outside of our information with a limited number of sites.

The other thing I would like to look into is using the spider functions to provide a crawler to node integration similar to feedparser where it will put the RSS feed into a node. This would be a more plain type of look like topix.net...

Is there a way to override node status?

I would like for a user to be able to view a node that has a status of 0 if ?var=1 is appended to the url. It's a custom node type, so it's housed in a custom module.

Can anyone think of a method to do this?

"Textarea" form type - how to identify line breaks ??

Suppose that in my module settings page, I have a "textarea":

$form['mymod_entries'] = array(
    '#type' => 'textarea',
    '#title' => t('Entries'),
    '#default_value' => variable_get('mymod_entries', '')
  );

Now somewhere else in my module functions i retrieve this setting:

$d = variable_get('mymod_entries',''))

and what I want is to manipulate this data by each line, eg:

PaypalPro and Drupal 5

I have a Drupal 5 site starting soon and I need the ability to charge users for a subscription to the site. Essentially users are buying a role. There are no products and I don't really need shopping carts, store fronts, etc. I know there was some work done a while back for 4.7 and roles but this solution has to be 5.0 compatible. Paypal Pro is also mandatory.

I've looked around but there doesn't seem to be much support for Paypal Pro. I've tried the contrib/paypalpro in CVS HEAD but it complains that "Paypalpro Express module is required to use PayPal Pro." I'm not even sure what that module is. Even if I had it, I don't know where I go from here.

Obviously my solution is going to require me to get my hands dirty and that's fine. I'm a very experienced programmer but mostly with Java. I'm slowly getting up to speed on PHP and Drupal and I understand the PayPal Pro API using Java. Here are my options as I see them. I would appreciate any feedback or suggestions on how best to solve my usecase (Paypal Pro to buy a user role).

1.) Somehow leverage existing paypalpro module. First step would be to look into the PHP code and try to understand what its doing.

2.) Write my own paypal module using phpPayPalPro. Its a sourceforge project which apparently supports PaypalPro using PHP.

Custom module road block

I'm making a custom module for a client and it's almost all working. What it does is allows individual users to add additional text fields into a node as they need to. I have the add and update working just fine. The problem I'm having is how can I delete individual text fields from the node? For example I add 3 new text fields and I realize that I only needed two. Is there a way to delete that unwanted text box?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions