Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

The new infusion

Asked Modified Viewed 1,831 times
D
djdandi
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions
asked
Senior Member

I have a problem with adding my infusion. The code is made but the database is not added new table. What's the problem?
This is the file infusion.php
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHPFusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: infusion.php
| Author: brzanek
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+-------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

include INFUSIONS."ostrzezenia_infusion/infusion_db.php";

if (file_exists(INFUSIONS."ostrzezenia_infusion/locale/".$settings['locale'].".php")) {
   include INFUSIONS."ostrzezenia_infusion/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."ostrzezenia_infusion/locale/English.php";
}

$inf_title = $locale['DEV_ADMIN'];
$inf_description = $locale['DEV_ADMIN'];
$inf_version = "1.0.5";
$inf_developer = "BrzAneK";
$inf_email = "";
$inf_weburl = "http://pogoda-zachodniopomorskie.pl";
$inf_folder = "ostrzezenia_infusion"; // The folder in which the infusion resides.
$inf_image = "shout.png";

//Administration panel
$inf_adminpanel[] = array(
   "title" => $locale['DEV_ADMIN'],
   "image" => "shout.gif",
   "panel" => "admin/ostrzezenia_admin.php",
   "rights" => "OST",
   "page" => 5
);

// Multilanguage table for Administration
$inf_mlt[] = array(
   "title" => $locale['DEV_ADMIN'],
   "rights" => "OS"
);


$inf_newtable[] = DB_OSTRZEZENIA." (
  ost_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
  user MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '',
  ost_name VARCHAR(50) NOT NULL DEFAULT '',
  ost_kat VARCHAR(20) NOT NULL DEFAULT '',
  ost_keywords VARCHAR(50) NOT NULL DEFAULT '',
  ost_image varchar(100) NOT NULL DEFAULT '',
  ost_powiat varchar(500) NOT NULL DEFAULT '',
  ost_startdzien VARCHAR(50) NOT NULL DEFAULT '',
  ost_startgodzina VARCHAR(50) NOT NULL DEFAULT '',
  ost_enddzien VARCHAR(50) NOT NULL DEFAULT '',
  ost_endgodzina VARCHAR(50) NOT NULL DEFAULT '',
  ost_synoptyczna TEXT NOT NULL,
  ost_tresc TEXT NOT NULL,
  ost_regiony TEXT NOT NULL,
  ost_skutki TEXT NOT NULL,
  ost_procent TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
  ost_stopien TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
  ost_visibility TINYINT(4) NOT NULL DEFAULT '0',
  ost_count TINYINT(20) NOT NULL DEFAULT '0',
PRIMARY KEY (ost_id)
) ENGINE=MyISAM";


// Defuse cleanup
$inf_droptable[] = DB_OSTRZEZENIA;


infusion_db.php
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHPFusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: infusion.php
| Author: brzanek
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
if (defined("ADMIN_PANEL")) {
    PHPFusion\Admins::getInstance()->setAdminPageIcons("OS", "<i class='fa fa-commenting fa-lg'></i>");
}
if (!defined("DB_OSTRZEZENIA")) {
    define("DB_OSTRZEZENIA", DB_PREFIX."ostrzezenia");
}

// Added ostrzezenia Locale Constant
if (!defined("OSTRZEZENIA_LOCALE")) {
    if (file_exists(INFUSIONS."ostrzezenia_infusion/locale/".LANGUAGE.".php")) {
        define("OSTRZEZENIA_LOCALE", INFUSIONS."ostrzezenia_infusion/locale/".LANGUAGE.".php");
    } else {
        define("OSTRZEZENIA_LOCALE", INFUSIONS."ostrzezenia_infusion/locale/English.php");
    }
}
0 replies

6 posts

C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

I see file is good. But why not added? Any error message?

Everything must comes with reason.
0 replies
D
djdandi
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions
answered
Senior Member

Yeah but there are no errors and the database does not add any new table.
The table has been added _admin corresponding record in the same way to the table _infusion but there is a new table _ostrzezenia
Edited by djdandi on 28-10-2016 08:49,
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Which Version of PHPFusion are you using (RC4 or 9.02)?

If 9.02, send the zipped infusion.php and infusion_db.php in zip attached in this forum. I'll check for you and tell you why.

If you're using RC4, try get 9.02. It's a better copy than RC4 in my opinion.

