Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 24. Nov 2024, 12:00

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 1. Feb 2009, 06:41 
Offline

Joined: 28. Sep 2007, 06:56
Posts: 37
I have following the instructions for displaying a random image and making it clickable to show that image. This works great.

My gallery is integrated into my site via the php include method.

I want it to work so that when you click on the image it will display that image in the include page (basically it will display it within the page design like it does with the include)

I tried to set an if statement so that if the twg_random was set to 1 it would write an include like this:

../twg/index.php?twg_random=1

That does not work - I get errors.

On that page if the random is NOT set to 1 then this Include statement DOES work

include ("../twg/index.php");

Ideas?

Site link is: #removed_broken_link

(photo gallery random link is to the right)


Top
 Profile  
 
 Post subject:
PostPosted: 1. Feb 2009, 23:59 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
if you use php include you have to use your including page.

- Michael


Top
 Profile  
 
 Post subject: Including page
PostPosted: 2. Feb 2009, 00:58 
Offline

Joined: 28. Sep 2007, 06:56
Posts: 37
Hi - thanks for replying. Actually that is what I did.

Here is a snippet of the code:

Page with random link display reads:

<a href ='index.php?page=photogallery&twg_random=1'><img src="/twg/image.php?twg_album=&twg_random=1&twg_type=random&twg_random_subdir=true&twg_random_size=126"></a>


This then loads index.php which loads the include page of photogallery

In this page I have the following code:

<?php
if ($twg_random == 1) {
include ("/twg/index.php?twg_random=1");
}
else {
include ("../twg/index.php");
}?>


I have tried variations of this but I get errors.

the current error is:

Warning: include(/twg/index.php?twg_random=1) [function.include]: failed to open stream: No such file or directory


Top
 Profile  
 
 Post subject:
PostPosted: 3. Feb 2009, 03:43 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you said you have included TWG with php include. Then you cannot call TWG with the index.php anymore. use your page that includes TWG.

- Michael


Top
 Profile  
 
 Post subject: Include
PostPosted: 4. Feb 2009, 00:27 
Offline

Joined: 28. Sep 2007, 06:56
Posts: 37
Okay - I JUST link to my page and make NO exceptions and now it is working.

Looks like I over engineered it.

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 66 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy