TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

October 12, 2024, 11:51:52 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,395
  • Total Topics: 21,244
  • Online today: 215
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 37
  • Total: 37

RSS Feeds for articles

Started by lurkalot, March 04, 2018, 04:30:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lurkalot

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.

tino

Quote from: lurkalot on March 04, 2018, 04:30:04 PM
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;

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/');

lurkalot

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?

tino

Quote from: lurkalot on March 04, 2018, 06:39:31 PM
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.

lurkalot

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.

tino

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.



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>';


lurkalot

Thanks, can split topic, but atm, if being honest I'm not sure where to put it.

illori

either resources or block code, not really a block code but it is a "block of code"

lurkalot

Quote from: illori on March 04, 2018, 09:13:49 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?

tino

Quote from: lurkalot on March 04, 2018, 08:43:43 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.