Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic Inconsistent use of $defaultimagesdir $imagesdir (Read 1370 times)
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Inconsistent use of $defaultimagesdir $imagesdir
Oct 12th, 2014 at 2:35pm
Mark & QuoteQuote  
Code
Select All
 Index: cgi-bin/yabb2/Sources/DoSmilies.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/DoSmilies.pm	(revision 1592)
 +++ cgi-bin/yabb2/Sources/DoSmilies.pm	(working copy)
 @@ -28,7 +28,7 @@
      $i                 = 0;
      while ( $SmilieURL[$i] ) {
          if ( $SmilieURL[$i] =~ /\//ixsm ) { $tmpurl = $SmilieURL[$i]; }
 -        else { $tmpurl = qq~$defaultimagesdir/$SmilieURL[$i]~; }
 +        else { $tmpurl = qq~$imagesdir/$SmilieURL[$i]~; }
          if ( $i && ( $i / 10 ) == int( $i / 10 ) ) {
              $moresmilieslist .= q~<br />~;
          }
 @@ -101,7 +101,7 @@
              }
              else { $smiliescolor = $my_smiliebg_b; }
              if ( $SmilieURL[$i] =~ /\//ixsm ) { $tmpurl = $SmilieURL[$i]; }
 -            else { $tmpurl = qq~$defaultimagesdir/$SmilieURL[$i]~; }
 +            else { $tmpurl = qq~$imagesdir/$SmilieURL[$i]~; }

              $smilieslist .= $my_smilie_window_td;
              $smilieslist =~ s/{yabb smiliescolor}/$smiliescolor/gsm;
 Index: cgi-bin/yabb2/Sources/InstantMessage.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/InstantMessage.pm	(revision 1592)
 +++ cgi-bin/yabb2/Sources/InstantMessage.pm	(working copy)
 @@ -771,7 +771,7 @@
      if ( $showadded == 2 ) {
          while ( $SmilieURL[$i] ) {
              if ( $SmilieURL[$i] =~ /\//ism ) { $tmpurl = $SmilieURL[$i]; }
 -            else { $tmpurl = qq~$defaultimagesdir/$SmilieURL[$i]~; }
 +            else { $tmpurl = qq~$imagesdir/$SmilieURL[$i]~; }
              $smilie_url_array .= qq~"$tmpurl", ~;
              $tmpcode = $SmilieCode[$i];
              $tmpcode =~ s/\&quot;/"+'"'+"/gsm;    # "'
 Index: cgi-bin/yabb2/Sources/Post.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/Post.pm	(revision 1592)
 +++ cgi-bin/yabb2/Sources/Post.pm	(working copy)
 @@ -987,7 +987,7 @@
                      if ( $SmilieURL[$i] =~ /\//ism ) {
                          $tmpurl = $SmilieURL[$i];
                      }
 -                    else { $tmpurl = qq~$defaultimagesdir/$SmilieURL[$i]~; }
 +                    else { $tmpurl = qq~$imagesdir/$SmilieURL[$i]~; }
                      $smilie_url_array .= qq~"$tmpurl", ~;
                      $tmpcode = $SmilieCode[$i];
                      $tmpcode =~ s/\&quot;/"+'"'+"/gxsm;
  



Not sure if these need check if file actually exists in current theme.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Inconsistent use of $defaultimagesdir $imagesdir
Reply #1 - Oct 12th, 2014 at 2:57pm
Mark & QuoteQuote  
Code
Select All
 Index: cgi-bin/yabb2/Admin/Smilies.pm
 ===================================================================
 --- cgi-bin/yabb2/Admin/Smilies.pm	(revision 1592)
 +++ cgi-bin/yabb2/Admin/Smilies.pm	(working copy)
 @@ -180,6 +180,18 @@
          else {
              $down = qq~<img src="$imagesdir/smiley_down.gif" alt="" />~;
          }
 +        if ( $SmilieURL[$i] =~ /\//ixsm )
 +        {
 +            $SmileyURL = $SmilieURL[$i];
 +        }
 +        else {
 +            $SmileyURL = qq~$yyhtml_root/Templates/Forum/$usestyle/$SmilieURL[$i]~;
 +            if ( !-e ("$htmldir/Templates/Forum/$usestyle/$SmilieURL[$i]")
 +            )
 +            {
 +                $SmileyURL = qq~$yyhtml_root/Templates/Forum/default/$SmilieURL[$i]~;
 +            }
 +        }
          $yymain .= qq~<tr>
      <td class="windowbg2 center"><input type="radio" name="showinbox" value="$SmilieDescription[$i]"~
            . ( $showinbox eq $SmilieDescription[$i] ? ' checked="checked"' : q{} )
 @@ -188,19 +200,13 @@
      <td class="windowbg2 center" style="white-space: nowrap;">
          <input type="file" name="smimg[$i]" id="smimg[$i]" size="35" />
          <input type="hidden" name="cur_smimg[$i]" value="$SmilieURL[$i]" /> <span class="cursor small bold" title="$admin_txt{'remove_file'}" onclick="document.getElementById('smimg[$i]').value='';">X</span>
 -        <div class="small bold">$admin_txt{'current_img'}: <a href="$yyhtml_root/Templates/Forum/default/$SmilieURL[$i]" target="_blank">$SmilieURL[$i]</a></div>
 +        <div class="small bold">$admin_txt{'current_img'}: <a href="$SmileyURL" target="_blank">$SmilieURL[$i]</a></div>
      </td>
      <td class="windowbg2 center"><input type="text" name="sdescr[$i]" value="$SmilieDescription[$i]" /></td>
      <td class="windowbg2 center"><input type="checkbox" name="smbox[$i]" value="1"~
            . ( $SmilieLinebreak[$i] eq '<br />' ? ' checked="checked"' : q{} )
            . q~ /></td>
 -    <td class="windowbg2 center"><img src="~
 -          . (
 -              $SmilieURL[$i] =~ /\//ixsm
 -            ? $SmilieURL[$i]
 -            : qq~$imagesdir/$SmilieURL[$i]~
 -          )
 -          . qq~" alt="" /></td>
 +    <td class="windowbg2 center"><img src="$SmileyURL" alt="" /></td>
      <td class="windowbg2 center"><input type="checkbox" name="delbox[$i]" value="1" /></td>
      <td class="windowbg2 center">$up $down</td>
    </tr>~;
  

  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2235
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Inconsistent use of $defaultimagesdir $imagesdir
Reply #2 - Oct 12th, 2014 at 3:04pm
Mark & QuoteQuote  
I need to check on the smilies - the ImgLoc function checks image locations when the code is
Code (HTML)
Select All
<img src= 

for the image. But it doesn't catch background image calls. I don't remember exactly and have to double check if it catches smiley locations. (Some of this code may be from before the ImgLoc function was added - whenever that was. It's a case of fresh eyes seeing inconsistencies and asking good questions.)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Inconsistent use of $defaultimagesdir $imagesdir
Reply #3 - Oct 12th, 2014 at 3:13pm
Mark & QuoteQuote  
I think it's case of newbie developer eating full box of ibuprofen because of evil headache...
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Inconsistent use of $defaultimagesdir $imagesdir

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry