Jump to content

Prediction Football--Catchable fatal error:

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
seyz4all

seyz4all

    Newbie

  • Members
  • PipPip
  • 13 posts
Please i have this script called "Prediction Football", after dealing with the sql create problem, which is now working..

i need to create admin user from the install script, but i get this

Quote

Catchable fatal error: Object of class User could not be converted to string in E:\wamp\www\PredictionLeague2\lang\lang.english.php on line 78

please help me out with this, what should be done.

#2
seyz4all

seyz4all

    Newbie

  • Members
  • PipPip
  • 13 posts
here the code in the file: lang.english.php


<?php 

/*********************************************************

 * DO NOT REPLACE OR REMOVE THIS FILE UNLESS YOU REALLY 

 * THINK YOU KNOW WHAT YOU ARE DOING.

 *********************************************************/

/*********************************************************

 * Author: John Astill (c) 2004

 * Date  : 21.11.2002

 * File  : lang.php

 * Desc  : English language file

 ********************************************************/


 /////////////////////////////////////////////////////////

 // Character set required

 /////////////////////////////////////////////////////////

 $charset = "iso8859-1";


 /////////////////////////////////////////////////////////

 // Menu variables

 /////////////////////////////////////////////////////////


$Login_txt = 'Login';

$Username_txt = 'Username';

$Password_txt = 'Password';

$Logon = 'Logon';

$New_User = 'New User';

$Forgot_password = 'Forgot password';


$Home = 'Home';  // Home team


$Menu = 'Menu';


$Prediction_Table = 'Prediction Table';

$Fixtures_Results = 'Fixtures/Results';

$My_Predictions = 'My Predictions';

$My_Profile = 'My Profile';

$Logout = 'Logout';


$Help = 'Help';

$Email_Us = 'Email Us';


$Admin_Menu = 'Admin Menu';

$Enter_Fixture = 'Enter Fixture';

$Enter_Result = 'Enter Result';

$Show_Users = 'Show Users';

$Recalculate_Standings = 'Recalculate Standings';

$Email_All_Users  = 'Email All Users ';

$View_Log = 'View Log';


 /////////////////////////////////////////////////////////

 // Create new user variables

 /////////////////////////////////////////////////////////


$Cookie_read_test_error = 'Not able to read test cookie when creating new user';

$Create_New_User = 'Create New User';

$User_ID_Required = 'User ID Required';

$User_ID_too_long = 'User ID too long. Must be less than 32 characters.';

$Passwords_is_required = 'Passwords is required';

$Passwords_do_not_match = 'Passwords do not match';

$Password_too_long = 'Password too long. Must be less than 32 characters.';

$Email_address_is_required = 'Email address is required';

$Email_too_long = 'Email too long. Must be less than 60 characters.';

$Email_address_is_not_valid = 'Email address is not valid';

$User_Info = 'User Info';

$User_ID = 'User ID';

$User_Name = 'User Name';

$Select_user_ID = 'Select a user ID.';

$Password_length = 'Password must be at least 5 characters long.';

$Repeat_password = 'Repeat password.';

$Email_Address_txt = 'Email Address';

$Enter_valid_email_address = 'Enter your valid email address.';

$Icon = 'Icon';

$Select_icon = 'Select the icon to represent your user.';

$Create = 'Create';


// CreateUser.php


$Unable_to_register_txt = "Unable to register User variable during creation for $username : $User";

$Unable_to_register_3_attempts_txt = "Unable to register User variable during creation for $username failed after 3 attempts: $User";

$Successfully_registered = 'Successfully registered '.$username.' during creation';

$Username_already_exists = 'Username already exists, please choose another name';

$One_user_per_email = 'Only one user per email ($email) address allowed.';

$Username_required = 'Username required, please choose a name';

$Password_required = 'Password required, please choose a password';

$Email_Answer_txt = "Hi ".$username.",\n\nWelcome to the ".$PredictionLeagueTitle.". Thank you for joining us.\n\nPlease check your details are correct. If you need to change anything please log in and modify your profile.\n\nGood Luck\n ";

