Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 22, 2024 - @188.18 (what is this?)
Forum activity rating: Three Stars Posts: 36/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :skull: Websites are like whispers in the night  :skull:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ♺ ∙ Web Crafting Materials
| | |-+  rss_dot_php, a small script to show your feeds on your site


« previous next »
Pages: [1] Print
Author Topic: rss_dot_php, a small script to show your feeds on your site  (Read 98 times)
vvinrg
Jr. Member ⚓︎
**


It's mine! My text! You can't have it!! Bwahaha!!!

⛺︎ My Room
StatusCafe: winrg
iMood: winrg
Matrix: Chat!
XMPP: Chat!

View Profile WWW

First 1000 Members!Joined 2023!
« on: November 12, 2024 @974.17 »

so, picture this: you've got all these posts everywhere. a wordpress, a youtube, a mastodon, a jekyll site, and more. you want a way to show all of them to anyone who comes to your site, and you don't want to use javascript. you've come to the right place!

rss_dot_php is a simple (~200 lines) PHP script for rendering your various feeds on one page. it supports RSS and Atom, and can have custom styles applied. it also allows users to filter out whatever feeds they dont want to see. it's designed to be thrown into an iframe somewhere on your site.

If you're curious what it looks like when styled and configured, my homepage has an instance

Install Guide:

to use it, you'll need a server with PHP support, or someone willing to host a single PHP script for you. I built this with the intention of doing the latter for a friend.

you should also have some basic knowledge of PHP syntax, but if you need help, I will be watching this thread.

first, download the script. save it somewhere on your computer, and open it in your text editor of choice.

there are 2 sections to edit, the first contains your feeds, and the second contains general config stuff. the script has 2 example feeds by default, "Dreamwidth News" and "OTW News". you can delete these, and add your own. every feed needs, at minimum, a URL. you can set this like so:

Code
$feeds[<name of your feed>]["url"] = <url of the RSS or Atom file>

every key in the $feeds array is used as the name for the given feed.

besides ["url"], the following config options are also supported:

Code
// how many seconds to wait before refreshing the feed data.
// defaults to 1 hour.
$feeds[<feed>]["ttl"] = <seconds>

// which rel= value to prefer on links, when reading links from an Atom feed
// defaults to "alternate"
$feeds[<feed>]["linkrel"] = <rel= value>

// a homepage for the feed, that gets linked to under everything from it.
// no default.
$feeds[<feed>]["home"] = <URL>

then, once you have the feeds configured, you may want to edit the config section just below. in particular, custom CSS can be put in the part that looks like

Code
/// Custom CSS
$config["custom_css"] = <<<'EOC'

/* custom CSS goes here! */

EOC;

the contents will be included verbatim in a <style> tag in the header.

finally, save the file with your edits, and put it anywhere. it can be set in the src= value of an iframe, and it wil just-work.

I hope this is useful to folks!
Logged
invader_gvim
Jr. Member ⚓︎
**


My husband kept loving me when I became a girl.

⛺︎ My Room

View Profile WWW

Sent On Earth By The Almighty TallestJoined 2024!
« Reply #1 on: November 15, 2024 @231.53 »

I really love love love love this idea because my website already shows my melonland posts and I currently do it via just html. Do you know if neocities allows me to use php scripts?  :dog:

I really love the hard work you have contributed in writing this  :mark:  :seal:  :mark:  :transport:
Logged

Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Best way to have a 2 column site?

Started by ObspogonBoard ☔︎ ∙ I need Help!

Replies: 3
Views: 2428
Last post February 13, 2023 @208.53
by fLaMEd
How do you prefer to keep your site organized (or not)

Started by NightdriftBoard ✁ ∙ Web Crafting

Replies: 30
Views: 8822
Last post August 02, 2024 @153.99
by candycanearter07
What do you think of web feeds?

Started by m15oBoard ✁ ∙ Web Crafting

Replies: 11
Views: 3774
Last post December 23, 2021 @737.60
by m15o

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi