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?

Trying to make infusions from v7 work with v9

Asked Modified Viewed 1,559 times
J
jjwichter
J
  • Member, joined since
  • Contributed 97 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
asked
Member

Keep getting this error in the error console:

if (file_exists(INFUSIONS."button_panel/locale/".$settings['locale'].".php")) {


Thanks,
John
0 replies

2 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

We removed global approach in 9. Please see the new function below.

fusion_get_locale();
Example usage:

$locale = fusion_get_locale(); // loads all your current locale to $locale string.
echo fusion_get_locale("SPR011"); // equivalent to $locale['SPR011'];
 // add additional file.php  into the locale cache.
$locale = fusion_get_locale("", LOCALE.LOCALESET."/file.php");
echo $locale['new_file_key']; // you can access additional now.


fusion_get_settings();

// Load the current site settings to $settings variable.
$settings = fusion_get_settings();

echo fusion_get_settings("locale"};  // equivalent to $settings['locale']


$userdata

$userdata = fusion_get_userdata(); // load your account data.
echo fusion_get_userdata("user_name");


Any other User


$other_user = fusion_get_user(6); // load user id 6
print_p($other_user);


No extra files need to be loaded to access these functions.
0 replies
J
jjwichter
J
  • Member, joined since
  • Contributed 97 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
answered
Member

Tried doing it myself but this is all new to me. Here is the button_panel:

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: infusion.php
| CVS Version: 1.12
| Author: cmike
| Web: http://freeware.wnet.net.pl
| Email: mike@wnet.net.pl
+--------------------------------------------------------+
| v7 by Diemux
| www.phpfusion-mods.net
+--------------------------------------------------------+
| Bugfixes and Working v7.01.02 by snowballsn
| www.phpfusion-mods.net
+--------------------------------------------------------+
| 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."button_panel/infusion_db.php";

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



// Infusion Information
$inf_title = "Button Panel";
$inf_description = "Button panel with click-counting and login system for clients.";
$inf_version = "1.12";
$inf_developer = "cmike, v7 by Diemux";
$inf_email = "mike@wnet.net.pl";
$inf_weburl = "http://freeware.wnet.net.pl";

// Infusion Paths
$inf_folder = "button_panel";

$inf_adminpanel[1] = array(
   "title" => "Button Panel",
   "image" => "image.gif",
   "panel" => "button_admin.php",
   "rights" => "BUP"
);

// Database Table information : Create database tables.
$inf_newtable[1] = DB_BUTTONS." (
  button_id int(11) NOT NULL auto_increment,
  button_name varchar(250) NOT NULL default '',
  button_pic varchar(200) NOT NULL default '',
  button_link varchar(200) NOT NULL default '',
  button_count int(11) NOT NULL default '0',
  button_user varchar(100) NOT NULL default '',
  button_pass varchar(100) NOT NULL default '',
  PRIMARY KEY  (button_id)
) ENGINE=MyISAM";
   
// Database Table Drop Command : Drop tables if infusion is uninstalled.
$inf_droptable_[1] = DB_BUTTONS;
?>
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

J
J
  • Member, joined since
  • Contributed 97 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
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

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet