Trying to add [Access Gallery] Link below "Album: album

Something_else

Joined: 2005-02-08
Posts: 29
Posted: Tue, 2005-02-08 14:26

Hopefully this is quick and painless. I simply want to add a basic link to the overall gallery from the Random Picture Block in postnuke. I cant seem to place the code in the right spot .. or maybe I'm not using the right code. All i get is a link "above' my block (out of block) in the table.

I was trying to add this code in the random.php file inside gallery/pnblocks folder.

<?php

echo"[<a href=\"modules.php?op=modload&name=gallery&file=index\">Access Gallery</a>]"
 ."";

?>

If someone has a better way to link to it, then by all means say so. I would think this is pretty basic, but I'm having a difficult time finding accomplishing it. I'm not very good with php at all ... otherwise this would have probably taken about 2 minutes. :(

Thanks for reading and i appreciate any response. :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-02-09 03:25

I don't know what you mean by "out of block". A url would be helpfull. Does Nuke have a differnt random block?

in block-random.php you can add links above the image. look for

		$id = $album->getPhotoId($index);
		echo ""

and you could change it like:

	if (!empty($index)) {
		$id = $album->getPhotoId($index);
		echo ""
		        .'<center>[<a href="modules.php?op=modload&name=gallery&file=index">Access Gallery</a>]</center>'
			. '<center><a href="' . makeAlbumUrl($album->fields['name'], $id) . '">'

I am showing more code for context. Not tested but should work or at lease point you in the right direction.

Dave

 
Something_else

Joined: 2005-02-08
Posts: 29
Posted: Wed, 2005-02-09 06:29

Hi! Thanks for the response. I tried doing what you explain here above. But it doesn't seem to work. Iv attached a example pic of what I'm trying to do. What i did in the pic was place "[access forum]" where i would like it to be in the block. Please disregard the fact that it doesn't sit inside the box. Its just a photo shop job.

I tried for hours to add a simple link to the "Overall" gallery but still haven't been able to create it.

I still want to keep everything the same ... just add a simple link at the bottom of the block like Ive displayed in my example pic.

What i meant by "out of box" is .. You see how everything fits inside that box .. my link was appearing outside of the box. inside the table. It doesn't really matter anyway.. i just removed the code when that happened.

I hope that is much more clear. Maybe my picture will help you understand better so you can help me out better. Thanks again. :)

*EDIT*

Forgot to mention that im using Postnuke. NOT phpnuke.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-02-09 07:23

in block-random.php find

		echo ' <center>From: '
			. '<a href="' .makeAlbumUrl($album->fields['name']) .'">'
			. $album->fields['title']
			. '</a></center>';

and change to

		echo ' <center>From: '
			. '<a href="' .makeAlbumUrl($album->fields['name']) .'">'
			. $album->fields['title']
			. '</a><br>[<a href="URL_TO_GALLERY/">Access Gallery</a>]</center>';
 
Something_else

Joined: 2005-02-08
Posts: 29
Posted: Thu, 2005-02-10 00:58

That didn't seem to work there either. I put it exactly where you said too. Nothing shows up at all and it doesnt disrupt the block any. I was thinking this needs to go in the "random.php" file under the pnblocks folder. No?

I don't understand why its not working.. You have any ideas?

BTW, thanks for helping me out. I appreciate it much. :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2005-02-10 01:48

what if you go to yoursite/gallery/block-random.php by itself? (like : http://langleycom.com/g1/block-random.php ) I Assumed that you are using the block-ramdom.php that comes with gallery....What is random.php? Is that a Nuke file?

 
Something_else

Joined: 2005-02-08
Posts: 29
Posted: Fri, 2005-02-11 09:22

OK. Heres the deal. I didn't see the block-random.php file until after i downloaded some other block off this site called "gallery_random_block_latest.tar.tar". All it was, was 2 folders, pnblock and pnlang. You are supposed to put them in your gallery folder. It works great but.. it uses a file called random.php. And doesn't have anything to do with block-random.php from what i can see. :D

So anyway .. Yes.. i can access my block-random.php and i see the access forum link that you helped me add. Looks perfect. SO ... i deleted my random gallery block .. took out the folders (pnblock pnlang) and .. when i try to add a block for this .. i don't even see an option to make this block-random.php in the blocks section.

My site doesn't like the "php" code blocks for some reason.. so i cant place the code in a php block .. What do i do with this block-random.php? Do i add it to includes/blocks ?

Thanks for you help. I appreciate your time .:)

 
Something_else

Joined: 2005-02-08
Posts: 29
Posted: Fri, 2005-02-11 09:29

Ok .. well i tired to add it to my includes/blocks folder and it totally wigged out. Couldnt even make new blocks. Sent to a white page. So that isnt going to work. I had to remove it from there.

I dont know what else to do but to use the one that works and modify it.

Heres the file im using..

 
Something_else

Joined: 2005-02-08
Posts: 29
Posted: Wed, 2005-02-16 04:34

Floridave?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-02-16 07:04

lackatee, Sorry I don't know. The only thing I can think of is if you can add the random-block that comes with gallery to you Nuke. You said

Quote:
Yes.. i can access my block-random.php and i see the access forum link that you helped me add. Looks perfect.

Why can't you add that file as a "block" in Nuke.

That is all I can think of. If you need help adding a block I am not your guy as I have not used PostNuke.

Dave