May 22 2012 00:50:45
Languages
Navigation
Friends & Affiliates
Roadmap
[N] User Profile Wall
[N] Error log like in P...
[N] Submit photo - Subc...
[N] Warnings - who can ...
[N] [edit profile]Save ...
[N] Moving panels with ...
[N] Forum thread deform...
[N] Thumbnails in downl...
[N] [Locale German] New...
[N] Warnings only for a...
Users Online
· Guests Online: 10

· Members Online: 0

· Total Members: 494
· Newest Member: budisantoso
Last Seen Users
· budisantoso17:02:39
· lidaer17:13:11
· Yodix 1 day
· mr-casino 1 day
· dos5 3 days
· Machello93 3 days
· Leonardo_master 3 days
· ezgi 3 days
· xxyy 4 days
· lilin0402 5 days

Login
 Username  Password  
View Thread: Tabelle wird nicht angelegt reloaded ;-)
Pimped Fusion - Content Management System » Pimped-Fusion Additions (de) » Infusionen
Who is here? 1 Guest
 Print Thread
Tabelle wird nicht angelegt reloaded ;-)
xxyy
GeSHi: PHP
  1. <?php
  2. /*-------------------------------------------------------+
  3. | Pimped-Fusion Content Management System
  4. | Copyright (C) 2009 - 2010
  5. | http://www.pimped-fusion.net
  6. +--------------------------------------------------------+
  7. | Filename: infusion.php
  8. | Author: xxyy
  9. +--------------------------------------------------------*/
  10. if (!defined("PIMPED_FUSION")) { die("Access Denied"); }
  11.  
  12. // The folder in which the infusion resides.
  13. $infusion_folder = "hue_panel";
  14.  
  15. // Load Definitions
  16. include INFUSIONS.$infusion_folder."/infusion_db.php";
  17.  
  18. /*// Check if locale file is available matching the current site locale setting.
  19. if (file_exists(INFUSIONS.$infusion_folder."/locale/".$settings['locale'].".php")) {
  20. // Load the locale file matching the current site locale setting.
  21. include INFUSIONS.$infusion_folder."/locale/".$settings['locale'].".php";
  22. } else {
  23. // Load the infusion's default locale file.
  24. include INFUSIONS.$infusion_folder."/locale/German.php";
  25. }*/
  26.  
  27.  
  28. // Infusion general information
  29. $inf_title = /*$locale['hue_title']*/"H&Uuml;"; // Your Infusion's Titel
  30. $inf_description = "Infusion zur Verwaltung von Haus&Uuml;bungen."; // Description of your Infusion
  31. $inf_version = "0.1 DEV"; // Your Infusion's Version
  32. $inf_developer = "xxyy"; // Your Name
  33. $inf_email = "supertux22@gmail.com"; // Your E-Mail
  34. $inf_weburl = "http://blacktigers.bplaced.net/"; // Your Website
  35.  
  36. // This is needed too:
  37. $inf_folder = $infusion_folder; // The folder in which the infusion resides.
  38.  
  39. // Some Definitions for the tables in the database:
  40. if (!defined("ENGINE")) define("ENGINE", "ENGINE=MyISAM");
  41. if (!defined("CHARSET")) define("CHARSET", "CHARACTER SET utf8 COLLATE utf8_general_ci");
  42.  
  43.  
  44. // Delete any items not required in your infusion below.
  45.  
  46. // Create some tables in database:
  47. $inf_newtable[1] = DB_HUE." (
  48. id INT(10) UNSIGNED AUTO_INCREMENT,
  49. fach TEXT NOT NULL,
  50. hue VARCHAR(260) NOT NULL,
  51. comment TEXT NOT NULL,
  52. status INT(1) UNSIGNED NOT NULL,
  53. user INT(10) UNSIGNED NOT NULL,
  54. date DATE NOT NULL,
  55. abgabe DATE NOT NULL,
  56. PRIMARY KEY (id)
  57. ) ".ENGINE." ".CHARSET.";";
  58.  
  59. $inf_newtable[2] = DB_HUE_SETTINGS." (
  60. hue_set_name TEXT NOT NULL,
  61. hue_set VARCHAR(10) DEFAULT '0'
  62. ) ".ENGINE." ".CHARSET.";";
  63.  
  64. $inf_newtable[3] = DB_HUE_KLASSEN." (
  65. id INT(10) UNSIGNED AUTO_INCREMENT,
  66. name TEXT NOT NULL,
  67. PRIMARY KEY (id)
  68. ) ".ENGINE." ".CHARSET.";";
  69.  
  70. // Insert something in your tables:
  71.  
  72. $inf_insertdbrow[0] = DB_HUE_KLASSEN." SET name='Beispiel' ";
  73.  
  74. $inf_insertdbrow[1] = DB_PANELS." SET panel_name='H&Uuml;-Panel', panel_filename='".$inf_folder."', panel_content='', panel_side=2, panel_order='1', panel_type='file', panel_access='0', panel_display='0', panel_status='1' ";
  75.  
  76. $inf_insertdbrow[2] = DB_HUE_SETTINGS." SET set_name='on',set='0' ";
  77. $inf_insertdbrow[3] = DB_HUE_SETTINGS." SET set_name='showcopy',set='1' ";
  78. $inf_insertdbrow[4] = DB_HUE_SETTINGS." SET set_name='showbanner',set='1' ";
  79. $inf_insertdbrow[5] = DB_HUE_SETTINGS." SET set_name='name',set='Haus&uuml;bungsinformation' ";
  80. $inf_insertdbrow[6] = DB_HUE_SETTINGS." SET set_name='einheit',set='Haus&uuml;bung' ";
  81. $inf_insertdbrow[7] = DB_HUE_SETTINGS." SET set_name='einheiten',set='Haus&uuml;bungen' ";
  82. $inf_insertdbrow[8] = DB_HUE_SETTINGS." SET set_name='klasse',set='Klasse' ";
  83. $inf_insertdbrow[9] = DB_HUE_SETTINGS." SET set_name='klassen',set='Klassen' ";
  84.  
  85.  
  86.  
  87. // If the infusion gets deinstalled, we have to drop the tables again:
  88. $inf_droptable[1] = DB_HUE;
  89. $inf_droptable[2] = DB_HUE_SETTINGS;
  90. $inf_droptable[3] = DB_HUE_KLASSEN;
  91.  
  92. // alter some tables
  93.  
  94. $inf_deldbrow[1] = DB_PANELS." WHERE panel_filename='".$inf_folder."'";
  95.  
  96.  
  97. // infusions can have multiple admin panels and navigation links.
  98. // Each admin panel and link is specified through an array.
  99.  
  100. // For admin panels we use $inf_adminpanel[] like so:
  101.  
  102. // There are 4 items available:
  103.  
  104. // title - the name of the link shown in the infusions admin panel.
  105. // image - the image displayd in the infusions admin panel.
  106. // link - the name of the admin panel file.
  107. // rights - infusions must have a unique access rights value, can be up to 4 letters (uppercase only).
  108.  
  109. $inf_adminpanel[1] = array(
  110. "title" => "H&Uuml; Admin",
  111. "image" => "hue.gif",
  112. "panel" => "hue_admin.php",
  113. "rights" => "HUE"
  114. );
  115.  
  116.  
  117. // Site links are defined in similar fashion using $inf_sitelink[] like so:
  118.  
  119. // Again there are 3 items available:
  120.  
  121. // title - the name of the link shown in the navigation menu.
  122. // url - the name of the infusion panel file.
  123. // visibility - defines visibility (nGUEST, nMEMBER, nMODERATOR, nADMIN or nSUPERADMIN).
  124.  
  125.  
  126. $inf_sitelink[1] = array(
  127. "title" => "Hausübung anzeigen",
  128. "url" => "index.php",
  129. "visibility" => nGUEST
  130. );
  131.  
  132.  
  133. ?>
