vytvoril som uzivatelske tag feedburner_counter, ktory mera pocet citatelov feedu vo feedburneri (viď nižšie), problem ale mam s vytvorenim podmienky s tymto tagom
toto mi nefunguje v sablone (asi treba v tom tágu assignovat premennu ale neviem ako):
{feedburner_counter assign="feedburner_counter"}
{$feedburner_counter}
{if $feedburner_counter=="1"}čitateľ
{elseif $feedburner_counter>="2" and $feedburner_counter<="4"}čitatelia
{else}čitateľov
{/if}
Code: Select all
//get cool feedburner count
$whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=nieco-sk";
//Initialize the Curl session
$ch = curl_init();
//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Set the URL
curl_setopt($ch, CURLOPT_URL, $whaturl);
//Execute the fetch
$data = curl_exec($ch);
//Close the connection
curl_close($ch);
$xml = new SimpleXMLElement($data);
$feedburner_counter = $xml->feed->entry['circulation'];
//end get cool feedburner count
echo $feedburner_counter;