Loading...
 
Architecture / Installation

Architecture / Installation


Two problems: top_bar.tpl and image thumbnails

posts: 14

Hi All,

sorry for the flurry of questions. Two problems:

1)

I changed the template of the tiki-top_bar.tpl, removing the tiki information and adding an image (long and thin, 75 pix high by 1024 long). The website displays OK in Microsoft Internet Explorer, but does not in Mozilla, Konqueror, etc. The left column, middle column and right column overdraw the top bar.

It looks (from viewing the source code from Mozilla) as though only one table is created, for the left, right and middle columns, and this table overwrites the top_bar. I tried editing tiki.tpl and creating tables, table rows, etc. to separate the top_bar from the other columns, but there was no change in behavior.

2)

When making images in image galleries, the thumbnail generator does not create a thumnail of the correct size (100 x 100 pix) but instead creates a thumbnail of the original image size. It looks like a thumbnail image is created but not resized.

Also when I try the user registration using "prevent robot registration" feature, I do not get a "random image" with numbers or anything. No image at all. I have PHP 4.3.4 installed, but it seems that GD is not working? I tried to show tiki-usage_chart.php as suggested on an IIS problem page (I have apache 1.3.26) and the image did not display, but neither did I get any errors.

Help anyone? Thanks.

- James

posts: 2881 United Kingdom

Hi James

1) remove or edit the height: parameter in your themes CSS file.


2) Thumbnails wont be generated for GIF. But as you may have a GD problem. I read somewhere that 4.3.4 has problems with Windows and hence the rather quick 4.3.5 release. I may be wrong there tho.
Run a PHP info script and see if the GD module is listed.

Damian


posts: 1001 Canada
The quick release was 4.3.6. 4.3.4 is a pretty stable one I use myself.

posts: 14

My problem seems to be PHP GD library, similar to a number of other people installing newer versions of PHP (mine is 4.3.4). While PHPinfo says that GD support is enabled, GIF and PNG and other file types are supported, but JPEG is not listed. This results in an error when the function "imagecreatejpeg()" is called. And this seems to be crashing scripts. Example, trying to upload a jpeg image:

Warning: imagecreatefromstring(): No JPEG support in this PHP build in domain-name/html/tiki-upload_image.php on line 229

I read something on the PHP websites about putting the jpeg-6b files into their own directory and doing something about it when configuring and compiling PHP so that GD correctly finds the jpeg information. But I couldn't find clear instructions. Does anyone know what exactly to do to fix this problem?

Thanks!

James


posts: 154 United Kingdom
  1. James, I have placed three images in the tiki-top_bar.tpl and have no problems in Mozilla the code can be seen at TopBarExample I used it also includews a login and search box in the tiki-top_bar.tpl.
  2. Also using an image 1024 pixels wide is not a good idea a sa lot of users will have their screen settings at 800*600 causing the image to go off the screen. It also does the same when you minimise the window.

posts: 1001 Canada

Hum James it looks like you have something not quite standard, I didn't have to mess with any of this stuff to get it working on EasyPHP or MDK 9.2 Advanced Extranet Server.
What's your version of GD?
This page gives information about the jpeg-6b support, particularly --with-jpeg-dir=DIR.

Try to come on #tikiwiki (or even #php) if you can, maybe that can help.


posts: 14

The problem was PHP 4.3.4 (and 4.3.6 BTW) was not compiling GD with JPEG support, even though the jpeg option was turned on in config. I needed to download JPEGSRC-6b and compile that, then manually specify the location during config of PHP. JPEG-6b was installed into /usr/loca/lib so that was the path I specified for the PHP compile, i.e.

--with-jpeg-dir=/usr/local/lib

and everything works. Annoying about the bundled GD support not installing the JPEG option when compiling PHP!

I am still working on the top_bar.tpl issue. I tried the code from sdl (below) (although the attachment would not appear or download for me, I needed to copy the wiki page) but the top bar images still get overdrawn by the left/middle columns of tiki when viewed in Mozilla. Any more ideas?

Thanks.

James


posts: 63 United Kingdom

I had a similar issue with the top bar on my site, but the solution is to be found in the CSS,

You need to set the height parameter of the DIV#tiki-top
Also you should edit the DIV#leftcolumn and DIV#rightcolumn to have the "top" parameter to be the height of your top bar.. For example, my top bar is 24 pixels high, so I set the leftcolumn and rightcolumn top to be 24 or 25, as I have a 1 pixel border on the bottom.

(I'm a bad person for putting stuff in my header.tpl otherwise it soulw be 124 pixels.)

posts: 2881 United Kingdom

> RussWilde:
> I had a similar issue with the top bar on my site, but the solution is to be found in the CSS,
>
> You need to set the height parameter of the DIV#tiki-top
> Also you should edit the DIV#leftcolumn and DIV#rightcolumn to have the "top" parameter to be the height of your top bar.. For example, my top bar is 24 pixels high, so I set the leftcolumn and rightcolumn top to be 24 or 25, as I have a 1 pixel border on the bottom.
>
> (I'm a bad person for putting stuff in my header.tpl otherwise it soulw be 124 pixels.)

the top is only needed if your using akwa based themes, that use CSS for left and right column positioning wink

Damian


posts: 2881 United Kingdom

> RussWilde:
> I had a similar issue with the top bar on my site, but the solution is to be found in the CSS,
>
> You need to set the height parameter of the DIV#tiki-top
> Also you should edit the DIV#leftcolumn and DIV#rightcolumn to have the "top" parameter to be the height of your top bar.. For example, my top bar is 24 pixels high, so I set the leftcolumn and rightcolumn top to be 24 or 25, as I have a 1 pixel border on the bottom.
>
> (I'm a bad person for putting stuff in my header.tpl otherwise it soulw be 124 pixels.)

the top is only needed if your using akwa based themes, that use CSS for left and right column positioning wink

Damian