Changes between Version 1 and Version 2 of HowToMakeInjections
- Timestamp:
- Oct 16, 2013, 12:07:00 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowToMakeInjections
v1 v2 5 5 For insertion of own injection to the Dolphin 7.1 need to complete the following actions: 6 6 7 1) C ompile MySQL query like the next example from BoonEx module "simple_messenger":7 1) Create MySQL query similar to the next example from "Simple Messenger" BoonEx module: 8 8 9 9 … … 24 24 Let's review every part of this code: 25 25 26 a) ` name` = 'bx_simple_messenger_core_init'- unique name for new injection[[BR]]26 a) `'name' = 'bx_simple_messenger_core_init'` - unique name for new injection[[BR]] 27 27 28 b) ` page_index` = '0' - means number of page where code of injection will appear. If u choose "0" then injection will work in all pages. If set another number - then in pages which have the same number in $_page['name_index'] variable. For example - member.php (account page) has code like $_page['name_index'] = 81;so for injection in this page `page_index` parameter will be 81.[[BR]]28 b) `'page_index' = '0'` - means number of page where code of injection will appear. If u choose "0" then injection will work in all pages. If set another number - then in pages which have the same number in `$_page['name_index']` variable. For example - member.php (account page) has code like `$_page['name_index'] = 81;` so for injection in this page `page_index` parameter will be 81.[[BR]] 29 29 30 c) ` key` = 'injection_header'- means template system key, where code of injection will be added. List of system keys u may see in inc/classes/BxDoltemplate.php file, in method parseSystemKey. Usual key for injection is injection_header, banners feature uses banner_right, top, left, bottom. Full list of available injections keys:[[BR]]30 c) `'key' = 'injection_header'` - means template system key, where code of injection will be added. List of system keys u may see in inc/classes/BxDoltemplate.php file, in method parseSystemKey. Usual key for injection is injection_header, banners feature uses banner_right, top, left, bottom. Full list of available injections keys:[[BR]] 31 31 32 32 … … 52 52 53 53 54 d) ` type` = 'php'- injection's type. If set "php" then system will try to execute injection code, if "text" - then includes text which will be placed to then enxt parameter[[BR]]54 d) `'type' = 'php'` - injection's type. If set "php" then system will try to execute injection code, if "text" - then includes text which will be placed to then enxt parameter[[BR]] 55 55 56 e) ` data` = 'return BxDolService::call(''simple_messenger'', ''get_messenger_core'');'- "body" of injection. Means code which will be executed everytiem when injection is connected (if `type` parameter = 'php') or just plain text or HTML (if `type` = 'text')[[BR]]56 e) `'data' = 'return BxDolService::call(''simple_messenger'', ''get_messenger_core'');'` - "body" of injection. Means code which will be executed everytiem when injection is connected (if `type` parameter = 'php') or just plain text or HTML (if `type` = 'text')[[BR]] 57 57 58 f) ` replace` = '0'- means will be key, where injection works, replaced or just added by injection's code. [[BR]]58 f) `'replace' = '0'` - means will be key, where injection works, replaced or just added by injection's code. [[BR]] 59 59 60 g) ` active` = '1'- means active (with value "1") or inactive (with "0") status of injection[[BR]]60 g) `'active' = '1'` - means active (with value "1") or inactive (with "0") status of injection[[BR]] 61 61 62 62 2) Execute new MySQL query with your injection in DB of your Dolphin's site.