To add a Java script file in a customize feature in drupal - drupal

i have create a customize feature in open atrium. now i have to implement the a javascript file like mindmap in that customise feature. how can this possible to add in the open atrium feature.
i have completed the feature using the book module of the open atrium. Now i have to change only the text area in to mindmap.how can it implemented in the feature.plz help me.

You are using the open atrium custom feature and want add a js file then you can follow the build a feature link https://community.openatrium.com/documentation-en/node/449
and then read the drupal_add_js function in the link http://drupal.org/node/304255.

You want to use drupal_add_js() in a custom module or theme depending on what you are making. If it is a one off site just add it to your theme. If youre trying to fix the moduel add it directly to the upstream module. If youre augmenting the module for your own purposes add it to a new helper module so that you can upgrade that module in the future without concerns of losig your work.
http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_add_js/6

Related

Is there a way to reuse the built-in HTML editor in Cofoundry

I would like to embed Cofoundry's built-in administration interface visual editor in other custom non-admin pages. The idea is not to use any of the fancy attributes like [HTML], but rather be able to load the editor using low level JavaScript and HTML instead of installing yet another editor myself and use that.
I suppose it is a standard HTML editor, so given the URLs for it in Cofoundry, I assume it would be possible to use the editor's own standard documentation for embedding the editor.
So, question, which editor is it - and what are the built-in URLs (paths) to it's components?
As of v0.9 Cofoundry uses TinyMCE as the HTML editor. You'd be better off using your own build of the editor than linking to the Cofoundry source as it's liable to change.

Edit Microsoft ChatBot UI design

I have setup a QnA Bot via the Azue BotService, and I want to use the WebChat channel, but the default MS Design for the chat interface is quite bland; is there a way for me to edit it?
Is it possible to go form the default theme on the left, so something like Air New Zealand's bot on the right in the image below?
It depends on how you want to integrate the webchat in your page but yes it is possible to change the aspect, it's only css and js
All the details are provided on the GitHub account for the Webchat: https://github.com/Microsoft/BotFramework-WebChat
In a few words:
Want to run a custom build of WebChat? Clone this repo, alter it, build it, and reference your built botchat.css and botchat.js files.
And for Styling:
Styling
In the /src/scss/ folder you will find the source files for generating
/botchat.css. Run npm run build-css to compile once you've made your
changes. For basic branding, change colors.scss to match your color
scheme. For advanced styling, change botchat.scss.

In Drupal, how do I override a template in a core module without modifying the actual core?

I want to edit the search results of a search using the search module. The template in question is search-result.tpl.php. I see that it's in html/modules/search, but I'd like to keep the modification out of the core and keep it in my sites folder. Is there a way to change the place that drupal looks for that specific template? If not, how can I accomplish my goal?
Copy the search-result.tpl.php into your theme's directory, modify it as needed, and clear the theme cache.
You may also want to check out the About overriding themable output handbook page for additional details.

How to create a QT plugin that customizes UI?

We would want the users to be able to optionally customize our QT applications. So if they would want to create their own theme for our applications, all they have to do is load their own CSS file.
Do we really need to create a plugin to be able to do that? If yes, could somebody give me the basic steps/ or a jump start on how to do it? If no, are there features in QT that I need to know to be able to do that without creating a plugin?
I have a Jabber instant messenger which is plugin based and written in Qt. It includes a style plugin that does exactly what you describe. The source for that plugin is here:
https://github.com/sje397/saje/tree/master/plugins/styles/
(Note: this is a plugin for my application - not a 'Qt style plugin')
Basically all you need to do is load a style sheet and call QApplication::setStyleSheet:
QFile f("filename");
if(f.open(QIODevice::ReadOnly)) {
qApp->setStyleSheet(f.readAll());
}
An example of a valid style sheet is here. Note that it is for my app, so includes some of my own class names etc.

Drupal6: Removing template files

I have been using a custom template file called user-profile.tpl.php for a while. But wanted to explore the CCK Content Profile abilities.
I renamed the template file to something arbitrary, but instead of drupal defaulting to using the standard profile view it is complaining that it can't find the user-profile.tpl.php file.
So either it saves this in the database somewhere, cache is disabled so that is not the Anyone know how drupal save the template file names? And how that can be reset?
Make sure you flush the theme registry whenever you make a change like that. You can do it using the link in the top left of admin_menu if you're using that module, or if not, go to Settings -> Performance and clear the cache.

Resources