Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

September 24, 2022, 04:47:35 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 193513
  • Total Topics: 21092
  • Online today: 38
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 0
Guests: 31
Total: 31

Author Topic: Rss readers v1.2 from Tufat with TinyPortal v.86 on SMF v1.1rc2-1.  (Read 9463 times)

0 Members and 1 Guest are viewing this topic.

nite0859

  • Guest
Attempting to implement : RSS Readers v1.2 from Tufat.com (http://www.tufat.com/s_rss_rdf_feed_reader.htm) inside Tiny Portal's Block on frontpage. I made a phpblock on the frontpage with this code :
Code: [Select]
echo '<iframe width="350" height="300" src="http://www.myservername.com/forum/rss/index.html"></iframe>';

Location of rss readers v1.2 on myserver : /myservername.com/forum/rss.

Rss readers comes with a customizable feedlist.xml that is called from the index.html found inside the /myservername.com/forum/rss directory.

Files inside /myservername.com/forum/rss
Code: [Select]
config.xml
feedList.xml
index.html
rssProxy.php
rssReader01.swf

Problem is that the <iframe> really does put a white frame around the rss feed box. That white "frame" around the rss feed box really has to go. How else would I tell the phpbox to go and open the index.html file ?

Has anyone ever played with this one before ? I thought it may be interesting to use the Rss feeds already built into SMF to display through this Flash Rss reader. Potentially, you could use Flash to scroll your recent topics, user list, or news from Yahoo!, Google, or whoever else offers an Rss feed.
« Last Edit: April 02, 2006, 02:04:56 PM by nite0859 »

nite0859

  • Guest
Re: Rss readers v1.2 from Tufat with TinyPortal v.86 on SWF v1.1rc2-1.
« Reply #1 on: April 02, 2006, 02:04:05 PM »
I realize that Tiny Portal allows you to select an RSS feed; however, in my case, this feature does not work. If I put in
Code: [Select]
http://finance.yahoo.com/rss/topstories

into the RSS feed link, I see nothing. The flash script does allow me to see things.

feral

  • Guest
Re: Rss readers v1.2 from Tufat with TinyPortal v.86 on SMF v1.1rc2-1.
« Reply #2 on: April 04, 2006, 04:14:07 PM »
well for your first question i would just try using an include instead of an iframe
Code: [Select]
include("http://www.myservername.com/forum/rss/index.html");

as for the second i just tested the rss on my site using that same yahoo feed and it worked fine for me. so i cant help on that. sorry

nite0859

  • Guest
Re: Rss readers v1.2 from Tufat with TinyPortal v.86 on SMF v1.1rc2-1.
« Reply #3 on: April 05, 2006, 09:24:21 PM »
I know why rss fails on my site.

The PHP option allow_url_fopen would normally allow a programmer to open, include or otherwise use a remote file using a URL rather than a local file path. For security reasons, my host provider has disabled this feature.

From my host's wiki :

Many developers include files by pointing to a remote URL, even if the file is within the local system. For example:
Code: [Select]
<?php include("http://example.com/includes/example_include.php"); ?>With allow_url_fopen disabled, this method will not work. Instead, the file must be included with a local path, and there are three methods of doing this:

By using a relative path, such as ../includes/example_include.php.
By using an absolute path (also known as relative-from-root), such as /home/username/example.com/includes/example_include.php.
By using the PHP environment variable $_SERVER['DOCUMENT_ROOT'], which returns the absolute path to the web root directory. This is by far the best (and most portable) solution. The example that follows shows the environment variable in action:

Example Include
Code: [Select]
<?php include($_SERVER['DOCUMENT_ROOT']."/includes/example_include.php"); ?>
Processing Differences (and passing variables to an included file)
It is worth mentioning that the alternative solutions presented here will result in a difference in the way the include() function is handled. The alternative solutions all return the PHP code from the included page; however, the now-unavailable remote URL method returns the result from the included page. One result of this behavior is that you cannot pass a querystring using the alternative solutions. You define the variables locally before performing the include:

Example
To achieve the effect of this:
Code: [Select]
<?php include("http://example.com/includes/example_include.php?var=example"); ?>
You must instead use this:
Code: [Select]
<?php
$var 
"example";
include(
$_SERVER['DOCUMENT_ROOT']."/includes/example_include.php");
?>


Adding Flexibility
For maximum flexibility (when multiple includes are required, for example), it may be easier to create a variable:
Code: [Select]
<?php
$doc_root 
$_SERVER['DOCUMENT_ROOT'];
include(
"$doc_root/includes/example_include.php");
include(
"$doc_root/includes/example_include2.php");
include(
"$doc_root/includes/example_include3.php");
include(
"$doc_root/includes/example_include4.php");
?>


Note: The technique works in the same way, regardless of whether you are using include() or require().


feral

  • Guest
Re: Rss readers v1.2 from Tufat with TinyPortal v.86 on SMF v1.1rc2-1.
« Reply #4 on: April 05, 2006, 10:44:44 PM »
*hate hosts that limit what you can do* altho i under stand it. well it that case you limited in your options. you can ask your host if they can open that sevice for your site. or if you are hosted on an apache server you may be able to over ride it in the htaccess file but dont ask me how it is just a thought =/

TwinsX2Dad

  • Guest
Re: Rss readers v1.2 from Tufat with TinyPortal v.86 on SMF v1.1rc2-1.
« Reply #5 on: April 06, 2006, 12:21:07 AM »
You get what you pay for - then again, sometimes you overpay for what you get...

For more on .htaccess files, see the Apache documentation.