RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / why there is thumbnails folder? how to insert picture?
Posted:  10 Jan 2015 18:21
i cant insert pictures on the calendar, is it possible?
Posted:  12 Jan 2015 15:29
Thumbnail images are explained in the 'Help' info when entering/editing events (the Event window - Help in the left margin of the Description field)
It works as follows:
In the event's description field you can enter for instance: "This is a thumbnail image: myimage.jpg."
Once you have done this - in Month, Week or Day view -  when hovering an event the image thumbnails/myimage.jpg will be shown.
Also on other calendar pages, e.g. Upcoming events, the image will be shown.

The directory thumbnails is the default directory. If you want to display images from an other directory, you should specify both the path and the image. Example: "This is a thumbnail image: myimages/myimage.jpg."
Roel
Posted:  14 Jan 2015 20:37
thanks for your timebiggrin, i knew it!cool it help a lot. thump_up
one more question :
is it possible to insert video too?
Posted:  22 Mar 2017 16:45
I know this is an old thread, but I have a similar issue.  When I add a .jpg or .png to the thumbnails folder and add it to the description file (e.g, This is an image: image.png) all I see when I hover or open the event is the generic image icon and the name of the image.  I have tried different browsers, different image types and different image sizes.  Nothing seems to provide the actual image. 

Using LuxCal 4.5.2 with SQLite on Windows.

Thanks!
Posted:  22 Mar 2017 18:18   Last Edited By: Roel B.
Hi there,
It works as follows:
1. upload your image to the thumbnails folder (for example image.png)
2. add/edit an event and add somewhere in the description field of the event "image.png" (without quotes).

(The thumbnails folder is the default. You can also use a different folder, but then you have to add the folder name to the image name (e.g. myfolder/image.png)  in the description field of the event)

Now if you hover the event for instance in Month view, the image should appear in the hover box.
If on the admin's Settings page, under Views, you check "Show in Month view" - images (2nd from the bottom), select Save settings and go back to the calendar view, you should see the images in Month view (without hovering the event).

If this does not work for you, please send me the URL of your calendar, so that I can have  a look myself.
Roel
Posted:  22 Mar 2017 20:41
Hi Roel, thank you for the very prompt reply.  I did as you suggested but the problem still exists.  My calendar/web site is internal to my office, so I can't send you a URL.  But here are some screen shots:

http://www.mfna.org/images/LuxCal_Item1.PNG
http://www.mfna.org/images/LuxCal_Detail.PNG
http://www.mfna.org/images/LuxCal_Hover.PNG
Posted:  23 Mar 2017 08:44
Hello Roel,

I recall mentioning having the user be able to upload an image when creating an event which gets put into the /thumbnails folder on the server and to the event. As it is now, unless I missed something, currently only those with FTP access can add an image to an event. I don't recall if you mentioned adding that feature?

Kind regards,
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  23 Mar 2017 10:41
Hello rli

Be sure that the filename is correct. By correct I mean that if in the filename on the server capital letters are used, then You ALSO have to use capital lettes in the calendar-image  filename.
Some programs automatically add the JPG extension as JPG and not jpg.

Hello Dan

I know that Roel has plans for a feature : "uploading thumbnails", but I don't know how the status is for this.

Kind regards
Schwartz
Posted:  23 Mar 2017 10:45
Hello again rli

Have You tried with the beautiful september.jpg or the heart.gif

These thumbnails are delivered by LuxSoft as examples.

Please try and tell us the outcome for that.

Kind regards
Schwartz
Posted:  23 Mar 2017 10:47
Hello again Dan

It is probably not rli that has set the foldername "thumbnails" - the system does this automatically.
Posted:  23 Mar 2017 10:52
And again rli

Try to visit the : http://www.calendarforum.dk/images.html

Here You can find some more information for the calendar - and the site is recommended by Dan biggrin

Kind regards
Schwartz
Posted:  23 Mar 2017 11:23   Last Edited By: Roel B.
Hi rli,
I did exactly the same as you did (file name pho_thumbnail.png, uploaded the file to the thumbnails folder, added the file name to the description field of an event) and it worked like a charm.
It doesn't matter if you add the thumbnail folder name to the image name in the description, so both "thumbnails/pho_thumbnail.png" and "pho_thumbnail.png" (without quotes) are fine.

The only thing I can think of now is that your thumbnails folder doesn't have the right permission. maybe try setting the file attributes to 644 or 755.
Or, just for testing, put the image in an other folder (e.g. "css") and add "css/pho_thumbnail.png" to the description field of an event.