$Email_Subject_txt = "Welcome to the ".$PredictionLeagueTitle;


 /////////////////////////////////////////////////////////

 // Change user variables

 /////////////////////////////////////////////////////////

$My_Profile_for = 'My Profile for';

$change_icon = 'change';

$Join_Date = 'Join Date';

$Change_Profile = 'Change Profile';

$Change_Password = 'Change Password';

$Old_Password_txt = 'Old Password';

$Password_Again = 'Again';

$Change_Password_button = 'Change Password';


// UserSelectIcon.php


$Click_on_the_Icon = 'Click on the Icon you want to use';

$Profile_Icon_Selection = 'Profile Icon Selection';

$Language = "Language";


 /////////////////////////////////////////////////////////

 // Help file variables

 /////////////////////////////////////////////////////////


$Prediction_League_Help_topic = 'Prediction League Help';

$Creating_a_new_user = 'Creating a new user';


$Creating_a_new_user_txt = '          To be able to participate in the Prediction League you need to create a user profile. This is created by selecting the <b>New User</b> link from the right hand column.

          <br> <br>

          Select a User ID to identify yourself in the prediction league. This can be anything you like as long as it is not already taken by another user.

          <br> <br>

          Enter a password (twice). This is to ensure no-one else can change your predictions.

          <br> <br>

          You <b>must</b> enter a valid email address to join the prediction league. This is used to have your password mailed to should you forget it.';


$Scoring_txt = 'Scoring';


$Scoring_txt_txt = '          Points are awared as follows:

          <ul>

          <li>'.$corrOneScore.' Points for predicting the correct number of goals by at least one team.

          <li>'.$corrHomeScore.' Points for predicting the correct number of goals for the home team.

          <li>'.$corrAwayScore.' Points for predicting the correct number of goals for the away team.

          <li>'.$corrScore.' Points for a correct score. i.e. you predict 3-1 and the result is 3-1.

          <li>'.$corrResult.' Point for a correct result. You predict 1-1, the score is 2-2.

          <li>'.$incorrResult.' Points for a incorrect result. i.e. you predict 3-1 and the result is 1-3.

          </ul>

          Goal Difference

          <ul>

          <li>For each correct teams number of goals you score, you receive that number of +goals. e.g. you predicit 2 and the team scores 2, you get +2 goals.

          <li>For each incorrect number of goals you predict per team, you lose the difference in goals. e.g. you predict 3 and the team scores 2, you get -1 goals.

          </ul>';


// Version 1.0 Additions

 /////////////////////////////////////////////////////////

 // Messaging variables

 /////////////////////////////////////////////////////////

$Del = "Del";

$Delete = "Delete";

$From = "From";

$To = "To";

$Date = "Date";

$Subject = "Subject";

$My_Messages = "My Messages";

$My_Messages_For = "My Messages for";

$My_Predictions_For = "My Predictions for";

$Send_Msg = "Send Message to ";

$Create_Msg = "Create message";

$Send_Msg_Button = "Send message";

$Message_txt = "Message";

$RE = "Re:";

$REM = "Rem";  // For removing messages

$Remove_All_Deleted = "Remove all deleted msgs";

$View_All_Messages = "View All Messages";

$Status_Col = "Status";


$Config_League = 'Configure League';

$Predictions = 'Predictions';

$Predict= 'Predict';

$Next_Match = "Next Match";

$Prediction_League_Standings = 'Prediction League Standings';

$No_Matches_Scheduled = 'No matches scheduled';

$New_Message = "New message";

$Subject_txt = "Subject";


// v1.03 addition

$Months = array('01'=>"Jan",

             '02'=>"Feb",

             '03'=>"Mar",

             '04'=>"Apr",

             '05'=>"May",

             '06'=>"Jun",

             '07'=>"Jul",

             '08'=>"Aug",

             '09'=>"Sep",

             '10'=>"Oct",

             '11'=>"Nov",

             '12'=>"Dec");

