Mambo/Gallery search engine friendly urls

Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Thu, 2005-02-03 22:59

Hi there.

I run Gallery 1.4.4-pl5 in Mambo 4.5.1

http://www.hotzeltopf.de/component/option,com_gallery/Itemid,57/

Standalone URL:

http://www.hotzeltopf.de/gallery/index.php

the rewrite rules are enabled, as you can test on the standalone url.

How can i change the mambo integration to get search engine friendly urls there?

Best regards

Hotzi

 
tatster

Joined: 2005-02-14
Posts: 2
Posted: Tue, 2005-02-15 11:30
Hotzi wrote:
Hi there.

I run Gallery 1.4.4-pl5 in Mambo 4.5.1

http://www.hotzeltopf.de/component/option,com_gallery/Itemid,57/

Standalone URL:

http://www.hotzeltopf.de/gallery/index.php

the rewrite rules are enabled, as you can test on the standalone url.

How can i change the mambo integration to get search engine friendly urls there?

Best regards

Hotzi

I have this same problem as Hotzi. I would like to know how to sort this.

Can anyone help?

Thanks,

Anthony

 
LogicX
LogicX's picture

Joined: 2003-02-23
Posts: 31
Posted: Wed, 2005-03-16 05:07

Just for reference, I have my Mambo Gallery SEF URLs solution.

 
Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Sat, 2005-04-16 10:37

LogicX: Thank you, i will test this today.

Best regards

Hotzi

 
Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Sat, 2005-04-16 11:24

I had various Problems:

Pathway: Array -> Array -> Array

Gallery Links without /gallery in the Path

Used latest Version of Mambo (4.5.2.1) and Gallery 1.5 stable

Best regards

Hotzi

 
ibiwalliser

Joined: 2005-06-22
Posts: 2
Posted: Wed, 2005-06-22 16:36
Hotzi wrote:
I had various Problems:

Pathway: Array -> Array -> Array
...

i had the same problem and here is my first hack (very very ugly, i hope someone with more mambo/gallery experience can clean it 8) )

gallery.php

if (($gallery->album->fields['returnto'] != 'no') && isset($gallery->session->albumName) && ($gallery->session->albumName != "")) {
	foreach ($gallery->album->getParentAlbums(true) as $navAlbum) {
		if ($navAlbum['title'] != "YOUR Gallery Title") {
			$mainframe->appendPathWay("<a class=\"pathway\" href=\"".$navAlbum['url']."\">".$navAlbum['title']."</a>");
		} else {
			$mainframe->appendPathWay("<a class=\"pathway\" href=\"".$navAlbum['url']."\">Gallery</a>");
		}
		$mainframe->setPageTitle("Gallery - ".$navAlbum['title']);	
	}
} else { #If No album is being displayed, just call it the generic gallery
	$mainframe->setPageTitle("Gallery");
}

some problems/issues:
- "Home" is not a link
- Current album is a link
- no image-title (i don't need it)
- "YOUR Gallery Title" ;-)

kind regards

 
Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Wed, 2005-06-29 19:10

Hi, should this be the WHOLE gallery.php?

 
ibiwalliser

Joined: 2005-06-22
Posts: 2
Posted: Wed, 2005-06-29 21:55
Hotzi wrote:
Hi, should this be the WHOLE gallery.php?

no, it just replace LogicX code which you added to the gallery.php

 
Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Fri, 2005-07-01 12:20

I added the Picture Caption to the title and to the pathway:

if (($gallery->album->fields['returnto'] != 'no') && isset($gallery->session->albumName) && ($gallery->session->albumName != "")) { 
   foreach ($gallery->album->getParentAlbums(true) as $navAlbum) { 
      if ($navAlbum['title'] != "YOUR Gallery Title") { 
       	 $mainframe->appendPathWay("<a class=\"pathway\" href=\"".$navAlbum['url']."\">".$navAlbum['title']."</a>");
      } else { 
         $mainframe->appendPathWay("<a class=\"pathway\" href=\"".$navAlbum['url']."\">Gallery</a>");
      
      } 
      	if (isset($include) && $include=="view_photo.php") {
       		$mainframe->setPageTitle("Gallery - ".$navAlbum['title']." - ".$photo->caption);
        }
        else { 
        	$mainframe->setPageTitle("Gallery - ".$navAlbum['title']);
        }
    
   } 
   	if (isset($include) && $include=="view_photo.php") {
      	 $mainframe->appendPathWay($photo->caption);     
        } 
   
} else { #If No album is being displayed, just call it the generic gallery 
   $mainframe->setPageTitle("Gallery"); 
} 

Can somebody check it (errors?)

Best regards

Hotzi

 
DocMartin

Joined: 2005-07-13
Posts: 55
Posted: Wed, 2005-07-13 01:48

I'd love page titles with captions. Not too worried about the URLs, esp given bit of hassle and Gallery 2 on the way. (And google starting to find/index photos etc at current locations).

I too tried LogicX's gallery.php file, found word "Array" in page title.

Just had a go with Hotzi's code in the gallery.php, and brought gallery to a standstill: "Parse error: parse error, unexpected T_STRING in ... gallery.php on line 52"
Now, I've no clue re php; looked up such error w google, saw that could be something as minor as missing semi-colon [I slapped one in near end of line 51, w no joy] but still no idea what's wrong; back to showing "Array".

Brian Gillis has posted fix for SEF URLs for Gallery in Mambo using Xaneon Extensions. http://www.thegillis.net/programming_papers/php/mambo,_xaneon,_and_gallery_sef_extension.html
I tried his initial fix, for rather better URLs, but some of Gallery not working.
Maybe as I erred, or didn't try whole fix; but anyway, if can get those titles, I'd be happy right now.

 
Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Wed, 2005-07-13 05:42

If you need listing of my whole files -> please tell me.

 
buglerroller

Joined: 2005-07-25
Posts: 28
Posted: Sun, 2005-08-14 01:29

Anyone have any luck with SEF Advanced?

 
Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Thu, 2005-09-22 18:13

Hello, could please someone test my changes for gallery 1.5.1?

url.php:

if ((isset($args['type']) && $args['type'] == 'popup') ||
(!empty($args['gallery_popup']))) {
#This line below is used by the photo properties and add comment lines
$url= $gallery->app->photoAlbumURL . "/index.php";
} else {
if (!empty($gallery->session->mambo->mosRoot)) {
#this line below is used by slideshow.php
if (strpos($target,".php")!==false) {
$url = $gallery->session->mambo->mosRoot . "index.php";
} else {
#otherwise, its an album/photo path, and we should show it:
$prefix = isset($gallery->app->embeddedphotoAlbumURL) ? $gallery->app->embeddedphotoAlbumURL . "/" : "";
$url = $prefix . $target;
unset($args['option']); unset($args['Itemid']); unset($args['include']);
}
} else {
$target = 'index.php';
}
}
break;

 
Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Thu, 2005-09-22 18:14

Dont forget: After creating the new Configuration you have to reconfigure: embeddedphotoAlbumURL

 
Hotzi

Joined: 2004-03-16
Posts: 58
Posted: Mon, 2006-04-10 19:05

Works with 1.53 security release too.

--
http://www.andrehotzler.de