• [MOD] Google Friendly Urls For 4images Best Seo Mod 4 0 5 1
Currently:  

Author Topic: [MOD] Google Friendly Urls For 4images Best Seo Mod  (Read 707229 times)

0 Members and 1 Guest are viewing this topic.

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: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #330 on: January 03, 2010, 02:32:56 PM »
Welcome to 4images forum. The solution is: restore backups and try again. You do something wrong.
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 nl2dav

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #331 on: January 21, 2010, 03:22:02 AM »
hi wonder and welcome to the 4images forum:
you can controll all special chars within this post: http://www.4homepages.de/forum/index.php?topic=17598.msg137905#msg137905

file includes/sessions.php

example with char ą :

search for
Code: [Select]
$row['cat_name'] = strtr($row['cat_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");and
Code: [Select]
$row['image_name'] = strtr($row['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
change to

Code: [Select]
$row['cat_name'] = strtr($row['cat_name'], "ąéèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","aeeeaeauoiaabcdefghijklmnopqrstuvwxyz");and
Code: [Select]
$row['image_name'] = strtr($row['image_name'], "ąéèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","aeeeaeauoiaabcdefghijklmnopqrstuvwxyz");

search
Code: [Select]
function get_category_url($cat_id,$cat_url = '')
add before

Code: [Select]
function normalize ($string) {
    $table = array(
        'Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z', 'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',
        'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
        'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',
        'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss',
        'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e',
        'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',
        'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b',
        'ÿ'=>'y', 'Ŕ'=>'R', 'ŕ'=>'r',
    );

    return strtr($string, $table);
}

search quoted code from Nicky (start of this post).

replace with

Code: [Select]
$row['cat_name'] = normalize($row['cat_name']);
and

Code: [Select]
$row['image_name'] = normalize($row['image_name']);
If you also want lowercase characters in your url, use strtolower after normalize lines you just replaced

Code: [Select]
$row['cat_name'] = strtolower($row['cat_name']);
Code: [Select]
$row['image_name'] = strtolower($row['image_name']);

Offline megna73

  • Spam suspect
  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #332 on: January 25, 2010, 12:04:01 PM »
Thanx for sharing

seo India

Offline tirakle

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #333 on: February 14, 2010, 02:00:00 PM »
i have the following problem. Maybe somebody can help ?

Some URLs are written false e.g.:

The Category name is. "Dress up Games" but the Url is: "nress-up-games"

next example:

the picture/game is called "fast track race" but the Url is written: "past-track-race"

some urls are right but most of the are wrong. Can somebody please help ?

I also have the problem the the coding seems to be wrong. I want the page coded in ISO 8859-1 but the site is displayer in UFT-8. I tried everything to change that but is wont work.

edit: So far I found out that the mistakes are only shown is you use large letters, means that ABCDEFGHIJKLMNOPQRSTUVWXYZ turns into klmnopqrstuvwxyzQRSTUVWXYZ !!!! ??????
« Last Edit: February 14, 2010, 02:50:31 PM by tirakle »

Offline Crazymodder

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #334 on: February 27, 2010, 11:45:09 AM »
Hi everybody

I have download the seo.rar and change the session.php and add the .htaccess to my gallery. Nearly everythink works perfect but in lightbox.html i get an error if i want to click on an image to get to details.php.
the links look so:
r{image_id}.lightbox.html
but i think they have to look so:
r_{cat_name}_{pic_name}_{image_id}.html

Somebody have a solution for that problem?:)

Offline Memf

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #335 on: March 11, 2010, 10:08:17 PM »
Hello :)

Thank you for this wonderful mod, everything works beautiful! But there is a problem with lightboxes... When viewing the album, being on the front page - all photos are added to the lightbox without problems, but on the other album pages (2, 3, etc.) gives an error:

Not Found
The requested URL /cat20.2.html was not found on this server.

.... By the way, working links to the lightbox on the first album pages look like: /cat-{cat_name}-{image_id}.htm?action=addtolightbox&id={image_id}, on the other album pages (2, 3, etc.) they have the form: /cat20.2.htm?action=addtolightbox&id={image_id}, therefore, gives an error "Not found" :( How fix it? Please help.

my .htaccess (sessions.php, the same as in the first post of this topic):

Code: [Select]
RewriteEngine On

#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\.img([0-9]+)\.htm$ postcards.php?image_id=$1&%{QUERY_STRING}

P.S. - sorry for my english  :oops:

Offline Perce2

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #336 on: March 15, 2010, 03:25:25 PM »
humm, FYI if you have "/"  in your images names ex : "CD / DVDs" you'll get an error.

So :
Code: [Select]
$row['image_name'] = strtr($row['image_name'], "/éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","-eeeaeauoiaabcdefghijklmnopqrstuvwxyz");



Even now I have made the above ammendment I still get the "404" error if a "/" is used in the image name. Any other suggestions ?

Offline Tiburon

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • http://www.hintergrundbilder.de
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #337 on: March 16, 2010, 08:15:43 PM »
After reading the whole thread (although I don´t know if I understood the half of it  :mrgreen:) the mod works really good with 1.7.7. Thanks for the Mod and all the support by people here.  :thumbup:

Finally I have one general question.

As far as I understood, it is nescessary that the Urls have a prefix like "k" or "cat" (e.g. for category) because 4images needs this to know if it is a category or an image.

Is it also necessary that the url shows the ID of an image or category ?

I would prefer urls like "../image-on-the-beach.htm" instead of "../image-on-the-beach-15.htm"
----------------------------------

Have a nice Day

Offline Memf

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #338 on: March 17, 2010, 09:22:33 PM »
the mod works really good with 1.7.7

Hello, Tiburon

Yes, in 1.7.7 everything works cool. I also use version 1.7.7, but there is a problem with the lightboxes (see my post above), perhaps this problem is present in you too, I think. Check it out.

So, anyone else can help me? Please.

Offline funchiestz

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #339 on: March 31, 2010, 03:43:39 PM »
Hi

Thank you for the mod, almost everything is cool but I find one small problem. After I install this mod, ecard function is no longer functioning, any idea how to solved it?

Thank you

Offline mesut06

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #340 on: April 14, 2010, 07:51:24 AM »
hello. How can I remove a number of categories id

Code: [Select]
http://polatliforum.com/resim/Polatli-macun-koyu-resimleri-59.html
I want to be this way
Code: [Select]
http://polatliforum.com/resim/Polatli-macun-koyu-resimleri.html
Arkadaşlar url de e bulunan kategori id numaralarını nasıl kaldıra bilirim. bu konuda yardımlarınızı bekliyorum.

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: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #341 on: April 14, 2010, 03:58:17 PM »
you can't. (this has been discussed too many times to repeat explanation)
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 Sunny C.

  • Addicted member
  • ******
  • Posts: 1.804
  • I ♥ 4I
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #342 on: April 21, 2010, 12:55:51 PM »
Is this Possible for this Mod?
http://www.4homepages.de/forum/index.php?topic=11447.0
Link: report_pic.php?cat_id=2&cat_name=2&image_id=44&image_name=XXXXX
Like: report-xxxxx-44.htm ??
Please help

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #343 on: May 02, 2010, 02:12:51 PM »
Hi All,
         I have a little problem with this mod..

Everything works fine.. but when a user is on 2nd page onwards and if he changes the number of image views from 8 to any other number.. , then my url changes to  something like  http://www.mysitename.com/k113.35.htm

Here 113 is the category number and 35 is the page number..



Is there any way to prevent this ??

Thanks,
batu544

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: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #344 on: May 02, 2010, 11:10:34 PM »
First of all, I get different results on your site then you've described: it shows k113.2.html where 2 - is the page number I was on, not 35.

Try replace in includes/sessions.php:
            $url   str_replace('categories.php''cat'.$matches1[1].'.'.$matches2[1].'.htm'$url);
            
$query str_replace('cat_id='.$matches1[1].'&'''$query);
            
$query str_replace('&cat_id='.$matches1[1], ''$query);
            
$query str_replace('cat_id='.$matches1[1], ''$query);
            
$query str_replace('page='.$matches2[1].'&'''$query);
            
$query str_replace('&page='.$matches2[1], ''$query);
            
$query str_replace('page='.$matches2[1], ''$query);


With:
            $cat_url get_category_url($matches1[1]);
            
$url   str_replace('categories.php''cat'.$cat_url.'.htm'$url);
            
$query str_replace('cat_id='.$matches1[1].'&'''$query);
            
$query str_replace('&cat_id='.$matches1[1], ''$query);
            
$query str_replace('cat_id='.$matches1[1], ''$query);

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)