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 - alekseyn1

Pages: 1 [2] 3 4 5 6 7
16
I downloaded the old version of firefox you recommended, and followed the steps provided to check what my site should look like to a robot. I followed your steps in this thread and the thread to not issue a session id. When I set the user agent as one that matched the ones in the bot list I get a redirect error in firefox!!!!

This must be why google can not index my site!

If I disable cookies and change user agent to something not listed in the bot list It will work without cookies....

I have begged google to reconsider my site and recieved confirmation they were going to try to reindex it...

But now I realize that they will only get a redirect loop error!!!!!


ARRRGGGHH?>?> I am so close to being finished that I can actually care about doing the photography and try to make a little money to feed my family and pay for a liscense :)


Can you please help me?"??
to be specific, the error in firefox says
Quote
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

AND [bold] I have disabled all robots in the list except "FAST-WebCrawler" => "searchbot", to keep search bots from being turned around until I can figure this out[/bold]

Well, I finally resolved (kinda) this problem.... Although I am not on this forum bridge, but on the phpBB3 bridge, I had the same problem. The problem was that every search bot that came to site, was properly identified by the forum and a special username was assigned to the bot... and this was confusing 4images.... ohhh man, I spent hour and hours trying to figure out why Google was not able to see my 4images installation.... so finally I have disabled Search Bot identification in my phpBB and it WORKED!! I suggest you dig throgh the settings and disable treating search bots as users within the forum.. I am sure it will fix your issue too...

17
Alexsey, you use this sitemap only for Google or for Yandex and etc. too?

Yandex as well as Google use this sitemap just great.

18
If i use your categories, then i have cat-gortenziya-51.htm and did not have cat-hydrangea-51.htm . Do you have urls only for one language? Or you use your google.php several times (with add information about language, for example, for english - google.php?l=english) ? Or somthing else?

yep. I only list categories in the sitemap in my default language...
I think to do both, you will need to add two custom functions just for that purpose. I would specify 2 lang directories manually (the easiest solution) in those functions.
unless 4images gurus can suggest an elegant php way to cycle through all languages available in your 4images installation.

19
multilang should be part of your /includes/functions.php

if it is not, then you will have your error... make sure you have

define('ROOT_PATH''./');
require(
"config.php");
include(
ROOT_PATH.'global.php');


in the beginning of your google.php

I am using the multilang for my categories like this:

$categories mysql_query('SELECT cat_id, cat_name FROM ' $table_prefix 'categories');
while (
$category mysql_fetch_array($categories))
{
	
$catid $category['cat_id'];
	
$catname strtr($category['cat_name'], " eeeaeauoiiaaABCDEFGHIJKLMNOPQRSTUVWXYZ","-eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
	
$catname fixname(multilang($catname));
	
if (
$shortURL == 1) {
	
	
$cat_url $gallery_url.'cat-'.$catname.'-'.$catid.'.htm';
	
}else {
	
	
$cat_url $gallery_url.'categories.php?cat_id='.$catid;
	
}

	
print_xml($cat_url,$prio_cat,'',$freq_cat);
}


so if it does not work for you please post your google.php here and check that the functions multilang in /includes/functions.php is like this:

//multinang mod
function multilang($text$show_first 0$remove 0){
  global 
$config;
  
preg_match("#\[".$config['language_dir']."\](.*)(\[\/?".$config['language_list']."\]|$)#iDUs"$text$match);
  if (!empty(
$match[1])) {
    return 
$match[1];
  }
  
preg_match("#^(.*)\[".$config['language_list']."\]#iDUs"$text$match);
  if (!empty(
$match[1])) {
    return 
$match[1];
  }
  
preg_match("#\[".$config['language_dir_default']."\](.*)(\[\/?".$config['language_list']."\]|$)#iDUs"$text$match);
  if (!empty(
$match[1])) {
    return 
$match[1];
  }
  if (
$show_first) {
    
preg_match("#\[".$config['language_list']."\](.*)(\[\/?".$config['language_list']."\]|$)#iDUs"$text$match);
    if (!empty(
$match[2])) {
      return 
$match[2];
    }
  }
  if (
$remove) {
    return 
preg_replace("#\[".$config['language_list']."\](.*)#iDs"""$text);
  }
  return 
$text;
}

function 
multilang_tag_remove($text){
  global 
$config;
  return 
preg_replace("#\[\/?".$config['language_list']."\]#iDUs"" "$text);
}



thanks for the sharp eyes and fixing the error in the code ))