Thanks.
0 replies
D
djdandi
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions
answered
Senior Member

I always use the latest version from github that is, 9.02
djdandi attached the following file:
ostrzezenia_infusion.zip [No information available / 131 Downloads]
0 replies
K
karrak
K
karrak 32
Van mi sosem változik..smile
  • Senior Member, joined since
  • Contributed 310 posts on the community forums.
  • Started 94 threads in the forums
  • Answered 1 question
answered
Senior Member

infusion_db.php

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHPFusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: infusion.php
| Author: brzanek
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
if (defined("ADMIN_PANEL")) {
    PHPFusion\Admins::getInstance()->setAdminPageIcons("OS", "<i class='fa fa-commenting fa-lg'></i>");
}
if (!defined("DB_OSTRZEZENIA")) {
    define("DB_OSTRZEZENIA", DB_PREFIX."ostrzezenia");
}

// Added ostrzezenia Locale Constant
if (!defined("OSTRZEZENIA_LOCALE")) {
    if (file_exists(INFUSIONS."ostrzezenia_infusion/locale/".LANGUAGE.".php")) {
        define("OSTRZEZENIA_LOCALE", INFUSIONS."ostrzezenia_infusion/locale/".LANGUAGE.".php");
    } else {
        define("OSTRZEZENIA_LOCALE", INFUSIONS."ostrzezenia_infusion/locale/English.php");
    }
}


infusion.php
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHPFusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: infusion.php
| Author: brzanek
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+-------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

include INFUSIONS."ostrzezenia_infusion/infusion_db.php";

$locale = fusion_get_locale("", OSTRZEZENIA_LOCALE);

$inf_title = $locale['DEV_ADMIN'];
$inf_description = $locale['DEV_ADMIN'];
$inf_version = "1.0.5";
$inf_developer = "BrzAneK";
$inf_email = "";
$inf_weburl = "http://pogoda-zachodniopomorskie.pl";
$inf_folder = "ostrzezenia_infusion"; // The folder in which the infusion resides.
$inf_image = "shout.png";

//Administration panel
$inf_adminpanel[] = array(
   "title" => $locale['DEV_ADMIN'],
   "image" => $inf_image,
   "panel" => "admin/ostrzezenia_admin.php",
   "rights" => "OS",
   "page" => 5
);

// Multilanguage table for Administration
$inf_mlt[] = array(
   "title" => $inf_title,
   "rights" => "OS"
);


$inf_newtable[] = DB_OSTRZEZENIA." (
  ost_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
  user MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
  ost_name VARCHAR(50) NOT NULL DEFAULT '',
  ost_kat VARCHAR(20) NOT NULL DEFAULT '',
  ost_keywords VARCHAR(50) NOT NULL DEFAULT '',
  ost_image varchar(100) NOT NULL DEFAULT '',
  ost_powiat varchar(500) NOT NULL DEFAULT '',
  ost_startdzien VARCHAR(50) NOT NULL DEFAULT '',
  ost_startgodzina VARCHAR(50) NOT NULL DEFAULT '',
  ost_enddzien VARCHAR(50) NOT NULL DEFAULT '',
  ost_endgodzina VARCHAR(50) NOT NULL DEFAULT '',
  ost_synoptyczna TEXT NOT NULL,
  ost_tresc TEXT NOT NULL,
  ost_regiony TEXT NOT NULL,
  ost_skutki TEXT NOT NULL,
  ost_procent TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
  ost_stopien TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
  ost_visibility TINYINT(4) NOT NULL DEFAULT '0',
  ost_count TINYINT(20) NOT NULL DEFAULT '0',
PRIMARY KEY (ost_id)
    ) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci";


// Defuse cleanup
$inf_droptable[] = DB_OSTRZEZENIA;
$inf_deldbrow[] = DB_ADMIN." WHERE admin_rights='OST'";
$inf_deldbrow[] = DB_LANGUAGE_TABLES." WHERE mlt_rights='OS'";
0 replies
D
djdandi
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions
answered
Senior Member

karrak :G
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
K
K
karrak 32
Van mi sosem változik..smile
  • Senior Member, joined since
  • Contributed 310 posts on the community forums.
  • Started 94 threads in the forums
  • Answered 1 question
D
D
  • Senior Member, joined since
  • Contributed 298 posts on the community forums.
  • Started 99 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet