Path of newly added image files in IBM Connections - ibm-connections

I have been trying to customize IBM Connections UI and have been able to insert and execute code in header.jsp thanks to the material available on the web.
The problem is if I add a new image file under the themes directory in <IBM_CONNECTIONS>\data\shared\customization\themes\images, how do I reference this image in header.jsp? Surely I cannot use an absolute path here which is <IBM_CONNECTIONS>/connections/resources/web/com.ibm.lconn.core.styles.oneui3/images/myimage.png.
Similarly I would like to add a new JavaScript, but I am not able to figure out how to give its relative path in header.jsp.

The <CONNECTIONS_CUSTOMIZATION_PATH>/themes directory should only be used to override images referenced by existing stylesheets, or add new images for custom stylesheets. If all you need is to display an image, the recommended location is <CONNECTIONS_CUSTOMIZATION_PATH>/common/images (create subdirectories if necessary). The image will be available under every application's context root, e.g. /files/images/myimage.png

claudiopro, your solution works with /files/images/myimage.png and /profiles/images/myimage.png and so on. But what about main /homepage/
The url /homepage/images/myimage.png is not working.
Do you know how to avoid that?
Do you also know where the solution you provided is documented in IBM Knowledge Center?
In documentation of Connections 5.0 there are few pages about images and CSS custiomizations but some of those solutions are not even working, some are in contraty with each other...

Related

Phaser3 load images from folder

Is it possible to loop through folder to load all possible images inside this folder (in Phaser I need to this.load.image and also afterwards add loaded images)?
This is necessary for Phaser3 game. It is hosted on Apache.
I think that it could be a problem from security reasons or there is some approach?
I searched through Phaser documentation but I didn't find anything that would do the job, Phaser does not seems to implement a filesystem by itself. So you could use this answer and if it doesn't work you should refer to Apache filesystem.
The goal here is to store all the images contained in your assets folder in an list (recursively? if you have some nested folders) then loop through that list calling this.load.image with each image directory.
If you manage to make it work please post the code : )

How to use Intersphinx to link documents when the underlying domain will change?

I have a use case for reStructured Text documentation in an offline scenario. It will move from one domain to another when installed and often No Internet access will be available. I'm assuming HTML output of sphinx. I have multiple microservice projects that I'd like to be able to share links between them using Intersphinx. The projects will ride together and someone browsing one project will have access to the others. I expect they could always be arranged to be in a project folder on the same top level domain even.
All the examples I see on the Internet seem to assume that a static domain will be in use and the documentation isn't copied to new places. Is there some way to easily account for a changing domain?
An additional concern that maybe covers the previous is relative linking. Can we account for the domain change in a way that won't require me to rebuild the docs? In HTML I'd have links to "/some/page.html" instead of "http://example.com/some/page.html".
Sounds like you're just looking to use relative paths instead of domain names. If that's the case, you would do something like this in your conf.py:
intersphinx_mapping = {
'other': ('example/', 'example/example.inv'),
}
From the intersphinx extension docs:
Relative local paths for target locations are taken as relative to the base of the built documentation, while relative local paths for inventory locations are taken as relative to the source directory.

How do I load an Android Studio resource file in so I can copy it?

I'm creating an app which has various default icons. These are stored in the 'drawables' folder, as png files. I want to be able to copy these across to internal storage when the user installs the app. I have the names of the drawables stored in the database (see my question from yesterday, here).
I'm not sure how to actually read the drawable in as a file, though. So, let's say I have a drawable called 'icon.png'. I need to open that and copy it across to the internal storage - but I'm not sure what the file path should be or how to go about it. I've been going round in circles in the documentation and got myself really confused!
Can anyone point me in the right direction?

Trying to move Drupal install TO subdirectory

Okay, so I've searched everywhere and while I can find plenty of stuff about moving a Drupal install out of a subdirectory I can't find anything on moving one into a subdirectory. I've recently taken over this project and it was developed without me so I've been landed in it here.
The problem is that the site was developed in the root of a dev server and I now have someone who wants it in a subdir. I've changed the base url in the htaccess and I've tried manually changing references in the CSS and DB but I can't be sure I've caught everything (modules etc).
What I want to know is, is there a way to force every link relative to the root to be relative to root/example instead. Basically everything that was once at www.example.com is now at www.example.com/subdirectory.
Thanks.
There's two pieces to this. The first you've already done: configuring htaccess to set a base url that includes the subdirectory.
Unfortunately, you may have quite a few references in the node content (especially embedded images) that will stop working.
A relatively simple solution to this would be to include a <base href="foo.com/dir" /> tag in your site theme, but this isn't a great fix in the long term.
You can try modifying your database directly, through queries such as the following (use with care, backup your database ahead of time, etc):
UPDATE field_revision_body SET body_value = REPLACE(body_value, 'devdomain.com', 'proddomain.com/subdir') (add http:// into those queries)
You may also need to update the paths in your files table to reflect the new locations on disk, especially if you're using multisite.
Alternately, have you considered using the Backup & Migrate module to move content from the dev server to a new install at the new instance?

Trouble syncing file-based templates to database using MSM and config bootstrap

Had started my typical EE build (using a bootstrapped config) for a client when they announced they wanted another additional site using the MSM module (le sigh).
So added the MSM module, I commented out the $config['site_url'] and $config['cp_url'] and set those in index.php instead using $assign_to_config.
That's when I discovered this bug where MSM config file settings are not recognized, which is a pain but I can work around it. However, I noticed that when I created the secondary site, it wouldn't recognise my custom location for add-ons and so I had to add that to index.php as well to $assign_to_config['third_party_path'] = "../assets/third_party/";.
Then I discovered that when I create or modify a template file, it won't automatically sync and so I need to manually do that each time which is a real PITA.
Why would my templates not be syncing to the database? Is this related to the MSM config bug?
While I haven't tried bootstrapping the third party path yet, I've definitely been able to bootstrap the template path for MSM sites... What bootstrap method are you using?
Are your sites on subdomains or subfolders? I've only had experience with subfolders so perhaps that makes a difference (although it shouldn't).
Could you maybe walk through in a bit more detail what's happening? Your first site (site_id = 1) templates sync automatically from filesystem edits, but your second site does not? Yet if you go to CP > Design > Synchronize Templates, that works?
The $assign_to_config portion of MSM setup is definitely a weakspot when it comes to bootstrapping... I wonder if we need to work up an additional bootstrap for MSM+CP environment, where it looks at the cp cookie ($_COOKIE['exp_cp_last_site_id']), and sets values based on that.
It may be helpful if you let us know which bootstrap you are using. For example, if you look at this bootstrap the site_url and cp_url are set using the HTTP_HOST server variable, so this shouldn't clash with your MSM install (and multiple domains) at all.
Perhaps you could try using that boostrap file instead, and see if it fixes your issue with template syncing?
Finally, if you're going to use the EE template manager, you don't really need to store templates as files. Conversely, if you want to save templates as files, it's probably much easier editing them using Sublime Text or another editor, rather than the clunky built-in editor (which is really only useful for small/simple changes).

Resources