Page 1 of 1

Breite des Artikelbildes setzen | Fixed Article Image width

Posted: Wed 14. Mar 2007, 14:45
by hedwig
English version below...

Hallo,

ich möchte gerne die Breite des Artikelbildes (Bild, dass man in den Artikelinformationen auswählen kann) einstellen. Standard ist der in der conf.inc.php angebene Wert für die content_width. Ich kann aber diesen Wert nicht ändern, da sonst andere Content-Parts von den neuen Maßen betroffen sind. Die Bilder sollen aber in der Artikelansicht nur eine maximal Breite von 100px haben. ist das möglich?

Danke.

-------------------
Hello,

Is there any possibilty to adjust the picture-width of the pictures chosen in the article-info without changing the value in the content_width variable in the conf.inc.php. I want to use a fixed with of 100px for the article images but you enter nothing in the form field "max width" the standard value is the value of the content_width variable.

Thanks.

Posted: Wed 14. Mar 2007, 15:32
by flip-flop
Hi hedwig,

please use the V1.3.0. There we have this feature implemented. :D

Knut

Posted: Wed 14. Mar 2007, 17:07
by hedwig
Hi Knut

which file, which variable?

---------------------

Welche Datei welche Variable?

Posted: Wed 14. Mar 2007, 17:36
by flip-flop
....which file, which variable? :shock:

Mhh, can regulate this at every article.

Bild: Kompletten Artikel
max. Breite: [ ] max. Höhe: [ ]

Bild: Artikellisting
max. Breite: [ ] max. Höhe: [ ]

Knut

Posted: Wed 14. Mar 2007, 17:51
by hedwig
Ja, das ist mir klar, will da aber einen default-wert einstellen können. und zwar nicht den der content-breite

Posted: Wed 14. Mar 2007, 18:35
by flip-flop
Ok, there is no regular way.

One solution is a samll and easy patch of the file /include/inc_lib/article.editcontent.inc.php
V1.30 060307
---------------
Line 178/179:
if ($article['image']['width'] > $phpwcms["content_width"] || $article['image']['width'] == '') {
$article['image']['width'] = $phpwcms["content_width"];

replace with

if ($article['image']['width'] > $template_default['article']['image_default_width'] || $article['image']['width'] == '') {
$article['image']['width'] = $template_default['article']['image_default_width'];


The same replace at line 211/212

if($article['image']['list_width'] > $template_default['article']['imagelist_default_width'] || $article['image']['list_width'] == '') {
$article['image']['list_width'] = $template_default['article']['imagelist_default_width'];


---------------
Second we need a new variable in /config/phpwcms/conf.template_default.inc.php

e.g.

Code: Select all

.
$template_default['article']['image_default_width']	    = 200;  // preset: max width of the article content img
$template_default['article']['imagelist_default_width']	= 100;  // preset: max width of the article list img
.
.
Thats all

Knut