Les avertissements suivants se sont produits :
Warning [2] Undefined array key 0 - Line: 1640 - File: showthread.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 1640 errorHandler->error_callback
/showthread.php 915 buildtree




Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Calendar CG gestion d'affichage
#2
Salut,
Question 1 : je n'ai pas le temps, ni l'envie de découper mon code (à toi de le faire) : je te mets l'original du gabarit avec popup en css du site duventdanslescordes.be :
Code :
[== Indéfini ==]{strip}
<table class="calendar" id="cal-calendar">
<caption class="calendar-month">
<span class="calendar-prev"><a href="{$navigation.prev}">&laquo;</a></span>&nbsp;
{$month_names[$month]}&nbsp;{$year}
&nbsp;<span class="calendar-next"><a href="{$navigation.next}">&raquo;</a></span>
</caption>
<tbody><tr>
{foreach from=$day_names item=day key=key}
<th>{$day_short_names[$key]}</th>
{/foreach}</tr>
<tr>
{* initial empty days *}
{if $first_of_month_weekday_number > 0}
<td colspan="{$first_of_month_weekday_number}">&nbsp;</td>
{/if}
{* iterate over the days of this month *}
{assign var=weekday value=$first_of_month_weekday_number}
{foreach from=$days item=day key=key}
{if $weekday == 7}
    {assign var=weekday value=0}
</tr>
<tr>
{/if}
<td {if isset($day.class)}class="{$day.class}"{/if}>
{if isset($day.events.0)}<span class="hov"><a href="{$day.url}">{$key}<!--[if gte IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<b>
{foreach from=$day.events item=event}
<a href="{$event.url}"><span>
{if isset($event.fields.m_affiche)}{* si le champ est rempli, on prend l'image dans Gallery/Artistes/ *}
{capture assign='affiche'}uploads/images/Gallery/Artistes/{$event.fields.a_alias}/{$event.fields.m_affiche}{/capture}{cms_module module="CGSmartImage" alias='thumb_catalogue' src=$affiche alt="Affiche du concert" class=''}
{elseif isset($event.fields.o_afficheAutre)}{* si le champ est rempli, on prend l'image dans Galery/chemin *}
{capture assign='afficheAutre'}uploads/images/Gallery/{$event.fields.o_afficheAutre}{/capture}{cms_module module="CGSmartImage" alias='thumb_catalogue' src=$afficheAutre alt="Affiche" class=''}
{else}{* si pas d'affiche, on prend l'image du catalogue *}
{capture assign='affiche'}uploads/images/catalog_src/{$event.fields.a_alias}_src_1.jpg{/capture}
{cms_module module="CGSmartImage" alias='thumb_catalogue' src=$affiche alt="Photo artiste" class=''}
          {/if}{$event.event_title}</span></a>
{/foreach}
</b><!--[if lte IE 6]></td></tr></table></a><![endif]-->
</span>
{else}{$key}{/if}
</td>
{math assign=weekday equation="x + 1" x=$weekday}
{/foreach}
{* remaining empty days *}
{if $weekday != 7}
<td colspan="{math equation="7-x" x=$weekday}">&nbsp;</td>
{/if}
</tr>
</tbody></table>
{/strip}
et la css :
Code :
[== Indéfini ==]
/*infobulle */

.hov table {position:absolute; border:0; border-collapse:collapse; left:0;}
.hov a {color:[[$Orange]];}
.hov b {display:none; font-weight:normal; width:200px; text-align:left;}
.hov:hover {position:relative; z-index:100;}
.hov a:hover, .hov:hover a {border:0; text-decoration:none; position:relative; }
.hov:hover b, .hov a:hover b {display:block; visibility:visible; position:absolute; right:0; top:10px; background:[[$BlancPur]]; cursor:pointer; border:1px dashed [[$vertPommeClair]]; font-size: 1.4em; padding:20px;box-shadow: 0px 0px 8px 4px rgba(0, 0, 0, 0.2); }
.hov b a { color:[[$vertPomme]]; text-decoration:none; background:transparent; display:block;clear:both; font-size:0.8em !important; margin-bottom:10px;}
.hov b a:hover {text-decoration:underline;}
table.calendar span.hov {
padding:6px;
border:1px dashed [[$vertPommeClair]];
}
Question 2 : La page sera toujours rechargée, mais tu peux faire en sorte que le calendrier reste au même endroit (pas au centre de la page) en ajoutant inline="1" dans ta balise d'appel de CGCalendar.
Répondre


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)