cgcalendar do not work :(

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
PowaBanga
New Member
New Member
Posts: 3
Joined: Sat May 28, 2022 10:12 am

cgcalendar do not work :(

Post by PowaBanga »

hi everybody !

I am noob here :) . I discover cmsmadesimple. I installed it in a debian docker, and all work fine.

I actually try to understand cgcalendar, i installed it, it work in pannel admin, and i added a new content page "calendar" with this in :

Code: Select all

 

{cms_jquery}
{cgjs_render}

{CGCalendar}

{cms_module module="CGCalendar"}
But my calendar don't appear on my site :(

Does anybody can help me to find what i did wrong please ? :)
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1619
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: cgcalendar do not work :(

Post by DIGI3 »

It's not the most intuitive module to set up (and I should point out that it's no longer supported, but there is a fork on the way I hear).

Without seeing your page template it's hard to tell, but you need to make sure you understand what each of the tags you're adding are actually doing.

{cms_jquery}, which should be in the <head> section of your page template, tells the CGExtensions module that you want to load jquery and jquery-ui. If your template already uses jquery then you probably don't need this.

{cgjs_render} tells the CGExtensions module to render all javascript it's been told to - in this case, jquery and jquery-ui. It will add the <__script__> tags exactly where you put this call in your template, so generally either the <head> or just below the closing <__body> is ideal.

{CGCalendar} loads the calendar module and will output the calendar (assuming everything is set up correctly) where the tag is placed.

{cms_module module=CGCalendar} is just the long form of the above, you should choose one.

If the above all seems correct, then the best things to check for errors are:
-javascript console. For this module in particular this is the most likely place to find errors
-validate your html.
-check your php error log.
-check the cmsms admin log
Not getting the answer you need? CMSMS support options
User avatar
PowaBanga
New Member
New Member
Posts: 3
Joined: Sat May 28, 2022 10:12 am