$Set_Defaults = "Default config values";


// v1.06 additions

$FixturesResults = "Fixtures/Results";

$Away = "Away"; // Away team title

$P = "P";  // Games played

$W = "W";  // Games won

$D = "D";  // Games drawn

$L = "L";  // Games lost

$F = "F";  // Goals for

$A = "A";  // Goals against

$GD = "GD";  // Goals difference

$POS = "Pos";  // Position

$PTS = "Pts";  // Points

$Result = "Result";

$Prediction_Stats = "Prediction Stats ";

$Download_Dbase = "Backup DBase";

$Lang_Report_Bug = "Report Bug";


// v1.07 additions

$Lang_Enable_Auto_Predictions = "Automatic Predictions";

$Lang_Enable = "Enable";

$Lang_Enter_Outstanding_Results = "Enter Outstanding Results";

$Lang_Enter_Multiple_Fixtures = "Enter Multiple Fixtures";


// v1.08 additions

$Predictions_For = "Predictions for";

$Game_Time = "Game Time";


// v1.09 additions

$New_Message_Subject = "You have received a new message on $PredictionLeagueTitle";

$New_Message_Body = "You have a new message on $PredictionLeagueTitle. You can view the message here $homePage";

$Games_Menu = "Select game";

$Upload_Icon = "Upload Icon";

$Previous = "Prev";

$Next = "Next";

$Upload_Instructions = "Please try to keep the dimensions of the image to a size suitable for display. Your image file size is limited to $MaxIconFileSize Kb";


// V1.11 additions

$League_Statistics = "Statistics";

$My_Missing_Predictions = 'My Missing Predictions';

$Division = "Div";

$Txt_No_Messages = "No Messages";

$Txt_Icon_Change = "To change the icon select the icon in the left panel";

$Txt_Bonus_Points = "Bonus Points";

$Txt_Change_Icon = "Click to change icon";



// V2.00 additions

$League_Statistics = "Statistics";

$My_Missing_Predictions = 'My Missing Predictions';

$Division = "Div";

$Txt_No_Messages = "No Messages";

$Txt_Icon_Change = "To change the icon select the icon in the left panel";

$Txt_Bonus_Points = "Bonus Points";

$Txt_Change_Icon = "Click to change icon";

$Txt_User_Type = "User Type";

$Txt_Last_Login = "Last login";

$Txt_Last_Ip = "Last IP Address";

$Txt_All_Ip = "All IP Addresses";

$Txt_User_Created = "User created";

$Txt_Week = "Week";

$Txt_Weekly_Winners = "Weekly Winners";

$Txt_Current_Fixtures = "Current Fixtures";

$Txt_No_Outstanding_Fixtures = "No oustanding fixtures";

$Txt_v = "v";

$Txt_Time = "Time";

$Txt_Logging_In_Title = "Logging In";

$Txt_Logging_In_Txt = "To log into the system enter your username and password into the Login box on the top left of the screen.<br> If you have forgotten your password then you can request that it is sent to you using the email address you gave when you created your user.";

$Txt_Menu_Title = "Menu Options";

$Txt_Menu_Txt = "<b>$Prediction_Table</b><br>Display the current standings.<br><br><b>$Fixtures_Results</b><br>Display the fixtures and results.<br><br><b>$My_Missing_Predictions</b><br>Display the games where you have not yet made a prediction.<br><br><b>$My_Predictions</b><br>Display or change the predictions you have made so far.<br><br><b>$My_Profile</b><br>Change your user preferences. You can change your password, username, icon, email address here.<br><br><b>$Logout</b><br>Logout from the predictoin league.<br><br><b>$My_Messages</b><br>Display any messages that other users have sent to you.";

$Txt_Messaging_Title = "Messaging";

$Txt_Messaging_Txt = "You can use messaging to send messages to other users and likewise other users can send messages to you. To send a message to another user, click the <img src='img/emailiconold18x12.gif'> icon when you see it next a another user.";

$Txt_Ups_And_Downs = "Movers and Losers";

