Jump to content
qlex

Adding RSS channel to processwire powered site

Recommended Posts

Hi,

congrats on processwire cms - it looks very clean and nice !

I have been asked by a client of mine, who is using processwire to update his website (somebody has created website using processwire and he's not available to help anymore) to login to admin panel and see if he can add rss support.

I need that RSS enabled (for a couple of pages, that he's updating regularly) so that my software (digital signage system) can parse and display his news.

How should i start and do it - without "breaking" his website ? After i login, i can see in modules section that there's "install" button next to Markup RSS Feed (which is strike-through). After that, is there anything more I should do ?

I have only access to panel, but not to ftp etc.

Thanks for your assistance!

Qlex
 

Share this post


Link to post
Share on other sites

Hi qlex and welcome to PW - hopefully you'll stick around after this client request :)

Here are the instructions for using the RSS module:

http://modules.processwire.com/modules/markup-rss/

Also, you may want to consider this enhanced version of the RSS module:

http://modules.processwire.com/modules/markup-rssenhanced/

Let us know if you need any specific help getting things to work.

  • Like 2

Share this post


Link to post
Share on other sites

adrian, thanks for the info.

Before my programmer helps me, I understand I can go ahead and hit "install" next to Markup RSS Feed. Then we would need to add piece of that code somewhere in those pages, that we want the rss feed to be created.

No need to display it on the client website (for the time being!), but important to get URL of the feed with news that we could parse with our app.


By installing and adding RSS, can the live site be broken - or is it rather secure to add this ?

Share this post


Link to post
Share on other sites

Never say never! - but it is rather secure  :)

Welcome to the forums, qlex

Share this post


Link to post
Share on other sites

I'm using RSS on my site like this:

1. Create a template "feed" or "rss"

2. Create a hidden page ("/feed/" or "/rss/" or whatever you want your url to be)

3. Uploading and customize the following file into template directory and update the field names

feed.php

  • Like 2

Share this post


Link to post
Share on other sites

Nico Knoll: thanx !
we installed the rss module without any problems just by hitting install.

to follow your suggestions, for number 3, we would need ftp access or is it doable just through admin ?

Share this post


Link to post
Share on other sites

@Nico

You used date(DATE_RFC2822) you're better of with date(DATE_RSS).
 
It's a W3c recomendation, some RSS clients have issues with DATE_RFC2822.
DATE_RFC2822 uses differences in Greenwich time and DATE_RSS uses time zone abbreviations.
So far I understand it depends on where you live if the client accepts the feed.
 
info:
  • Like 1

Share this post


Link to post
Share on other sites

Hello!

I tried to install RSS on my website. After install module in admin page I add template from example:

<?php

   $rss = $modules->get("MarkupLoadRSS");
   $rss->load("http://mydomain.com/news/");

   foreach($rss as $item) {
       echo "<p>";
       echo "<a href='{$item->url}'>{$item->title}</a> ";
       echo $item->date . "<br /> ";
       echo $item->description;
       echo "</p>";
   }
?>

After that i make page with this template. But here is problem, when i want open page with rss i get error:

Error: Call to a member function load() on a non-object (line 4 of /my_path/site/templates/rss.php).

How can I resolve that?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Lmwt
      Hi there,
      I am new to PW but already very convinced. I need to build a dropdown button to browse in a collection of authors by country and language. The dropdown should be editable in the BACK and displayed on the same as the authors collection. I tried my luck with "PageField Creator" but I don't know how to display the dropdown, I simply used: 
      "$content .=$page->Land;" (the name of the select field)
      but nothing is displayed...
      I see there is a 2nd module out there to achieve this : "Select Options Fieldtype". I am not sure what is the difference, anyone has a tip?
      And a clear tutorial with the necessary steps to build this? I am a bit confused which should be the parent template or page, if it should have a file or not...
      Thanks a lot in advance!
    • By Noel Boss
      👋 PW Pros…
      I have some hooks that I need to bind at the init phase (or even __construct) and I was wondering, and I couldn't find a good and simple way to determine if I'm in the admin. Would be nice if there is a reliable short option to do so, but I can't seem to find one… Is there a coherent way to tell this no matter where I am?
      Right now, I use the following method inside one of my modules:
      public function isAdmin($page = null) { if ( strpos($this->input->url, $this->urls->admin) !== false || $this->process instanceof ProcessPageList || $this->process instanceof ProcessPageEdit || ($page instanceof Page && $page->rootParent->id == $this->config->adminRootPageID) ) { return true; } return false; } @ryan wouldn't it be nice to have something like wire()->isAdmin(); like wire()->user->isLoggedin(); to tell if we are in admin – very early on (probably even in __construct() phase of modules?
    • By benbyf
      Hi!
      Been doing some basic Twilio implementation for a client to enable them to automatically send text messages to registered users on page publish. As an upshot, I thought I would strip out the site specific work and stick up on github here: https://github.com/benbyford/TwilioChannels
      This modules pulls in the Twilio APi and enables you to send SMS messages from your front or backend.
      Send SMS message Truncate message to single message character limit Auto-select number from range of numbers depending on $To number country of origin–this enables you to send messages with a local number to that user if one added to the config. Templates usage:
      $twilio = $modules->get("TwilioChannels"); $twilio->sendSMS($toNumber, $message);  
    • By J_Szwarga
      What is the best practice for having a form (only accessible to a logged in user) save the user's progress between sections of the form? Fieldsets? Multiple forms?
      Use case: I have a very long application form that would take 30 minutes for the applicant to fill out and I would hate for all progress to be lost due to user error. The progress needs to be logged into the user's page.
      Thanks!
    • By ryanC
      Hi, I have created a new install of Processwire 3.0.98, (local machine) and I am unable to install any modules from within Processwire itself. I go to Modules/Site/Add New/ then under "Module Class Name" I enter the name. The module appears, I hit "Download and Install", but I always get an error. For example: 
      "File could not be downloaded (https://github.com/adrianbj/TracyDebugger/archive/master.zip) 2: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version, 2: fsockopen(): Failed to enable crypto, 2: fsockopen(): unable to connect to ssl://github.com:443 (Unknown error) (tried: curl, fopen, socket)"
      I have been able to track down some of the modules and just upload the zip file manually, but this is happening with every module that I had previously installed in another installation with no problems. Any ideas? 
      Thanks!
×
×
  • Create New...