How can I enable user to dynamically set logo in Apex 5? - oracle

I need to allow the user upload a number of logos and select a default, that will then become the logo that's shown at the top left of the screen.
Usually the logo is a static application file, so is there perhaps a way to make changes to those by the user? Or to set a static file as a select statement?
I also tried setting an application computation to set an application item but couldn't get that to work.
This is my first question on SO. If I'm asking something stupid, please go easy on me. Thanks.

The way to solve this problem is to give the user a page for him to upload and manage the logos. (save them in the database)
Then create a RESTful Web Service that returns the image of a selected logo,
and use the link of the RESTful Web Service as the img src link.

Related

Google Analytics - Language of the first session of an user

This is related to the language of a website like FB, amazon, booking, etc.
When you open one of this sites, or when you click on the search and goes to the site, it opens with a language by default.
There is custom dimension (Cd-session- diatect, or something like that) that is the langueage of the site, but is the last one you had in your session. Would anyone know what is the custom dimensions in Google analytics to filter by this "first visit"? I heard there is something to filter by the first time you visit the site but I cannot find it.
Thanks,
A custom dimension, by definition, does not exist by default. So you should create a custom dimension like the one you are already looking at but with hit scope instead of session.
In this way you can see which language of the site was active on the landing page, which is the first page of each session.

Lightbox2: Display other picture if named image is lost

I have a lot galleries displayed with Lightbox2 and it works fine.
Now I want to delete the larger version of the pictures, but keep the gallery with the thumbnails for visitors.
How can I manage, that lightbox2 displays an alternative image, if the given file in the html is not existing?
I couldn't find an option in lightbox.js to handle with missing targets.
I had the same question, but after a little research I decided that Lightbox2 is not the right place to handle missing images. Instead, that should be handled at the server or application level.
The web server will respond with a 404 error for any missing resource, whether a web page, image, or anything else. In most cases, it also returns a small HTML page to alert the user (such as this example at Google).
You can usually configure your server or application to return a default 404-style image instead of an HTML page if the requested resource was an image. That will then be displayed to the user instead of the broken image symbol.
How you do this of course depends on the particular server/application stack you are using, but here is a good solution for Apache.

How to identify a Page in a PDF

I have an app where users upload PDF docs to a webserver. Each Page in that PDF doc has certain app specific "interesting properties" which the app infers by reading the content in the page.
This information is stored in a DB and needs to be presented to the user. The issue is that users can delete , insert and change the page order, as well as make changes to the values of these interesting properties so page number is not a good way to track the properties of a page.
What is a good way to make sure that we can track this.

organizing iOS app that gets data from server?

I am making an app that uses http requests to display images of documents. It will open up on a main page with options of documents and once you click on a document it will read images from the server (note there are like 200 images) and you can flip through the pages. My question: how do a create an app that will get a bunch of images from the server without having to create a bunch of individual Xcode pages? And it has to be able to do it with multiple books based on which one you click. And it should be able to handle the addition of documents to the server.
Thank you so much in advance!
if i understand your question, by 'create page in xcode' you mean in 'interface builder'.
if you have much images you have to load, create and display them programmatically not with interface builder, and take care to load them asynchronously to not freeze your app ( the responde of how you do is in your other question about cacheing images ;) ).

Logging image downloads

I'm trying to find a way of finding out who is downloading what image from an image gallery. Users can download using a button beside the thumbnail or right click and use the "save link as" Is it possible to relate a user session or ID to a "save link as" action from all browsers using either PHP or JavaScript.
Yes, my preferred way of doing this would be via PHP. You'd have to set up a script which would load up the file and send it to the user browser. This script would also be able to log the download somewhere (e.g. your database).
For example - in very rough pseudo-code:
download.php
$file = $_GET['file'];
updateFileCount($file);
header('Content-Type: image/jpeg');
sendFile($file);
Then, you just have your download link point to download.php instead of the actual file. (Note that updateFileCount and sendFile are functions that you would have to provide, of course - this script is an example of a download script which you could use)
Note: I highly recommend avoiding the use of $_GET['file'] to get the whole filename - malicious users could use it to retrieve sensitive files from your web server. But the safe use of PHP downloads is a topic for another question.
You need a gateway script, like ImageDownload.php?picture=me.jpg, or something like that.
That page whould return the image bytes, as well as logging that the image is downloaded.
Because the images being saved are on their computer locally there would be no way to get that kind of information as they have already retrieved the image from your system. Even with javascript the best I know that you could do is to log each time a user presses the second mousebutton using some kind of ajax'y stuff.
I don't really like the idea, but if you wanted to log everytime someone downloaded an image you could host the images inside a flash or java app that made it a requirement to click a download image button. That way the only way for them to get the image without doing that would be to either capture packets as they came into their side or take a screenshot.
Your server access logs should already have the request for the non-thumbnailed version of the file, so you just need to modify the log format to include the sessionid, which I presume you can map back to a user.
I agree strongly with the suggestion put forward by Phill Sacre. For what you are looking for this is the way to go.
It also has the benefit of being potentially able to keep the tracked files out of the direct web path so that they can't be direct linked to.
I use this method in a client site where the images are paid content so must be restricted access.

Resources