I'd like DaDa to store the name of the list being edited in a cookie
so FCK can use that for user-specific file upload directories,
templates, etc I'm comfortable with PHP but It's been a long time
since I've done any Perl coding, and it was pretty basic then Any
pointers on the most elegant way to extend DaDa to include a new
cookie would be most welcome � thanks
Here's some ideas,
To just have Dada Mail store a new cookie, you can try tweaking the
login subroutine in the mail
cgi file
Here's the lines to look for:
print $q->header(-cookie => [$dumb_cookie, $login_cookie],
-nph => $DADA::Config::NPH,
-Refresh =>'0; URL='
$referer);
You can just add another cookie to the end of that, like this:
my $fckeditor_cookie = $q->cookie(
-name => 'dada_mail_list',
-value => $admin_list,
%DADA::Config::COOKIE_PARAMS,
);
print $q->header(-cookie => [$dumb_cookie,
$login_cookie, $fckeditor_cookie], -nph => $DADA::Config::NPH, -Refresh =>'0; URL=' $referer);
Then, just make sure to clear it out when you're done, find these
lines the logout subroutine, also in the mail
cgi file:
print $q->header(-COOKIE => $logout_cookie,
-nph => $DADA::Config::NPH,
-Refresh =>'0; URL='
$location,
);
and just add another cookie with no real value:
my $fckeditor_cookie = $q->cookie(
-name => 'dada_mail_list',
-value => undef,
%DADA::Config::COOKIE_PARAMS,
);
print $q->header(-COOKIE => [$logout_cookie,
$fckeditor_cookie], -nph => $DADA::Config::NPH, -Refresh =>'0; URL=' $location, )
If you do a little test:
#!/usr/bin/perl -w
use strict;
use CGI;
my $q = new CGI;
my $fckeditor_cookie = $q->cookie(
-name => 'dada_mail_list',
-value => 'mylist',
);
print $q->header(-cookie => [$fckeditor_cookie]);
Looks like the headers return looks something like this:
Set-Cookie: dada_mail_list=mylist; path=/
Date: Tue, 09 Dec 2008 02:34:27 GMT
Content-Type: text/html; charset=ISO-8859-1
So, that looks easy enough to parse out
Start a new thread, email: dadadev@dadamailproject.com
This is the developer discussion mailing list for Dada Mail.
If you are just looking for support Dada Mail, consult the message boards at:
https://forum.dadamailproject.com
Documentation for Dada Mail:
Specifically, see the Error FAQ:
https://dadamailproject.com/d/FAQ-errors.pod.html
To post to this list, send a message to:
mailto:dadadev@dadamailproject.com
All subscribers of this list may post to the list itself.
Topics that are welcome:
Dada Mail is on Github:
https://github.com/justingit/dada-mail/
If you would like to fork, branch, send over PRs, open up issues, etc.
This Privacy Policy is for this mailing list, and this mailing list only.
Email addresses collection through this mailing list are used explicitly to work within this email discussion list.
We only collect email addresses through our Closed-Loop Opt-In system.
We don't use your email address for any other purpose.
We won't be sharing your email address with any other entity.
Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.
All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.
All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.