adding a link to another gallery website

ngianos

Joined: 2004-02-19
Posts: 21
Posted: Tue, 2004-07-27 04:16

My brother and I both have gallery 1.4.4-RC3 up and running. Is it possible for me to create an album on my site and when a user clicks to view the album a link sends them to my brother's site. It seems like this should be a simple hack, but I'm just not sure where to do it. Our sites on hosted on the same server at our house if that makes a difference. Any help would be appreciated.

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16154
Posted: Tue, 2004-07-27 06:06

ngianos,
You can't do that with images (copying albums form another install) but you could copy some of his images and in the album discription add a link to his album. Does that make sence?

Or you can test some functionality here:
http://langleycom.com/g1/albums.php and click the "Redirect test" album.
What you can do is:
create an album.
Add a photo for the highlight image.
In the album properties FAQ Gallery:c.34 add this to the album summery <meta http-equiv="refresh"content="5;url=http://bla.bla_bla.com/">
You will need to change the url to the site you want to go to and once it is working right change the 5 to a 0.

Dave

Login or register to post comments
ngianos

Joined: 2004-02-19
Posts: 21
Posted: Tue, 2004-07-27 16:28

Thanks floridave. That's more or less what I was looking for and it works perfectly.

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16154
Posted: Tue, 2005-02-08 22:46

Another method is to add this to view_album.php

if ($gallery->session->albumName == "redirect") {
	header("Location: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=85781#85781");
	exit;
}

just before the the code sends the doctype if not embedded or further up in you are in a embedded enviroment

if (!$GALLERY_EMBEDDED_INSIDE) {
	doctype();

You need to change the albumName and the URL that you want the user to go to.

Dave

Login or register to post comments
solsurfer

Joined: 2004-11-03
Posts: 36
Posted: Thu, 2006-05-11 20:30

This is great, Dave. What do you do if you need to change the url after you've reset the redirect time to 0?

Login or register to post comments
Appsnt

Joined: 2008-08-29
Posts: 7
Posted: Wed, 2009-08-26 08:24

Hi,
I know this is an old post but I am still using 1.5.8 and none of the above tips work.
I must be doing it wrong.
I have only just got 1.5.8 working after upgrading from v1.4.3-pl2 and dont want to have to go through it all again just yet.
I want to link a album to a RIP page without affecting other albums.
Any ideas would be great.

Thanks

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16154
Posted: Fri, 2009-08-28 05:59

I don't have a working G1 install at this time but:
add this to the album summery <meta http-equiv="refresh"content="5;url=http://bla.bla_bla.com/">
should work.
You will need to change the url to the site you want to go to and once it is working right change the 5 to a 0.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Fri, 2009-08-28 20:12

Actually I just tested and it appears that HTML is getting filtered out in current versions.

Also, I don't use G1 anymore and just have one install I've been lazy to convert. It took me 20 minutes just to reset my password and I can't remember where the heck anything is.

Dave says he's going to come up with some fix.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 16154
Posted: Fri, 2009-08-28 20:27

I will have to install 1.5.8 to see if this works:

$currentAlbum = $gallery->album->fields["name"];
switch ($currentAlbum) {
case "album01":
print '<meta http-equiv="refresh"content="5;url=http://bla.bla_bla.com/album1/">';
break;
case "album02":
print '<meta http-equiv="refresh"content="5;url=http://bla.bla_bla.com/album2/">';
break;

that would go in view_album.php

not much time to install G1....working on G3.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
Appsnt

Joined: 2008-08-29
Posts: 7
Posted: Tue, 2009-09-01 23:45

Thanks for the help will give that a try

Allan

Login or register to post comments