Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

[Résolu]News défilantes
#26

Tu pourrais au moins mettre en minuscule les <DIV> et mettre la / de fermeture des balises.
Supprime <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> de ton gabarit de news.
#27

Si je supprime la ligne : le slider lance la premiere news mais il charge la deuxieme pendant un bout de temps Sad et du coup impossible de changer de news

Cool
#28

Tu as ceci comme fichier non trouvé : http://www.montjoie.asso.fr/%5B%5Broot_u...nation.png
On dirait un [[root_url]].
#29

C'est pour "les petits points verts" pour la pagination qui auraient du apparaitre, mais c'est pas bien grave.

Normalement je l'ai désactivé dans le script :
Code :
[== Indéfini ==]
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="modules/NewsSlides/Linking/js/slides.min.jquery.js"></script>

    <script>
{literal}
        $(function(){
            // Set starting slide to 1
            var startSlide = 1;
            // Get slide number if it exists
            if (window.location.hash) {
                startSlide = window.location.hash.replace('#','');
            }
            // Initialize Slides
            $('#slides').slides({
                preload: true,
                preloadImage: 'modules/NewsSlides/Linking/img/loading.gif',
                generatePagination: false,
                play: 5000,
                pause: 2500,
                hoverPause: true,
                // Get the starting slide
                start: startSlide,
                animationComplete: function(current){
                    // Set the slide number as a hash
                    window.location.hash = '#' + current;
                }
            });
        });
{/literal}
    </script>

{if $itemcount > 0}    

<div id="container">
         <div id="example">
               <div id="slides">
            <div class="slides_container">

{foreach from=$items item=entry}
<div class="slide">

<div style="font-weight:bold; font-size:x-small;" class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>

{if $entry->postdate}
    <div style="font-size:x-small;" class="NewsSummaryPostdate">
        {$entry->postdate|cms_date_format}
    </div>
{/if}

{if $entry->summary}
    <div style="font-size:x-small;" class="NewsSummarySummary">
        {eval var=$entry->summary}
    </div>
    <!--<div style="font-size:xx-small;" class="NewsSummaryMorelink">-->
        {*$entry->morelink*}
        <div class="NewsSummaryMorelink">
<a href="{$entry->moreurl}"><img src="uploads/images/slideNews/detail.png" width="38px" height="21px" alt="Voir la news {$entry->title}"</a>
    </div>

{else if $entry->content}

    <div class="NewsSummaryContent">
        {eval var=$entry->content}
    </div>
{/if}

