Skip to content
Chris Paschen edited this page Jul 12, 2018 · 22 revisions

Here are some 'tips' when using custom code.

The custom PHP script placeholders

USAGE PHP START PHP END
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!!!!

The custom HTML script placeholders

USAGE HTML START HTML END
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!!!!

Insert Examples (PHP)

placeholder must be on its own line!

New PHP Insert Code

$bar = 'easy';
$foo = 'some code';
/***[INSERT<>$$$$]***/
$var = 4;
/***[/INSERT<>$$$$]***/
$more = 'more some code';

Existing PHP Insert Code

$bar = 'easy';
$foo = 'some code';
/***[INSERTED$$$$]***///*23*/
$var = 4;
/***[/INSERTED$$$$]***/
$more = 'more some code';

Update PHP Insert Code

$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

$bar = 'easy';
/***[REPLACE<>$$$$]***/
$foo = 'some code changed';
/***[/REPLACE<>$$$$]***/
$more = 'more some code';

Existing PHP Replace Code

$bar = 'easy';
/***[REPLACED$$$$]***//*25*/
$foo = 'some code changed';
/***[/REPLACED$$$$]***/
$more = 'more some code';

Update PHP Replace Code

$bar = 'easy';
/***[REPLACED<>$$$$]***//*25*/
$foo = 'some code changed';
/***[/REPLACED<>$$$$]***/
$more = 'more some code';

Insert Examples (HTML)

placeholder must be on its own line!

New HTML Insert Code

<div class="easy">
<?php echo '<a href="'.$item->url.'" title="url" >'; ?>
<!--[INSERT<>$$$$]--><!--23-->
<?php echo '<a href="'.$item->new_url.'" title="new url" >'; ?>
<!--[/INSERT<>$$$$]-->
</div>

Existing HTML Insert Code

<div class="easy">
<?php echo '<a href="'.$item->url.'" title="url" >'; ?>
<!--[INSERTED$$$$]--><!--23-->
<?php echo '<a href="'.$item->new_url.'" title="new url" >'; ?>
<!--[/INSERTED$$$$]-->
</div>

Update HTML Insert Code

<div class="easy">
<?php echo '<a href="'.$item->url.'" title="url" >'; ?>
<!--[INSERTED<>$$$$]--><!--23-->
<?php echo '<a href="'.$item->new_url.'" title="new url" >'; ?>
<!--[/INSERTED<>$$$$]-->
</div>

Replace Examples (HTML)

placeholder must be on its own line!

New HTML Replace Code

<div class="easy">
<!--[REPLACE<>$$$$]-->
<?php echo '<a href="'.$item->url.'" title="updated url" >'; ?>
<!--[/REPLACE<>$$$$]-->
</div>

Existing HTML Replaced Code

<div class="easy">
<!--[REPLACED$$$$]--><!--25-->
<?php echo '<a href="'.$item->url.'" title="updated url" >'; ?>
<!--[/REPLACED$$$$]-->
</div>

Update HTML Replaced Code

<div class="easy">
<!--[REPLACED<>$$$$]--><!--25-->
<?php echo '<a href="'.$item->url.'" title="updated url" >'; ?>
<!--[/REPLACED<>$$$$]-->
</div>
Clone this wiki locally