Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

PHP integration in a CSS layout
https://www.tinywebgallery.com/forum/viewtopic.php?f=11&t=357
Page 1 of 1

Author:  Jean-Sebastien Bargiel [ 10. Jun 2006, 09:28 ]
Post subject:  PHP integration in a CSS layout

This PHP integration was quite a bit of a challenge, particularly in light of the fact it was my first project with CSS and PHP.

First, I never achieved to integrate the TWG into a PHP pseudo-frame structure (one using a root index.php and ?variables to call content files - as long as the TWG was installed in its own subfolder). This "double" PHP inclusion generated some noticeable bugs (e.g. number of thubnails in the DHTML nav froze at the 7th image in FF but worked fine in IE; the top nav height would dynamically resize depending on the space taken by the picture/nav area and no matter the "height=19px" in the CSS file, etc.). Also, some important features did not work, such as the search engine, the ability to delete comments, and loaded the default home page (PHP included by default) instead of the expected function.

From that point, I decided to work with a more conventional structure using only one PHP file for the TWG inclusion. But then I the specific CSS layout of my site gave me some integration trouble. In the example provided with the TWG for PHP inclusion, tables are used to separate a menu file from the TWG. However, I realized that table cells don'T handle "overflow=auto" when a CSS code fixes the body with "position=absolute" (this was required by my site layout to fix the left menu in IE). So I replaced the table approach with pure CSS. If the main site uses CSS, I recommend using different file names than the ones used by the TWG, otherwise they mix up and create unexpected issues.

The only problem left - and maybe someone could give me a hint on this - is that the admin page from the top nav loads in a small iframe located top right, where other frames appear (comments, options, etc.). I have to right-click and open in a new window to make it usable.

Anyhow, thanks for this wonderful gallery engine! It is just awesome !

Author:  TinyWebGallery [ 12. Jun 2006, 09:01 ]
Post subject: 

Hi,

Have you read the howto about php inclusion? You need the given DOCTYPE and some settigns in the config. Otherwise it does now work properly at all.

Furthermore autodetection of thumbs has to be turned off because ie does not do this properly! (like described in the howto).
And if search and delete comments do not work something els I think there is something wrong with the setup.

Have you made changes in the config?

If you have lot of default settings in the css I recommend anyway to use iframe because css can be overwritten too easy.

about the last thing - this is weired and should not happen at all!
I just was on your page and don't find this - only the language flags don't seem to work in ie (or open where it is not visible). You should use the normal mode!

/Michael

Author:  Jean-Sebastien Bargiel [ 13. Jun 2006, 21:24 ]
Post subject:  PHP integration in a CSS layout

Yes, I read the howto about PHP integration. However, I may have missed some key information due to my "newbieness" with PHP...

After your post I did a fresh installation on my test server (thanks to Xampp!) and it appear that the language selection in IE is now fixed. I have no clue how I screwed it up but the fact that it was fixed through a fresh installation indicates that I did something wrong.

With respect to PHP inclusion, now that I can test offline using Xampp, I may give another try to building a full PHP/pseudo-frames site. Eventually...

In my first implementation, I did not change the config.php file, but made one little change to the index.php (in the root TWG folder) to remove the icon when a high-speed connection is detected (it will only show for slow connections).

I also made a few changes to the style.css to to change the fonts and switch their size to "em" instead of "px"). The my_styles.css file did not seem to allow this.

As you note, the style.css of TWG overwrote my own "layout.css" in the root folder. To fix this, I made sure there were no general classes defined in either of the CSS files:

/* the colors of the links */
td a:link { color:#000000; text-decoration: none; }
td a:visited { color:#000000; text-decoration:none; }
td a:hover { color:#D85D5D; text-decoration:none; }
td a:active { color:#D85D5D; text-decoration:none; }
td a:focus { color:#D85D5D; text-decoration:none; }

I did the same in my own "layout.css" file to ensure non-TWG styles did not overwrite TWG section styles. As a result, the browser is forced to apply the styles only to specified <divs> (or areas) of the site.

About the Admin link opening in an iframe, through further experimentations, and even after a fresh installation, I found that the problem arises with "Show public admin link?" set to false and "Show login?" set to true. With these options, the Admin link appears only after I log in, but loads in that same login frame instead of a new window. If I set the "Show public admin link?" to true (default setting), it correctly loads in a new window, but the Admin link is always shown. I thought this was not be very useful because I don't want any visitor to access the administration section.

Thanks for your interest in our work and for taking the time to respond. And again, this Tiny Web Gallery rocks! :)

J-S.

Author:  TinyWebGallery [ 14. Jun 2006, 06:28 ]
Post subject: 

About the admin link - this could be possible - before this link was used only to send admin emails - It was actually a different link at all.

I think I have missed to change this here.

Thanks,
Michael

Author:  george.mikal [ 2. Jun 2010, 13:41 ]
Post subject: 

If you have lot of default settings in the css I recommend anyway to use iframe because css can be overwritten too easy.

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/