Jump to content
LemmeCheck.Info

Creating An Rss Feed In Tgpx


Robert
 Share

Recommended Posts

To create an RSS feed for your TGPX site, use the following code:

{define name=globaldupes value=true}
{define name=pagedupes value=false}
{php} echo '<?xml  version="1.0" ?>'; {/php}

<rss version="2.0">
  <channel>
    <title>YOUR SITE NAME</title>
    <description>YOUR SITE DESCRIPTION</description>
    <link>YOUR SITE URL</link>
{galleries
var=$galleries
preview=true
type=any
category=MIXED
amount=25
getnew=true
allowused=true
order=date_approved
reorder=date_displayed DESC, date_approved}

{foreach var=$g from=$galleries}
    <item>
      <title>{$g.thumbnails|htmlspecialchars} {$g.category|htmlspecialchars} {$g.format|htmlspecialchars}</title>
      <link>{$g.gallery_url|htmlspecialchars}</link>
      <description>
	  &lt;a href=&quot;{$g.gallery_url|htmlspecialchars}&quot; title=&quot;Thumb&quot;&gt;&lt;img src=&quot;{$g.preview_url|htmlspecialchars}&quot; alt=&quot;Thumb&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
	  &lt;br /&gt;&lt;br /&gt;
	  {$g.description|htmlspecialchars}
      </description>
      <pubDate>{$g.date|tdate::'D, d M Y H:i:s -0600'}</pubDate>
    </item>
{/foreach}

  </channel>
</rss>

Note, you need to replace the text, "YOUR SITE NAME", "YOUR SITE DESCRIPTION" and "YOUR SITE URL" with your own information.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. policies