We are developing a website using websphere portal 8. Is there a way to prevent the portal to integrate the portal CSS in the mashup files that are being served on a page request? The CSS contains all the lotus ui styles we do not use on that website.
Yes, you can. Portal 8 Theme has different profiles, you should understand profile like 'how many js/css/other portal staff' is loaded on the page. You can say page use light profile. To set profile to page you should open page properties and set property
resourceaggregation.profile=profiles/profile_lightweight.json
But even in that case you'll see portal css that you do not want to see.
All profiles json files located in static part of your theme theme/static/themes/Portal8.0/profiles
By default there are 4 files
profile_admin.json
profile_deffered.json
profile_full.jon
profile_lightweight.json
I suppose you able to create your own profiles.
If you take a closer look at this profiles you'll see what modules this profiles brings to page, for example lightweight profile
"moduleIDs": [
"wp_theme_portal_80",
"wp_portlet_css",
"wp_one_ui",
"wp_one_ui_dijit",
"wp_legacy_layouts",
"wp_client_ext",
"wp_status_bar",
"wp_theme_menus",
"wp_theme_skin_region",
"wp_theme_high_contrast",
"wp_layout_windowstates"
],
In your case you interested with wp_theme_portal_80 - how to know what this module contains?
To know it you should open contributions directory and lookup theme.json file. Open it and you'll see next
"modules":[{
"id":"wp_theme_portal_80",
"prereqs":[{
"id":"wp_client_main"
},{
"id":"wp_client_ext"
}],
"contributions":[{
"type":"head",
"sub-contributions":[{
"type":"js",
"uris":[{
"value":"/js/head.js"
}]
}, {
"type":"css",
"uris":[{
"value":"/css/master.css"
}, {
"value":"/css/masterRTL.css",
"type":"rtl"
}]
}]
}]
},
This files will we included in your html markup if you use lightweight profile. I suppose now it is clear how to avoid portal css on the page - just edit profile json/create own profile/edit theme.json Be careful to broke default portal theme if you'll be modify theme.json or default profiles
Hope it will helpful for you.
Related
So I have QnA maker set up and connected to our Azure (I am totally new to Azure). I need to change the CSS of the Iframe from QNA maker, it is currently blue (as the default). I am following this guide to make it our company's colors:
https://blog.botframework.com/2017/10/11/customize-web-chat-websites/
I need to be able to clone this: https://github.com/Microsoft/BotFramework-WebChat/tree/master/src (which I already forked) into the current Azure build, which I am ultimately having a problem with.
I am sure I am overlooking something simple in Azure, but I just need to clone the source code to properly add the .css files I need to be able to edit the bot.
Currently, I have tried to grab the Iframe and change the CSS that way, but no dice (of course). All I need to do is change blue, to red, any way to do that will be helpful, whether that is changing the Iframe after it loads or by getting this guide to work for us. Thank you!
Refer to the github readme for more detail: https://github.com/Microsoft/BotFramework-WebChat
There are options:
Easiest: In any website, IFRAME the standard Web Chat channel
Easy: In your non-React website, run Web Chat inline
Easyish: In any website, IFRAME your Web Chat instance
Medium: In your React website, incorporate the Web Chat React
component
According to your requirements; running the bot in an iframe with custom style, you should read the Easyish section:
You can isolate your instance of Web Chat by running it inside an
IFRAME. This involves creating two web pages:
Your Web Chat instance, as shown above. (refer to Easy)
The hosting page, adding <iframe src="/path/to/your/webchat/instance" height="height" width="width" />
Based on the Easyish section (step 1), you need to first complete the Easy section. In your existing web app, add a new page with the following code (enable directline on Azure Bot settings):
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
</head>
<body>
<div id="bot"/>
<script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
<script>
BotChat.App({
directLine: { secret: direct_line_secret },
user: { id: 'userid' },
bot: { id: 'botid' },
resize: 'detect'
}, document.getElementById("bot"));
</script>
</body>
</html>
CUSTOMIZE your chat box style by editing the botchat.css file. You make a copy from https://cdn.botframework.com/botframework-webchat/latest/botchat.css and edit to your liking and put your own customized botchat.css to somewhere in your web app and change the href in the header instead of using the default one.
Finally for Easyish section step 2, you can create an iframe (content is step 1 web chat page) and embed that in your hosting page.
I am trying to create custom user CSS for someone to use, that will remove all the extra stuff on a website they are viewing, except the body content. I figured I could use chromes inspect to get the sites CSS code, then edit it and use a custom user css extension on chrome to implement it. However the site has over 7000 lines of code in their CSS and I am still very new to CSS. Is there any simple way to make this work without having to go through 7000 lines of code?
Here is just a quick, bare-minimum, "prove of concept"-type starter of how you can achieve what you want using Firefox browser, just to get you going.
Create two files: manifest.json and RemoveStuff.js.
Put this inside manifest.json
{
"manifest_version": 2,
"name": "RemoveStuff",
"version": "1.0",
"content_scripts": [
{
"matches": ["*://*.google.com/*"],
"js": ["RemoveStuff.js"]
}
]
}
and put this inside RemoveStuff.js
document.getElementById("lga").outerHTML='';
Now using Firefox browser navigate to about:debugging, click Load Temporary Add-on and select RemoveStuff.js. Now go to google and you shouldn't see google's logo (or whatever picture/animation they have there).
You can start learning about Firefox extensions here, or Chrome here
I can't see a reference to the api.css, adam.css and eve.css files in the Preview API, nor can I find any reference to the buttons and icons they would like the app to use.
Is there a page I'm missing?
I've tried:
Here and here
(incompatible with Preview API)
There is also this but it doesn't provide much help (other than help to decode the horrific JSDoc site)
The monolithic api.css file have been split into separated stylesheets, each of them corresponding to a certain views module. Thus, you only need to include the CSS files for the modules you use.
Right now, these are the files:
$views/css/list.css
$views/css/image.css
$views/css/buttons.css
$views/css/throbber.css
$views/css/popup.css
You can see them in action in the Views tutorial preview, and some of them are also used in the Apps Tutorial on GitHub.
I was using CKEditor with no problems on my site then moved the site from one directory to another -- /vmgdev to /vmg. Everything is working OK except ckeditor, which doesn't appear. It seems that ckeditor is failing to load the autogrow plugin scripts, as it's still looking at the old path. Disabling autogrow fixes the problem and ckeditor appears again. In the head of a page that uses the editor I still have the following:
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {
...
"loadPlugins": { "autogrow": { "name": "autogrow", "desc": "Autogrow plugin", "path": "/vmgdev/sites/all/modules/ckeditor/ckeditor/plugins/autogrow/", "default": "f" },
...;
//--><!]]>
</script>
How I can I fix the autogrow plugin path? In the form that allows me to change the ckeditor global profile the plugins path is set to %m/plugins and beneath this field it claims that %m is equal to %m - /vmg/sites/all/modules/ckeditor, but that's obviously not the path that's being used.
Thanks.
Remember to clear the cache on your Drupal server as well as the cache on your browser.
Since ckeditor relies on a lot of javascript, I've found that often the browser caches the javascript and doesn't show the changes you've made even if you've refreshed the Drupal cache.
I don't have a real need to omit the default core.css reference from my HTML pages but I would like to know so I can feel comfortable that I have full control. Thanks
There are many ways to achieve this.
The problem is, once you remove the core.css file you are talking about 6 thousand lines of places that will not appear with a presentation anymore. What I do when we are limited to theme-only visual customization I create a theme that will address any new CSS needs and also replace the elements in the core.css file (themes are loaded AFTER this file, so if you have duplicated declarations in both files, the theme's one will prevail, without using the !important mini-hacks).
Keep in mind that SharePoint in editing mode just doesn't work without this file, you have to use different approaches when you are, for example, talking about an internet-facing site with 100% anonymous users vs an intranet-like portal with everyone creating and editing content on the go.
With all the warnings given, you can go to your masterpage and remove the core.css tag making it invisible:
<SharePoint:CssLink runat="server" Visible="false"/>
Depending on your type of sharepoint site (WSS vs MOSS + Publishing Features) the masterpages may work differently based on configuration, by default (WSS or MOSS without Publishing Features or any change on the matter) your masterpage will open on all the link that do not contain /_layouts/ in the url.
Examples:
/Default.aspx => Masterpage
/DocumentLibrary/Forms/Allitems.aspx => MasterPage
/_layouts/viewlsts.aspx (Show all site content) => no custom
masterpage
This is Microsoft's way to stop you from breaking even more (system pages) with the masterpages, but you can be extreme and use HttpModules or editing the 12/Template/Layouts/LCID folder (affecting the entire web front-end)
Usual scenarios:
Anonymous sites with no core.css when the user is anonymous and normal load when credentials are given (loading speed)
Themes used to let users create their mini-sites and use the branded templates or other sharepoint themes
Masterpages to customize what most of the users usually see, forcing your branding throught the child webs (new websites in non-MOSS Publishing wont inherit the masterpage)
Everything-under-the-masterpage with HttpModules or /12/ modifications (very rinky and complicated)
Note: It's not recommended to customize files from the Site Definition when you can avoid doing so.
When using Mickel's advice, make a copy of the Default.master, rename it to something like Custom.master and apply changes to that file. Then right click your custom master page and select "Set as default master page."
This is all done from within SharePoint Designer btw
Simply add your own custom CSS style sheet via Central Admin - this will be applied last, after Core.css so you can override anything you wish. You do not want to remove it! :-)