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 19, 2019, 03:50:40 PM

Login with username, password and session length

Recent

Members
  • Total Members: 3752
  • Latest: Alizee
Stats
  • Total Posts: 188918
  • Total Topics: 20754
  • Online Today: 126
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 1
Guests: 65
Total: 66

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

0 Members and 1 Guest are viewing this topic.

Offline tino

  • Developer
  • *
  • Posts: 1651
Re: RSS Feeds for articles
« Reply #20 on: March 05, 2018, 12:52:12 PM »

One question, this line for the vendor,
Code: [Select]
echo 'ikmultimedia.com'.PHP_EOL;Appears to be clickable.

this line for the second vendor
Code: [Select]
echo 'blog.andertons.co.uk'.PHP_EOL;Doesn't appear to be clickable.

Great progress on this though, thank you.

They are just echo statements and aren't links. If you wanted them to be links then they need to be like this...

Code: [Select]
echo '[url=http://blog.andertons.co.uk]blog.andertons.co.uk[/url]'.PHP_EOL;

Offline tino

  • Developer
  • *
  • Posts: 1651
Re: RSS Feeds for articles
« Reply #21 on: March 05, 2018, 12:58:01 PM »
Try changing the width to 45% instead of 50%, the images should scale to the width then.

If you want to style the images then use, amend the values as you wish

Code: [Select]
.rss-feed-right img {
    width: 50%;
    height: auto;
}

.rss-feed-left img {
    width: 50%;
    height: auto;
}

Online lurkalot

  • Administrator
  • *
  • Posts: 6226
    • Camera Craniums
Re: RSS Feeds for articles
« Reply #22 on: March 05, 2018, 03:18:03 PM »
Thank you tino.

I'm testing it now with a couple of ebay rss feeds, but having real trouble getting it to look right. Needs some space to separate the panels.  And the rss_date I can't position to the left without distorting things.  Might just be these feeds controlling the layout, and me not being able to override them.

This is the feeds I was playing with.

Code: [Select]
global $context;

echo '<style type="text/css">

/*Date item added to ebay*/
.rss_date {
    color : white;
}

.rss-feed-right img {
    width: 45%;
}

.rss-feed-left img {
    width: 45%;
}

.rss-feed-right {
    color : white;
    float: right;
    width: 50%;
    height: 100%;
}

.rss-feed-left {
    color : white;
    float: left;
    width: 50%;
    height: 100%;
}

@media only screen and (max-width: 640px) {

.rss-feed-left
{
   float: none;
   display: table-row-group;
}

.rss-feed-right
{
   float: none;
   display: table-footer-group;
}

}

</style>';

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

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

echo '<div style="padding: 10px; display:table;">';
echo '<div class="rss-feed-left">';

TPparseRSS('https://www.ebay.co.uk/sch/i.html?_from=R40&_nkw=Electric+guitar&_sacat=0&LH_BIN=1&LH_ItemCondition=1000&LH_PrefLoc=1&_rss=1');
echo '</div>';

echo '<div class="rss-feed-right">';
TPparseRSS('https://www.ebay.co.uk/sch/i.html?_osacat=29518&_odkw=chainsaw+parts+accessories&_from=R40&_trksid=p2334524.m570.l2632.R2.TR12.TRC2.A0.H3.Xdash.TRS0&_nkw=dash+cam&_sacat=3270&_rss=1');
echo '</div>';
echo '</div>';


Offline tino

  • Developer
  • *
  • Posts: 1651
Re: RSS Feeds for articles
« Reply #23 on: March 06, 2018, 01:39:01 PM »
Code: [Select]
global $context;

echo '<style type="text/css">

/*Date item added to ebay*/
.rss_date {
    color : white;
    text-align: unset;
}

.rss-feed-right img {
    width: 45%;
}

.rss-feed-left img {
    width: 45%;
}

.rss-feed-right {
    color : white;
    width: 45%;
    height: 100%;
    float: right;
}

.rss-feed-left {
    color : white;
    width: 45%;
    height: 100%;
    float: left;
}

@media only screen and (max-width: 640px) {

.rss-feed-left
{
   float: none;
   display: table-row-group;
}

.rss-feed-right
{
   float: none;
   display: table-footer-group;
}

}

</style>';

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

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

echo '<div style="padding: 10px; display:table; width: 90%">';
echo '<div class="rss-feed-left">';
TPparseRSS('https://www.ebay.co.uk/sch/i.html?_from=R40&_nkw=Electric+guitar&_sacat=0&LH_BIN=1&LH_ItemCondition=1000&LH_PrefLoc=1&_rss=1');
echo '</div>';

echo '<div class="rss-feed-right">';
TPparseRSS('https://www.ebay.co.uk/sch/i.html?_osacat=29518&_odkw=chainsaw+parts+accessories&_from=R40&_trksid=p2334524.m570.l2632.R2.TR12.TRC2.A0.H3.Xdash.TRS0&_nkw=dash+cam&_sacat=3270&_rss=1');
echo '</div>';
echo '</div>';

Online lurkalot

  • Administrator
  • *
  • Posts: 6226
    • Camera Craniums
Re: RSS Feeds for articles
« Reply #24 on: March 06, 2018, 02:33:46 PM »
Thanks you tino.  Much better, I think I can use that now.  8)

Will experiment with other feeds to see how they look.