News: TinyPortal Release Schedule. Please read this update for More Info.

Login  |  Register
* *
TinyPortal on Twitter
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 12, 2018, 09:12:45 AM

Login with username, password and session length

Recent

Members
  • Total Members: 3734
  • Latest: nati9
Stats
  • Total Posts: 186722
  • Total Topics: 20602
  • Online Today: 330
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 1
Guests: 18
Total: 19

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

0 Members and 1 Guest are viewing this topic.

Offline tino

  • Developer
  • *
  • Posts: 1327
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: 1327
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;
}

Offline lurkalot

  • Administrator
  • *
  • Posts: 5471
    • 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: 1327
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>';

Offline lurkalot

  • Administrator
  • *
  • Posts: 5471
    • 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.