I’ve been using KB Advanced RSS Widget for quite a while now and it did have a problem a few weeks back that I managed to fix by doing the following changes:
https://www.ads-software.com/support/topic/undefined-variable-if-debugging-is-enabled-fixable-with-1-line-of-code?replies=1
However, I just updated my website to have site-wide SSL and unfortunately the plugin is loading the /wp-includes/rss.png
file via non-HTTPS connections which obviously isn’t very safe and opens the site up to cross site injections.
Mixed Content: The page at 'https://www.website.com/' was loaded over HTTPS, but requested an insecure image 'https://www.website.com/wp-includes/images/rss.png'. This content should also be served over HTTPS.
I found the following bits of code but I am unsure how to update them correctly, I have already updated the admin > general > site address links to both be https.
if ( empty($items) || $items < 1 ){
$items = 10;
}
if ( '' == $output_format ){
$output_format = "<li><a class='kbrsswidget' href='^link\$' title='^description\$'>^title\$</a></li>";
}
if ( '' == $url ){
$output_begin = "<ul>"; // note that we're checking whether the url is empty. that way we don't re-populate these fields if somebody
$output_end = "</ul>"; // intentionally cleared them. we only want to populate them when beginning a new widget.
if ( file_exists(dirname(__FILE__) . '/rss.png') ){
$icon = str_replace(ABSPATH, get_settings('siteurl').'/', dirname(__FILE__)) . '/rss.png';
}else{
$icon = get_settings('siteurl').'/wp-includes/images/rss.png';
}
$url = "https://";
}
// REQUIRED. Displays widget's admin form.
function form($instance) { /// UPDATED
if ( empty($instance) ){ // set defaults
$output_format = "<li><a class='kbrsswidget' href='^link\$' title='^description\$'>^title\$</a></li>";
$output_begin = "<ul>";
$output_end = "</ul>";
if ( file_exists(dirname(__FILE__) . '/rss.png') ){
$icon = str_replace(ABSPATH, get_settings('siteurl').'/', dirname(__FILE__)) . '/rss.png';
}else{
$icon = includes_url('images/rss.png');
}
$instance = array( 'title' => '', 'url' => '', 'items' => 10, 'error' => false, 'icon'=>$icon, 'linktitle'=>0, 'display_empty'=>0, 'reverse_order'=>0, 'utf'=>0, 'output_format'=>$output_format, 'output_begin'=>$output_begin, 'output_end'=>$output_end );
}
$instance['number'] = $this->number;
$this->build_form( $instance );
}
I’d greatly appreciate some help converting them to both be compatible with https.
I’m using https://www.ads-software.com/plugins/wp-force-ssl/ for forcing SSL across the website, everything else is working fine…
Thanks
]]>For example, I have the KB Advanced RSS plugin installed on my site, which allows me to display headlines and other data from external RSS feeds in a customized format. There are fields in this widget where you can enter HTML for custom display of data pulled from an RSS feed. To create the specific display features and effects I want, I need to be able to put PHP code in there too, but even with the Exec-PHP plugin it doesn’t recognize it.
How can I extend Exec-PHP to enable recognition of PHP code in widgets such as the KB Advanced RSS widget which, like the normal text widget, allow entry of text or HTML?
I have tried looking through all the .php files in the Exec-PHP plugin but can’t figure out how to extend the plugin to do what I need. Any help would be appreciated! Thanks!
]]>I’m using KB Advanced RSS widget — https://www.ads-software.com/extend/plugins/kb-advanced-rss-widget/ — and it’s working great.
There’s a modification I want to make that I can’t seem to figure out how to do myself. I’d like to display the pubdate for each item in an RSS feed as a relative date/time (e.g. how many minutes ago, hours ago, or days ago). I found these codes that can be used to display date/time in this kind of relative format:
I have also found a couple of plugins that can be installed to do this kind of thing automatically, such as https://www.ads-software.com/extend/plugins/wp-relative-date/
However, these are all for displaying the date/time of posts and comments, not items in an external RSS feed. I’m trying to figure out how to modify the code of the KB Advanced RSS widget so that pubdate will display in a similar way, but I’m stumped. The widget creator no longer provides support, but it’s a popular plugin so there might be some people here who use it and have created mods for it already.
Does anyone have any suggestions for how to do what I’m trying to do? Thanks for any help that anyone can provide!
Eric
]]>Is there something similar available for Atom feeds? KB Advanced RSS does display Atom, but instead of linking to the news story, it takes all links back to my blog’s homepage…:-(
]]>I’ve gotten this far:
`<li style=”margin-bottom:10px”>^title$‘
What is the code I need to add to this formatting to show the excerpts? I’ve searched all over, but can’t seem to find this info or any examples.
If it helps, the page I’m working on is: https://www.centralsection-apa-ca.org/ (using the widget at the bottom of the main content area).
]]>I used the follow tags
<li><b><a href='^link$' title='^description$'>^title$</a></b></li>
<li>- ^pubdate[opts:date=F jS Y]$</li>
to show the title and the date it was posted. However, how can I show the excerpt of the article (or even the thumbnail of the picture in the article) too?
Thank you very much!
]]>I have an RSS feed set up on my homepage that’s just pulling from a Google Alerts query. When I use the standard widget code of:
<li><a class='kbrsswidget' href='^link$' title='^description$'>^title$</a></li>
it displays like this:
Suicide Prevention: We Can Do BetterGoogle Alerts - suicide prevention
where it adds the source (Google Alerts – suicide prevention) to the end of each entry. In that widget code, I’m not seeing anything that would be able to eliminate that which makes me think that’s how it’s sent from Google as part of the title.
Am I missing something so very basic that I’m going to be embarrassed for posting this? If not, (or if so), does anyone have any ideas for how I can eliminate that from each post? Thanks much.
]]>I’d appreciate any tips on how I can make the title link to the feed url and not the sites front page. Thank you.
]]>