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, 20:20

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  [ 14 posts ] 
Author Message
 Post subject: including index.php file
PostPosted: 25. Jan 2011, 22:52 
Offline

Joined: 25. Jan 2011, 21:22
Posts: 6
Hey all,

I am trying to includ the index.php file in my existing php site. I'd prefer the php mothod over the iFrame.

I was unable to find the example_php_include.php file that the FAQ references and when I did a search onthe forum the words were too common so please forgive this I'm sure already asked question.

The FAQ says I need to set the follow :$php_include=true; and $install_dir="twg/".

My setup is mainsite --> twg sub folder.

So I did this at the top of my gallery.php file:

?<php
$php_include=true;
$install_dir="twg/".
>?

(I intentionally broke the php above)

I also tried adding a ; after the twg/".

this resulted in a black page being shown. When I remove the above code and simply used:

?>php include("twg/index.php"); >? I get the "please select a gallery" and languages menu at the the top.
followed by a message that says "No Images Uploaded Yet"
followed by the bottom information (total visits etc)

then the remainder of the page layout after the include is broken.

In the admin I get the following lines in the debug:

01.25.2011 20:22:51 (en) - ERROR 2 in php/site/twg/index.php, line 164: Cannot modify header information - headers already sent by (output started at /srv/www/php/site/gallery2.php:4)
01.25.2011 20:22:51 (en) - ERROR 2 in site/twg/inc/head.inc.php, line 21: Cannot modify header information - headers already sent by (output started at /srv/www/php/site/gallery2.php:4)
01.25.2011 20:22:51 (en) - ERROR 2 in site/twg/inc/filefunctions.inc.php, line 2122: copy(buttons/twg.gif) [_a href='function.copy'_function.copy_/a_]: failed to open stream: No such file or directory

I'd appreciate any help.


Top
 Profile  
 
PostPosted: 26. Jan 2011, 01:55 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you have to set this settings in the my_config.php and not in your php file.

Best,
Michael


Top
 Profile  
 
PostPosted: 26. Jan 2011, 20:46 
Offline

Joined: 25. Jan 2011, 21:22
Posts: 6
Micheal, thanks for the tip that fixed the problem with the php include but caused 2 other problems.
Well 1 new one and 1 existing one continues.
the first problem and previously existing is that anything after the php include is broken, I'll have to break out firebug unless there is something obvious I'm missing.

the new problem is that when I click on a picture to view it full size I get a message about no files being uploaded yet. I also get this message if I try to access index.php directly in the twp folder.

thanks


Top
 Profile  
 
PostPosted: 26. Jan 2011, 22:10 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
have you read the howto yet? There it is explained how to include TWG with php include.
Of course calling the index.php direclty will lead to an error.

- Michael


Top
 Profile  
 
PostPosted: 26. Jan 2011, 23:23 
Offline

Joined: 25. Jan 2011, 21:22
Posts: 6
I've read the php how to in the FAQ on the site. Is there another how-to I should be reading? The one in the diectory points me to the online FAQ.

I've set the following in my_config
$php_include=true;
$install_dir='twg/';

I've also set the Doc type as recommended in the FAQ.

I then call the index file with

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

the index file appears just fine, everything after it is broken.
When I click on a gallery it opens just fine and shows the picture thumbnails.
When I click on a thumnail the picture opens fine.
the problem is when I click on the picture to open it in a window it says it's opened /twg/index.php
there is no styles attached, it is just text and says "No images uploaded yet"

thanks,
-Rob


Top
 Profile  
 
PostPosted: 26. Jan 2011, 23:55 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
have you installed TWG in
twg/
and is your file in the directory where the twg dir is?

- Michael


Top
 Profile  
 
PostPosted: 27. Jan 2011, 00:07 
Offline

Joined: 25. Jan 2011, 21:22
Posts: 6
I installed twg in a sub-folder of my site called twg.

my gallery.php file which is calling the /twg/index.php file is in the site root.


Top
 Profile  
 
PostPosted: 27. Jan 2011, 00:24 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I just tested again with the latest version and it works fine. Make sure to have this settings in my_config.php.

- Michael


Top
 Profile  
 
PostPosted: 27. Jan 2011, 17:52 
Offline

Joined: 25. Jan 2011, 21:22
Posts: 6
Here is the contents of my my_config.php file.

$browser_title_prefix= 'Landscaping';
$default_gallery_title= 'Landscaping Portfolio';
$skin= 'admin';
$icon_set= 'lightgrey';
$show_border= 'FALSE';

$resize_only_if_too_big= true;
$show_clipped_images= false;

$show_comments= false;
$show_image_rating= false;
$show_image_rating= false;
$show_help_link= false;
$open_in_maximized_view= true;

$text= 'Landscaping';
$php_include=true;
$install_dir='twg/';


Top
 Profile  
 
PostPosted: 27. Jan 2011, 18:04 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
looks o.k. - can you sent am an url with pm?

- Michael


Top
 Profile  
 
PostPosted: 28. Jan 2011, 09:28 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
$open_in_maximized_view= true;

in php include is not working - i'll check the code...

- Michael


Top
 Profile  
 
PostPosted: 28. Jan 2011, 10:53 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
This setting does actually not make sense. Because when you include TWG in your code it is not possible anymore to render a fullscreen TWG.
In the code I did disable this but not the possibility to start this mode. I'll disable this in the next version.

You have to decide what you want fullscreen or not. Fullscreen + php include is not possible.

Have fun using TWG,
Michael


Top
 Profile  
 
PostPosted: 28. Jan 2011, 18:16 
Offline

Joined: 25. Jan 2011, 21:22
Posts: 6
Is using an iFrame restricted in the same way?


Top
 Profile  
 
PostPosted: 28. Jan 2011, 22:32 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
no - the fullscrenn is then only in the iframe.

- Michael


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 10 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