1
Peekay
How do I display a block from another Xoops site?
  • 2007/3/18 22:04

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I am sure I have seen this before, but can't find it (Guinness overdose playing a large part here I think)

For example, what code would I need to use to display the 'recent topics' block from this site on my own site (preferably by adding code via the blocks admin).
A thread is for life. Not just for Christmas.

2
JMorris
Re: How do I display a block from another Xoops site?
  • 2007/3/19 1:32

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


In the particular case you mentioned, without using a third-party "scraper" to gather the content you are wanting, I don't believe there is a way to do what you want to do.

The most common ways I know of doing such things is...

* RSS feeds for the content you want to display (the forum here does not have this)
* Using an IFRAME that is linked to an id in the page's HTML (again, won't work here)
* Using a module like BOoX (Blocks Outside of XOOPS) to display the content (again, won't work because BOoX is not installed on this site)
* Using a "content scraper" to gather the content you want and that will produce a RSS feed or Javascript for that content.

Now, there may be a way fetch the output of this site using a PHP include and strip the unwanted content, but that's much more advanced than I know how to do.

Sorry.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
nekro
Re: How do I display a block from another Xoops site?
  • 2007/3/19 2:06

  • nekro

  • Quite a regular

  • Posts: 213

  • Since: 2005/11/9


It is very probable that if you have a public or payed hosting you would not be able to do a php include from another site. For security reasons that kind of actions used to be disabled.
I recommend you to use an iframe... or RSS

4
Herko
Re: How do I display a block from another Xoops site?
  • 2007/3/19 9:47

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


And in many countries and with many content publishers, scraping is not an entirely legal practice. You're basically stealing content and displaying it as your own without permission.

Doesn't phppp's Digest module do this too?

Herko

5
Peekay
Re: How do I display a block from another Xoops site?
  • 2007/3/19 12:54

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


The post I was looking for is here The script jeffgr found is on dynamicdrive.com. It works like a ticker, however I also found a static version here

I have just tested it with News articles using backend.php as the URL and it works fine, but haven't tried it with a forum yet. I use CBB which has RSS output, but not sure how it works (i.e. not sure what the RSS URL is).

I will take a look at using a module, but I only need it for a block. Thx for the suggestion about Digest.
A thread is for life. Not just for Christmas.

6
Peekay
Re: How do I display a block from another Xoops site?
  • 2007/3/19 14:56

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Well, the script seems happy pulling feeds from news and articles modules, e.g.

/backend.php (News 1.44)
/modules/wfsection/backend.php (WF-Section 2.07b3)
/modules/smartsection/backend.php (SmartSection)

and... after some messing about, with my forum CBB 1.16a

/modules/newbb/rss.php?f=1

where f=n is the forum number. You MUST however allow anonymous users to view this forum, otherwise it will not work and you'll get a 'feed not found' error message.

EDIT : I've discovered you can also use:

/modules/newbb/rss.php?c=0

to pull a feed of all the forum categories, or use a number to target a specific category.

A thread is for life. Not just for Christmas.

Login

Who's Online

325 user(s) are online (258 user(s) are browsing Support Forums)


Members: 0


Guests: 325


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits