Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resources location
#1
I've just blown most of a Sunday playing around with a plugin (Olegs version of Fabios GS_comments) and have got to wondering where the approved place for resources to live would be.

The plugin already used an extra CSS file for displaying comments, and I've added another one for the configuration pane I've added, and it also uses an extra Javascript file for form validation. These need to be fetchable from outside, so obviously shouldn't live in the plugins directory as by default the .htaccess has "Deny from All" in it, they need to be available whatever the selected theme is, and putting them in admin feels wrong.

Any suggestions or pointers to what I've missed?

Changes I've made include optionally using Google reCaptcha, a comment 'template', comment moderation (OK, comment deletion, it's almost moderation) and moving the comment data out of the page xml file into its own under data/other. It's 1am local time though and I want to think some more about a couple of points so no uploads tonight.

Anthony
Reply
#2
I did not write this plugin, I do not understand PHP, I just hitched a script validator http://flowplayer.org/tools/demos/validator/index.html :-)
Reply
#3
And adding that isn't worth a mention? :-)
Besides, the version I've been working on was the one you have for download as Fabios site appears to have gone away.

After some thought, and sleep, I've gone for a new top level directory resources/, with subdirectories resources/css/, resources/js/ and resources/images/. I don't use the images one currently but it seemed like an obvious addition. There might be a case for another sub-directory for standalone bits of PHP, the FrontEndUser plugin tries to call login.php and logout.php inside plugins/ which breaks with the default .htaccess files.

I'll upload my version of GS_Comments in a minute, but put it in a new thread.
Reply
#4
I also made some changes http://neowebtime.ru/comments.zip
Demo http://neowebtime.ru/0/index1
Reply




Users browsing this thread: 2 Guest(s)