leogopal / sysinfo

Plugin that displays useful system information about a WordPress install.
GNU General Public License v2.0
27 stars 4 forks source link

Only works from WordPress.org, not from GitHub #1

Closed Japh closed 11 years ago

Japh commented 11 years ago

I've had a brief look at the plugin, but for some reason, it only works when installed via the directory, not manually via GitHub. The files' contents are exactly the same, even the permissions, but the screens look different and the phpinfo doesn't work.

Anyone else seeing this?

Japh commented 11 years ago

(I may be doing something obvious and dumb. I hope I am, as that's easy to fix, and if so I apologise!)

arcware commented 11 years ago

Hi Japh - How did you deploy the plugin folder/files that you pulled from GitHub?

Japh commented 11 years ago

I've found what went wrong. The plugin directory name when cloned from GitHub ends up being "WordPress-SysInfo", but the path is hardcoded into the plugin as "sysinfo". If I rename the directory after cloning, it works fine.

Japh commented 11 years ago

Closed the ticket, but ideally the path wouldn't be hardcoded, surely?

Japh commented 11 years ago

I'm curious, why use this:

plugins_url( 'sysinfo/css/sysinfo.css' )

Rather than this:

plugins_url( '/css/sysinfo.css', __FILE__ )
arcware commented 11 years ago

I'm not sure why I did it that way to be honest, especially since I've never done it that way in any other plugin I've written. Not sure what I was thinking. At any rate, thanks for pointing that out and I'll get the change made.

Japh commented 11 years ago

Haha! I've only seen it this way once before, myself. I believe in the WordPress Plugin Boilerplate, which I assume this is based on?

arcware commented 11 years ago

Ah, yes, you're right, that's probably where it came from. Since Tom was involved I wanted to use the WP Plugin Boilerplate (or at least pieces from it). So we'll just blame him :-)

Japh commented 11 years ago

LOL ;)

Perhaps @tommcfarlin can tell us why he's done it that way in the boilerplate?

tommcfarlin commented 11 years ago

It's done that way simply as a carry over from a couple of years of lack of experience. I've no shame in admitting that :).

It'll be something that's fixed in 2.0 of the Boilerplates.