Anyone have an iframe code to display recent posts/replies on a non XF site?

drastic

Well-known member
We use a different script (not WP) for our homepage and XF as our forum.

I'd like to use either an iframe or something else to display the recent posts/replies on our frontend.

Anyone have something to do this?

I think it could help our front-end readers see the activity and get engaged.

Thanks!
 
I would do this , as mentioned by others, with RSS feed.

However there is a bit of a workaround that I think might work. But don't blame me if not and be backed up before doing it.

  • Create a new style
  • edit the page_container template for that style so its stripped right down to just showing the contents of the widget
  • Create a page node with the whats new widget.
  • Give that page node a style override with the new style you created
  • Then use the URL of that page node in your iframe.
EDIT:

Page_container could be as simple as this

Code:
<!DOCTYPE html>
<html >
<head>
<base href="your_domain/" target="_PARENT">
</head>
<body>
{$content|raw}
</body>
</html>

This will not use your site's CSS, to do that add <xf:macro template="helper_js_global" name="head" arg-app="public" /> into the <head>
 
Last edited:
But I just found that xenforo seems to have X-Frame-Options blocked by deault, so you'd need to find out where to disable that

EDIT:

config.php

Code:
$config['enableClickjackingProtection'] = false;
 
Last edited:
Good info so far and appreciate it.

We have a custom script/homepage that doesn't use XF and we are struggling big time to get readers INTO the forum. I'm thinking that readers need to SEE the activity on our front-end to see what they're missing, because trying to convince them to "join" or "chat" in the forums hasn't worked in at least a year.

I have failed a LOT at growing a forum...
 
I'm thinking that readers need to SEE the activity on our front-end to see what they're missing, because trying to convince them to "join" or "chat" in the forums hasn't worked in at least a year.

In that case the simplest is an RSS feed, but as mentioned you can also use an iframe.

I have feeds from my forum onto my other site, and it works very well and is much simpler than setting up an iframe that shows just the posts.

See:


Here there are multiple feeds from various different forums/subforums
 
In that case the simplest is an RSS feed, but as mentioned you can also use an iframe.

I have feeds from my forum onto my other site, and it works very well and is much simpler than setting up an iframe that shows just the posts.

See:


Here there are multiple feeds from various different forums/subforums
Agreed. That's what I suggested earlier:

 
Back
Top Bottom