MyBB Community Forums

Full Version: RSS Syndication?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello, I would like to change Syndication.php so that it will show the author's avatar, the author's name, and the author's reputation, and after the post, postbit buttons. I am inserting this into an HTML page, so if you could include how to do that.
I am no PHP whiz...
My feed is:
http://toontownresistance.org/forums/syn...,6&limit=2

and the postbits I would like to display are at here:
http://toontownresistance.org/forums/ima...t/english/

this isn't really what an RSS feed is for ... you should find another way to pull the content.
Your website does not come up for me.
Are you sure you went to

http://toontownresistance.org/forums/
Actually, change of plans, I would like to know what feed the portal page pulls from
The portal doesn't pull from a feed, it queries the database...
And how can I do that in HTML?
You can't. You need to use PHP to do it.
You can't do it dynamically in HTML, HTML is not dynamic, you'll need PHP to query the database, or javascript or something to parse an RSS feed of all posts or something.
This is the code my HTML Page is using.

<head><title>Toontown Resistance</title>
<script type="text/javascript">
var TimeToFade = 1000.0;

function fade(eid)
{
  var element = document.getElementById(eid);
  if(element == null)
    return;
   
  if(element.FadeState == null)
  {
    if(element.style.opacity == null 
        || element.style.opacity == '' 
        || element.style.opacity == '1')
    {
      element.FadeState = 2;
    }
    else
    {
      element.FadeState = -2;
    }
  }
    
  if(element.FadeState == 1 || element.FadeState == -1)
  {
    element.FadeState = element.FadeState == 1 ? -1 : 1;
    element.FadeTimeLeft = TimeToFade - element.FadeTimeLeft;
  }
  else
  {
    element.FadeState = element.FadeState == 2 ? -1 : 1;
    element.FadeTimeLeft = TimeToFade;
    setTimeout("animateFade(" + new Date().getTime() + ",'" + eid + "')", 33);
  }  
}
function animateFade(lastTick, eid)
{  
  var curTick = new Date().getTime();
  var elapsedTicks = curTick - lastTick;
  
  var element = document.getElementById(eid);
 
  if(element.FadeTimeLeft <= elapsedTicks)
  {
    element.style.opacity = element.FadeState == 1 ? '1' : '0';
    element.style.filter = 'alpha(opacity = ' 
        + (element.FadeState == 1 ? '100' : '0') + ')';
    element.FadeState = element.FadeState == 1 ? 2 : -2;
    return;
  }
 
  element.FadeTimeLeft -= elapsedTicks;
  var newOpVal = element.FadeTimeLeft/TimeToFade;
  if(element.FadeState == 1)
    newOpVal = 1 - newOpVal;

  element.style.opacity = newOpVal;
  element.style.filter = 'alpha(opacity = ' + (newOpVal*100) + ')';
  
  setTimeout("animateFade(" + curTick + ",'" + eid + "')", 33);
}</script>
</head>
<body onload="fade(1); fade(3)" background="background/pattern.png">
<center><div id="1"  style=" opacity: 0; background: url(background/back.png); width: 800px; height: 678px; position: relative; right: 1px;"><img  src="background/top.png" style="opacity: 1;"><br><div id="3" style="opacity: 0; background: url(background/menu.png) no-repeat; width: 800px; height: 449px; position: relative; right: 1px;"><br><br><br><br><center><p style="width: 500px; height: 300px; overflow: auto; border: 0px; list-style: none;"></p></center></div></div></center>

Is there a way to translate it into PHP, then Querying the Database so that it fits into:
<p style="width: 500px; height: 300px; overflow: auto; border: 0px; list-style: none;"></p>
Pages: 1 2