Parsed in 0.137 seconds, using GeSHi 1.0.7.20

Die DB_HUE_SETTINGS wird nicht angelegt - Ich habe alles mögliche geändert - aber es geht nicht!
xxyy
PS:
Könnte bitte mal jemand den Spoiler BBCode aktivieren?
EDIT:
Code aktualisiert.
Edited by xxyy on 05-11-2010 20:26
Signaturexxyy
blacktigers.bplaced.net/banner/sig.png
Meine neue Webseite (in Development...)
Alle Angaben ohne Gewähr. Ich übernehme keine Haftung für Schäden an Hard/Software Wink
 
http://xxyy.bplaced.net/
phprazor
Hast Du denn vorher sauber define´d ??

DB_HUE_SETTINGS wie auch DB_HUE_KLASSEN ??
Denn die KLASSEN wird bestimmt auch nicht angelegt.

Also z.B. in einer infusion_db.php
Download source  Code
if (!defined("DB_HUE_SETTINGS")) {
   define("DB_HUE_SETTINGS", DB_PREFIX."hue_settings");
}




Ansonsten kann ich da keinen Fehler sehen ...
Edited by phprazor on 31-10-2010 17:29
 
xxyy
EBEN das ist es ja - kein Fehler
hab ich alles definiert - sonst könnte ich ja die Infu nicht installieren.
infusion_db.php:
GeSHi: PHP
  1. <?php
  2. /*-------------------------------------------------------+
  3. | Pimped-Fusion Content Management System
  4. | Copyright (C) 2009 - 2010
  5. | http://www.pimped-fusion.net
  6. +--------------------------------------------------------+
  7. | Filename: infusion_db.php
  8. | Author: xxyy
  9. +--------------------------------------------------------*/
  10. if (!defined("PIMPED_FUSION")) { die("Access Denied"); }
  11.  
  12. if (!defined("DB_HUE")) {
  13. define("DB_HUE", DB_PREFIX."hue");
  14. }
  15.  
  16. if (!defined("DB_HUE_SETTINGS")) {
  17. define("DB_HUE_SETTINGS", DB_PREFIX."hue_settings");
  18. }
  19. if (!defined("DB_HUE_KLASSEN")) {
  20. define("DB_HUE_KLASSEN", DB_PREFIX."hue_klassen");
  21. }
  22. ?>
