WebsiteBaker Community Forum

WebsiteBaker Support (2.12.x) => General Help & Support => Topic started by: Legaziofunk on January 09, 2020, 01:42:49 PM

Title: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 09, 2020, 01:42:49 PM
Hello folks,

happy effing new year ;-)

Sorry for being stupid these days, but that's how it feels!

Since my search on the above mentioned question did not result in any very concrete results, I am believing even more the answer must be simple!

Say, I want a section on one of my WB-pages to show a neat overview of a blog (here: a wordpress blog), how do I achieve this?
(In my case, I'd love to have this horizontally (cf. here, https://wbce.at/tpls/ where it is shown vertically - yup, I know, that's not a blog but comments, but you get the idea...))

- I fondled around with the "/feed"-option of Wordpress (means: wordpress provides you with the feed address by using www.yourblog.XX/feed by default)

- I tried using some add-ons such as news or so

But all that did not result in anything...!  :|

I guess, the solution is rather simple - or isn't it?   :lol:

Happy greetings nevertheless!

Your Legacy of Funk
...and keep on rocking in 2020 peepz!
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 09, 2020, 05:52:03 PM
Oh, and I forgot to add, I read something about WIDGETS in this context - but that dd not bring me any further, since there are a ot of widgets out there...

*shrug*
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: hgs on January 10, 2020, 08:02:15 AM
Lieber Legaziofunk

Wir wollen dir ja helfen, aber ich habe noch nicht begriffen was du genau machen möchtest.

Wir gehen auch immer davon aus, dass die neuste aktuelle WB-Version (2.12.2) und mindesten php7.x im Spiel ist.
Ist da so?

Also versuch es doch mal wie der Lehrer in der "Feuerzangenbole" als der Pauker die Dampfmaschine erklärt hat.
Er fing ungefähr so an:
Da stellen wir uns mal ganz dum an...

Ich möchte es wirklich verstehen, zur Zeit kann ich dir nicht weiter helfen.

DeepL
Dear Legaziofunk

We want to help you, but I haven't figured out exactly what you want to do.

We also always assume that the newest current WB version (2.12.2) and at least php7.x is in the game.
Is that so?

So try it like the teacher in the "Feuerzangenbole" when the teacher explained the steam engine.
He started like this:
Let's take a stupid approach...

I really want to understand. I can't help you right now.

Translated with www.DeepL.com/Translator (free version)
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: DarkViper on January 10, 2020, 08:49:37 AM
Die Aufgabenstellung an sich ist mir soweit klar. Du brauchst eine Ausgabe im Stil von AnyNews, allerdings ist die Datenquelle nicht das WB-Newsmodul, sondern der Blog, bzw. ein Blogabschnitt, aus WP.
Derzeit gibt es bei WB kein spezialisiertes Modul, das sich die erforderlichen Daten direkt aus einer Fremdanwendung wie WP holen kann. Jedoch gibt es auch dafür mögliche Lösungsansätze.
Der einfachste Ansatz dürfte die Nutzung des WP-RSS-Feeds als offene Schnittstelle sein. Soweit ich mich erinnern kann, gibt/gab es zu WebsiteBaker ein RSS-Reader-Modul. Dieses könnte genutzt werden um die Blogdaten von WP  (oder einem beliebigen anderen System) abzurufen. Diese Daten müssten dann zur Anzeige nur noch an ein entsprechendes Template übergeben werden.

The task itself is clear to me. You need an output similar to AnyNews, whereby the data source is not the WB news module, but the blog, or a blog section, from WP.
There is currently no specialized module at WB that can get the necessary data directly from a third-party application like WP. However, there are also possible solutions to this problem.
The simplest approach is probably to use the WP RSS feed as an open interface. As far as I can remember, there is/was an RSS reader module for WebsiteBaker. This could be used to get the blog data from WP (or any other system). This data would then only have to be transferred to a corresponding template for display.

Manuela
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 12, 2020, 11:04:27 PM
yup,
I'd say, Manuela got it!

Sorry, if my task at hand seemed a bit too confusing.

I also got the impression, there is no specialised tool for that - hence, my request.

The aforementioned RSS-Reader-Module is what I could not retrieve.

Where do I find this?

And how to procede from there exactly...?

Cheers!

Ups, I forgto to mention: YES! The technical stats are as required:

WB 2.12. AND latest PHP Version! :-)
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 13, 2020, 01:45:11 PM
so, I have used this one:

News Reader 0.3.8.1
https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=0C7B1671

and actually had tried it before and which I referred to as:
Quote
- I tried using some add-ons such as news or so

In other words: this thing is not exactly intuitively self-explaining ... LOL

Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 16, 2020, 01:27:32 PM
BUMP

I did not find AnyNews as a module... or anything else then the aforementioned News Reader which is a complete riddle to me how to use it properly...

Any help...?
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 16, 2020, 03:15:59 PM
I may point out (due to a specific personal request):

The WPress-site is running separately on a subdomain.

I want to feed the WP content onto the -> WBaker-site on the domain.

So the WBaker-Site shows (somewhere - preferably in one sidebar or a section) the WPress-content e.g. the last three blog posts or similar...

so the two sites are online and in my command/my original content.
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: hgs on January 17, 2020, 08:19:01 AM
Hier mal eine Version, die mir zugesteckt wurde

Da ich weder News noch AnyNews nutze, kann ich aber nichts zum Gebrauch sagen

DeepL:
Here's a version that was slipped to me

Since I use neither News nor AnyNews, I can't say anything about the use
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 17, 2020, 09:08:10 AM
Thanx.

