Drupal is up and running but how do I ...?

Protect REAL directories with roles?

Does anyone know of a way to protect real directories with roles?

For example, I create a real directory on my server and upload a bunch of PDFs. Then I want only users who are logged in and given a certain role to have access to those files. Is that possible?

Thanks,

Moses

How do you include functions in nodes using 'PHP code'?

I create a new page, select for input format 'PHP code', and insert the following:

function test1() { 
$a = $b;
}

When I do this, and hit submit, the page blanks out. This will happen for my page with any php functions I insert, including functions from required files. All other php code works just fine as near as I can tell.

How do I change /node/12 to /support ?

I created a new page and it assigned it node/12 and I created a new primary link called Support that goes to the path /support. I want users to be able to type www.mysite.com/support and go to the support page, but it's called node/12. How can I change this? Thanks Guys! :)

Any expert on Contemplate module (content template module)

I have cck and contemplate module installed. Since cck by default doesn't do teasers I had to install the contemplate module.

Now I create and edit a template for a cck contenttype I created.

What exactly do I have to edit in the teaser field? Do I have to edit the teaser template or teaser variable field or both? Anyone have an example? Thanks a lot!

MySQL Error - Warning: Can't open file: 'watchdog.MYI' (errno: 145)

I'm getting a sql error when I try to login or run cron.php.

Warning: Can't open file: 'watchdog.MYI' (errno: 145) query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', 'Can't open file: 'watchdog.MYI' (errno: 145)\nquery: DELETE FROM watchdog WHERE timestamp < 1149702748 in /includes/database.mysql.inc on line 120.', 2, '', '/cron.php', '', 1150307548) in /includes/database.mysql.inc on line 120

Is this a MySQL server error? Has anybody else run into this problem?

Preventing multiple clicks of submit button

I've looked around for a solution and found the spam module. However, I'm looking for something that will prevent it from the start.

The problem:
I can go into the comment section of an article, write a comment, and click the "Submit Comment" button 20 times and it'll post 20 times.

Is there a way to disable the submit button after the first click? or nullify the submission if it were clicked more than once? I'm thinking there should be an easy solution to this since no one else seems to have this problem.

Any help would be appreciated.

Pages

Subscribe with RSS Subscribe to RSS - Post installation