Parsed in 0.029 seconds, using GeSHi 1.0.7.20
Signaturexxyy
blacktigers.bplaced.net/banner/sig.png
Meine neue Webseite (in Development...)
Alle Angaben ohne Gewähr. Ich übernehme keine Haftung für Schäden an Hard/Software Wink
 
http://xxyy.bplaced.net/
slaughter
Versuch mal die Namen der Spalten umzubenennen.
z.B von "id", "fach", "date" etc. zu "v_id", "v_fach", "v_date", vielleicht ist das "date" reserviert.
 
Advertising Bot
Posted on 22-05-2012 00:50
Bot Agent

Posts: n^x
Joined: Always

  
xxyy
Ich glaube du hast da was falsch verstanden - die DB_HUE wird angelegt - es ist nur die DB_HUE_SETTINGS
Signaturexxyy
blacktigers.bplaced.net/banner/sig.png
Meine neue Webseite (in Development...)
Alle Angaben ohne Gewähr. Ich übernehme keine Haftung für Schäden an Hard/Software Wink
 
http://xxyy.bplaced.net/
slaughter
Probier es trotzdem mal den Namen der Spalte umzubenennen. Der Name "set" könnte reserviert vll sein?
 
xxyy
Hab ich gemacht.
Komische Meldung:
Die Fehlermeldung schrieb:
Einstellungen konnten nicht geladen werden!
Settings could not been loaded!
0 :

Download source  Code
//Einstellungen
$hue=array();
$result=dbquery("SELECT * FROM ".DB_HUE_SETTINGS,false);
if(!dbrows($result)) { die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><strong>Einstellungen konnten nicht geladen werden!<br />Settings could not been loaded!</strong><br />".mysql_errno()." : ".mysql_error()."</div>"); }
while ($data = dbarray($result)) {
   $hue[$data['hue_set_name']] = $data['hue_set'];
}


Signaturexxyy
blacktigers.bplaced.net/banner/sig.png
Meine neue Webseite (in Development...)
Alle Angaben ohne Gewähr. Ich übernehme keine Haftung für Schäden an Hard/Software Wink
 
http://xxyy.bplaced.net/
slaughter
Wird die Tabelle in der Datenbank angelegt?
 
xxyy
NEIN, hab ich aber schon im Titel geschriebenWink
EDIT:
Ich habe eigentlich nichts geändert (in der infusion.php), aber jetzt wird die Tabelle plötzlich angelegt.
Leider werden die Einträge(insertdbrow) nicht angelegt.
Edit2:
Habe die Syntax geändert:
$inf_insertdbrow[2] = DB_HUE_SETTINGS." SET set_name='on',set='0' ";
- Von der Panel Anweisung Grin
Geht aber noch immer nicht.
Wäre es denn beim neuen Modulsystem möglich die Fehler in einer Nachricht/ in einem Logfile auszugeben?
Edited by xxyy on 05-11-2010 21:10
Signaturexxyy
blacktigers.bplaced.net/banner/sig.png
Meine neue Webseite (in Development...)
Alle Angaben ohne Gewähr. Ich übernehme keine Haftung für Schäden an Hard/Software Wink
 
http://xxyy.bplaced.net/
slaughter
Heißt die Spalte jetzt nicht hue_set_name bzw. hue_set?
  x 1
 
xxyy
Danke, das war es!
Manchmal bin ich wirklich ganz schön unaufmerksam (um nicht zu sagen "dumm"Grin)!
Signaturexxyy
blacktigers.bplaced.net/banner/sig.png
Meine neue Webseite (in Development...)
Alle Angaben ohne Gewähr. Ich übernehme keine Haftung für Schäden an Hard/Software Wink
 
http://xxyy.bplaced.net/
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Fehler, den ich nicht behoben kriege : ( Administration in Pimped-Fusion 3 17-02-2012 04:41
Linkes Panel wird Rechts angezeigt Themes 1 07-03-2011 15:56
new_posts.php wertet nicht korrekt aus ? Bugs und Fehlermeldungen 1 02-03-2011 10:25
Dopplete Tabelle - Images verschoben Infusionen 4 13-01-2011 16:14
Pimped Fusion läuft nicht unter PHP Version 5.2.11[closed] Administration in Pimped-Fusion 2 30-12-2010 11:33
Share this thread
URL:
BB-Code:
HTML:
AddThis:
Share |
Render time: 2.90 seconds - 107 Queries 994,370 unique visits