{if isset($entry->extra)}
    <div class="NewsSummaryExtra">
        {eval var=$entry->extra}
    {* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
    </div>
{/if}
{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsSummaryField">
        {if $field->type == 'file'}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}:&nbsp;{eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}

</div>
{/foreach}
<!-- End News Display Template -->
</div>
                <a href="#" class="prev"><img src="uploads/images/slideNews/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
                <a href="#" class="next"><img src="uploads/images/slideNews/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
            </div>
            <img src="modules/NewsSlides/Linking/img/example-frame.png" width="539" height="341" alt="Example Frame" id="frame">
        </div>
                   </div>
{/if}

Cool
#30

Si je remet le gabarit fourni avec le module à savoir :
Code :
[== HTML ==]
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="modules/NewsSlides/Linking/js/slides.min.jquery.js"></script>
<script>
{literal}
    $(function(){
    // Set starting slide to 1
        var startSlide = 1;
        // Get slide number if it exists
        if (window.location.hash) {
            startSlide = window.location.hash.replace('#','');
        }
        // Initialize Slides
        $('#slides').slides({
            preload: true,
            preloadImage: 'modules/NewsSlides/Linking/img/loading.gif',
            generatePagination: true,
            play: 5000,
            pause: 2500,
            hoverPause: true,
            // Get the starting slide
            start: startSlide,
            animationComplete: function(current){
                // Set the slide number as a hash
                window.location.hash = '#' + current;
            }
            });
        });
{/literal}
</script>
{if $itemcount > 0}    
<div id="container">
    <div id="example">
        <div id="slides">
            <div class="slides_container">
                {foreach from=$items item=entry}
                <div class="slide">
                {if $entry->postdate}
                <div class="NewsSummaryPostdate">
        {$entry->postdate|cms_date_format}
    </div>
{/if}

<div class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>



{if $entry->summary}
    <div class="NewsSummarySummary">
        {eval var=$entry->summary}
    </div>

    <div class="NewsSummaryMorelink">
        [{$entry->morelink}]
    </div>

{else if $entry->content}

    <div class="NewsSummaryContent">
        {eval var=$entry->content}
    </div>
{/if}

{if isset($entry->extra)}
    <div class="NewsSummaryExtra">
        {eval var=$entry->extra}
    {* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
    </div>
{/if}
{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsSummaryField">
        {if $field->type == 'file'}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}:&nbsp;{eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}

</div>
{/foreach}
<!-- End News Display Template -->
</div>
                <a href="#" class="prev"><img src="modules/NewsSlides/Linking/img/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
                <a href="#" class="next"><img src="modules/NewsSlides/Linking/img/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
            </div>
            <img src="modules/NewsSlides/Linking/img/example-frame.png" width="539" height="341" alt="Example Frame" id="frame">
        </div>
                   </div>

{/if}

J'ai bien que mes trois news.

Par contre avec mon gabarit modifier et bien ça fonctionne pas Sad
Code :
[== Indéfini ==]
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="modules/NewsSlides/Linking/js/slides.min.jquery.js"></script>

    <script>
{literal}
        $(function(){
            // Set starting slide to 1
            var startSlide = 1;
            // Get slide number if it exists
            if (window.location.hash) {
                startSlide = window.location.hash.replace('#','');
            }
            // Initialize Slides
            $('#slides').slides({
                preload: true,
                preloadImage: 'modules/NewsSlides/Linking/img/loading.gif',
                generatePagination: false,
                play: 5000,
                pause: 2500,
                hoverPause: true,
                // Get the starting slide
                start: startSlide,
                animationComplete: function(current){
                    // Set the slide number as a hash
                    window.location.hash = '#' + current;
                }
            });
        });
{/literal}
    </script>

{if $itemcount > 0}    

<div id="container">
         <div id="example">
               <div id="slides">
            <div class="slides_container">

{foreach from=$items item=entry}
<div class="slide">

<div style="font-weight:bold; font-size:x-small;" class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>

{if $entry->postdate}
    <div style="font-size:x-small;" class="NewsSummaryPostdate">
        {$entry->postdate|cms_date_format}
    </div>
{/if}

{if $entry->summary}
    <div style="font-size:x-small;" class="NewsSummarySummary">
        {eval var=$entry->summary}
    </div>
    <!--<div style="font-size:xx-small;" class="NewsSummaryMorelink">-->
        {*$entry->morelink*}
        <div class="NewsSummaryMorelink">
<a href="{$entry->moreurl}"><img src="uploads/images/slideNews/detail.png" width="38px" height="21px" alt="Voir la news {$entry->title}"</a>
    </div>

{else if $entry->content}

    <div class="NewsSummaryContent">
        {eval var=$entry->content}
    </div>
{/if}

{if isset($entry->extra)}
    <div class="NewsSummaryExtra">
        {eval var=$entry->extra}
    {* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
    </div>
{/if}
{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsSummaryField">
        {if $field->type == 'file'}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}:&nbsp;{eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}

</div>
{/foreach}
<!-- End News Display Template -->
</div>
                <a href="#" class="prev"><img src="uploads/images/slideNews/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
                <a href="#" class="next"><img src="uploads/images/slideNews/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
            </div>
            <img src="modules/NewsSlides/Linking/img/example-frame.png" width="539" height="341" alt="Example Frame" id="frame">
        </div>
                   </div>
{/if}

Cool
#31

@jean
Ton code
Citation :<a href="{$entry->moreurl}"><img src="uploads/images/slideNews/detail.png" width="38px" height="21px" alt="Voir la news {$entry->title}"</a>

est légèrement en erreur manque />

<a href="{$entry->moreurl}"><img src="uploads/images/slideNews/detail.png" width="38px" height="21px" alt="Voir la news {$entry->title}" /></a>


et la c'est bon

J-C Etiemble v 2.2.xx
#32

Effectivement, j'avais oublié cette fermeture en éditant le code pour qu'il corresponde au chemin de son image. Les experts en html l'auront corrigés d'eux-mêmes Wink
#33

Jean le Chauve a écrit :Effectivement, j'avais oublié cette fermeture en éditant le code pour qu'il corresponde au chemin de son image. Les experts en html l'auront corrigés d'eux-mêmes Wink

Merci je ne dois pas encore être un expert Big Grin

Résolu

Cool
Sujet fermé


Atteindre :


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