Hallo, Gast! (Registrieren)

Wir wünschen allen Besuchern frohe Ostern!

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
MyLeagues
#1
Eine neue Erweiterung wurde veröffentlicht: MyLeagues

Zitat:This plugin allows user to manage sports leagues statistics. It generates league tables and schedules.

Installation:
Put files from 'upload' folder on your server and then activate the plugin in ACP.
Zitieren
#2
Hallo,
ich habe mir MyLeagues heruntergeladen, im Admin-CP unter Konfiguration ist es auch ganz unten zu sehen aber wenn ich dann auf Myleagues und matches klicke kommt folgendes:
Zitat:Warning [2] Invalid argument supplied for foreach() - Line: 363 - File: admin/inc/class_form.php PHP 5.3.10-1~dotdeb.1 (Linux)
dann eine tabelle mit folgenden inhalt (eigentlich eine Tabele, aber wird hier nicht dargestellt):
Zitat: File Line Function
/admin/inc/
class_form.php 363 errorHandler->error
/admin/modules/config/
myleagues.php 483 DefaultForm->generate_select_box
/admin/index.php 520 require
und zum schluss noch:
Zitat:MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1064 - You have an error in your SQL syntax;
check the manual that corresponds to your
MySQL server version for the right syntax to use
near '' at line 1
Query:
SELECT `name` FROM forum_myleagues_leagues
WHERE `lid` =

Please contact the MyBB Group for support.
Ich habe alles richtig eingefügt hab ich nochmal kontrolliert. Könnten sie mir helfen?
MfG Lkwmonster
Zitieren
#3
Kann es sein, dass man zuerst eine League erstellen muss? Wenn man das nicht tut, dann kommt tatsächlich der von Dir genannte Fehler. Wenn man aber eine League erstellt, dann läuft das bei mir ohne Probleme weiter.
viele Grüße
Jockl
übersetzte und eigene Plugins
Zitieren
#4
Hallo, Ich habe ebenfalls ein problem mit diesem Plugin. Ich habe es auf den Server hochgeladen und im AdminCP Aktiviert. Hab mal ein test Team matches und League gemacht, jedoch hab ich nirrgends im Forum zugriff auf das Plugin. Wen ich unter dem Menu von Myleagues auf Links klicke werden mir meine Links angezeigt, mit einem Klick Öffnet sich eine Seite das ich keine Berechtigung hätte.. Ich bin aber angemeldet als Admin!


Gut, ich hab mal einbisschen geschaut und bin auch fündig geworden zum teil. Es wird gesagt, also soweit ich das verstanden hab, dass man die Links die zu den genannten Team Matches ect gehen (der mit der keine berechtigung) in den Myleagues.php einfügen muss. Ich denke das ist auch meine Lösung. Aber.. Ich weiss nicht wo ich das genau setzten muss 

Wo müssen jetzt diese links hin:
http://zhstylez.cwsurf.de/myleagues.php?...king&lid=1

