_TOGGLE

Donations

Donate with PayPal!
Help support Pro_News and become a member of our Sponsors Group
The tip jar is at PayPal, but does not require a PayPal account
Anonym $ 10.00
macavity $ 115.00
RedGerry £ 50.00
Anonym $ 10.00
minor $ 20.00

Recommended ISP

Tweak to Small Month block to hide New Year's Day, etc.

Tweaks to CPGNuCalendar
Svar på EmneSvar på Emne Utskriftsvennlig side

Tweak to Small Month block to hide New Year's Day, etc.

Innlegg Skrevet: Lør Feb 24, 2007 1:28 am

If you want Small Month block to meaningfully show events, you do not want New Year's Day, Valentine's Day, etc., showing up as events just like real events.

Fix is straightforward.

For each of the calendar date psuedo events, go in and modify them to have Low Priority.

Then in /modules/CPGNuCalendar/includes/functions.inc look for these 2 lines (they occur separately, but both are in the hasevents function):

PHP:
if ($ev[$i]['view'] == 0 || in_group($ev[$i]['view']) || is_user() || can_admin($cal_module_name))
if (
$rep[$i]['view'] == 0 || in_group($rep[$i]['view']) || is_user() || can_admin($cal_module_name))



Change them to the following lines respectively (adding a priority check to the end of each line):

PHP:
if (($ev[$i]['view'] == 0 || in_group($ev[$i]['view']) || is_user() || can_admin($cal_module_name)) && $ev[$i]['priority'] != 1)
if ((
$rep[$i]['view'] == 0 || in_group($rep[$i]['view']) || is_user() || can_admin($cal_module_name)) && $rep[$i]['priority'] != 1)



That's it. Just make sure that all real events are set with medium or high priority, and only dates with those priorities will be filled in your small month calendar display.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Innlegg: 1229
Ble medlem: Mar 18, 2006
Link  QR  Share this Utskriftsvennlig side  facebook   myspace   twitthis  
Show more ...
Vis Innlegg fra:   
Svar på EmneSvar på Emne Side 1 av 1

CPGNuCalendar

Gå til:  



Du kan ikke starte nye emner i dette forumet
Du kan ikke svare på emner i dette forumet
Du kan ikke endre dine egne innlegg i dette forumet
Du kan ikke slette dine egne innlegg i dette forumet
Du kan ikke delta i avstemninger i dette forumet
Du kan ikke legge til filer i dette forumet
Du kan laste ned filer fra dette forumet

Alle klokkeslett er GMT






layingback Non-Human Terms of Use