• [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 710016 times)

0 Members and 3 Guests are viewing this topic.

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #255 on: April 20, 2009, 06:06:09 AM »
tats ok

is there any way to display category path in the image url

for ex : if a site has hollywood-actress as a category it should say

http://test.com/cat-hollywood-actress-1/img-vanessa-21.htm


Take a time and read whole thread carefully, this was requested here dozen times with some result........

Offline whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #256 on: April 20, 2009, 06:15:38 PM »
i searched whole topic but not able to locate

can u just send me the exact post

i'll be very thankful to you

 :)

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #257 on: April 20, 2009, 10:07:28 PM »
i searched whole topic but not able to locate

can u just send me the exact post

i'll be very thankful to you

 :)

sorry I cant, we have search function on top of this page......

Offline whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #258 on: April 23, 2009, 06:58:21 AM »
The one thing stopping me from using 4images on my live site is the problem with the URL


After spending several weeks fine tuning and adding lots of great mods to my site on a localhost WAMP test area I just can't get the URLs the way I want them


I've been thru the 27 pages of this MOD:

[Mod] Search Engine Friendly URLs aka Short URLs
http://www.4homepages.de/forum/index.php?topic=6729.0

and whilst I quite like the effect
eg.
www.mysite.com/cat-12 
www.mysite.com/images-321

