Shrink header bar hover text to level that fits âmostâ single words.
Add Google search box. I had to do this because the âExternalâ app does not open in a new Tab or Window. I use my nextcloud as a HUB for all my daily activity ⊠and losing the âcontextâ of my nextcloud launchpad does not work for me. This allows me to search w/o closing my nextcloud page.
How To: Shrink header bar hover text to level that fits âmostâ single words.
Step 1 - Locate the file â/nextcloud/core/templates/layout.user.phpâ
Step 2 - You are going to change the file in 2 places:
- Change line 65 from: <span> to <span style="font-size: .700em ! important;">
- Do the same for line 75 (for the word "More ...") Change <span> to <span style="font-size: .700em ! important;"><?php p($l->t('More')); ?></span>
You are going to allow array Domains which can be used as target for forms. This means you have to explicitly allow âGoogleâ. To do this you need to add âhttp://*.google.comâ below ââselfââ, ⊠as I have below.
/** @var array Domains which can be used as target for forms */
protected $allowedFormActionDomains = [
'\'self\'',
'http://*.google.com'
];
Step 2.
Create a file called: /nextcloud/core/templates/myGoogle.php
⊠to include the file in step 2 ⊠but only for desktops (not mobile devices).
Put the code below at line 71 ⊠(below the â<?php endforeach; ?>â tag âŠ
<!-- Show the google box code-->
<li data-id="<?php p($entry['id']); ?>" class="hidden" tabindex="-1" style="padding: 6px 10px ! important;">
<!-- Show the google box code-->
<?php
function isMobile() {
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
}
if(isMobile()){
// Do something for only mobile users
}
else {
include ("myGoogle.php"); // Do something for only desktop users
}
?>
</li>
<!-- Show the google box code-->