MyXoops Forum

Forum - myXOOPS German Support

7 - 5 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Aw:: Kalender mit Teilnahmebutton

Betreff: Aw:: Kalender mit Teilnahmebutton
von Goffy am 13.08.2010 13:30:09

Hi

Der Block MiniCalenderEx von piCal 0.91 funktioniert ab der Xoops-Version 2.3.* nicht mehr, weil das Auslesen der
jeweiligen Block-ID fehlschlägt.
Dieser Fehler ist bei piCal 0.93 behoben. piCal 0.93 funktioniert aber ohne "Protector's BigUmbrella Anti-XSS" nicht.


Eine Anpassung von piCal 0.91 an Xoops 2.3 und höher ist wie folgt möglich:

Datei blocks/pical_minical_ex.php
---------------------------------
Die Zeilen 11 bis 41 durch folgendes ersetzen
// XOOPS 2.2
if( ! defined'XOOPS_CUBE_LEGACY' ) && substrXOOPS_VERSION ) == 2.2 ) {
  
$GLOBALS['pical_blockinstance_id'] = $this->getVar('instanceid') ;
}

function 
pical_minical_ex_show$options )
{
  global 
$xoopsConfig $xoopsDB $xoopsUser ;

 
// speed check
  //global $GIJ_common_time ;
 //list($usec, $sec) = explode(" ",microtime());
 //echo ((float)$sec + (float)$usec) - $GIJ_common_time ; 

 // get bid
  
global $xoopsModule;
  
$module = new XoopsModule();
  
//Achgtung, wenn das Modul piCal umbenannt wurde, muss hier der entsprechende Name angegeben werden $module=$xoopsModule->getByDirname('piCal');
  
$mid=$module->getVar('mid');
  if( (
substrXOOPS_VERSION ) == 2.1) or (substrXOOPS_VERSION ) == 2.2)) {
   
// block instance of XOOPS 2.1/2.2
    
$mcx_rs $xoopsDB->query"SELECT i.instanceid FROM ".$xoopsDB->prefix("block_instance")." i LEFT JOIN ".$xoopsDB->prefix("newblocks")." b ON i.bid=b.bid WHERE b.mid='$mid' AND b.show_func='pical_minical_ex_show'" ) ;
  } else {
    
// newblocks of XOOPS 2.0.x, >2.2 or impresscms
   
$mcx_rs $xoopsDB->query"SELECT bid FROM ".$xoopsDB->prefix("newblocks")." WHERE mid='$mid' AND show_func='pical_minical_ex_show'" ) ;
 }
 
$num_rows mysql_num_rows$mcx_rs ) ;
 if( 
$num_rows == ) {
    
//Voreinstellungen für Formular einlesen
    
$bid=0;
 } else while( 
$res mysql_fetch_object$mcx_rs ) ) {
    
$bid=$res->bid;
 }


Datei admin/pluginsmanager.php
------------------------------
Die Zeilen 47 bis 53 durch folgendes ersetzen
if( (substrXOOPS_VERSION ) == 2.1) or (substrXOOPS_VERSION ) == 2.2)) {
  
// block instance of XOOPS 2.1/2.2
  
$mcx_rs $xoopsDB->query"SELECT i.instanceid,i.title FROM ".$xoopsDB->prefix("block_instance")." i LEFT JOIN ".$xoopsDB->prefix("newblocks")." b ON i.bid=b.bid WHERE b.mid='".$xoopsModule->getVar('mid')."' AND b.show_func='pical_minical_ex_show'" ) ;
} else {
 
// newblocks of XOOPS 2.0.x, >2.2 or impresscms
 
$mcx_rs $xoopsDB->query"SELECT bid,title FROM ".$xoopsDB->prefix("newblocks")." WHERE mid='".$xoopsModule->getVar('mid')."' AND show_func='pical_minical_ex_show'" ) ;
}


Außerdem habe eine kleine Beschreibung, wie der Plugin-Manager von piCal richtig angewendet wird, dazugegeben.
Ich habe nämlich einige Versuche gebraucht, bis ich wusste, wie er anzuwenden ist.

Bei Fragen oder Problemen bitte posten

Aktuell aus dem Forum

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