From 730dc52e2659f72ad896377b75cb39b4957f0d25 Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 24 Mar 2018 22:59:38 +0200 Subject: [PATCH] Updated TIPS: Custom Code (markdown) --- TIPS:-Custom-Code.md | 98 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 81 insertions(+), 17 deletions(-) diff --git a/TIPS:-Custom-Code.md b/TIPS:-Custom-Code.md index e6852aa..7c21332 100644 --- a/TIPS:-Custom-Code.md +++ b/TIPS:-Custom-Code.md @@ -4,14 +4,14 @@ Here are some 'tips' when using custom code. |USAGE|PHP START|PHP END |---|---|---| -|New Insert Code|`/***[INSERT<>$$$$]***/`|`/***[/INSERT<>$$$$]***/`| -|New Replace Code|`/***[REPLACE<>$$$$]***/`|`/***[/REPLACE<>$$$$]***/`| -||WHEN JCB ADDS IT BACK AGAIN| -|JCB Add Inserted Code|`/***[INSERTED$$$$]***///*23*/`|`/***[/INSERTED$$$$]***/`| -|JCB Add Replaced Code|`/***[REPLACED$$$$]***///*25*/`|`/***[/REPLACED$$$$]***/`| -||CHANGING EXISTING CUSTOM CODE| -|Update Inserted Code|`/***[INSERTED<>$$$$]***///*23*/`|`/***[/INSERTED<>$$$$]***/`| -|Update Replaced Code|`/***[REPLACED<>$$$$]***///*25*/`|`/***[/REPLACED<>$$$$]***/`| +|New
Insert Code|`/***[INSERT<>$$$$]***/`|`/***[/INSERT<>$$$$]***/`| +|New
Replace Code|`/***[REPLACE<>$$$$]***/`|`/***[/REPLACE<>$$$$]***/`| +||**WHEN JCB ADDS IT BACK AGAIN**| +|Existing
Inserted Code|`/***[INSERTED$$$$]***//*23*/`|`/***[/INSERTED$$$$]***/`| +|Existing
Replaced Code|`/***[REPLACED$$$$]***//*25*/`|`/***[/REPLACED$$$$]***/`| +||**CHANGING EXISTING CUSTOM CODE**| +|Update
Inserted Code|`/***[INSERTED<>$$$$]***//*23*/`|`/***[/INSERTED<>$$$$]***/`| +|Update
Replaced Code|`/***[REPLACED<>$$$$]***//*25*/`|`/***[/REPLACED<>$$$$]***/`| > "`/*23*/`" and "`/*25*/`" (or similar id numbers) are the ID of the code in the system don't change it!!!! @@ -19,13 +19,77 @@ Here are some 'tips' when using custom code. |USAGE|HTML START|HTML END |---|---|---| -|New Insert Code|``|`<--[/INSERT<>$$$$]-->`| -|New Replace Code|``|`<--[/REPLACE<>$$$$]-->`| -||WHEN JCB ADDS IT BACK AGAIN| -|JCB Add Inserted Code|``|`<--[/INSERTED$$$$]-->`| -|JCB Add Replaced Code|``|`<--[/REPLACED$$$$]-->`| -||CHANGING EXISTING CUSTOM CODE| -|Update Inserted Code|``|`<--[/INSERTED<>$$$$]-->`| -|Update Replaced Code|``|`<--[/REPLACED<>$$$$]-->`| +|New
Insert Code|``|`<--[/INSERT<>$$$$]-->`| +|New
Replace Code|``|`<--[/REPLACE<>$$$$]-->`| +||**WHEN JCB ADDS IT BACK AGAIN**| +|Existing
Inserted Code|``|`<--[/INSERTED$$$$]-->`| +|Existing
Replaced Code|``|`<--[/REPLACED$$$$]-->`| +||**CHANGING EXISTING CUSTOM CODE**| +|Update
Inserted Code|``|`<--[/INSERTED<>$$$$]-->`| +|Update
Replaced Code|``|`<--[/REPLACED<>$$$$]-->`| -> "``" and "``" (or similar id numbers) are the ID of the code in the system don't change it!!!! \ No newline at end of file +> "``" and "``" (or similar id numbers) are the ID of the code in the system don't change it!!!! + +# Insert Examples (PHP) + +> placeholder must be on its own line + +### New PHP Insert Code +```php +$bar = 'easy'; +$foo = 'some code'; +/***[INSERT<>$$$$]***/ +$var = 4; +/***[/INSERT<>$$$$]***/ +$more = 'more some code'; +``` + +### Existing PHP Insert Code +```php +$bar = 'easy'; +$foo = 'some code'; +/***[INSERTED$$$$]***///*23*/ +$var = 4; +/***[/INSERTED$$$$]***/ +$more = 'more some code'; +``` + +### Update PHP Insert Code +```php +$bar = 'easy'; +$foo = 'some code'; +/***[INSERTED<>$$$$]***///*23*/ +$var = 4; +/***[/INSERTED<>$$$$]***/ +$more = 'more some code'; +``` + +# Replace Examples (PHP) + +> placeholder must be on its own line + +### New PHP Replace Code +```php +$bar = 'easy'; +/***[REPLACE<>$$$$]***/ +$foo = 'some code changed'; +/***[/REPLACE<>$$$$]***/ +$more = 'more some code'; +``` + +### Existing PHP Replace Code +```php +$bar = 'easy'; +/***[REPLACED$$$$]***//*25*/ +$foo = 'some code changed'; +/***[/REPLACED$$$$]***/ +$more = 'more some code'; +``` + +### Update PHP Replace Code +```php +$bar = 'easy'; +/***[REPLACED<>$$$$]***//*25*/ +$foo = 'some code changed'; +/***[/REPLACED<>$$$$]***/ +```