The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi-file plugins
#1
Hello.
I'm writing a plugin myself, and as it would also include a bit of AJAX I'm trying to fit all the functions and checks in one single file.
Which is bad, in my opinion, it's starting to get messy.

My question is: should I provide myplugin.php with a "myplugin" folder, the first then requiring the proper scripts in "myplugin"?

I ask because I thought of a much cleaner solution, but it needs a modification of "admin/inc/plugin_functions.php":
  • Check plugin files in GSPLUGINPATH, ending in php (as it is now)
  • Check also for folders with a file "plugin.php" or "$(folder name).php" in them (proposed solution)
  • Include the found php file
Reply


Messages In This Thread
Multi-file plugins - by tankmiche - 2010-09-24, 19:03:36
Multi-file plugins - by Zegnåt - 2010-09-25, 00:00:26
Multi-file plugins - by JWH_Matthew - 2010-09-25, 02:19:51
Multi-file plugins - by Zegnåt - 2010-09-25, 02:49:55
Multi-file plugins - by tankmiche - 2010-09-25, 03:26:37
Multi-file plugins - by ccagle8 - 2010-09-25, 10:10:07
Multi-file plugins - by tankmiche - 2010-09-25, 17:05:54



Users browsing this thread: 2 Guest(s)