News: When asking for support, it helps us and you, if you read the Posting Guidelines

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

September 20, 2019, 09:11:51 PM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 188921
  • Total Topics: 20754
  • Online Today: 130
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 32
Total: 32

Author Topic: RSS Feeds for articles  (Read 3568 times)

0 Members and 1 Guest are viewing this topic.

Offline lurkalot

  • Administrator
  • *
  • Posts: 6227
    • Camera Craniums
RSS Feeds for articles
« on: March 04, 2018, 09:30:04 AM »
Rather than use a third party script, would it be possible too ad a RSS feeds to articles. So these can be displayed on separate pages.  News feed page, ebay listings etc. A handy feature for affiliate publishers.

Offline tino

  • Developer
  • *
  • Posts: 1651
Re: RSS Feeds for articles
« Reply #1 on: March 04, 2018, 11:05:59 AM »
Rather than use a third party script, would it be possible too ad a RSS feeds to articles. So these can be displayed on separate pages.  News feed page, ebay listings etc. A handy feature for affiliate publishers.

You can do that on a page currently, choose PHP then add the following;

Code: [Select]
global $context;

$context['TPortal']['rss_notitles'] = true;

$context['TPortal']['rssmaxshown'] = 10;

echo 'ikmultimedia.com'.PHP_EOL;

TPparseRSS('http://www.ikmultimedia.com/rss.php');

echo 'blog.andertons.co.uk'.PHP_EOL;

TPparseRSS('https://blog.andertons.co.uk/feed/');

Offline lurkalot

  • Administrator
  • *
  • Posts: 6227
    • Camera Craniums
Re: RSS Feeds for articles
« Reply #2 on: March 04, 2018, 11:39:31 AM »
Neat trick. Thank you.

I'll give that a try.  Does this mean we're getting closer to the blocks in blocks feature I asked about a while ago, or just is it limited to the rss function?

Offline tino

  • Developer
  • *
  • Posts: 1651
Re: RSS Feeds for articles
« Reply #3 on: March 04, 2018, 11:46:37 AM »
Neat trick. Thank you.

I'll give that a try.  Does this mean we're getting closer to the blocks in blocks feature I asked about a while ago, or just is it limited to the rss function?

That’s just calling the RSS function directly. You can do that with any function just pass the correct parameters to it.

Some might need some styling but it’s essentially your imagination which would hold you back.

I don’t like the php article option as it uses eval and I view that as evil and dangerous. But I do see it’s use.

I could if I managed to hack a forum delete all data in the database for example with one line of code. Amongst many other things. SMF uses it also, you just have to be careful with who gets access.

Offline lurkalot

  • Administrator
  • *
  • Posts: 6227
    • Camera Craniums
Re: RSS Feeds for articles
« Reply #4 on: March 04, 2018, 12:47:24 PM »
Yay, it does work, just been messing about with it.  You're right about the styling, it does need some work in that department, especially if you turn the images on.

Not bad if just used as a list though, but in a article it could probably do with splitting into two columns to fill the page.  Has potential though.

PHP article system gets a fair amount of use, mainly for site functions etc.  In daily use, I wouldn't recommend anyone gives out permissions to use php, or html articles to anyone unless trusted immensely.

Offline tino

  • Developer
  • *
  • Posts: 1651
Re: RSS Feeds for articles
« Reply #5 on: March 04, 2018, 01:13:16 PM »
Try that...

Can probably add image styling in there as well.

Might be an idea to split this topic up as we're digressing here.

Code: [Select]

global $context;

$context['TPortal']['rss_notitles'] = true;

$context['TPortal']['rssmaxshown'] = 10;

echo '<div style="min-height:250px; padding: 10px;">';
echo '<div style="float: left;">';
echo 'ikmultimedia.com'.PHP_EOL;

TPparseRSS('http://www.ikmultimedia.com/rss.php');
echo '</div>';

echo '<div style="float: right;">';
echo 'blog.andertons.co.uk'.PHP_EOL;
TPparseRSS('https://blog.andertons.co.uk/feed/');
echo '</div>';
echo '</div>';


Offline lurkalot

  • Administrator
  • *
  • Posts: 6227
    • Camera Craniums
Re: RSS Feeds for articles
« Reply #6 on: March 04, 2018, 01:43:43 PM »
Thanks, can split topic, but atm, if being honest I'm not sure where to put it.

Offline illori

  • Administrator
  • *
  • Posts: 2051
Re: RSS Feeds for articles
« Reply #7 on: March 04, 2018, 02:13:49 PM »
either resources or block code, not really a block code but it is a "block of code"

Offline lurkalot

  • Administrator
  • *
  • Posts: 6227
    • Camera Craniums
Re: RSS Feeds for articles
« Reply #8 on: March 04, 2018, 02:21:14 PM »
either resources or block code, not really a block code but it is a "block of code"

I was thinking perhaps, "Tinyportal Feature Requests" should be it's own board, then at least a new topic could be started for each request, or is that too much?  At the moment all request are in one topic, and things get messy like now.  Maybe add as a child board to feedback?

Offline tino

  • Developer
  • *
  • Posts: 1651
Re: RSS Feeds for articles
« Reply #9 on: March 04, 2018, 02:47:19 PM »
Thanks, can split topic, but atm, if being honest I'm not sure where to put it.

Resources, would be where I would put it.