Wrong code for showing grafix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Robert9
    Member
    • Oct 2001
    • 53

    Wrong code for showing grafix

    Das Problem, das mich eben mal wieder eine ganze Nacht gekostet hat, liegt hier:

    Admincp > Texte: Anhänge > Angehängte Grafiken vollständig im Beitrag anzeigen
    PHP Code:
    <select name="setting[viewattachedimages]" id="sel_setting[viewattachedimages]_9" tabindex="1" class="bginput">
      <
    option value="0">Nein</option>
      <
    option value="1" selected="selected">Ja</option>
      <
    option value="2">Jawenn der Beitrag nur einen Anhang hat</option>
    </
    select
    Ich will alles zeigen und wähle Ja, damit haben wir den Wert 1

    Die Abfrage aber in /includes/class_postbit.php lautet in Zeile 491 (round about!)
    PHP Code:
    else if (!in_array($attachment['attachmentextension'], array('tiff''tif''psd''pdf')) AND ($this->registry->options['viewattachedimages'] == OR ($this->registry->options['viewattachedimages'] == AND $attachcount == 1))) 
    Auf deutsch also: wenn Wert = 2 oder wenn Wert = 1 und nur ein Bild angehängt.
    Abhilfe schafft also eine Änderung des Formulars (wobei ich (noch) nicht weiß, wo dieser Wert noch abgefragt wird) oder aber Änderung in
    PHP Code:
    == OR ($this->registry->options['viewattachedimages'] == AND $attachcount == 
    vb sollte sich mal was einfallen lassen wie man unsere eingesetzte Zeit belohnt.


    If someone wants to translate my german text take the one above; else read this:

    If you want to show every grafix in forum you select inside the admincp "show all pics"; with this you set the value to 1.

    But inside /includes/class_postbit.php at 491, it asks

    value =1 or value = 2 and only one attachment.


    To solve this change /includes/class_postbit.php (491)

    from
    PHP Code:
    == OR ($this->registry->options['viewattachedimages'] == AND $attachcount == 
    to

    PHP Code:
    == OR ($this->registry->options['viewattachedimages'] == AND $attachcount == 
    Last edited by Robert9; Wed 6 Sep '06, 4:37am.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    I believe you are talking about this bug:

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...