EditWrx Knowledge Base Home
 Search       Login   Register   Members   Help   Home 
Search by username


Forms
 Moderated by: Keith  
 New Topic   Reply   Print 
AuthorPost
affinitymc
Member
 

Joined: Sat Feb 4th, 2006
Location:  
Posts: 21
 Posted: Mon Feb 13th, 2006 01:01 am
 Quote  Reply 
I designed a form for handling newsletter subscriptions, with submissions going to a CSV file. Everything went well until I attempted to access the file using the page open toolbar command. I can access it with the Super User account, but not with a Sitewide User account, which is really what I need. The Sitewide User is restricted to Block Editing.

How can I make the CSV file available to the Sitewide User without making them a Super User?

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 578
 Posted: Mon Feb 13th, 2006 06:41 pm
 Quote  Reply 
The problem is that a Block Only editor can only see files that contain an editblock or includeblock in the OPen Page dialog. And of course the txt and csv files do not contain those blocks.

Sooo, you can either change the user to a Full Page user (keep in mind that if a Full Page user loads a page with blocks on it they can still only edit within the blocks), or make the following change

Open /library/ini/path_tree.txt. Search for

}##get title

on line 232. Create a new line above that line and put

if($_[0] =~ /form_.+?\.csv|form_.+?\.txt/){$bell=1}

on that new line.

 

I'll add that to the next update also.

affinitymc
Member
 

Joined: Sat Feb 4th, 2006
Location:  
Posts: 21
 Posted: Mon Feb 13th, 2006 07:00 pm
 Quote  Reply 
Thanks Keith, that works a treat.

Just a small point, but I also noticed that in the CSV file, the individual submissions (in my case each record contains First Name, Last Name, Email) are separated by two blank rows. Any suggestions on how these blank rows can be eliminated?

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 578
 Posted: Mon Feb 13th, 2006 07:16 pm
 Quote  Reply 
Oh really? Well, you see there are two lines that were used for testing that somehow ended up still in the record_submissions.txt file.

Open /library/ini/record_submissions.txt and remove the two lines

print V "$u\n";
print V "$uu\n";

probably lines 59 & 60.

Those are also removed in the next update.

affinitymc
Member
 

Joined: Sat Feb 4th, 2006
Location:  
Posts: 21
 Posted: Mon Feb 13th, 2006 07:30 pm
 Quote  Reply 
Thanks Keith for your quick reply!


 Current time is 04:59 pm




Powered by WowBB 1.62 - Copyright © 2003-2004 Aycan Gulez