http://zhstylez.cwsurf.de/myleagues.php?...dule&lid=1
http://zhstylez.cwsurf.de/myleagues.php?...eams&lid=1
Ich denke bei if (!defined("IN_MYBB")) aber genau das ist mein Problem Ich weiss es nicht genau. Ich hab mal das ganze if und die ("direct initialization.....) Zeile gelöscht und die Links eingefügt danach ging gar nichts mehr auf der Seite. Ich hab es dann aber wieder Rückgängig gemacht und jetzt Frag Ich euch! Ich hoffe es kann mir jemand Helfen :-)
Code:
<?php

/**
* MyLeagues by Filip Klar 2012
* Plugin file
* @author Filip Klar <kontakt@fklar.pl>
*/

if(!defined("IN_MYBB")) {
    die("Direct initialization of this file is not allowed.<br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("admin_config_menu", "myleagues_admin_menu");
$plugins->add_hook("admin_home_menu_quick_access", "myleagues_admin_menu");
$plugins->add_hook("admin_config_action_handler", "myleagues_admin_action_handler");


function myleagues_info() {
    
    global $lang;
    $lang->load("myleagues");
    
    return array(
        'name'             => "MyLeagues",
        'description'     => $lang->myleagues_plugin_description,
        'website'         => "http://fklar.pl/tag/myleagues/",
        'author'            => "Filip Klar",
        'authorsite'     => "http://fklar.pl/",
        'version'           => "1.0",
        'guid'              => "f3a93b453b3fa2b43f2c98c284457f75",
        'compatibility' => "16*"
    );
    
}


function myleagues_install() {

    global $db;
    
    $db->query("CREATE TABLE IF NOT EXISTS `".TABLE_PREFIX."myleagues_leagues` (
        `lid` int(10) NOT NULL AUTO_INCREMENT,
        `name` varchar(120) NOT NULL,
        `public` enum('0','1') NOT NULL DEFAULT '0',
        `season` varchar(50) NOT NULL,
        `teams` varchar(200) NOT NULL,
        `modified` bigint(30) NOT NULL,
        `pointsforwin` int(2) NOT NULL DEFAULT '3',
        `pointsfordraw` int(2) NOT NULL DEFAULT '1',
        `pointsforloss` int(2) NOT NULL DEFAULT '0',
        `sort` enum('goals','direct') NOT NULL DEFAULT 'goals',
        `colors` text NOT NULL,
        `wordforgoals` varchar(20) NOT NULL,
        `columns` varchar(100) NOT NULL DEFAULT 'points,goals,difference,matches,wins,draws,losses',
        `extrapoints` VARCHAR(200) NOT NULL,
        PRIMARY KEY (`lid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1");
    
    $db->query("CREATE TABLE IF NOT EXISTS `".TABLE_PREFIX."myleagues_matchdays` (
        `mid` int(10) NOT NULL AUTO_INCREMENT,
        `no` int(10) NOT NULL,
        `name` varchar(30) NOT NULL,
        `league` int(10) NOT NULL,
        `startdate` bigint(30) NOT NULL,
        `enddate` bigint(30) NOT NULL,
        PRIMARY KEY (`mid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1");
    
    $db->query("CREATE TABLE IF NOT EXISTS `".TABLE_PREFIX."myleagues_matches` (
        `mid` int(10) NOT NULL AUTO_INCREMENT,
        `league` int(10) NOT NULL,
        `matchday` int(10) NOT NULL,
        `dateline` bigint(30) NOT NULL,
        `hometeam` int(10) NOT NULL,
        `awayteam` int(10) NOT NULL,
        `homeresult` int(5) DEFAULT NULL,
        `awayresult` int(5) DEFAULT NULL,
        PRIMARY KEY (`mid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1");
    
    $db->query("CREATE TABLE IF NOT EXISTS `".TABLE_PREFIX."myleagues_rows` (
        `rid` int(10) NOT NULL AUTO_INCREMENT,
        `league` int(10) NOT NULL,
        `team` int(10) NOT NULL,
        `points` int(5) NOT NULL DEFAULT '0',
        `goalsfor` int(5) NOT NULL DEFAULT '0',
        `goalsagainst` int(5) NOT NULL DEFAULT '0',
        `goalsdifference` int(5) NOT NULL DEFAULT '0',
        `matches` int(5) NOT NULL DEFAULT '0',
        `wins` int(5) NOT NULL DEFAULT '0',
        `draws` int(5) NOT NULL DEFAULT '0',
        `losses` int(5) NOT NULL DEFAULT '0',
        `points2` int(5) NOT NULL DEFAULT '0',
        `goalsfor2` int(5) NOT NULL DEFAULT '0',
        `goalsagainst2` int(5) NOT NULL DEFAULT '0',
        `goalsdifference2` int(5) NOT NULL DEFAULT '0',
        PRIMARY KEY (`rid`),
        UNIQUE KEY `league` (`league`,`team`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1");
    
    $db->query("CREATE TABLE IF NOT EXISTS `".TABLE_PREFIX."myleagues_teams` (
        `tid` int(10) NOT NULL AUTO_INCREMENT,
        `name` varchar(100) NOT NULL,
        `coach` varchar(50) NOT NULL,
        `ground` varchar(100) NOT NULL,
        `address` varchar(50) NOT NULL,
        `website` varchar(50) NOT NULL,
        `modified` bigint(30) NOT NULL,
        PRIMARY KEY (`tid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1");
    
    $config = array(
        'sid'                => "NULL",
        'name'            => "myleagues",
        'title'            => "MyLeagues",
        'description'    => "",
        'optionscode'    => "yesno",
        'value'            => 1,
        'disporder'        => 0,
        'gid'                => 0,
    );
    
    $db->insert_query("settings", $config);
    rebuild_settings();
    
}


function myleagues_is_installed() {

    global $db;

    if($db->table_exists("myleagues_leagues")) {
        return TRUE;
    }
    else {
        return FALSE;
    }
    
}


function myleagues_uninstall() {

    global $db;
    
    $db->query("DROP TABLE `".TABLE_PREFIX."myleagues_leagues`");
    $db->query("DROP TABLE `".TABLE_PREFIX."myleagues_teams`");
    $db->query("DROP TABLE `".TABLE_PREFIX."myleagues_matchdays`");
    $db->query("DROP TABLE `".TABLE_PREFIX."myleagues_matches`");
    $db->query("DROP TABLE `".TABLE_PREFIX."myleagues_rows`");
    
}


function myleagues_activate() {

    global $db;
    
    $config = array(
        'value' => 1
    );
    
    $db->update_query("settings", $config, "`name` = 'myleagues'");
    rebuild_settings();
    
}


function myleagues_deactivate() {

    global $db;
    
    $config = array(
        'value' => 0
    );
    
    $db->update_query("settings", $config, "`name` = 'myleagues'");
    rebuild_settings();
    
}


function myleagues_admin_menu(&$sub_menu) {
    
    $sub_menu[] = array(
        'id'    => "myleagues",
        'title' => "MyLeagues",
        'link'  => "index.php?module=config-myleagues"
    );      
    
}

function myleagues_admin_action_handler(&$action) {
    
    $action['myleagues'] = array(
        'active' => "myleagues",
        'file'   => "myleagues.php"
    );    
    
}


?>
Zitieren