I can't get my dropdown menu to function with that particular mod
(and also it's not great for Google SEO as it has no category or image name in the URL)




I've also tried the mod on this current thread - [MOD] Google Friendly Urls For 4images Best Seo Mod - but can't manipulate the URL the way I want because I am struggling with REGEX and the .htaccess, and my own understanding of php coding

I appreciate that you have to have the cat ID and image ID in every URL using this mod but can I split up the long URL with a forward slash? (And remove the .htm extension)

eg. I want:
www.mysite.com/categoryname-12/imagename-43

I've also managed to remove the .htm / .html / .php ending successfully but would like to split up the category and the image with a forward slash (/)

because I have sub-categories, the URL currently looks ridiculous and would help if I could have forward slashes like this - category / subcat / image


any suggestions/advice?

hey

didi you got the solution

even im trying for the same

Offline whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #259 on: April 23, 2009, 07:19:30 AM »
if you use unmodified code from the original tutorial on first page of this topic, you should not see all the parent categories in the links, only current category name.
as of links to image details, in includes/sessions.php find
Code: [Select]
//return get_category_url($row['cat_id']).'-'.str_replace('+','-',urlencode($row['image_name'])).'-'.$image_id;
replace it with
Code: [Select]
return get_category_url($row['cat_id']).'-'.str_replace('+','-',urlencode($row['image_name'])).'-'.$image_id;

I am using your given sessions.php file which didnt have the code which you tell to replace.
I have attached your given sessions.php file which i am currently using plz plz edit it for better seo and also tell can i use it with 4images 1.6.7  for better seo and user flags?

the same is not working

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #260 on: May 03, 2009, 08:06:20 PM »
Im replacing this in step 2.... I cant find the negative effects.... however
Code: [Select]
if ($this->mode == "get" && strpos($url, $this->session_id) === false) {
Why is my session.php different? I cant find the mod it is related to... using 1.7.6
As long as I can finish my site before I die.

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 #261 on: May 03, 2009, 08:47:50 PM »
@whosthis.ee:
@AntiNSA2:
Would you repeat what is the problem again?

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 whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #262 on: May 03, 2009, 08:52:04 PM »
The one thing stopping me from using 4images on my live site is the problem with the URL


After spending several weeks fine tuning and adding lots of great mods to my site on a localhost WAMP test area I just can't get the URLs the way I want them


I've been thru the 27 pages of this MOD:

[Mod] Search Engine Friendly URLs aka Short URLs
http://www.4homepages.de/forum/index.php?topic=6729.0

and whilst I quite like the effect
eg.
www.mysite.com/cat-12
www.mysite.com/images-321

I can't get my dropdown menu to function with that particular mod
(and also it's not great for Google SEO as it has no category or image name in the URL)




I've also tried the mod on this current thread - [MOD] Google Friendly Urls For 4images Best Seo Mod - but can't manipulate the URL the way I want because I am struggling with REGEX and the .htaccess, and my own understanding of php coding

I appreciate that you have to have the cat ID and image ID in every URL using this mod but can I split up the long URL with a forward slash? (And remove the .htm extension)

eg. I want:
www.mysite.com/categoryname-12/imagename-43

I've also managed to remove the .htm / .html / .php ending successfully but would like to split up the category and the image with a forward slash (/)

because I have sub-categories, the URL currently looks ridiculous and would help if I could have forward slashes like this - category / subcat / image


any suggestions/advice?

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 #263 on: May 03, 2009, 09:00:08 PM »
I can't get my dropdown menu to function with that particular mod
(and also it's not great for Google SEO as it has no category or image name in the URL)
Exactly what is the problem? On my test site dropdown works fine. You can try replacing POST with GET in category_dropdown_form.html template.






I appreciate that you have to have the cat ID and image ID in every URL using this mod but can I split up the long URL with a forward slash? (And remove the .htm extension)

eg. I want:
www.mysite.com/categoryname-12/imagename-43

I've also managed to remove the .htm / .html / .php ending successfully but would like to split up the category and the image with a forward slash (/)

because I have sub-categories, the URL currently looks ridiculous and would help if I could have forward slashes like this - category / subcat / image


any suggestions/advice?

the splitting path with slashes is more complicated then it looks, due to 4images using relative paths ./ and ../

.htm you can remove in includes/sessions.php and in .htaccess
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 whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #264 on: May 03, 2009, 09:10:31 PM »
when i click on any item in my dropdown

its taking to this url : http://celebrityphotogallery.org/cat.htm?cat_id=31
instead of this url : http://celebrityphotogallery.org/cat-aishwarya-rai-31.htm

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 #265 on: May 03, 2009, 09:56:31 PM »
If you know a little how HTML works, then this would not surprise you at all. This is normal and you can't do anything about it without javascript or without removing dropdown.
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 AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #266 on: May 04, 2009, 06:29:31 AM »
Step three says to find this code
Code: [Select]
function url($url, $amp = "&") {
    global $l;
    $dummy_array = explode("#", $url);
    $url = $dummy_array[0];

    if ($this->mode == "get" && !preg_match("/".SESSION_NAME."=/i", $url)) {
      $url .= preg_match("/\?/", $url) ? "$amp" : "?";
      $url .= SESSION_NAME."=".$this->session_id;
    }

    if (!empty($l)) {
      $url .= preg_match("/\?/", $url) ? "$amp" : "?";
      $url .= "l=".$l;
    }

    $url .= (isset($dummy_array[1])) ? "#".$dummy_array[1] : "";
    return $url;
  }



however

Mine is like this :
Code: [Select]
function url($url, $amp = "&") {
    global $l;
    $dummy_array = explode("#", $url);
    $url = $dummy_array[0];

    if ($this->mode == "get" && strpos($url, $this->session_id) === false) {
      $url .= strpos($url, '?') !== false ? $amp : "?";
      $url .= SESSION_NAME."=".$this->session_id;
    }

    if (!empty($l)) {
      $url .= strpos($url, '?') !== false ? $amp : "?";
      $url .= "l=".$l;
    }

    $url .= (isset($dummy_array[1])) ? "#".$dummy_array[1] : "";
    return $url;


This line of code is different
Code: [Select]
  if ($this->mode == "get" && strpos($url, $this->session_id) === false) {
I dont know why it is didfferent... I cant find the mod if there is one that added the code to make it different... is it safe to take that out of there in order to do the last step of this mod without breaking anything?
As long as I can finish my site before I die.

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 #267 on: May 04, 2009, 08:27:41 AM »
yes, replace that block of code and then in the new code replace
Code: [Select]
    if ($this->mode == "get" && strstr($url, $this->session_id)) {
      $url .= strpos($url, '?') !== false ? '&' : '?';
      $url .= SESSION_NAME."=".$this->session_id;
    }
    if (!empty($l)) {
      $url .= strpos($url, '?') ? '&' : '?';
      $url .= "l=".$l;
    }
    $url = str_replace('&', $amp, $url);
    $url .= isset($dummy_array[1]) ? "#".$dummy_array[1] : "";
    return $url;


with:
Code: [Select]
    if ($this->mode == "get" && strpos($url, $this->session_id) === false) {
      $url .= strpos($url, '?') !== false ? $amp : "?";
      $url .= SESSION_NAME."=".$this->session_id;
    }

    if (!empty($l)) {
      $url .= strpos($url, '?') !== false ? $amp : "?";
      $url .= "l=".$l;
    }

    $url = str_replace('&', $amp, $url);
    $url .= (isset($dummy_array[1])) ? "#".$dummy_array[1] : "";
    return $url;
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 whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Google Friendly Urls For 4images Best Seo Mod
« Reply #269 on: May 05, 2009, 04:47:41 AM »

Thanks it works very well!
As long as I can finish my site before I die.