Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Discussion] "Hello World" Redux (towards a possible Plugin SDK)
#20
@Angryboy, I've had another look at your Plugin SDK on Github
I'm not a fan of the GSUI class to output the final HTML, but it could be very useful to create GetSimple-compliant pieces of markup, eg in my version of $ui->header you'd have direct control over the output (I like storing my markup in static html files), but not over the wrapper:

PHP Code:
<?php 
$html 
file_get_contents(GSPLUGINPATH '/myplugin/nav-tmpl.html');
echo 
$ui->header('Admin Page Title'$html);
?>

Basically something that would work the same as creating a hook in the page's top nav to output HTML.

But except for that, great work on the GSUtils and GSPlugin classes! I really like all functions which simplify the GS interface (the asset registration utilities, hook stuff), and the filesystem functions. Also, the codebase is crystal-clear to me, nicely written.

Perhaps you could also consider the suggestion shawn_a and I discussed for limiting the asset loading to specific pages instead of only GSBACK, GSFRONT or GSBOTH (in any way you judge fit). 
Other possible suggestions (for GSPlugin):
- making a call to the GSAPI for plugin info (with cache support)
- comparing local & remote version, with callback to exec if remote > local

Small typos in the API docs: mvfile has 'Deletes a file' as a description; GSUI input second - example in the code says 'type' => 'title' instead of 'type=>'text'.

Question: doing getfile with JSON parses the content.. as objects or nested arrays?

Thanks for developing this.
Reply


Messages In This Thread
RE: [Discussion] "Hello World" Redux (towards a possible Plugin SDK) - by Tyblitz - 2015-10-30, 05:42:43



Users browsing this thread: 1 Guest(s)