Skip to content

Commit

Permalink
Change namespace to "codeboxplus"
Browse files Browse the repository at this point in the history
  • Loading branch information
o0johntam0o committed Jul 23, 2014
1 parent 435fcb6 commit 327ea18
Show file tree
Hide file tree
Showing 242 changed files with 19 additions and 43 deletions.
28 changes: 2 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,11 @@ Codebox Plus alows you to:

## Requirement

php: >=5.3.3

phpbb: 3.1.*@dev
phpbb: 3.1.x

## Installation

Copy ```./ext/o0johntam0o/codebox_plus/*``` to ```<phpBB root>/ext/o0johntam0o/codebox_plus/*```

## Note

* For security purpose, please don't put any private infomation into the BBCode [CODE][/CODE]

* Usage:

[CODE={language} file={filename}]{code}[/CODE] (with specified filename and language)

[CODE={language}]{code}[/CODE] (without filename, default filename is "Untitled.txt")

[CODE file={filename}]{code}[/CODE] (without language, default language is "Plain text")

[CODE]{code}[/CODE] (using default filename - Untitled.txt and default language - Plain text)


{language} is as the same with the filename of the language file (in root/includes/geshi/geshi/)


To update the GeSHi parser, just replace the folder ./includes/geshi/ with the new one (current version is 1.0.8.11).

I do not own any files under the folder root/includes/geshi/. More information about the authors can be found at http://qbnz.com/highlighter/
Copy ```./ext/o0johntam0o/codeboxplus/*``` to ```<phpBB root>/ext/o0johntam0o/codeboxplus/*```

## License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
*
*/

namespace o0johntam0o\codebox_plus\acp;
namespace o0johntam0o\codeboxplus\acp;

class main_info
{
function module()
{
return array(
'filename' => '\o0johntam0o\codebox_plus\acp\main_module',
'filename' => '\o0johntam0o\codeboxplus\acp\main_module',
'title' => 'CODEBOX_PLUS_TITLE',
'version' => '1.0.0',
'modes' => array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
*/

namespace o0johntam0o\codebox_plus\acp;
namespace o0johntam0o\codeboxplus\acp;

class main_module
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "o0johntam0o/codebox_plus",
"name": "o0johntam0o/codeboxplus",
"type": "phpbb-extension",
"description": "Syntax highlighting 200+ programming languages (using GeSHi); Expand/collapse code block; Downloading code contents.",
"homepage": "https://github.com/o0johntam0o/phpBB-Extension-Codebox-Plus",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
codebox_plus_base_controller:
pattern: /codebox_plus
defaults: { _controller: o0johntam0o.codebox_plus.controller:base }
defaults: { _controller: o0johntam0o.codeboxplus.controller:base }

codebox_plus_download_controller:
pattern: /codebox_plus/download/{id}-{part}
defaults: { _controller: o0johntam0o.codebox_plus.controller:downloader, id:0, part:0 }
defaults: { _controller: o0johntam0o.codeboxplus.controller:downloader, id:0, part:0 }
requirements:
id: \d+
part: \d+
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
o0johntam0o.codebox_plus.controller:
class: o0johntam0o\codebox_plus\controller\main
o0johntam0o.codeboxplus.controller:
class: o0johntam0o\codeboxplus\controller\main
arguments:
- @controller.helper
- @template
Expand All @@ -12,8 +12,8 @@ services:
- %core.root_path%
- %core.php_ext%

o0johntam0o.codebox_plus.listener:
class: o0johntam0o\codebox_plus\event\main_listener
o0johntam0o.codeboxplus.listener:
class: o0johntam0o\codeboxplus\event\main_listener
arguments:
- @controller.helper
- @template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
*/
// TODO: IMPROVE ANTI-SPAM FEATURE
namespace o0johntam0o\codebox_plus\controller;
namespace o0johntam0o\codeboxplus\controller;

class main
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
*/
// TO-DO: VALIDATE HTML
namespace o0johntam0o\codebox_plus\event;
namespace o0johntam0o\codeboxplus\event;

/**
* @ignore
Expand Down Expand Up @@ -51,7 +51,7 @@ public function load_language_on_setup($event)
{
$lang_set_ext = $event['lang_set_ext'];
$lang_set_ext[] = array(
'ext_name' => 'o0johntam0o/codebox_plus',
'ext_name' => 'o0johntam0o/codeboxplus',
'lang_set' => 'codebox_plus',
);
$event['lang_set_ext'] = $lang_set_ext;
Expand Down Expand Up @@ -233,7 +233,7 @@ private function codebox_parse_code($code = '', $lang = 'text')
// GeSHi
if (!class_exists("GeSHi"))
{
include($this->root_path . 'ext/o0johntam0o/codebox_plus/includes/geshi/geshi.' . $this->php_ext);
include($this->root_path . 'ext/o0johntam0o/codeboxplus/includes/geshi/geshi.' . $this->php_ext);
}

$geshi = new \GeSHi($code, $lang);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
*/

namespace o0johntam0o\codebox_plus;
namespace o0johntam0o\codeboxplus;

/**
* @ignore
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
*/

namespace o0johntam0o\codebox_plus\migrations;
namespace o0johntam0o\codeboxplus\migrations;

class release_1_0_0 extends \phpbb\db\migration\migration
{
Expand Down Expand Up @@ -45,7 +45,7 @@ public function update_data()
'acp',
'CODEBOX_PLUS_TITLE',
array(
'module_basename' => '\o0johntam0o\codebox_plus\acp\main_module',
'module_basename' => '\o0johntam0o\codeboxplus\acp\main_module',
'modes' => array('config_codebox_plus'),
),
)),
Expand Down

0 comments on commit 327ea18

Please sign in to comment.