Post reply

Note: this post will not display until it has been approved by a moderator.
Attachments: (Clear attachments)
Restrictions: 4 per post (4 remaining), maximum total size 192 KB, maximum individual size 128 KB
Uncheck the attachments you no longer want attached
Click or drag files here to attach them.
Other options
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
Shortcuts: ALT+S post or ALT+P preview

Topic summary

Posted by pepak
 - September 20, 2010, 05:42:20 AM
I am afraid I understand neither what you wanted to do nor what you did. Why did you duplicate the text box? (I am not surprised that it overwrote the content of the first text box, since you gave them both the same name.)
Posted by sadr
 - September 19, 2010, 09:49:31 PM
i added (/files|/files2|/files3) to simple-download-monitor.php

and then copied:
   



so a second text box appeared.  

i wrote the second directory but then when i saved the file it saved the new directory as the first directory as well.

not really sure what to change to add a new directory.

i did look at the stats and noticed it worked but i had to change everything back as the first directory is my main one
thanks for the help!
Posted by Mischa
 - August 18, 2010, 04:58:04 PM
Yes, it works!

In the backend (config of SDM) I put: (wp-content/uploads/|images/) to have the two directories.
Also (I forgot) to add the file type I wanted to log in the download manager (my bad :S)

In the .htaccess file I added (just the first two rules, but I copied the third to show wherre I put it):
RewriteRule ^(wp-content/uploads/.*) /index.php?sdmon=$1 [L]
RewriteRule ^(images/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f

Thanks for your help and I hope someone else has some use of this post as well.
Godspeed!
Posted by pepak
 - August 18, 2010, 03:36:20 PM
Or better yet, put it into paretheses:
(/files|/files2|/files3)
Posted by pepak
 - August 18, 2010, 03:11:17 PM
Adding an extra mod_rewrite rule to .htaccess is the first step.

Then you need to change the "Allowed directories" regular expression to something like:
/files|/files2|/files3
At least, it should work. I didn't actually try it.
Posted by Mischa
 - August 18, 2010, 11:03:42 AM
Also I saw the PREG comment, but I am not familiair with the syntax, sorry for this.

Could you provide a example how to use this function within your plugin?

Thanks again.
Posted by mischa
 - August 18, 2010, 10:46:45 AM
Hi Pepak,

Is it possible to monitor more than 1 directory (not a subdirectory)?

Can this be done by adding more than 1 rewrite rule in the .htaccess?
But I can only put 1 directory link in the SDM config page.

Thanks for the help.