Author Topic: Thumbnails in RSS  (Read 51964 times)

0 Members and 1 Guest are viewing this topic.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Thumbnails in RSS
« Reply #15 on: July 06, 2008, 05:03:51 PM »
Not sure if I am posting this is the correct area or not but I sat down this weekend and figured a way to get the thumbnails to show up finally. Through google translator I saw that the one person was wanting donations for his mod. their mod looked great but overkill for what I wanted. I just wanted a thumnail to show up.
The main problem I had was that the readers that I was using wanted the direct path and not a relative one. the "./thumbnails" did not work. it had to be "http://www.example.com/thumbnails" in order for them to see it.
I went in and modified an already mod for external thumbnails, instead of taking a chance on things messing up elsewhere, i just renamed it to another function.
You will be modifying 3 files on your site.
rss.php
includes\functions.php
your template directory\rss_item.xml

In the rss.php file
replace
Code: [Select]
'image' => get_thumbnail_code($row['image_media_file'], $row['image_thumb_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1),
with
Code: [Select]
//rss thumbnail mod
//'image' => get_thumbnail_code($row['image_media_file'], $row['image_thumb_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1),
'image' => get_thumbnail_rss_code($row['image_media_file'], $row['image_thumb_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1),
        //

in the includes/functions.php
go to the end of the file
above
Code: [Select]
?>insert
Code: [Select]
//--External thumbnails(modified for rss feed)--------------------------------
function get_thumbnail_rss_code($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 1) {
  global $site_sess, $config;
  $mysite = 'http://www.example.com/gallery/';// change this to the path to your 4images gallery

  if (!check_media_type($media_file_name)) {
    $thumb = "<img src=\"".$mysite.ltrim(ICON_PATH,"./")."/404.gif\" border=\"0\" alt=\"\" />";
  }
  else {
    if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
      $file_src = $mysite.ltrim(ICON_PATH,"./")."/".get_file_extension($media_file_name).".gif";
      $image_info = @getimagesize($file_src);
      $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      $thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";
    }
    else {
      $file_src = $mysite.ltrim(get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1),"./");
      $image_info = @getimagesize($file_src);
      $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      $thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
    }
  }

  if ($show_link) {
    if ($open_window) {
      $thumb = "<a href=\"".$site_sess->url($mysite."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
    }
    else {
      $thumb = "<a href=\"".$site_sess->url($mysite."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
    }
  }
  return $thumb;
}

//--End external thumbnails(modified for rss feed)----------------------------

note under line 4 in the above change
put in the path to your gallery directory just as you would type it in your browser

I tried using other variables from 4images but they did not seem to carry over to the readers so I just hardcoded it in the function.

in the your template folder/rss_item.xml
replace on the 5th line
Code: [Select]
      <description><![CDATA[{item_description}]]></description>
with
Code: [Select]
      <description><![CDATA[<table><tr><td>{item_image}</td><td>{item_description}</td></tr></table>]]></description>

I also did the mods at the top of this post so I am not sure if you need them or not.

and you are finished.

if you look at that last change you will see that you can make this as fancy as you want.
anything between the ![CDATA[ and the ]]> is passed on to the reader without any parsing.
I made mine so that it is a table with 2 cells next to each other with the thumbnail on the left and your description of the image on the right. but you can take it from there if you want more info.

this works with yahoo, google, ie7, firefox, and a few others and passes the feed validation so I think I am good.
I did find one software reader that could not display the image, just broken links, but I think it was on thier end and not mine.

if you want to see this in action...
http://www.budduke.com/gallery/rss.php?action=images

PS: if you go to my site you will see I am using SMF forums with only one login between 4images and SMF (interested?)
It took my about 2-3 weeks to get it to work but they are using thier own database and I used some functions that someone else created for connected to thier product but when I find time I will compare all the changes I did and how hard it would be to pass the info on to everyone.
Buddy Duke
www.budduke.com

Offline Bob

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Thumbnails in RSS
« Reply #16 on: July 06, 2008, 05:56:53 PM »
THX!

nice Work mate  :thumbup:

Offline ripejuice

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Sexy Wallpapers
Re: Thumbnails in RSS
« Reply #17 on: July 11, 2008, 08:16:41 PM »

Can't find the below line in rss.php.
Quote
'image' => get_thumbnail_code($row['image_media_file'], $row['image_thumb_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1),

Please help.I have included my rss.php.



Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: rss.php                                              *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.6                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'rss';

$nozip 1;
define('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');

$site_template->template_extension 'xml';

@
define('RSS_DEFAULT_ITEMS'10);
@
define('RSS_MAX_ITEMS'30);

if (isset(
$HTTP_GET_VARS['items']) || isset($HTTP_POST_VARS['items'])) {
  
$num_items = (isset($HTTP_POST_VARS['items'])) ? intval($HTTP_POST_VARS['items']) : intval($HTTP_GET_VARS['items']);
  if (!
$num_items) {
    
$num_items RSS_DEFAULT_ITEMS;
  }

  if (
$num_items RSS_MAX_ITEMS) {
    
$num_items RSS_MAX_ITEMS;
  }
}
else {
  
$num_items RSS_DEFAULT_ITEMS;
}

if (
$action == '') {
  
$action 'images';
}

function 
cut_at_word($text$length$suffix '...') {
  if (
strlen($text) <= $length) {
    return 
$text;
  }

  
$delims = array(' ''.'',''!''?''-'':''_''/');
  
$text substr($text0$length 1);

  
$positions = array();

  for (
$i 0; isset($delims[$i]); $i++) {
    
$pos strrpos($text$delims[$i]);
    if (
$pos) {
      
$positions[] = $pos;
    }
  }

  if (
sizeof($positions) > 0) {
    
rsort($positions);
    
$text substr($text0$positions[0]);
  }

  
$text .= $suffix;

  return 
$text;
}

function 
format_rss_text($text) {
  
$text format_text(trim($text), 101);
  
$text strip_tags($text);
  
$text safe_htmlspecialchars($text);

  
$text cut_at_word($text250);

  return 
$text;
}

function 
format_rss_html($text) {
  
$text format_text(trim($text), 101);

  return 
$text;
}

function 
get_file_url($file_name$image_type$cat_id)
{
    
$url get_file_path($file_name$image_type$cat_id01);

    if (!
is_remote($file_name)) {
        global 
$script_url;
        
$url $script_url.'/'.$url;
    }

    return 
str_replace('./'''$url);
}

function 
get_rss_enclosure($file_name$image_type$cat_id) {
  if (!
get_file_path($file_name$image_type$cat_id00)) {
    return array();
  }

  
$file get_file_path($file_name$image_type$cat_id01);
  
$url get_file_url($file_name$image_type$cat_id);

  return array(
    
'url' => $url,
    
'length' => @filesize($file),
    
'type' => get_mime_content_type($file)
  );
}

$cache_id create_cache_id(
  
'page.rss',
  array(
    
$user_info[$user_table_fields['user_id']],
$action,
    
$image_id,
    
$cat_id,
    
$num_items
  
)
);

if (!
$cache_page_rss || !$content get_cache_file($cache_id)) {
  
$old_session_mode $site_sess->mode;
  
$site_sess->mode 'cookie';

ob_start();

$rss_title format_rss_text($config['site_name']);
$rss_link  $site_sess->url($script_url);
$rss_desc  format_rss_text($config['site_name']);
$rss_lang  "";
$rss_image = array();
$rss_ttl   $cache_page_rss $cache_lifetime 0;
$rss_cat   = array();
$rss_items = array();

switch (
$action) {
  case 
'comments':
    if (!
$image_id) {
      exit;
    }

    
$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, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.""user_name").get_user_table_field(", u.""user_email")."
            FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
            LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
            WHERE i.image_id = 
$image_id AND c.cat_id = i.cat_id";
    
$image_row $site_db->query_firstrow($sql);

    if (!isset(
$image_row['image_id'])) {
      exit;
    }

    
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;

    
$rss_title .= " - " format_rss_text($image_row['image_name']);
    
$rss_link  $site_sess->url($script_url."/details.php?".URL_IMAGE_ID."=".$image_id);
    
$rss_desc  format_rss_html($image_row['image_description']);
    if (
get_file_path($image_row['image_thumb_file'], "thumb"$cat_id00)) {
      
$rss_image = array(
        
'url' => get_file_url($image_row['image_thumb_file'], "thumb"$cat_id),
        
'title' => format_rss_text($image_row['image_name']),
        
'link' => $rss_link
      
);
    }

    
$rss_cat = array(
      
'name' => format_rss_text($cat_cache[$cat_id]['cat_name']),
      
'domain' => $site_sess->url($script_url."/categories.php?".URL_CAT_ID."=".$cat_id)
    );

    
$image_allow_comments = (check_permission("auth_readcomment"$cat_id)) ? $image_row['image_allow_comments'] : 0;

    
$sql "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.""user_level").get_user_table_field(", u.""user_name").get_user_table_field(", u.""user_email").get_user_table_field(", u.""user_showemail").get_user_table_field(", u.""user_invisible").get_user_table_field(", u.""user_joindate").get_user_table_field(", u.""user_lastaction").get_user_table_field(", u.""user_comments").get_user_table_field(", u.""user_homepage").get_user_table_field(", u.""user_icq")."
            FROM "
.COMMENTS_TABLE." c
            LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
            WHERE c.image_id = 
$image_id
            ORDER BY c.comment_date DESC
            LIMIT 
$num_items";
    
$result $site_db->query($sql);

    while (
$row $site_db->fetch_array($result)) {
      
$user_name format_rss_text($row['comment_user_name']);
      
$user_email "example@example.com";

      if (isset(
$row[$user_table_fields['user_name']]) && $row['user_id'] != GUEST) {
        
$user_name format_rss_text($row[$user_table_fields['user_name']]);
        if (!empty(
$row[$user_table_fields['user_email']]) && (!isset($row[$user_table_fields['user_showemail']]) || (isset($row[$user_table_fields['user_showemail']]) && $row[$user_table_fields['user_showemail']] == 1))) {
          
$user_email $row[$user_table_fields['user_email']];
        }
      }

      
$rss_items[] = array(
        
'title' => format_rss_text($row['comment_headline']),
        
'link' => $site_sess->url($script_url."/details.php?".URL_IMAGE_ID."=".$image_id."#comment".$row['comment_id']),
        
'pubDate' => $row['comment_date'],
        
'desc' => format_rss_text($row['comment_text']),
        
'category' => array(
          
'name' => $rss_title,
          
'domain' => $rss_link
        
),
        
'author' => array(
          
'name' => $user_name,
          
'email' => $user_email
        
),
      );
    }
    break;

  case 
'images':
  default:
    
$cat_sql "";
    if (
$cat_id && isset($cat_cache[$cat_id])) {
      
$rss_title .= " - " format_rss_text($cat_cache[$cat_id]['cat_name']);
      
$rss_link  $site_sess->url($script_url."/categories.php?".URL_CAT_ID."=".$cat_id);
      
$rss_desc  format_rss_html($cat_cache[$cat_id]['cat_description']);

      
$cat_sql "AND i.cat_id = $cat_id";
    }

    
$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, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.""user_name")."
            FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
            LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
            WHERE i.image_active = 1
              
$cat_sql
              AND c.cat_id = i.cat_id
              AND i.cat_id NOT IN ("
.get_auth_cat_sql("auth_viewcat""NOTIN").")
            ORDER BY i.image_date DESC
            LIMIT 
$num_items";
    
$result $site_db->query($sql);

    while (
$row $site_db->fetch_array($result)) {
      
$user_name format_rss_text($lang['userlevel_guest']);
      
$user_email "example@example.com";

      if (isset(
$row[$user_table_fields['user_name']]) && $row['user_id'] != GUEST) {
        
$user_name format_rss_text($row[$user_table_fields['user_name']]);
        if (!empty(
$row[$user_table_fields['user_email']]) && (!isset($row[$user_table_fields['user_showemail']]) || (isset($row[$user_table_fields['user_showemail']]) && $row[$user_table_fields['user_showemail']] == 1))) {
          
$user_email $row[$user_table_fields['user_email']];
        }
      }

      
$rss_items[] = array(
        
'title' => format_rss_text($row['image_name']),
        
'link' => $site_sess->url($script_url."/details.php?".URL_IMAGE_ID."=".$row['image_id']),
        
'pubDate' => $row['image_date'],
        
'desc' => format_rss_html($row['image_description']),
        
'category' => array(
          
'name' => format_rss_text($cat_cache[$row['cat_id']]['cat_name']),
          
'domain' => $site_sess->url($script_url."/categories.php?".URL_CAT_ID."=".$row['cat_id'])
        ),
        
'enclosure' => get_rss_enclosure($row['image_thumb_file'], "thumb"$row['cat_id']),
        
'author' => array(
          
'name' => $user_name,
          
'email' => $user_email
        
),
        
'comments' => $site_sess->url($script_url."/details.php?".URL_IMAGE_ID."=".$row['image_id']."#comments"),
      );
    }
    break;
}

$items '';

foreach (
$rss_items as $item) {
  
$tpl_vars = array(
    
'item_title' => $item['title'],
    
'item_link' => $item['link'],
    
'item_pubdate' => gmdate('D, d M Y H:i:s'$item['pubDate']) . " GMT",
    
'item_description' => $item['desc'],
    
'item_category' => false,
    
'item_category_domain' => '',
    
'item_category_name' => '',
    
'item_author' => false,
    
'item_author_email' => '',
    
'item_author_name' => '',
    
'item_enclosure' => false,
    
'item_enclosure_url' => '',
    
'item_enclosure_length' => '',
    
'item_enclosure_type' => '',
  );

  if (@
count($item['category']) > 0) {
    
$tpl_vars['item_category'] = true;
    
$tpl_vars['item_category_domain'] = $item['category']['domain'];
    
$tpl_vars['item_category_name'] = $item['category']['name'];
  }

  if (@
count($item['author']) > 0) {
    
$tpl_vars['item_author'] = true;
    
$tpl_vars['item_author_email'] = $item['author']['email'];
    
$tpl_vars['item_author_name'] = $item['author']['name'];
  }

  if (@
count($item['enclosure']) > 0) {
    
$tpl_vars['item_enclosure'] = true;
    
$tpl_vars['item_enclosure_url'] = $item['enclosure']['url'];
    
$tpl_vars['item_enclosure_length'] = $item['enclosure']['length'];
    
$tpl_vars['item_enclosure_type'] = $item['enclosure']['type'];
  }

  
$site_template->register_vars($tpl_vars);
  
$items .= $site_template->parse_template("rss_item");
}

$tpl_vars = array(
  
'channel_title' => $rss_title,
  
'channel_link' => $rss_link,
  
'channel_pubdate' => gmdate('D, d M Y H:i:s') . " GMT",
  
'channel_description' => $rss_desc,
  
'channel_image' => false,
  
'channel_image_url' => '',
  
'channel_image_title' => '',
  
'channel_image_link' => '',
  
'channel_ttl' => $rss_ttl,
  
'items' => $items
);

if (
count($rss_image) > 0) {
  
$tpl_vars['channel_image'] = true;
  
$tpl_vars['channel_image_url'] = $rss_image['url'];
  
$tpl_vars['channel_image_title'] = $rss_image['title'];
  
$tpl_vars['channel_image_link'] = $rss_image['link'];
}

$site_template->register_vars($tpl_vars);

$site_template->print_template($site_template->parse_template($main_template));

$content ob_get_contents();
ob_end_clean();

// Reset session mode
$site_sess->mode $old_session_mode;

if (
$cache_page_rss) {
  
save_cache_file($cache_id$contenttrue);
}

// end if get_cache_file()

header('Content-Type: text/xml');
header('Expires: ' gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');

echo 
$content;


?>

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Thumbnails in RSS
« Reply #18 on: July 12, 2008, 12:42:22 AM »
Sorry, that was my bad...
Like I said in my post, I did the changes that Thunderstrike had posted on the first page of this topic before I did mine...

If you have not done any of the mods from the first page
you will need to do this instead...

In the rss.php file

look for

Code: [Select]
'title' => format_rss_text($row['image_name']),
add after

Code: [Select]
//rss thumbnail mod
'image' => get_thumbnail_rss_code($row['image_media_file'], $row['image_thumb_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1),
//


and you should be good to go...


Buddy Duke
www.budduke.com

Offline Kurman

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • www.kurman.ru
Re: Thumbnails in RSS
« Reply #19 on: October 02, 2008, 03:49:11 AM »
Good MOD, can used instead of MOD show images in external page.

I've installed it, but RSS feed can view thumbnail if as feed I use RSS path of a sinle page, for example take RSS link from the detailed page? while viewing an image.

But if I use RSS llink from index page or catagories page, I've RSS feeded only titles and text, without thumbnail preview.
What could cause this?

link to my site
4images running as a music portal http://music.kurman.ru/

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Thumbnails in RSS
« Reply #20 on: October 02, 2008, 07:18:20 AM »
I just checked, budduke's changes work fine. (I first did the changes from original tutorial on first page)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Thumbnails in RSS
« Reply #21 on: October 02, 2008, 12:23:58 PM »
Good MOD, can used instead of MOD show images in external page.

I've installed it, but RSS feed can view thumbnail if as feed I use RSS path of a sinle page, for example take RSS link from the detailed page? while viewing an image.

But if I use RSS llink from index page or catagories page, I've RSS feeded only titles and text, without thumbnail preview.
What could cause this?

link to my site

make the changes that I suggested above and things should work fine...
you can see what it should look like at
http://www.budduke.com/gallery/rss.php?action=images

let me know if it is not working for you...
Buddy Duke
www.budduke.com

Offline Kurman

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • www.kurman.ru
Re: Thumbnails in RSS
« Reply #22 on: October 03, 2008, 07:30:30 AM »
Yes, after I did this step from the first page, it works fine.

find in rss.php:

Code: [Select]
'item_title' => $item['title'],
add after:

Code: [Select]
'item_image' => $item['image'],
Thanks guys!
4images running as a music portal http://music.kurman.ru/

Offline yousaf

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Thumbnails in RSS
« Reply #23 on: May 29, 2009, 02:05:56 PM »
i was unable to make it work as i have missed the first page's steps by thunderstrike.
now it is working for me but i see difference between mine and yours RSS.

i have attached a snapshot of my rss as well as yours RSS snapshot too, so that you can see and tell me what i missed in editing.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Thumbnails in RSS
« Reply #24 on: May 29, 2009, 05:14:54 PM »
i was unable to make it work as i have missed the first page's steps by thunderstrike.
now it is working for me but i see difference between mine and yours RSS.

i have attached a snapshot of my rss as well as yours RSS snapshot too, so that you can see and tell me what i missed in editing.


Can you post a link to your rss feed?
What browser are you using. Some act different with feeds...
Buddy Duke
www.budduke.com

Offline yousaf

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Thumbnails in RSS
« Reply #25 on: May 29, 2009, 07:42:48 PM »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Thumbnails in RSS
« Reply #26 on: May 29, 2009, 08:11:56 PM »
http://www.wallpaperowner.com/rss.php?action=images

this is the link to my gallery

Your feed looks entirely different then mine  :?:
Can you zip and attach your rss.php file and I will compare the setup with mine?
I won't have time to look at it till this weekend when I get home from work but not sure at this moment why yours is different.
We both have 1.7.7 so they should look the same. Do you have any other MODS that may have reformatted the RSS feed?
Buddy Duke
www.budduke.com

Offline yousaf

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Thumbnails in RSS
« Reply #27 on: May 29, 2009, 08:21:35 PM »
sure i am attaching my RSS.php file for you.
its a fresh installation of 4images 1.7.7 and i have just 3 mods on the script
which are Google Search engine friendly links, thumbnails in RSS and Google Sitemap.

Offline yousaf

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Thumbnails in RSS
« Reply #28 on: May 29, 2009, 08:25:32 PM »
There is a 4th mod installed as well Dynamic Page Title but none of the mods mentioned have anything to do with RSS.php

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Thumbnails in RSS
« Reply #29 on: May 29, 2009, 09:16:19 PM »
sure i am attaching my RSS.php file for you.
its a fresh installation of 4images 1.7.7 and i have just 3 mods on the script
which are Google Search engine friendly links, thumbnails in RSS and Google Sitemap.


Look for on line 273?
Code: [Select]
        'enclosure' => get_rss_enclosure($row['image_thumb_file'], "thumb", $row['cat_id']),

replace with or put // in front of it
Code: [Select]
//        'enclosure' => get_rss_enclosure($row['image_thumb_file'], "thumb", $row['cat_id']),

That should take that extra link out, not sure if that is why I did it on mine or not, usually I comment things so I know why I did it but it was remmed out on my rss.php file

Hope that fixes it for you,
Buddy Duke
www.budduke.com