RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / Mini calendar showing Show event details to users = only logged in. but still showing all
Posted:  19 Jul 2016 11:49
I have the calendar showing details to only logged in viewers. (via my admin settings), this works fine for my main, full calendar.
But my mini calendar shows the details regardless of whether im logged in or not ?

I have tried with IE, FF and Opera. cleared cache etc.

any clues please ?
Posted:  23 Jul 2016 22:47   Last Edited By: Roel B.
Hi there,

You are right.
Initially we thought that if someone embeds a mini calendar, one would always want to show all event details. When the "Show event details to all users" setting was introduced, it was not done for the mini calendar. As a matter of fact, this is an inconsistency which nobody ever asked to correct.
In the next LuxCal version this will be corrected.

It's an easy fix; if you want to change this in your current LuxCal version, then edit the file lcmini.php in the calendar root and replace line 45

Code:


$popText .= '<br>'.makeE($evt,$set['popFieldsMcal'],'br',"<br>");

by the following three lines

Code:


if ($set['details4All']) {
    $popText .= '<br>'.makeE($evt,$set['popFieldsMcal'],'br',"<br>");
}

Roel
Posted:  26 Jul 2016 12:46   Last Edited By: Roel B.
HI Roel

Thanks for that, however, it doesn't seem to work

Here is my updated code in lcmini.php

Code:


        if ($set['popFieldsMcal']) {
            $popText = "<div class="fontS"><b>".$chBox.$time.((!$evt['mde'] and $evt['eti']) ? ' - '.ITtoDT($evt['eti']).' ' : ' ').$evt['tit'].'</b>';
if ($set['details4All']) {
    $popText .= '<br>'.makeE($evt,$set['popFieldsMcal'],'br',"<br>");
}
            $popText = htmlspecialchars(addslashes($popText.'</div>'));
            $popClass = ($evt['mde'] or $evt['r_t']) ? 'normal repeat' : 'normal';
            $popAttr = " onmouseover="pop(this,'{$popText}','{$popClass}',30)"";
            $cursor = ' point';


I can still see the details even though im not logged in
Posted:  27 Jul 2016 03:15
Try pressing Ctrl plus F5 to refresh the page. It might be displaying from what was in the cache.

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

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  27 Jul 2016 09:42   Last Edited By: Roel B.
Your updated code looks fine.
Dan may be right.
Or otherwise . . .
- did you disable "Show event details to users" on the admin's Settings page? and then log out to check if event details were now not shown? (when hovering a mini-square, only the event tile should pop up).
- are you sure the "public user" is not part of a group with post rights? Logged in users and users with post rights will see the event details.

I've implemented exactly the same change in the demo calendar, before posting it here (in my previous post) and it works fine.
Roel
Posted:  28 Jul 2016 09:41
Hi again

Quote:


did you disable "Show event details to users" on the admin's Settings page? and then log out to check if event details were now not shown?

Yes i did, and when i do this i get just the title. thump_up

However, when i change it to "logged in only" it shows title only (perfect) on main calendar
But the details still show on the mini calendar.

Quote:


are you sure the "public user" is not part of a group with post rights?

Public user has no post rights, read access only.

Cache cleared, temp files removed. force refresh done.
checked in Opera, FF and IE.

My steps
1. clear cache
2. log into calendar
3. settings > show  events details to users = disabled. save
4. log out
5. clear cache
6. close browser
7. visit main calendar... can see events, but no details.
8. view mini... can see events, but no details.

9. login into calendar, admin = show events = logged in only.
10. save. log out.
11. clear cache, close browser
12. visit main calendar... can see events, but no details.
13. view mini... can see events, AND details.

Stumped lol
Posted:  28 Jul 2016 10:48
Try renaming mini so it can't show in page when viewing with browser. After when mini doesn't show in page rename back again. I know it seems dumb but on rare occasion I have had to go that far to get something to display properly.

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

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  28 Jul 2016 14:38
Thanks for the suggestion Dan, but i tried that.. no joy :(

however, i spotted some mini calendar settings at the bottom of admin.
Event fields - mini calendar hover box: 12345

i changed this to 1
note: it does say "if none specified then its disabled. but if you leave box empty, you get
"missing or invalid settings (background highlighted" as an error message ?

but..this does fix my problem, as when i use full calendar. i can see details (once logged in)
and the mini is just now only showing the title. (as i dont have a venue listed)
Posted:  28 Jul 2016 22:52
Sorry, sorry, sorry, I made a mistake sad

The code should be:

Code:


if ($set['details4All'] == 1) {
    $popText .= '<br>'.makeE($evt,$set['popFieldsMcal'],'br',"<br>");
}

So on the first line " == 1" should be added.
Sorry for the inconvenience.
Roel
Posted:  10 Aug 2016 13:40
Thanks Roel
That's fixed it :)