Jump to content

[SOLVED]RSS feed block only showing 1 twitter post


Recommended Posts

I set up the RSS feed block for my twitter feed AFTER twitter changed its API settings, and it has been working fine. Recently however the RSS block is only showing 1 post. Sometimes it shows the 5 latest, but once you refresh the page it goes back to showing 1. Please see the problem on www.duratex.co.uk.

 

I have tried resetting the module, also uninstalling and reinstalling, but no change.

 

Any ideas would be very welcome!

Link to comment
Share on other sites

Had a quick look in the source, but nothing obvious that can be wrong.

Double check: You did change the number of feeds in the module configure to something higher than 1, yes?

Can you put it to 6 and see if anything changes?

 

My 2 cents,

pascal

Link to comment
Share on other sites

mowax, Think I found it:

edit the file classes/Tools.php

find the function:

public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5)

 

Change to this:

 

public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 25)

 

 

What it does:

you said, it SOMETIMES shows 5, but mostly not. Seemed like some sort of random problem. What I found in this function was a "timeout". It tries to get new feeds a specific time only, to not 'hang' the module, forever trying...

Apparently, 5 was too short to get the feeds normally. I think 25 is a nice amount. Check the speed of your site if it doesn't take too long though. (I think it will return as soon as it has the 5 feeds, so should be no problem.

 

pascal

  • Like 1
Link to comment
Share on other sites

hi Pascal,

 

that was a great idea, in fact I thought it could be something to do with loading timeouts but wouldn't have had the first idea where to look. unfortunately though, this doesn't seem to work, even if I increase the timeout to 50. I also tried increasing the timeout values just below this function in the same file, but that didn't work either.

 

I remembered to disable caching and cleared my cache, but I will try deleting some cookies a bit later and see if that could be preventing me from seeing the changes.

 

thanks for pointing me in what is probably the right direction though ;)

Link to comment
Share on other sites

Hi mowax, previous post problem seems to be solved again.

 

 

I Tried to call the rss feed line directly in my browser. It seemed that the rss provider has a limited quota of sending stuff and it was over that limit.

 

Anyway, Now that it works again, I will have another look at it...

pascal

  • Like 1
Link to comment
Share on other sites

mowax, the problem doesn't seem to be in the rss module (try for example google rss news feed:

http://news.google.com/?output=rss

this works OK.

 

If you click on the link above of your rss feed, you see that the problem is at the source. It seems that the rss feeder that you use, (most of the time) only sends out 1 message.

 

 

I have another solution, I think:

have a look at my test site:

 

http://ps1541no2.buymethai.com/en/

 

Look at either left column all the way down below

or

look in the center column, all the way down below.

 

Here you see your tweets (in color, with pictures) displayed, and option to get older ones as well. You have an option to follow your twitter, and they can tweet to you.

 

Look if you like it, if so, It's easy to do!

pascal

  • Like 1
Link to comment
Share on other sites

post-455771-0-56168900-1377739909_thumb.jpgOK, here we go:

 

Download this free module: It allows you to just put any kind of HTML/Javascript/images/text on your page:

- go to: http://contentbox.org/

- Just push the download button (don't have to generate one, just use default one. (If you need more boxes like this, just 'generate' one, it will change the name a little, so that it can live next to another contentbox-module, without interference)

 

When downloaded:

- upload the zip file to your /modules folder and extract (or, if you use ftp, extract on your computer, and upload the folder 'contentbox' to the /modules folder)

 

- Go to modules->modules, find contentbox and press install.

- Then go there again and press configure.

 

You will see a white field with some layout buttons above it, just like a description field of products.

Press the small blue 'HTML' button in the button bar of this field.

Remove all old text

replace with the following text:

 

<p><a class="twitter-timeline" href="https://twitter.com/DuratexUK" data-widget-id="372011630957060096">Tweets by @DuratexUK</a></p>
<script type="mce-text/javascript">// <![CDATA[
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);[spam-filter](document,"script","twitter-wjs");
// ]]></script>

 

- Press Update

- Press Update (save)

 

- have a look at your front page. See if it works.

 

Hope this does the trick.

-----------------------------------------

 

If you are curious there the text comes from, or want to make some tweaks:

go to twitter.com

press the settings icon (top right)

press widgets

press create new

add your twitter name (@duratexuk)

make any changes you like (height of box, theme, etc)

get widget text bottom right

copy as said before in custombox

 

That's all.

pascal

Edited by PascalVG
Added image (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi Pascal,

 

Thanks for this solution, I guess it is better than a module which hardly ever works! That said I didn't get the widget to appear, only the <p> tag, but will look further into it.

 

Just so I'm clear though, what was the problem I had? Was it with twitter, the rss block module, or something else?

 

Cheers

Mo

Link to comment
Share on other sites

Hi mowax,

 

Hope you can make it work. Otherwise make a temporary employee with admin rights and send me the login/password details, then I will do it for you :-)

 

The problem seems to be the site that creates the rss feed. It took (mostly) only one post at the time, not many/all. Maybe it was possible to change a setting on that site or so, but I couldn't find any that quickly.

This seems to be a working solution, though, so let's try to get this to work.

 

Let me know if you need help with it,

pascal.

  • Like 1
Link to comment
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
×
×
  • Create New...