$Txt_Monthly_Winner = "Monthly Winner";

$Txt_Choose_Week = "Choose Week";

$Txt_Misc_Profile = "Miscellaneous";

$Txt_Allow_Emails = "Allow other users to email me";

$Txt_Username_Or_Password_Invalid = "Username or password invalid";

$Txt_Delete_Fixtures = "Are you sure that you want to delete all the fixtures? This will also delete all users predictions and the positions in the standings will be lost.";

$Txt_Tournament_Standings = "Tournament Standings";

$Txt_Group_A = "Group A";

$Txt_Group_B = "Group B";

$Txt_Group_C = "Group C";

$Txt_Group_D = "Group D";

$Txt_Quarter_Finals = "Quarter Finals";

$Txt_Semi_Finals = "Semi Finals";

$Txt_Final = "Final";


// Euro1.01 additions

$Txt_Home_Page = "Home";


// Euro E.02 additions

$Txt_Delete_Account = "Delete Account";

$Txt_Deleting_User = "Are you sure you want to delete your account. This will delete all your predictions and your profile. You will disappear from the standings table. You will need to create a new user to enter the game. You must enter your password to be able to delete your account.";


// Euro E05 additions

$Txt_Average_Points = "Average Points";

$Txt_Points = "Points";

$Txt_Played = "Played";

$Txt_Avg = "Avg";  // Short version of Average.


// Euro E07 additions

$Txt_Manage_Icons = "Manage Icons";

$Txt_Click_On_The_Icon_To_Delete = "Click on the icon to delete";

$Txt_Are_You_Sure_Icon = "Are you sure you want to delete this icon?";


// V2.00 Changes

$Txt_Manage_Competition = "Manage Competitions";  // Leagues cups etc.


// V2.01 Changes

$Txt_Position = "Position";

$Txt_Message_User = "Message User";

$Txt_Show_Standings_On_Login = "Show the standings on login";


// V2.03 Changes

$Txt_No_Stats_Available = "No statistics available";


// V2.04 Changes

$Txt_Shoutbox_Title = "Shoutbox";

$Txt_No_Shout = "Talk to me....";

$Txt_Manage_Shouts = "Manage Shouts";


// 2.05 Changes

$Txt_Add = "Add";

$Txt_Add_Competition = "Add Competition";

$Txt_Competition_Name = "Competition Name";

$Txt_Competitions = "Competitions";

$Txt_Predictions_For = "Predictions for";

$Txt_Homescore = "homescore";

$Txt_Awayscore = "awayscore";


// 2.06 Changes

$Txt_Predictions_From = "Predictions from";

$Txt_Predictions = "Predictions";

$Txt_Enter_User_Predictions = "Enter Users Predictions";

$Txt_Admin = "Admin";

$Txt_Bonus = "Bonus";

$Txt_Modify_All_Fixtures = "Modify all fixtures";

$Txt_Modify_Fixture = "Modify fixture";

$Txt_Modify = "Modify";

$Txt_Change_Fixtures = "Change fixtures";

$Txt_Reset = "Reset";

$Txt_Fixture_Administration = "Fixture Administration";

$Txt_24hr = "(24hr)";

$Txt_YYYYMMDD = "[YYYY-MM-DD]";   // Years months and days

$Txt_HHMMSS = "[HH:MM:SS]";      // Hours minutes and seconds

$Txt_Shout = "Shout";

$Txt_This_Page_Took = "This page took ";

$Txt_Seconds_To_Create = " second(s) to create";

$Txt_Home_Team = "Home Team";

$Txt_Away_Team = "Away Team";

$Txt_Delete_Fixture = "Delete Fixture";

$Txt_Are_You_Sure_Fixt_Delete = "Are you sure you want to delete this fixture and all related predictions?";

$Txt_By_Date = "By date";

$Txt_By_User = "By user";

$Txt_Current_Users = "Current users: ";


?>




#3
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
That means the variable $User refers to an instance of an object that does not have a __toString function defined.