[support] Simple form-based node flagging

Neil: esl-lounge.com neil at esl-lounge.com
Sun Sep 23 10:56:23 UTC 2007


In the end, I added the following code to the contact.module:

    // THESE NEXT TWO LINES ADDED FOR PRE-FILLING
    if( !isset( $_POST['subject']) && !empty($_GET['subject'])) // FIRST 
ADDITIONAL LINE
     $form['subject']['#value'] = $_GET['subject']; // SECOND AND LAST 
ADDITIONAL LINE

which allows me to create links like this:

<a href="/contact?subject=Page+Reported:http://www.mysite.com<?php print 
$_SERVER['REQUEST_URI'] ?>+(do+not+delete.)" rel="nofollow">Report Page</a>

which is exactly what I was after.


----- Original Message ----- 
From: "Michael Prasuhn" <mike at mikeyp.net>
To: <support at drupal.org>
Sent: Saturday, September 22, 2007 5:58 PM
Subject: Re: [support] Simple form-based node flagging


I suppose tkaing the same development resources to look at fixing the abuse 
module is out of the question?

-Mike

__________________
Michael Prasuhn
mike at mikeyp.net
mikeyp.phone at gmail.com phone
714.356.0168 cell
949.200.7670 fax

-----Original Message-----
From: "Neil: esl-lounge.com" <neil at esl-lounge.com>

Date: Sat, 22 Sep 2007 13:50:32
To:<support at drupal.org>
Subject: [support] Simple form-based node flagging


I would like to make a simple "node flagging" tool on my site. I have a flag 
icon on every node which has the URL of the node (or the nid) inserted into 
it using php.

What I would like is for a user who clicks that to be sent to the contact 
form and for the page URL to appear in the "Message" text box already.

I've had a lot of problems with the Abuse module (especially the admin side 
of things...constant sql errors), so have decided to try to create something 
simpler. If the contact form can't be used like that, is there a way I can 
set up a simple form on a page (mysite.com/report) which is pre-filled with 
a flagged node's URL/nid as described above?

Thanks

Neil-- 
[ Drupal support list | http://lists.drupal.org/ ]
-- 
[ Drupal support list | http://lists.drupal.org/ ]



More information about the support mailing list