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
[Résolu]Génération des vignettes dans le sommaire des articles
#1
Citation :#~~~~~ DEBUT BLOC A NE PAS SUPPRIMER ~~~~~
#~ Version du CMS: #1.11.1
#~ Url du site : localhost
#~ Hébergeur / Soft : amen
#~ Informations Système :
#~ ----------------------------------------------
#~ Cms Version: 1.11.1
#~ Installed Modules:
#~ CMSMailer: 5.2.1
#~ CMSPrinting: 1.0.3
#~ FileManager: 1.4.0
#~ MenuManager: 1.8.3
#~ MicroTiny: 1.2.3
#~ ModuleManager: 1.5.5
#~ News: 2.12.8
#~ Search: 1.7.7
#~ ThemeManager: 1.1.7
#~ CGExtensions: 1.26.2
#~ Uploads: 1.14.2
#~ CGCalendar: 1.9.6
#~ Config Information:
#~ php_memory_limit:
#~ process_whole_template:
#~ output_compression:
#~ max_upload_size: 10000000
#~ url_rewriting: mod_rewrite
#~ page_extension: .html
#~ query_var: page
#~ image_manipulation_prog: GD
#~ auto_alias_content: true
#~ locale:
#~ default_encoding: utf-8
#~ admin_encoding: utf-8
#~ set_names: true
#~ Php Information:
#~ phpversion: 5.3.8
#~ md5_function: On (Vrai)
#~ gd_version: 2
#~ tempnam_function: On (Vrai)
#~ magic_quotes_runtime: Off (Faux)
#~ E_STRICT: 0
#~ E_DEPRECATED: 0
#~ memory_limit: 128M
#~ max_execution_time: 60
#~ output_buffering: 1
#~ safe_mode: Off (Faux)
#~ file_uploads: On (Vrai)
#~ post_max_size: 10M
#~ upload_max_filesize: 10M
#~ session_save_path: c:/wamp/tmp (0777)
#~ session_use_cookies: On (Vrai)
#~ xml_function: On (Vrai)
#~ xmlreader_class: On (Vrai)
#~ Server Information:
#~ Server Api: apache2handler
#~ Server Db Type: MySQL (mysqli)
#~ Server Db Version: 5.5.16
#~ Server Db Grants: Trouvé un privilège "GRANT ALL" qui semble être adapté
#~ ----------------------------------------------
#~~~~~ FIN BLOC A NE PAS SUPPRIMER ~~~~~



Bonjour,

Je reviens sur le post http://www.cmsmadesimple.fr/forum/viewtopic.php?id=3318.
J'ai insérer ceci dans mon gabarit sommaire :
Code :
[== Indéfini ==]
{if $entry->image neq ''}
  {capture assign='photoarticle'}uploads/news/id{$entry->id}/{$entry->image}{/capture}

   <img src="{supersizer url=true width=220  path=$photoarticle}" alt="{$entry->title}" />

{/if}


Au début tout marchait parfaitement, mais depuis quelque jours, lorsque je crée mon article et que je joint la photo, dans le sommaire plus rien ne s'affiche. J'ai bien evidemment créé un champ supplémentaire dans le module Articles (définition de champs). Ce champ est un fichier. Je l'ai appelé "image".

Je vous donne mon gabarit sommaire :

Code :
[== Indéfini ==]
  <!-- Start News Display Template -->
{* This section shows a clickable list of your News categories. *}

<!--
<ul class="list1">
{foreach from=$cats item=node}
{if $node.depth > $node.prevdepth}
{repeat string="<ul>" times=$node.depth-$node.prevdepth}
{elseif $node.depth < $node.prevdepth}
{repeat string="</li></ul>" times=$node.prevdepth-$node.depth}
</li>
{elseif $node.index > 0}</li>
{/if}
<li{if $node.index == 0} class="firstnewscat"{/if}>
{if $node.count > 0}
    <a href="{$node.url}">{$node.news_category_name}</a>{else}<span>{$node.news_category_name} </span>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node.depth-1}</li>
</ul>

-->

{* this displays the category name if you're browsing by category *}
<!--
{if $category_name}
<h1>{$category_name}</h1>
{/if}
-->
{* if you don't want category browsing on your summary page, remove this line and everything above it *}

<div class="news-pagination">
{if $pagecount > 1}

{if $pagenumber > 1}
<div class="firstpage">{$firstpage}</div>
<div class="prevpage">{$prevpage}</div>
{/if}

<div class="pagetext">{$pagetext}&nbsp;{$pagenumber}&nbsp;{$oftext}&nbsp;{$pagecount}</div>

{if $pagenumber < $pagecount}
<div class="nextpage">{$nextpage}</div>
<div class="lastpage">{$lastpage}</div>
{/if}

{/if}
</div>


{foreach from=$items item=entry}

<div class="NewsSummary">
<!--
{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>

<!--
<div class="NewsSummaryCategory">
    {$category_label} {$entry->category}
</div>

{if $entry->author}
    <div class="NewsSummaryAuthor">
        {$author_label} {$entry->author}
    </div>
{/if}
-->


{if $entry->summary}

<div class="NewsSummaryImage">
  {if $entry->image neq ''}
  {capture assign='photoarticle'}uploads/news/id{$entry->id}/{$entry->image}{/capture}
  <a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">
      <img src="{supersizer url=true width=100 height=80 path=$photoarticle}" alt="{$entry->title}" />
  </a>
{/if}
</div>


    <div class="NewsSummarySummary">
        {eval var=$entry->summary}
        <div class="NewsSummaryMorelink clear">
        {$entry->morelink}
    </div>
</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 -->


J'ai vidé mon cache n fois mais en vain.
Quelqu'un peut il m'éclairer?


Messages dans ce sujet

Atteindre :


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