Originally posted by ptitpierre
That's fine, but when I am not logged in and when I select a picture which is in a private category (I mean you must be logged in to see the pic) I have the Index page.
Is there a possibility to have différent RSS feeds according to the user logged in (or not logged in for visitors) ?
Thanks in advance !
Pierre
Originally posted by nette
Parse error: parse error, unexpected T_STRING in /home/electrii/public_html/gallery/includes/template.php(101) : eval()'d code on line 1
http://ataraxy.net/~electrii/gallery/rss.phpif someone could help me out I would be grateful
---
Hmm I think it's funny how I posted under the correct forum to get help for this mod the first time and I never got a response so I posted somewhere else thinking maybe no one read this one and I get this
http://www.4homepages.de/forum/viewtopic.php?t=3914#5 from one of the moderators.
Now I am posting back under the same original thread for the mod and still no reply. Doesn't make any sense to me.
Originally posted by falti
It was a quick and dirty hack. I thought someone could use it, modify it whatever. I am currently busy and cannot give support. I also have the problem that the hack works fine at my 4images version (4images 1.7) so why don't you look at /home/electrii/public_html/gallery/includes/template.php(101) : eval()'d code on line 1
and try to fix it by yourself?
Originally posted by graficalicus
just a little help needed for this - which is working well, BTW - but one issue:
If a user uploads an image, and in their comments about the image they include a URL or a " ' " character (like "it's" or "your's" or 'look out below!' ) it craps out the RSS feed -
I need a stripslashes kind of command - but I'm not sure where to place it - so these characters don't interrupt the feed -
this is the complete rss.php file:
<?
/*************************************************
* RSS Feed for 4images *
* beta 0.1 *
* Email:
*/
//------------ CONFIG ----------------------------
$num_new_images = 10;
/*
u can uncomment this, if you want to use config variables from 4images config
$num_new_images = $config['image_cells'];
*/
//because we have no session here, we have to hardcode this values
define('SCRIPT_URL', 'http://digiart.graficalicus.com'); //no trailing slash
define('LANGUAGE', 'en-us');
define('ROOT_PATH', './');
//----- END CONFIG--------------------------------------------
include(ROOT_PATH.'global.php');
$main_template = 'rss';
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, c.cat_name
FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c
WHERE i.image_active = 1 AND c.cat_id = i.cat_id
ORDER BY i.image_date DESC
LIMIT $num_new_images";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
$format="Y-m-d\TH:i:s+00:00"; //the time format for rss date
while($image_row = $site_db->fetch_array($result)){
$site_template->register_vars(array(
"title" => $image_row["image_name"],
"description" => $image_row["image_description"],
"category_domain" => SCRIPT_URL."/categories.php?cat_id=".$image_row["cat_id"],
"category" => $image_row["cat_name"],
"link" => SCRIPT_URL."/details.php?image_id=".$image_row["image_id"],
"date" => format_date($format,$image_row["image_date"]),
));
$new_images.=$site_template->parse_template("rssitem");
}
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(
array(
"ctitle" => $config['site_name'],
"clink" => SCRIPT_URL,
"cdescription" => $config['site_name']." Last 5 images",
"language" =>LANGUAGE,
"ititle" =>"digiart galleries at the graficalicus workshop",
"iurl" => SCRIPT_URL."/digiart-graf_banner.gif",
"ilink" => SCRIPT_URL,
"items" => $new_images,
)
);
header("Content-type: text/xml");
$site_template->print_template($site_template->parse_template($main_template));
?>
thanks in advance -
Originally posted by falti
"description" => stripslashes($image_row["image_description"])
this should work (not tested).
Originally posted by V@no
I dont know exactly how all this RSS works, but would it be a problem if someone use < and > signs in the description (url html link)?
if so, u'll probably need to replace them with < and >
As of the appostrophe, why would it give any problems if RSS uses tags simular to HTML? just curious.
I dont know exactly how all this RSS works, but would it be a problem if someone use < and > signs in the description (url html link)?
if so, u'll probably need to replace them with < and >
As of the appostrophe, why would it give any problems if RSS uses tags simular to HTML? just curious.
Originally posted by AntiNSA2
his mod works great for me in opera.... I wanted to add one thing
open up header.html and add this
<link rel="alternate" type="application/rss+xml" title="TheCenterOfTheNet All Lives Stills Newest Images Feed" href="http://www.thecenterofthenet.com/4images/rss.php" />
to get an RSS button to appear in opera/fav browser......
But my request would be if you could modify this mod ...
Some people use different templates for different categories.... it would nice to beable to place this within category specific template that way the user could only select feeds from the categories they are interested in in addition to the newest images for the whole database.
Thanks!