Please have a look at the HTML source of your calendar and see if you can find the following code:

<img class='thNail' src='http://www.yoursite.xxx/thumbnails/pho_thumbnail.png' alt='pho_thumbnail.png'></span>

If so, the HTML code is correct and it means the browser can't access the image on your server.
Roel
Posted:  23 Mar 2017 15:56   Last Edited By: rli
Thanks for all the replies, folks.  I must be missing something.

@Schwartz, I did try the included thumbnails and had the same results.

@Roel, I found the code: <img class='thNail' src='https://localhost/webcal/thumbnails/pho_thumbnail.png' alt='pho_thumbnail.png'></span>

I notice that the URL uses HTTPS and not HTTP.  I have not implemented security on the server.  Again, this is for internal use only, for an office of 7 people.

I changed the permissions on the 'thumbnails' folder to Full Control for all Users.  Still nothing.

Like I said, I must be missing something.  Oh, I am working on a local machine, so I move files by copying from one location to another; no ftp is involved.
Posted:  23 Mar 2017 17:22   Last Edited By: Roel B.
OK, it's got to be something I'm doing.  I installed LuxCal 4.5.2L on my Mac running the Aprelium Abyss web server, and the behaviour of embedded images is the same.  I've played around a bit and found some interesting (but not helpful) behaviour.  For example, just adding "thumbnails/image.ext" or "image.ext" (no quotes) just shows the text in the hover-over.  Either way, I notice that LuxCal adds a space before the image descriptor.

I tried overriding that behaviour by inserting some escaped return characters ("\n," "\r\n"). While that didn't reveal the image, it did replace the descriptor in the event box with the actual HTML code (copied directly from my Windows machine: <img class='thNail' src='https://localhost/webcal/nthumbnails/september.jpg' alt='september.jpg'>)  Note the "\n" in the code.

If I remove the "\n" from the HTML code, the event box reverts back to " thumbnails/september.jpg".

This behaviour is identical between both Mac and Windows.  Which leads me to think I've not set some preference correctly.
Posted:  23 Mar 2017 18:55   Last Edited By: Roel B.
There are not a lot of thing you can do wrong. If the HTML code is ok, the browser should retrieve the image from the server.

Do you have tools to edit the HTML code real-time? (like the Web Developer add-on in Firefox)
If so, try to remove the "s" from https in the image link (see your one but last post).
It should not make any difference, but if it does, I will give you a mod to ensure http, rather than https.
Roel
Posted:  23 Mar 2017 21:17   Last Edited By: rli
Hi Roel,

{Sigh} My connection to the forum was dropped as I tried to send my reply. And my reply was lost.  I will try to re-type it.

I did not use the Developer Tools in Firefox (Chrome also exhibits the same behavior), but I did copy and paste the URL into a new tab.  Using https, I receive a message:

The image "https://abyss/webcal/thumbnails/pho_tn.jpg" cannot be displayed because it contains errors.

However, when I remove the 's' the image displays correctly.

I tried adding a self-signed certificate to my web server to see if that would resolve the https issue, but it did not.

So, let me say this is a very minor issue, and is not relevant to the content I wish to have on the calendar.  I applaud you for the effort you've put into LuxCal, and the quality product it is.  That you offer it free and are so quick to support it earns two thumbs up from me! 

I wouldn't worry about a fix for this.  If you're working on other features and this happens to find its way into the next release, great!  If not, I can live without thumbnail images in calendar events!

Thanks.
Posted:  23 Mar 2017 23:50
Don't give up smile

Edit the file common/toolbox.php and change line 219  from . . .

$baseUrl = 'http'.(!empty($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['SERVER_NAME'];

to . . .

$baseUrl = 'http://'.$_SERVER['SERVER_NAME'];

and then there will be no https any more.

(The question remains: why does the PHP variable $_SERVER['HTTPS'] indicate that your site is a secure site?)

Roel
Posted:  24 Mar 2017 17:17
Thanks, Roel, that did the trick!  I don't know why the server is reporting it's secure (I did add a self-signed certificate yesterday, but that was AFTER I saw the issue).  I'm using Aprelium's Abyss 1X web server, so maybe it's something unique to that?

Anyway, here's the result after making your change:

http://www.mfna.org/images/Pho.PNG
Posted:  24 Mar 2017 21:49
smile
Roel