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

Recent

Welcome to TinyPortal. Please login or sign up.

April 20, 2024, 11:24:56 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,165
  • Total Topics: 21,219
  • Online today: 174
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 48
  • Total: 48

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.

tino

Quote from: lurkalot on March 05, 2018, 07:40:03 PM

One question, this line for the vendor,
echo 'ikmultimedia.com'.PHP_EOL;
Appears to be clickable.

this line for the second vendor
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...

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

tino

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


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

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

lurkalot

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.

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


tino


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

lurkalot

Thanks you tino.  Much better, I think I can use that now.  8)

Will experiment with other feeds to see how they look.