20
:cry: После установки мода перестал заходить в галерею! Помогите что делать :?:

пробовать войти с именем админа от форума а не галлереи

если не получается то описать как можно подробнее ошибку

21
Sun,

this should be the solution for you.

replace
$catname fixname($catname);

with
	
$catname fixname(multilang($catname));


and replace
	
	
$imgname fixname ($imgname);


with
	
	
$imgname fixname (multilang($imgname));

22
Please help.
Need input from SEO and 4images gurus...

I can not identify when this started to happen. I have many MODs installed. All seems to be working fine.
BUT Google stopped indexing my 4images pages altogether...

I started digging and found that only Googlebot does not see the pages served by 4images... all other search engines seem to be unaffected.
Analyzing the server response, I found a weird thing:

http://web-sniffer.net/
for URL like http://www.fotodvor.com/
with user agent: Googlebot

I get "Status: HTTP/1.1 302 Moved Temporarily"

any other user agent shows a good page.

renaming (thus disabling) .htaccess did not make any difference (it seems)...

Any ideas would be really appreciated!

below is my .htaccess just in case:

Code: [Select]
RewriteEngine On

# If no-www domain requested, externally redirect to www domain
RewriteCond %{HTTP_HOST} ^fotodvor\.com
RewriteRule (.*) http://www.fotodvor.com/$1 [R=301,L]
RewriteRule ^sitemap.xml$ google.php

# If www+subdomain domain requested, externally redirect to subdomain without "www"
RewriteCond %{HTTP_HOST} ^www\.([^.]+)\.fotodvor\.com
RewriteRule (.*) http://%1.fotodvor.com/$1 [R=301,L]

# If subdomain+www domain requested, externally redirect to subdomain without "www"
RewriteCond %{HTTP_HOST} ^([^.]+)\.www\.fotodvor\.com
RewriteRule (.*) http://%1.fotodvor.com/$1 [R=301,L]

# If subdomain requested, rewrite home page requests to index.php with query string user=subdomain & page="home"
RewriteCond %{REQUEST_URI} !^/search\.php
RewriteCond %{HTTP_HOST} !^www\.fotodvor\.com
RewriteCond %{HTTP_HOST} ^([^.]+)\.fotodvor\.com
RewriteRule ^$ /search.php?search_user=%1 [L]

#signature mod
RewriteRule ^signature\.png$ signature.php?%{QUERY_STRING}
RewriteRule ^go$ signature.php?go=1&%{QUERY_STRING}

#correcting a weird phpBB intergation bug...
#RewriteRule ^viewtopic.php?([^/\.]+)$ /forum/viewtopic.php?$1
RewriteRule ^viewtopic.php?$ http://www.fotodvor.com [R=301,L]

#RewriteBase /
RewriteRule ^cat-(.*)-([0-9]+)\.htm$ categories.php?cat_id=$2&%{QUERY_STRING}
RewriteRule ^cat\.htm$ categories.php?%{QUERY_STRING}

#Mod_bmollet : Image name in URL
RewriteRule ^img-(.*)-([0-9]+)\.htm$ details.php?image_id=$2&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.search.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.lightbox.htm$ details.php?image_id=$1&%{QUERY_STRING}

