coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: Flipper01 on February 26, 2005, 06:02:09 PM

Title: Upgrade problem: displayimage.php
Post by: Flipper01 on February 26, 2005, 06:02:09 PM
I just upgraded my gallery from 1.1 to 1.3, but I have some trouble with the displayimage.php.

When I try to look at a picture I get an empty page with this error:
QuoteTemplate error
Failed to find block 'ipinfo'(#(<!-- BEGIN ipinfo -->)(.*?)(<!-- END ipinfo -->)#s) in :

   <tr>
      <td>
         <table width="100%" cellpadding="0" cellspacing="0">
            <td class="tableh2_compact" nowrap>
               <b>{MSG_AUTHOR}</b>
            </td>
            <td class="tableh2_compact" align="right" width="100%">
{BUTTONS}
            </td>
            <td class="tableh2_compact" align="right" nowrap>
               <span class="comment_date">[{MSG_DATE}]</span>
            </td>
         </table>
      </td>
   </tr>
   <tr>
      <td class="tableb_compact">
         <div id="cbody{MSG_ID}" style="display:block">
            {MSG_BODY}
         </div>
         <div id="cedit{MSG_ID}" style="display:none">
{EDIT}

         </div>
      </td>
   </tr>



Because I only need the 'add to favorites' link I used my old displayimage.php and pasted the next code in there:
    // Create the add to fav link
    if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
        $info[$lang_picinfo['addFavPhrase']] = "<a href=addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . " >" . $lang_picinfo['addFav'] . '</a>';
    } else {
        $info[$lang_picinfo['addFavPhrase']] = "<a href=addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . " >" . $lang_picinfo['remFav'] . '</a>';
    }


But now I get the error: Warning: in_array(): Wrong datatype for second argument in /home/ibn/website/fotoboek/displayimage.php on line 235


link to my album: http://w3.frw.rug.nl/ibn/fotoboek/
Title: Re: Upgrade problem: displayimage.php
Post by: Nibbler on February 26, 2005, 07:03:26 PM
You need to replace all files when doing an upgrade. Keeping old files will give you errors.
Title: Re: Upgrade problem: displayimage.php
Post by: Flipper01 on February 26, 2005, 08:52:05 PM
Quote from: Nibbler on February 26, 2005, 07:03:26 PM
You need to replace all files when doing an upgrade. Keeping old files will give you errors.

I editted the theme.php and that's causing the trouble I guess. The problem is that I editted so much that I can't undo this change.

I only want the possibility to add pictures to a favorite list. That is working, I only get the error...
Title: Re: Upgrade problem: displayimage.php
Post by: Nibbler on February 26, 2005, 09:13:32 PM
You need to make sure there is an ipinfo block in theme.php - that's the problem. You can copy it over from any of the other theme.php files.
Title: Re: Upgrade problem: displayimage.php
Post by: Flipper01 on February 26, 2005, 10:10:27 PM
Thnx, that solved the problem!

There was some more code I had to add, but it seems to be working fine  ;D