This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Which regex-characters must be escaped? | |
Special characters in regular expressions which have to be escaped are:. \ + * ? [ ^ ] $ ( ) { } = ! < > | : - | |
And a free escaper | |
https://www.regex-escape.com/regex-escaping-online.php | |
and a dummy bit of text to test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app = JFactory::getApplication(); | |
$layout = $app->input->getCmd('layout'); | |
if ($layout != 'blog') { | |
<jdoc:include type="modules" name="sidebar" /> | |
} | |
OR you check the view: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Where profile 2 is my external backup e.g. Amazon S3. | |
/usr/local/php70/bin/php-cli /home/ACCOUNTNAME/public_html/cli/akeeba-backup.php --profile=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$moduleName = $module->module; | |
<div class="<?php echo $moduleName; ?>"> | |
//module stuff | |
</div> | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OK, that means there's some broken JSON in the params of one of your elements. | |
Unfortunately, the only way to get some clue as to which one is to modify some Joomla core code. | |
Edit the file: | |
./libraries/vendor/joomla/registry/src/Format/Json.php | |
... and around line 72 will be ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add a stylesheet | |
$mediaUrl = 'media/' . $module->module; | |
$cssName = 'general.css'; | |
if (file_exists($mediaUrl . '/css/' . $cssName) && filesize($mediaUrl . '/css/' . $cssName) > 0) | |
{ | |
$document = JFactory::getDocument(); | |
$document->addStyleSheetVersion($mediaUrl . '/css/' . $cssName, array('version' => 'auto')); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This only shows to admins. Consequently you either need to be logged in or have shared sessions turned on to see anything */ | |
use Joomla\CMS\Factory; | |
<?php | |
$user = Factory::getUser(); | |
$isroot = $user->authorise('core.admin'); | |
if($isroot) { | |
highlight_string("<?php\n\$params =\n" . var_export($params, true) . ";\n?>"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo "<pre>" . print_r($params, true) . "</pre>"; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set the email to HTML | |
JFactory::getMailer()->addRecipient()->addSender()->setSubject()->setBody()->isHtml(); |