#Mod_bmollet : This is to make search function work  ( redirect links from search results )
RewriteRule ^search\.htm$ search.php?%{QUERY_STRING}
RewriteRule ^search\.([0-9]+)\.htm$ search.php?page=$1&%{QUERY_STRING}
RewriteRule ^lightbox\.htm$ lightbox.php?%{QUERY_STRING}
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}
RewriteRule ^postcard([a-zA-Z0-9]+)\.htm$ postcards.php?postcard_id=$1&%{QUERY_STRING}
RewriteRule ^postcard\.img([0-9]+)\.htm$ postcards.php?image_id=$1&%{QUERY_STRING}

23
Wow, an old subject, but I am trying to figure this out myself and need help...

I am trying to come up with the proper approach to the ratings system.

At the moment I have a formula listed above working on my site with the following code:

// Rating
//formula used at IMDB for rating of their movies
//
//    v               m 
//------- * R  +  ------- * c 
//  v + m           v + m 
//
//Where:
//v = number of votes
//m = minimum number of votes to be considered (on IMDB = 1250)
//R = average "vote" given to the image
//c = average "vote" for all the image (on IMDB currently = 6.9)

$cat_id_sql get_auth_cat_sql("auth_viewcat""NOTIN");

$vote_number 30//"m" parameter from the above formula
$cutoff_time time() - 60 60 24 30;
$time "AND i.image_date >=".$cutoff_time."";
$time_av "AND image_date >=".$cutoff_time."";

$sql1 "SELECT AVG(image_rating) as avg, image_active, cat_id
        FROM "
.IMAGES_TABLE."
        WHERE image_active = 1 "
.$time_av." AND cat_id NOT IN ($cat_id_sql) AND image_rating <> 0";
	


$result1 $site_db->query_firstrow($sql1);
$average_of_all_images $result1['avg'];

//this is checking if the average rating is 5.0. If so, the system will sort by 
if (($average_of_all_images == 5) || (!$average_of_all_images)) {
$order_by "image_votes";

} else {

$order_by "(((i.image_votes/(i.image_votes+".$vote_number."))*i.image_rating)+((".$vote_number."/(i.image_votes+".$vote_number."))*".$average_of_all_images."))";
}

//echo "M = ".$vote_number.". Average of all ".$average_of_all_images."... ";
	

$sql "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_rating, i.image_votes, c.cat_name, u.user_name, c.hide_author
        FROM "
.IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
        WHERE i.image_active = 1 "
.$time." AND i.cat_id NOT IN (".$cat_id_sql.") AND i.cat_id = c.cat_id AND i.user_id = u.user_id ".$cat_match_sql."
        ORDER BY "
.$order_by." DESC
	
	
LIMIT 10"
;
	



but it sometimes gives me weird results still.... especially when I set the cutoff time for 24 hours and M parameter to 3 votes only....
I do not fully understand how the ORDER BY ".$order_by." DESC line works in the context of the task.... does it perform properly? Is there another way (maybe using a temporary table) to list the images based on the formula?

There is another approach to calculating the ratings though that I have not tested yet... it will only work if you have installed the mod for saving the votes to the DB though...

The approach is to calculate a weighted average rating for an image instead of arithmetic average that is being calculated in the standard installation and then just simply sort by rating.
(taken from here)

If you have the mod installed then running this query will give you a weighted average rating for all your images:


//arithmetic mean for all images
SELECT sumvt ) / sumcnt )
FROM (
SELECT countvote ) * countvote ) AS cntvote countvote ) * countvote ) AS vt
FROM 4images_voted
GROUP BY vote
)a



//arithmetic mean for an image
SELECT sumvt ) / sumcnt )
FROM (
SELECT countvote ) * countvote ) AS cntvote countvote ) * countvote ) AS vt
FROM 4images_voted
WHERE image_id 
$image_id
GROUP BY vote
)a


I may be breaking my head over nothing, but image ratings are important for my site and I need them working as accurate as possible... So please MySQL gurus, I need help with this. Which approach you think is the best?

in Russian here

24
Yep... you did make a mistake in your path.. you forgot the "\" where it should not have been.

you have two instances of that line because of the PM mod (somebody must have installed this one for you if you did not know that  :))

