Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ripejuice

Pages: [1]
1
Plugins / Re: [PLUGIN] Batch Import From ZIP Files
« on: December 08, 2008, 10:34:53 PM »
please help me...
i uploaded a 350mb zip file into my server and its after that only i realised that my zip folder was like this
hollywood>hollywood1>a>angelina>angelina1.jpg
hollywood>hollywood1>b>britney>britney1.jpg


can i unzip this....


please help

2
Mods & Plugins (Releases & Support) / Re: [PROGRAM] 4images Mobile Server
« on: December 08, 2008, 10:22:29 PM »
thanx for the mob server...

3
Tutorials / Re: [TUT] One Image - Three sizes
« on: December 08, 2008, 10:21:26 PM »
thank you mavensi....will this affect google images ranking due to duplicate same images

4
Bug Fixes & Patches / Re: [1.7.3] RSS feed not valid
« on: December 08, 2008, 10:20:16 PM »
thanks....by the way rss is not well formatted for me..

5
Bug Fixes & Patches / Re: [1.7.4] BUG in userqroups.php & solution
« on: December 08, 2008, 10:10:49 PM »
jeevani esthar bur! don't get it

6
Discussion & Troubleshooting / Re: Add another page
« on: July 28, 2008, 01:07:26 PM »
thank u mawenzi........

7
Discussion & Troubleshooting / Add another page
« on: July 28, 2008, 07:55:34 AM »
I would like to add another page to my gallery like about.html ,privacy.html,contact.html with all the default footer,sidebar and header.How to do it?
Please help me...

8
Mods & Plugins (Requests & Discussions) / Re: Thumbnails in RSS
« 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;


?>

9
thank you very very much..it worked :)

10
I'm a big noob in coding....please help me
where do i need to edit for putting the alt text attribute for images

11
Please anybody can help me to put a alt attibute for for every images by making the 'alt text' same as the image name.
Alternative text is used by Google's image search  to help return appropriate images.Its very very important for getting good ranking in google.


According to Google
Quote
" The "title" attribute is a bit different: it "offers advisory information about the element for which it is set." As the Googlebot does not see the images directly, we generally concentrate on the information provided in the "alt" attribute. Feel free to supplement the "alt" attribute with "title" and other attributes if they provide value to your users! "

Pages: [1]
Post your comments here