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

Registration to the event

Is there a simple way to implement a registration forms to the events? In contrast to RSVPs I'd like not to invite people to my event, but, first, let them find my event and by filling in the registration form, which would collect additional to user's profile data, apply for the invitation to the event. Then I, based on their submitted data, could send them RSVP.

Help Requested Debugging Error Message ....

If anyone could help be debug this situation, I would greatly appreciate it. I'm getting 3 error messages any time I go to a page with node/add in the path. I've modified some existing modules ... adding an additional node_load call or two, and I think it stems from that, but I can't track down the root cause of this problem. Is there any way to identify the code that was calling these functions? Any help would be GREATLY appreciated.

http://connect.educause.edu/node/add
http://connect.educause.edu/node/add/flexinode-1


details
Type php
Date Wednesday, August 17, 2005 - 9:16am
User drupal
Location /index.php?q=node/add
Message implode() [function.implode]: Bad arguments. in c:\Inetpub\wwwroot\modules\node.module on line 353.

How to use ajax for your modules (with Xajax)

xajax is an open source PHP class library that allows you to easily create powerful, web-based, Ajax applications using HTML, CSS, JavaScript, and PHP. (from http://xajax.sourceforge.net/)

It has a nice and straightforward implementation. It's still in alpha but that should be enough for most purposes.

So, here's a short howto for your own modules, f you like to implement some ajax stuff.

1. Download the class and place it into your module directory

2. Include it into your module file

 require_once('inc/xajax.inc.php' ); 

3. Write the code
Your website should do something when the user clicks the button ;)
We just take the function 'my_function'.

// place this into your php code
function my_function() {
  // code comes later
}

4. Register your functions
Place the following code into your [module_name]_menu() function ( What's this?)

    // initialise xajax
    $xajax = new xajax();
    
    // register functions for ajax
    $xajax->registerFunction("my_function");
    
    // include javascript in html header
    drupal_set_html_head($xajax->getJavascript()); 

    // let xajax process ajax requests
    $xajax->processRequests();

5. Write your javacript code
Wrong ;). We are not required to write any javascript code. Xajax is doing the dirty work for us.

List of Books

I am a Brazilian user and my English is poor. I am using the Tool of Languages of the Google. It forgives if the text not to be clearly. how I can make a list of books as is present in http://drupal.org/handbooks ?

pseudo-block users? (i.e block them from accessing anything but 'confirm account' for example)

Hi,
I'm trying to limit access to users, based on a custom addition to the user object, a userstatusid.
If the userstatusid is not 0, the user isnt allowed to log in normally, they need to be redirected to one of a number of pages
(we have a complicated signup and verification process, as well as various other user states which requre the user to fill in a form before they can continue).

I've implemented hook_user so that when the user logs in, i check their status, and if its not 0, i call a function. This function should be able to prevent them from accessing any part of the site except a particular page (which is different for each ID)

This is where i have the problem:
if i call user_logout, i have no control over the page they are redirected to. Also their user object is lost so even if i did recirect them, the destination page doesnt know who they are.

if i do a simple redirect, they're still logged in and can just click a link and avoid my destination page.

There are too many states for me to set up a different role for each one, it needs to be something i do at login time, preferably while having full access to the $user object

Basically, once i've verified username and password through the standard login form, i want to know how I can redirect the user, whilst also preventing them from simply returning to the site.

I don't mind if i have to pass the userid manually, such as by redirecting to /somepage/$userid, but i do want the new page to be themed

Tell-a-friend vs. Referrer vs. multiple modules

So I've run into rather an interesting quandry, and would like to toss it out for advice.

For a site I'm building, we want users to have the ability to refer their friends to a specific page. There was no such module on the project/Modules page for 4.6.x, so I figured I'd write one. The result (largely a combination of the print and feedback modules) is this simple module:

http://www.garfieldtech.com/tellafriend.tar.gz

We were planning on contributing it back to Drupal.org as a contributed module, but then I noticed this module in CVS:

http://drupal.org/node/16499

Same name, but actually does something different. (Mine refers pages, that one refers the whole site only.) The author also has his account set to not let me contact him. The discussion thread http://drupal.org/node/15732) on that, however, revealed these other, apparently out-dated and not-recently-updated modules:

http://drupal.org/project/refer
http://drupal.org/node/7827

So between the lot of them, including the module I just wrote, it looks like there's 3 refer-friend-to-this-page modules and one refer-friend-to-whole-site module, but that module has a namespace collision with one of the page-specific modules (mine, of course :-) ). And none of them, it seems, offer invite-to-join-site functionality.

So, I'll throw it out to the community. What do we do with all of this code? :-) It seems sensible to me to be able to refer individual pages, not the whole site, but to invite to join the site. Any of the authors of those modules interested in a merger of some kind? Should I just submit my module to CVS and let someone else figure out the namespace issue? Should I rename it and then do the same? Something else?

Pages

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