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 Wed May 22, 2013 11:53 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sat Nov 20, 2010 12:34 pm 
Offline

Joined: Sat Nov 20, 2010 10:05 am
Posts: 3
Hello,

when twg index.php is included with $twg_album set to some "pictures" subdirectory like this:
Code:
                $twg_album="someSubdir";
                //$twg_show="x";
                include '../twg182/index.php';

, the setting disappears somewhere in the
Code:
ob_start();
...
@ob_end_clean();

chunk of code.

The following change helped:
Code:
$tmpAlbum=$twg_album;
ob_start();
...
@ob_end_clean();
$twg_album=$tmpAlbum;


  • TWG version 1.8.2
  • Zend server Version 5.0.3, PHP v. 5.3.3


Top
 Profile  
 
PostPosted: Sat Nov 20, 2010 9:48 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 01, 2005 12:53 pm
Posts: 8577
I don't undertstand what the problem is.

- Michael


Top
 Profile  
 
PostPosted: Sun Nov 21, 2010 5:02 pm 
Offline

Joined: Sat Nov 20, 2010 10:05 am
Posts: 3
I expected that when the index.php file is included while $twg_album is set, the page with the images in the $twg_album directory should be opened. I needed to add two assignment statements to index.php to achieve this.


Top
 Profile  
 
PostPosted: Sun Nov 21, 2010 6:12 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 01, 2005 12:53 pm
Posts: 8577
Of course this does not work because TWG looks for an url parameter and if none is found the album is set to an empty value as default.

you would have to change the parsing of the url parameter.

- Michael


Top
 Profile  
 
PostPosted: Mon Nov 22, 2010 5:55 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 01, 2005 12:53 pm
Posts: 8577
Get TWG 1.8.3 - there you can do this...

- Michael


Top
 Profile  
 
PostPosted: Tue Nov 23, 2010 12:16 am 
Offline

Joined: Sat Nov 20, 2010 10:05 am
Posts: 3
Thank you for the reply.

1.8.3 is installed now.

The index.php is included like this:

include '../twg183/index.php?twg_album=someImages&twg_show=x';

The pictures directory contains someImages subdirectory.

The result: nothing is produced by the included index.php and these are the records in the log file:

[22-Nov-2010 23:01:16] PHP Warning: include(../twg183/index.php?twg_album=smutecniOznameni&amp;twg_show=x) [<a href='function.include'>function.include</a>]: failed to open stream: No error in C:\Program Files\Zend\Apache2\htdocs\gradiko\index.php on line 139
[22-Nov-2010 23:01:16] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '../twg183/index.php?twg_album=smutecniOznameni&amp;twg_show=x' for inclusion (include_path='.;C:\Program Files\Zend\ZendServer\share\ZendFramework\library') in C:\Program Files\Zend\Apache2\htdocs\gradiko\index.php on line 139

When I use the variables from the context instead of the url parameters I get the following lines in the log:

[22-Nov-2010 23:12:44] PHP Warning: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\Program Files\Zend\Apache2\htdocs\twg183\inc\filefunctions.inc.php on line 1380
[22-Nov-2010 23:12:44] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'C:\Program Files\Zend\Apache2\htdocs\twg183/language/language_.php' (include_path='.;C:\Program Files\Zend\ZendServer\share\ZendFramework\library') in C:\Program Files\Zend\Apache2\htdocs\twg183\index.php on line 123


Top
 Profile  
 
PostPosted: Tue Nov 23, 2010 12:33 am 
Offline
Site Admin
User avatar

Joined: Mon Aug 01, 2005 12:53 pm
Posts: 8577
this does of course not work.

You can only include a file! twg_album has to be set before. Any other parameter is not recognized! You woul have to change caode that this works.

- Michael


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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:
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO