Custom Feed
OK, I’m feeling really stupid. I’m not an expert, but I generally can stumble my way thru nuke stuff.
Everything seemed to install fine. I did have some header error messages, but I followed the post
http://nukeseo.com/modules.php?name=Forums&file=viewtopic&t=225 and put
Code:include_once('includes/custom_files/nukeSEO/nukeFEEDhdr.php');
|
in root/header.php… was that correct? The errors stopped…
Incidentally, this looks like one of the smoothest GUIs for a module I've tried yet. The js pop-ups are a nice touch.
I've never messed with feeds before, I've been doing a lot of searching and reading, but I’m too far out of my element. My site isn’t “open” yet, so it doesn’t have much on it- but it does have a full encyclopedia which is what I want a feed for. Actually, I want to make a Google Gadget to pull down a daily definition. I made a block that shows a daily definition (I was surprised that no-one had made one yet. And I looked around a lot for one.)
I’m sure my block isn’t the most efficient way of achieving what I want, but it works.
I know it’s a vague thing I’m asking- but I don’t even know where to begin.
For my block I created two new fields in my table. The block picks a random entry and puts 1 in one field and the date in second field the first time the definition is shown. For the rest of the day it shows the entry that matches today’s date. Each new day (date) the block picks a random entry from all entries that do not have that 1. At the end of the encyclopedia it clears the fields and starts over.
To make things more interesting- I need to have a picture in that feed also. The encyclopedia defines the pictures. Not much good with out ‘em.
Now to really screw things up, my Encyclopedia has restricted access. I give a definition a day as a teaser. But full access requires membership. I can preview the default Encyclopedia feed fine as long as I’m logged in, but not otherwise. This again falls back to perhaps using my block code.
I followed this thread
http://nukeseo.com/modules.php?name=Forums&file=viewtopic&t=278
and I’m made a copy of the includes/content.php to play with. I put my block code in it, but I don’t know where to go from there.
How do I get the results from my query into a feed? I’m thinking it has something to do with making a class, but I’m not familiar enough with that to know.
These are my variables (the end results that get echoed in my block).
Code:
$todaypic = $row[0];
$todaytitle = $row[2];
$todaytext = $row[3];
|
$todaypic is achieved by naming the .gifs with numbers that correspond to the tid, and then dropping it in
Code:
<img src=\"/images/color_candles/".$todaypic.".gif\" />
|
It’s bound to be something simple, bit I’m way too tired atm to wrap my head around it.
Input?
Austin
www.ezcandlesticks.com/lounge (don’t expect to see much)
Nuke 8
As an after-thought, since my setup doesn’t require items such as Order and Level how would that affect the admin interface?
Edit: I just realized that
none of the feeds provide by this module can be displayed if I'm not logged in, even when I have the modules themselves set to "Viewable by Everyone". Displays fine when I'm logged in. By contrast, using the default simple backend.php will display news articles regardless of logged in status. Back to the studying...