Well, I installed it - but can't find it in the sections afterwards so I'm not even sure what went wrong...

I'm kinda confused now, because isn't implementing a blog into a website some staple issue...?

Frustrating...
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: hgs on January 17, 2020, 09:43:07 AM
Diese redme ist aus einer Version, die für ein Fork angepasst wurde.
Hoffe es erlärt die Vorgehensweise im Prinzip

DeepL
This redme is from a version that was adapted for a fork.
Hope it explains the procedure in principle
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: DarkViper on January 17, 2020, 09:44:49 AM
No need for frustration. ;)
I'll be back home late this afternoon and test the RSS reader addon.
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 17, 2020, 12:03:24 PM
No need for frustration. ;)
I'll be back home late this afternoon and test the RSS reader addon.

AWESOME!!
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: crnogorac081 on January 17, 2020, 06:00:11 PM
I told him to pot the link from WP feeder and I will create him droplet code, but no answer
Title: Re: Feeding a Wordpress blog into your WB-Site / droplet
Post by: crnogorac081 on January 19, 2020, 03:29:58 PM
here is droplet. Go to Admin / Admin tools / Droplet , add droplet, name it my_rss

add this code:
Code: [Select]
$rss = new DOMDocument();
$rss->load('http://blog.kloss.biz/feed/');
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,
);
array_push($feed, $item);
}
$limit = 5;
$out = '<div class="outer_feed">';
for($x=0;$x<$limit;$x++) {
$title = str_replace(' & ', ' &amp; ', $feed[$x]['title']);
$link = $feed[$x]['link'];
$description = $feed[$x]['desc'];
$date = date('l F d, Y', strtotime($feed[$x]['date']));
$out .= '<p class="outer_feed_title"><strong><a href="'.$link.'" title="'.$title.'">'.$title.'</a></strong><br />';
$out .='<small class="outer_feed_date"><em>Posted on '.$date.'</em></small></p>';
$out .='<p class="outer_feed_txt">'.$description.'</p>';
}
$out .= '</div>';
return $out;

then use it where ever you want using [[my_rss]]   including [[ ]]

cheers
Title: Re: Feeding a Wordpress blog into your WB-Site / droplet
Post by: Legaziofunk on January 19, 2020, 03:37:56 PM

then use it where ever you want using [[my_rss]]   including [[ ]]

Heaps of Thanx - but, this is the only part I'm confused with.

I never used droplets and therefore don't know what do to when "using it".

Where exactly do I need to put this
Code: [Select]
[[my_rss]]   including [[ ]] code and is this exactly how it's gonna be out in (empty brackets?)?
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: crnogorac081 on January 19, 2020, 04:01:56 PM
Follow my instructions. First make it. Then use it. 
To use it , you are calling it by name between [[Droplet name]] so in your canse if you name it my_rss you call it [[my_rss]]

You can add this droplet call inside wysiywg editor or code object, for example inside your template index.php file
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: hgs on January 19, 2020, 05:12:09 PM
Kurz getestet, es funktioniert so wie es beschrieben wurde.

DeepL
Briefly tested, it works as described.
(https://gyazo.com/9a6f3c322377e67e5cba800aec81ba22.png)
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 19, 2020, 05:27:50 PM
Follow my instructions. First make it. Then use it. 
To use it , you are calling it by name between [[Droplet name]] so in your canse if you name it my_rss you call it [[my_rss]]

You can add this droplet call inside wysiywg editor or code object, for example inside your template index.php file

Yup, I did that, but my outcome looks very different to Harald's: cf. http://christiankloss.de/ (I unlocked it...)

This is the site I am trying it first with.

(in my PMs aforementioned Structure 2)

Could it be that I need to add the CSS class="outer_feed" in the template.css first?
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: hgs on January 19, 2020, 08:11:04 PM
Ich habe nur in einem WYSIWYG das Dorplet aufgerufen.
Eine besondere css-Anweisung habe ich nicht vergeben.
(https://gyazo.com/47a6dbd1ed828d321db8732080d8df7f.png)

DeepL
I have only called the Dorplet in a WYSIWYG section.
I did not give a special css-statement.

Am Template kann es auch nicht liegen, hab es mal schnell installiert, Ergebnis:
(https://gyazo.com/a76cb01f47dec4f1a023642702ae9802.png)

It can also not be the template, I installed it quickly, result:
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 20, 2020, 12:25:56 PM
Thanx - man, what a drag...

Okay, I installed the actual blog now: blog.christiankloss .de which is supposed to be the one feeding into the christiankloss.de-Site.

(and accordingly later on: blog.kloss.biz feeding into kloss.biz - so having this "cross reference" was just to test if if and how this is gonna work...)

But with the according blogs fedding into the according websites:

blog.kloss.biz ->  kloss.biz
blog.christiankloss .de -> christiankloss.de

none of them works for me.
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: dbs on January 21, 2020, 10:04:55 AM
Seems it works now.
What was the problem?
Title: Re: Feeding a Wordpress blog into your WB-Site
Post by: Legaziofunk on January 21, 2020, 10:55:54 AM
SOLUTION

On the server site, you have to go to your script settings

and set

PHP-allow_url_fopen    -> On    
PHP-allow_url_include    -> On


What these functions exactly do: I do not know.

The Hoster helped me out with it and changed the settings.

This took appr. 12 h to do so since the second level support was involved.

Nevertheless, I am pleased with my hoster to have helped with this.

Also huge thanx to crnogorac081 for providing the code.

And for everybody else involved in the process.