anyways, i have attached to corrected file. please check (backup your current version just in case)

25
Dont show the arrows to make the crop see the image in attach

there are 2 .js files in the attachment that you should have placed in your templates folder. ImageCropper.js has links to arrows that you should edit (appr line 292). And looks like you have already fixed the icons issue in functions.js ))

And another question the crop insert a code in the comment like this [CROP:0,0,600,466] how interpret the code.

if you did the step 4 properly it should be working by now. Please check if you did step 4 (and also review the second post in this threat)


and by the way... I found why with this code, Internet explorer was adding a 3 pixel line under pictures.... this was due to the spaces between DIV tags believe it or not.... so.... in step 3:

instead of :

Code: [Select]
<div class="center" id="ipad" style="margin: 0px; padding: 20px; background-color: #aaaaaa">
<div id="holdr" style="position: absolute; left: 20px; top: 190px;"><a name="image"></a>
<img style="height: {height}px; width: {width}px;" src="{image_address}" id="im" onDblClick="maxArea(event);">

</div>
<br/>

<!-- PhotoTools Pad -->

you should have:

Code: [Select]
<div class="center" id="ipad" style="margin: 0px; padding: 20px; background-color: #aaaaaa">
<div id="holdr" style="position: absolute; left: 20px; top: 190px;"><a name="image"></a>
<img style="height: {height}px; width: {width}px;" src="{image_address}" id="im" onDblClick="maxArea(event);"></div><br/>

<!-- PhotoTools Pad -->

26
Hi thanks for this nice Mod.

Works, but it have a problem in the buttons by clicking to choose a function  it shows a red cross instead of a blue button.  :?

You casn see here in my test site http://globalfoto.net/globalfototeste/details.php?image_id=238


open the .js files and edit path to the image files there...

27
Discussion & Troubleshooting / Re: Non-latin letters in file name
« on: October 29, 2010, 02:04:06 AM »
I gave up on this issue....
http://www.4homepages.de/forum/index.php?topic=27277.msg147707#msg147707


so I decided not to keep the original file names but to rename the pics on upload...
so in the includes upload.php

change
     $this->name = $regs[1];

to
      //$this->name = $regs[1];
     $this->name = time();

I think that was all I did... so now you should have your files named something like 1288274563.[extention]

I hope this helps

28
For all the Russian users out there - here is the google.php that works on my site

it transliterates the categories and images names to become Google friendly. the transliteration function MUST be exactly identical to the one stored in sessions.php

Code: [Select]
<?
# Create Google Sitemap for 4images
# Created by Mai Minh (minh@maingo.com http://www.vna2z.com)
# Modified by Oliver van der Werf (info@flash-webdesign.de http://www.flash-webdesign.de)
# Date: 28/11/2006 | 02.01.2007
# You can send ping to Google with this request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URL_TO_YOUR_SITEMAP
#---------------------------------

require("config.php");
//require(ROOT_PATH.'includes/sessions.php');

$link=mysql_connect("$db_host","$db_user","$db_password");
mysql_select_db("$db_name") or die ("Cannot connect database!");

# 4images top page (with trailing slash)
$gallery_url = 'http://www.fotodvor.com/';

# Priotity
//select between 0.0 and 1.0
//0.0 identifies the lowest priority page(s) on your website
//1.0 identifies the highest priority page(s) on your website
$prio_img = 0.5;
$prio_cat = 0.8;
$prio_profile = 0.1;

# Frequency
//"always", "hourly", "daily", "weekly", "monthly", "yearly" or "never"
$freq_img = 'daily';
$freq_cat = 'daily';
$freq_profile = 'monthly';

# Use Short URLs
$shortURL = 1; // 0 or 1

# Print XML header
xml_head();

# Print URLs

