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
CGFeedMaker et news
#6
Voici mon gabarit de mon flux : ceci est le model par défaut

Citation :{* original rss feed template *}
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
{* note: if you have not configured pretty urls or mod rewrite, the next line may fail when trying to validate the feed *}
<atom:link href="{$feed_url}" rel="self" type="application/rss+xml" />
<title>{$feed.title}</title>
{if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
{if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
{if isset($feed.copyright) && !empty($feed.copyright)}<copyright>{$feed.copyright}</copyright>{/if}
{if isset($generator)}<generator>{$generator}</generator>{/if}
{if isset($feed.managing_editor) && !empty($feed.managing_editor)}<managingEditor>{$feed.managing_editor}</managingEditor>{/if}
{if isset($admin_email)}<webMaster>{$admin_email} ({$admin_user->firstname} {$admin_user->lastname})</webMaster>{/if}
{if isset($feed.image) && !empty($feed.image)}
<image>
{if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
{if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
<title>{$feed.title}</title>
<url>{$file_location}/{$feed.image}</url>
</image>
{/if}

{* an example of how to create a feed from a call to the news module *}
{* you can use any smarty variable that is available in the news summary template *}
{* you can substitute this logic with output from any module that supports a summary
view, or possibly get artistic and mix output from different modules *}
{news assign='junk'}
{if isset($items)}
{foreach from=$items item='entry'}
<item>
<title>{$entry->title|cms_html_entity_decode}</title>
<link>{$entry->moreurl}</link>
{capture assign='description'}{if isset($entry->summary)}{$entry->summary}{else}{$entry->content}{/if}{/capture}
<description>{$description|trim|strip_tags|summarize:40}</description>
<pubDate>{$entry->postdate|rfc_date}</pubDate>
<guid>{$entry->moreurl}</guid>
</item>
{/foreach}
{/if}
</channel>
</rss>


A JCE
mon but finale est que la fille ajoute une news et que les personnes surfant sur son site sur la page news voient les news et après je récupère le RSS pour l'intégrer sur sa page facebook automatiquement.

ps: je vous remercie déjà d'avance pour votre aide



01:08 : C'est tout bon j ai trouvé j avais pas activé les pretty url's voici la raison pourquoi cela ne fonctionnais pas.
Je vais préparé un tutorial "youtube" dans les prochains jours pour les "noob" comme moi :-)
Répondre


Messages dans ce sujet

Atteindre :


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