Re: cgcalendar do not work :(

Post by PowaBanga »

Ok, here is my cms on the calendar page : http://sentiersetcompagnie-wordpress.po ... calendrier
here i installed cmsmadesimple with some content and "simplex" design. I modified the file in gabaryt -> simplex

Code: Select all

{strip}
{* used for page specific data or logic in Edit Content -> Logic *}
{process_pagedata}

{* ================
   THEME LOGIC
   ================ *}
    
{* With cms_lang_info we retrieve current language information, assign gives us $nls variable we can work with *}
{cms_lang_info assign='nls'}
{* assigned url to theme related folder so we do not have to type full path each time *}
{$theme_path = "{uploads_url}/simplex"}
{* assigned content tag, now we have all smarty variables available anywhere in template *}
{* assigned title tag to a variable which we can override with a module entry title for example *}
{title assign='main_title'}
{content assign='main_content'}
{* assigned prev and next links so we don't have empty html tags if there is no previous or next page *}
{cms_selflink dir='previous' assign='prev_page'}
{cms_selflink dir='next' assign='next_page'}

{* ensure that the smarty variables we created are copied to global scope for use elsewhere in the template *}
{share_data scope=parent vars='nls,theme_path,main_title,main_content,prev_page,next_page' scope=global}

{* using strip as we don't want useless whitespace, especially not before doctype *}
{/strip}<!doctype html>
<!--[if IE 8]>         <__html lang='{$nls->htmlarea()}' dir='{$nls->direction()}' class='lt-ie9'> <![endif]-->
<!--[if gt IE 8]><!--> <__html lang='{$nls->htmlarea()}' dir='{$nls->direction()}'> <!--<![endif]-->
    <head>
        <meta charset='{$nls->encoding()}' />
        {metadata} {* Don't remove this! Metadata is entered in Site Admin/Global settings. *}
        <title>{$main_title nocache} - {sitename}</title>
        <meta name='HandheldFriendly' content='True' />
        <meta name='MobileOptimized' content='320' />
        <meta name='viewport' content='width=device-width, initial-scale=1' />
        <meta http-equiv='cleartype' content='on' />
        <meta name='msapplication-TileImage' content='{$theme_path}/images/icons/cmsms-152x152.png' />
        <meta name='msapplication-TileColor' content='#5C5A59' />
        {if isset($canonical)}<link rel='canonical' href='{$canonical}' />{elseif isset($content_obj)}<link rel='canonical' href='{$content_obj->GetURL()}' />{/if} {* See in news detail template how cannonical url can be assigned from module *}
        {cms_stylesheet} {* This is how all the stylesheets attached to this template are linked to *}
        <link href='//fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic|Oswald:700' rel='stylesheet' type='text/css' />
        <link rel='apple-touch-icon-precomposed' sizes='152x152' href='{$theme_path}/images/icons/cmsms-152x152.png' />
        <link rel='apple-touch-icon-precomposed' sizes='120x120' href='{$theme_path}/images/icons/cmsms-120x120.png' />
        <link rel='apple-touch-icon-precomposed' sizes='72x72' href='{$theme_path}/images/icons/cmsms-76x76.png' />
        <link rel='apple-touch-icon-precomposed' href='{$theme_path}/images/icons/cmsms-60x60.png' />
        <link rel='shortcut icon' sizes='196x196' href='{$theme_path}/images/icons/cmsms-196x196.png' />
        <link rel='shortcut icon' href='{$theme_path}/images/icons/cmsms-60x60.png' />
        <link rel='icon' href='{$theme_path}/images/icons/favicon_cms.ico' type='image/x-icon' />
        {cms_selflink dir='start' rellink='1'} {* Relational links for interconnections between pages, good for accessibility and Search Engine Optmization *}
        {cms_selflink dir='prev' rellink='1'}
        {cms_selflink dir='next' rellink='1'}
        <!--[if lt IE 9]>
            <__script__ src="//html5shiv.googlecode.com/svn/trunk/html5.js"></__script>
            <__script__ src="//css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></__script>
        <![endif]-->
        {cms_jquery} 
        {cgjs_render}
    </head>
    </__body id='boxed' class='container page-wrapper page-{$page_alias} page-{$content_id}'>
        <!-- #wrapper (wrapping content in a box) -->
        <div class='row' id='wrapper'>
            <!-- accessibility links, jump to nav or content -->
            <ul class="visuallyhidden">
                <li>{anchor anchor='nav' title='Skip to navigation' accesskey='n' text='Skip to navigation'}</li>
                <li>{anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}</li>
            </ul>
            <!-- accessibility //-->
            <!-- .top (top section of page containing logo, navigation search...) -->
            <header class='top inner-section'>
                <div class='row header'>
                    <!-- .logo (cmsms logo on the left side) -->
                    <div class='logo four-col'>
                        <a href='{root_url}' title='{sitename}'>
                            <img src='{$theme_path}/images/cmsmadesimple-logo.png' width='227' height='59' alt='{sitename}' />
                            <span class='palm'></span>
                        </a>
                    </div>
                    <!-- .logo //-->
                    <!-- .main-navigation (main navigation on the right side) -->
                    <nav class='main-navigation eight-col cf noprint' id='nav' role='navigation'>
                        {Navigator loadprops='0' template='Simplex Main Navigation'} {* A Navigator module, database Template *}
                    </nav>
                    <!-- .main-navigation //-->
                </div>
                <!-- .header-bottom (bottom part of header containing catchphrase and search field) -->
                <div class='row header-bottom'>
                    <section class='phrase cf'>
                        <span class='seven-col phrase-text'>Power for professionals<br class='lt-768' /> Simplicity for End Users</span>
                        {Search|strip formtemplate='Simplex Search'} {* Search module using custom template in Design Manager, you should use resultpage parameter for search results (see module help) *}
                    </section>
                </div>
                <!-- .header-bottom //-->
                <!-- .banner (banner area for a slider or teaser image) -->
                 <img src="{uploads_url}/images/Banner.jpg" width="100%">
                <!-- .banner //-->
            </header>
            <!-- .top //-->
            <!-- .content-wrapper (wrapping div for content area) -->
            <main role='main' class='content-wrapper inner-section'>
                <div class='row'>
                    <!-- .content-inner (display content first) -->
                    <div class='content-inner eight-col push-four'>
                        <!-- .content-top (breadcrumbs) -->
                        <div class='content-top cf' itemscope itemtype='http://data-vocabulary.org/Breadcrumb'>
                            {Navigator action='breadcrumbs'} {* you can create own breadcrumbs template as well and include it with template parameter *}
                            <span class='title-border' aria-hidden='true'></span>
                        </div>
                        <!-- .content-top //-->
                        <!-- .content (actual content with title and content tags) -->
                        <article class='content' id='main'>
                            <h1>{$main_title nocache} </h1> {* title tag *}
                                {$main_content nocache} {* content entered in page editor area, variable is assigned on top in template logic, using nocache as variables are cached with Smarty cache on *}
                        </article>
                        <!-- .content //-->
                    </div>
                    <!-- .content-inner //-->
                    <!-- .sidebar (then show sidebar) -->
                    <aside class='sidebar four-col pull-eight'>
                        {* sample of using News Module tag for summary of latest two articles, remember if News page is deleted you should change detailpage parameter *}
                        {News summarytemplate='Simplex News Summary' number='2' detailtemplate='Simplex News Detail'}
                    </aside>
                    <!-- .sidebar //-->
                    <div class='cf eight-col push-four'>
                        {if !empty($prev_page)}<span class='previous'>{$prev_page nocache}</span>{/if}
                        {if !empty($next_page)}<span class='next'>{$next_page nocache}</span>{/if}
                    </div>
                </div>
            </main>
            <!-- .content-wrapper //-->
            <!-- .footer (footer area) -->
            <footer class='footer inner-section'>
                <span class='back-top'><a href='{anchor anchor='main' onlyhref='1'}' id='scroll-top'><i class='icon-arrow-up' aria-hidden='true'></i></a></span>
                <div class='row'>
                    <section class='eight-col push-four noprint'>
                        <nav class='footer-navigation row'>
                            {Navigator template='Simplex Footer Navigation' excludeprefix='home' number_of_levels='2' loadprops='0'}
                        </nav>
                    </section> 
                    <section class='four-col pull-eight copyright'>
                        {global_content|strip name='Simplex Footer'} {* generic Design Manager template *}
                    </section>
                </div>
            </footer>
        <!-- #wrapper //--> 
        </div>
    {cms_jquery exclude='ui,nestedSortable,json,migrate' append='uploads/simplex/js/jquery.sequence-min.js,uploads/simplex/js/functions.min.js'}{strip}
    {* if you are using some older jQuery plugin that relies on deprecated and removed functions that are no longer supported
       in jQuery 1.11.0 try removing "migrate" from exclude list which will include jQuery Migrate 1.2.1 Plugin.
       For more information about removed functions see: http://jquery.com/upgrade-guide/1.9/ *}{/strip}
    <__body>
</__html>
You spoke about a fork. In my case in need a calendar that i can idealy modify from google, so if it support .ics format (or other) it's ok. Is there some alternative that can be good for me ? if somebody know where i can find this possibly fork you are welcome too :)

And finaly, where can i find the php error and admin log ?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1619
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: cgcalendar do not work :(

Post by DIGI3 »

I see an error in the console, so that's a good place to start. It could be related to the fact you have all your scripts and the module loaded twice, but I'm not sure. I just did a quick test by putting {CGCalendar} in a page template, and {cms_jquery} and {cgjs_render} just before the <__body> tag in my template and the calendar worked fine.

PHP error log depends on your hosting setup, but is usually in the site root as a file called error_log, and may have an additional one in /admin. You can google how to enable it and find it. The Admin log is under Site Admin > Admin Log.
Not getting the answer you need? CMSMS support options
User avatar
PowaBanga
New Member
New Member
Posts: 3
Joined: Sat May 28, 2022 10:12 am

Re: cgcalendar do not work :(

Post by PowaBanga »

ok, for my needs, i think i will probable first use an iframe of google calendars, i do not need more for now in fact :)

Thank you very much for your answer !
Last edited by PowaBanga on Sun Jun 05, 2022 5:46 pm, edited 1 time in total.
Post Reply

Return to “Modules/Add-Ons”