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

login_destination pass query string?

I was wondering if there's a way to set the _REQUEST['destintion'] variable to include a query string?

Here's my situation in a nutshell:

I've got a form that logged in users can use to submit links to the site. This interaction is initiated via a bookmarklet (essentially a "Digg this" type thing). If they're not logged in, they get sent to the login page. I'm using the login_destination module to send them back to the proper form upon login. But when I try to pass the query string, I'm getting errors.

here's how my function is looking: (assume destination at this point is 'node/add/storylink')

  if ($_REQUEST['destination']) {
    $path = $_REQUEST['destination'];
    $query = '';
    // do a test to see if we're also passing url submission info
    if ($_REQUEST['edit']['url']) {
      $query .= '?edit[url]=' . $_REQUEST['edit']['url'];
    }
    return url($_GET['q'], "destination=$path". urlencode($query));
  }

problem is, that will return a destination string of:

node/add/storylink%3Fedit%5Burl%5D%3Dhttp%3A//www.google.com

if I don't urlencode the querystring, I get redirected to whatever site is in edit[url].

Has anyone else had a problem like this? is there some kind of destination_query_string function that exists?

Thanks!

resubmit problem

I use form API create a form page. But if I click the submit button many times in a very short time, the form values will be submitted not only once. In the database there are also not only one data record.

why?

Anyone know how to customise the Contact List?

I'd prefer to have space between the list of contacts, and maybe more explanation of who they are, and also for it not to say 'Who would you like to contact?' Anyone know how to change it?

Courier <-> Drupal . . .

I have a couple of setups where there is both Courier-MTA and Drupal being used on the same server. I'm thinking of working up some sort of module to integrate the two so that there is only one place to manage accounts. Has anyone done anything like this already?

Attaching an image to a node

I want our forum users to be able to upload an image so I installed the upload image module but I don't like that it lumps files/images together. As far as security goes it seems like it'd be better to let them attach an image or nothing at all, rather than have to grant them the ability to upload anything. Is there another module that just allows image uploads?

Jay

XML Output from CCK Structure

Ok,
So what I am attempting to do is output all of my content as XML from CCK defined nodes. The XML structure needs to be pretty specific. I attempted to change the mime type of a template to represent XML and strip out the XHTML stuff. This gets me pretty close.

I do not want to hack the core of Drupal.
Basicaly imagine a menu structure like this.

Home
-Home Sub Page
-Sub Page Two
About Us
-Guy Named Fred
-Gal Named Heather

and the XML output would be like this

<root>
<page title="Home">
      Home content
      <page title="Home Sub Page">
            Some more content
      </page>
      <page title="Sub Page Two">
            Sub Page Content
      </page>
</page>
<page title="About Us">
      About Us Content
      <page title="Guy Named Fred">
          Fred's content
      </page>
      <page title="Gal Named Heather">

Pages

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