$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories');
while ($category = mysql_fetch_array($categories))
{
$catid = $category['cat_id'];
$catname = strtr($category['cat_name'], " eeeaeauoiiaaABCDEFGHIJKLMNOPQRSTUVWXYZ","-eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$catname = fixname($catname);
if ($shortURL == 1) {
$cat_url = $gallery_url.'cat-'.$catname.'-'.$catid.'.htm';
}else {
$cat_url = $gallery_url.'categories.php?cat_id='.$catid;
}

print_xml($cat_url,$prio_cat,$lastmod,$freq_cat);
}

$images = mysql_query('SELECT image_id,image_name,image_active,image_date FROM ' . $table_prefix . 'images');
while ($image = mysql_fetch_array($images))
{
if ($image['image_active'] == 1) {
$imgid = $image['image_id'];
        $imgname = strtr($image['image_name'], ", eeeaeauoiiaaABCDEFGHIJKLMNOPQRSTUVWXYZ","--eeeaeauoiiaaabcdefghijklmnopqrstuvwxyz");
$imgname = fixname ($imgname);
$date = $image['image_date'];
$lastmod = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
if ($shortURL == 1) {
$img_url = $gallery_url.'img-'.$imgname.'-'.$imgid.'.htm';
}else{
$img_url = $gallery_url.'details.php?image_id='.$imgid;
}
print_xml($img_url,$prio_img,$lastmod,$freq_img);
}
}


$profiles = mysql_query('SELECT user_id, user_lastaction FROM ' . $table_prefix . 'users WHERE user_id >= "1"');
while ($profile = mysql_fetch_array($profiles))
{

$profileid = $profile['user_id'];
$date = $profile['user_lastaction'];

if ($date == 0) {
$date_ = time();
$date = date("Y-m-d",$date_)."T".date("H:i:s",$date_)."+00:00";
} else {
$date = date("Y-m-d",$date)."T".date("H:i:s",$date)."+00:00";
}

$profile_url = $gallery_url.'member.php?action=showprofile&amp;user_id='.$profileid;
print_xml($profile_url,$prio_profile,$date,$freq_profile);
}

# Print XML footer
xml_foot();

function xml_head() {
$freq = 'daily';
$priority = '1.0';
$mod = date("Y-m-d")."T".date("H:i:s")."+00:00";
echo "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
}

#-----------------------------------------------
# xml_foot
#-----------------------------------------------
function xml_foot() {
echo "
</urlset>";
}

#-----------------------------------------------
# print_xml
#-----------------------------------------------
function print_xml($url,$priority,$lastmod,$changefreq) {
$temp = "<url>
<loc>$url</loc>";
$temp .= "  <priority>$priority</priority>";
if ($lastmod != '') {
$temp .="  <lastmod>$lastmod</lastmod>";
}
$temp .= "  <changefreq>$changefreq</changefreq>
</url>";
echo $temp;
}

function fixname($text)
{
  return strtolower(strtr(
    $text,
     array(
      "e" => "e",
      "e" => "e",
      "e" => "e",
      "a" => "a",
      "e" => "e",
      "a" => "a",
      "u" => "a",
      "o" => "o",
      "i" => "i",
      "a" => "a",

      //russian UTF8 encoded alphabet (lower and upper cases)
      "&#1040;" => "a",
      "&#1072;" => "a",
      "&#1041;" => "b",
      "&#1073;" => "b",
      "&#1042;" => "v",
      "&#1074;" => "v",
      "&#1043;" => "g",
      "&#1075;" => "g",
      "&#1044;" => "d",
      "&#1076;" => "d",
      "&#1045;" => "e",
      "&#1077;" => "e",
      "&#1025;" => "yo",
      "&#1105;" => "yo",
      "&#1046;" => "zh",
      "&#1078;" => "zh",
      "&#1047;" => "z",
      "&#1079;" => "z",
      "&#1048;" => "i",
      "&#1080;" => "i",
      "&#1049;" => "j",
      "&#1081;" => "j",
      "&#1050;" => "k",
      "&#1082;" => "k",
      "&#1051;" => "l",
      "&#1083;" => "l",
      "&#1052;" => "m",
      "&#1084;" => "m",
      "&#1053;" => "n",
      "&#1085;" => "n",
      "&#1054;" => "o",
      "&#1086;" => "o",
      "&#1055;" => "p",
      "&#1087;" => "p",
      "&#1056;" => "r",
      "&#1088;" => "r",
      "&#1057;" => "s",
      "&#1089;" => "s",
      "&#1058;" => "t",
      "&#1090;" => "t",
      "&#1059;" => "u",
      "&#1091;" => "u",
      "&#1060;" => "f",
      "&#1092;" => "f",
      "&#1061;" => "h",
      "&#1093;" => "h",
      "&#1062;" => "c",
      "&#1094;" => "c",
      "&#1063;" => "ch",
      "&#1095;" => "ch",
      "&#1064;" => "sh",
      "&#1096;" => "sh",
      "&#1065;" => "sch",
      "&#1097;" => "sch",
      "&#1066;" => "",
      "&#1098;" => "",
      "&#1067;" => "i",
      "&#1099;" => "i",
      "&#1068;" => "'",
      "&#1100;" => "'",
      "&#1069;" => "e",
      "&#1101;" => "e",
      "&#1070;" => "yu",
      "&#1102;" => "yu",
      "&#1071;" => "ya",
      "&#1103;" => "ya",
  //russian 1251 encoded alphabet (lower and upper cases)
  "а" => "a",
      "А" => "a",
      "б" => "b",
      "Б" => "b",
      "в" => "v",
      "В" => "v",
      "г" => "g",
      "Г" => "g",
      "д" => "d",
      "Д" => "d",
      "е" => "e",
      "Е" => "e",
      "ё" => "yo",
      "Ё" => "yo",
      "ж" => "zh",
      "Ж" => "zh",
      "з" => "z",
      "З" => "z",
      "и" => "i",
      "И" => "i",
      "й" => "j",
      "Й" => "j",
      "к" => "k",
      "К" => "k",
      "л" => "l",
      "Л" => "l",
      "м" => "m",
      "М" => "m",
      "н" => "n",
      "Н" => "n",
      "о" => "o",
      "О" => "o",
      "п" => "p",
      "П" => "p",
      "р" => "r",
      "Р" => "r",
      "с" => "s",
      "С" => "s",
      "т" => "t",
      "Т" => "t",
      "у" => "u",
      "У" => "u",
      "ф" => "f",
      "Ф" => "f",
      "х" => "h",
      "Х" => "h",
      "ц" => "c",
      "Ц" => "c",
      "ч" => "ch",
      "Ч" => "ch",
      "ш" => "sh",
      "Ш" => "sh",
      "щ" => "sch",
      "Щ" => "sch",
      "ъ" => "",
      "Ъ" => "",
      "ы" => "i",
      "Ы" => "i",
      "ь" => "'",
      "Ь" => "'",
      "э" => "e",
      "Э" => "e",
      "ю" => "yu",
      "Ю" => "yu",
      "я" => "ya",
      "Я" => "ya",
      "/" => "",
  "&" => "-",
  "№" => "",
  "," => "-",
  "°" => "",
  "\"" => "",
  "і" => "i", //ukranian i  
  "ї" => "i", //ukranian ї
  "є" => "e", //ukranian є
  "«" => "",
  "»" => "",
  )));
}
?>

29
There is a great service online that combines a lot of social sites in one button (line of icons)

you can see sample on my site

the link is http://odnaknopka.ru/get/

30
Mods & Plugins (Requests & Discussions) / Re: Cyrillic filenames
« on: October 24, 2010, 12:17:53 PM »
Well,

if anyone interested in a quick fix - please see below. This replaces the file name with the time string (in unix format)

in file includes/upload.php

find
Code: [Select]
      $this->name = $regs[1];
and replace all occurances with

Code: [Select]
      //$this->name = $regs[1];
  $this->name = time();

Any further ideas?

Pages: 1 [2] 3 4 5 6 7