Member
Member
wdiggles   2011-06-28, 05:32
#1

Album.php uses getGalleryIndexURL this way `` and the trailing / displays in the resulting links URL.

The print_album_menu function uses getGalleryIndexURL this way echo "[*]".$indexname.""; and the trailing / does not display in the resulting links that are displayed if printAlbumMenu is on.

That means links to the same pages can be seen as duplicate content, one link with the trailing / and one without that both go to the same page.

How do I add a trailing / to the print_album_menu function?

Thank you for any help

Warren

Administrator
Administrator
acrylian   2011-06-28, 08:25
#2

Modify the plugin. But I actually don't see the problem. It is the same link and usage (html_encode(getGalleryIndexURL())) both times and surely not applicable to the duplicated content issue. That is applicable if you have two different urls pointing to the same content, especially if you are using several domains.

Member
Member
wdiggles   2011-06-28, 15:57
#3

Link from listmenu:
http://www.warrendiggles.com/photography/colorado-wedding
Link from album.php:
http://www.warrendiggles.com/photography/colorado-wedding/

I ran a test using SEOMoz crawler and it shows that these two different links point to duplicate content, my research shows that google will consider it duplicate content as well. For example google sees these url variations as duplicate content even though they all end out on the same landing page:
warrendiggles.com
www.warrendiggles.com
www.warrendiggles.com/
www.warrendiggles.com/index.html

How do I add a trailing slash to this snippet in the plugin (html_encode(getGalleryIndexURL()))

I tried "/" adding {echo "/"} ."/". a bunch of variations but could not get it to work.

Thank you for your help

Member
Member
sbillard   2011-06-28, 16:19
#4

This really seems a flaw in the tool you are using. All three of those representations are the same "link" with respect to internet standards. Not really much we can do about that since they will be found by whatever search engine happens to use that URL.

You have not provided the full code, but I presume you should use: (html_encode(getGalleryIndexURL())).'/' if you wish to add the slash.

Member
Member
reneesanguinetti   2011-06-28, 20:53
#5

@wdiggles
Were you able to modify the print_album_menu plugin? Did you get the trailing slash to display? I tried sbillard's suggestion without success. Can you provide the full code you used? I am using zenphoto version 1.4.0.3 [6817] (Official Build) THEME: zpfocus_v1.4.
Thank-you! Renee

Member
Member
wdiggles   2011-06-29, 00:27
#6

@renee
I tried variations of sbillard's suggestion without success either, here is the full code so if Mr. Billard will help again hopefully it will be more clear to us..

if($option === "list" OR $option === "list-top") { if(!empty($indexname)) { echo "[*]".$indexname.""; } }
Thank you!
Warren

Administrator
Administrator
acrylian   2011-06-29, 07:50
#7

I would suggest an easier solution without hacking any functions (I know SEO is specific but sometimes I think it is really exaggerated): Add a rewrite/redirection rule to your .htaccess file to remove that slash.

Member
Member
wdiggles   2011-06-29, 18:30
#8

Thank you acrylian I agree that is the best option, this is the code I used which I put directly after this line in the zenphoto htaccess file:

put no rules before this line

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)([^/])$ http://www.domain.com/zenphoto/$1$2/ [R=301,L]

Of course insert your site info into the http://www.domain.com/zenphoto/$1$2/

This post shows how to add the trailing slash to every url, you can also remove the trailing slash. Here is a link to the website I got the info from:

http://blog.valtersboze.com/2009/06/add-or-remove-trailing-slash-in-url-with-htaccess/

Member
Member
reneesanguinetti   2011-06-30, 19:37
#9

@wdiggles
This code worked fine for my menu items, but my theme is ZPfocus_v1.4 , zenphoto version 1.4.0.3 [6841] (Official Build) and I use the zenpage plugin for News, Pages and Categories. When I add the rule to my .htaccess file it returns a 404 page not found error for anything except the menu items.
Do you have any issues with this rule?
Thank-you! Renee

Member
Member
reneesanguinetti   2011-12-21, 18:42
#10

Hello,
I am using Zenphoto version 1.4.1.6 [8326] (Official Build)
Current gallery theme: zpFocus_v1.4.1.4
I still have the issue with the /.
The links to my albums on the gallery pages do show the trailing /.
But the links to the albums, pages and news items on my dropdown menu do not display the trailing / in the url.
Each time I add new albums, pages, etc. Google reports that I have more duplicate pages. Hundreds.
I tried modifying the print_album_menu.php as suggested before, but I could not get it to work. Also I tried the code for the htaccess file; it worked for the album links in the menu, but pages and news produced a 404 not found error.
I was wondering if this has changed in the newest release or maybe someone can offer me another solution. I would upgrade, but I don't think my current theme has been updated for the newest Zenphoto upgrade.
I appreciate your time!
Thank-you - Renee

Administrator
Administrator
acrylian   2011-12-21, 19:33
#11

Do you use the sitemap-extended plugin as well? I don't think it changed in 1.4.1.6 and I don't remeber if it does in 1.4.2. I don't remember how this theme creates the menu. Did you try a standard theme?

In 1.4.2 RC1 the html_meta_tags plugin has now an option to place a type in the. Maybe try that out.

Member
Member
reneesanguinetti   2011-12-21, 19:44
#12

Yes, I did try a standard theme with the Zenphoto version I am using (1.4.1.6). Same results. I will try RC1, but I'm not sure if it will be compatible with zpFocus_v1.4.1.4. Maybe the author will add to this topic.
Thank-you! Renee

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.