MyXoops Forum

Forum - myXOOPS German Support

2 + 6 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Re: Wer kennt sich gut mit MyAlbum-P aus

Betreff: Re: Wer kennt sich gut mit MyAlbum-P aus
von WDC am 27.06.2006 19:22:21

Ich bin der Meinung das ich diesen Befehl bearbeitet habe, und dann wurden die neuen Werte in die falschen Felder geschrieben.

// Update a photo 
function myalbum_update_photo$lid $cid $title $desc $valid null $ext "" $x "" $y "" )
{
 global 
$xoopsDB$xoopsConfig$xoopsModule;
  global 
$table_photos $table_text $table_cat $mod_url $isadmin ;

 if( isset( 
$valid ) ) {
   
$set_status ",status='$valid'" ;

    
// Trigger Notification
   
if( $valid == ) {
     
$notification_handler =& xoops_gethandler'notification' ) ;

     
// Global Notification
      
$notification_handler->triggerEvent'global' 'new_photo' , array( 'PHOTO_TITLE' => $title 'PHOTO_URI' => "$mod_url/photo.php?lid=$lid&cid=$cid) ) ;

      
// Category Notification
      
$rs $xoopsDB->query"SELECT title FROM $table_cat WHERE cid=$cid) ;
      list( 
$cat_title ) = $xoopsDB->fetchRow$rs ) ;
      
$notification_handler->triggerEvent'category' $cid 'new_photo' , array( 'PHOTO_TITLE' => $title 'CATEGORY_TITLE' => $cat_title 'PHOTO_URI' => "$mod_url/photo.php?lid=$lid&cid=$cid) ) ;
    }
 } else {
    
$set_status '' ;
  }

 
$set_date = empty( $_POST['store_timestamp'] ) ? ",date=UNIX_TIMESTAMP()" "" ;

  
// not admin can only touch photos status>0
 
$whr_status $isadmin '' 'AND status>0' ;

  if( 
$ext == "" ) {
    
// modify only text
   
$xoopsDB->query("UPDATE $table_photos SET cid='$cid',title='".addslashes($title)."' $set_status $set_date WHERE lid='$lid$whr_status") ;
  } else {
    
// modify text and image
    
$xoopsDB->query("UPDATE $table_photos SET cid='$cid',title='".addslashes($title)."', ext='$ext',res_x='$x',res_y='$y$set_status $set_date WHERE lid='$lid$whr_status");
 }

 
$xoopsDB->query("UPDATE $table_text SET description='".addslashes($desc)."' WHERE lid='$lid'");

 
redirect_header"editphoto.php?lid=$lid_ALBM_DBUPDATED ) ;
}


Das ist der Part, wo ich denke, das der Code rein muss. Hatte ich auch probiert, aber er hat mir die Werte halt in die falschen Felder geschrieben.

Danke das du dir soviel Mühe gibst.

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
Modulentwicklung New Xoops Xcreate Module 0 5329 26.11.2025 15:22
efkan Gehe zum letzten Beitrag
Modulentwicklung XOOPS Custom Field Module 1 1816 24.11.2025 11:21
Goffy Gehe zum letzten Beitrag