Breite des Artikelbildes setzen | Fixed Article Image width

Hier bekommst Du deutschsprachigen Support. Keine Fehlermeldungen oder Erweiterungswünsche bitte!
Post Reply
hedwig
Posts: 14
Joined: Sat 4. Nov 2006, 03:21
Location: Germany

Breite des Artikelbildes setzen | Fixed Article Image width

Post 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.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi hedwig,

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

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
hedwig
Posts: 14
Joined: Sat 4. Nov 2006, 03:21
Location: Germany

Post by hedwig »

Hi Knut

which file, which variable?

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

Welche Datei welche Variable?
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post 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
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
hedwig
Posts: 14
Joined: Sat 4. Nov 2006, 03:21
Location: Germany

Post by hedwig »

Ja, das ist mir klar, will da aber einen default-wert einstellen können. und zwar nicht den der content-breite
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post 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
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply