Op zoek naar een soort van profielen-site

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gebruikersavatar
Ramon Fincken
Berichten: 2552
Lid geworden op: 27 nov 2005, 23:15
Locatie: Diemen
Contacteer:

Bericht door Ramon Fincken » 07 mar 2007, 08:44

Mik schreef:Lukt niet..

Dit artikel hierboven zorgt ervoor dat ik met de gebruikers van het forum ken aanmelden toch? Dat lukt dus niet..
hij neemt de inlogsessies over, laat een zien ( broncode + online bestanden ) wat je precies hebt gedaan en ingesteld?
Freelance webdevelopment, including phpbb2 scripting!

Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 07 mar 2007, 12:01

Nou dit is het bestand waar ik het in wil doen (Het is een toto-script waarbij ik het wil gebruiken, dus ik neem aan dat ik het in de inlog-script moet zetten)

Code van de inlog-bestand is:

Code: Selecteer alles

logfunctions.php

<?php
/*********************************************************
 * Author: John Astill
 * Date  : 15th June 2002
 * File  : logfunctions.php
 ********************************************************/

/*******************************************************
* Append the given message to the log file.
*******************************************************/
function LogMsg($msg) {
  global $logfile;
  // If the log filename is "", don't try to write to it.
  if ($logfile == "") {
    return;
  }

  // Write to the end of the file
  $file = fopen($logfile,'a+');
  if ($file == FALSE) {
    ErrorNotify("Unable to write to Log : $logfile . This could be due to the log file not having the correct permissions on the server.");
    return;
  }

  $date = date("M/d/Y H:i:s T");
  fwrite($file,"\n------------------------\n$date\n$msg");
  
  fclose($file);
}

?>
En volgens het artikel wat jij me stuurde moesti k dit erin zetten:

Code: Selecteer alles

define('IN_PHPBB', true); 
$phpbb_root_path = '../'; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

// 
// Start session management 
// 
$userdata = session_pagestart($user_ip, PAGE_INDEX); 
init_userprefs($userdata); 
// 
// End session management 
//
Dus ik maakte van het bestand logfunctions.php

Code: Selecteer alles

<?php
/*********************************************************
 * Author: John Astill
 * Date  : 15th June 2002
 * File  : logfunctions.php
 ********************************************************/


define('IN_PHPBB', true); 
$phpbb_root_path = '../'; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

// 
// Start session management 
// 
$userdata = session_pagestart($user_ip, PAGE_INDEX); 
init_userprefs($userdata); 
// 
// End session management 
//

/*******************************************************
* Append the given message to the log file.
*******************************************************/
function LogMsg($msg) {
  global $logfile;
  // If the log filename is "", don't try to write to it.
  if ($logfile == "") {
    return;
  }

  // Write to the end of the file
  $file = fopen($logfile,'a+');
  if ($file == FALSE) {
    ErrorNotify("Unable to write to Log : $logfile . This could be due to the log file not having the correct permissions on the server.");
    return;
  }

  $date = date("M/d/Y H:i:s T");
  fwrite($file,"\n------------------------\n$date\n$msg");
  
  fclose($file);
}

?>
Klopt toch wat ik doe?

fn002449
Berichten: 326
Lid geworden op: 09 nov 2005, 13:59

Bericht door fn002449 » 07 mar 2007, 13:09

nee de manier waarop jij het wilt doen is onmogelijk....

je moet namelijk ook checken of de user is ingeloged

dit gaat zo..

Code: Selecteer alles

if($userdata['session_logged_in'] == 1)
    print("ingelogt");
else
    print("niet ingelogt");

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 07 mar 2007, 15:16

Dus wat moet de complete code voor het bestand zijn? :oops:

fn002449
Berichten: 326
Lid geworden op: 09 nov 2005, 13:59

Bericht door fn002449 » 07 mar 2007, 15:18

het is niet mogelijk..... op jouw manier....

je zal heel het script moeten aanpassen niet alleen het inlog script.

en aangezien ik volgens mij wel kan aannemen dat jij niet zoveel van php snapt ;) is dat voor jouw onmogelijk ;)

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 07 mar 2007, 15:33

Hmm.. dan ben ik weer op zoek naar een uitbreiding van het profiel op het forum

Gebruikersavatar
Bee
Berichten: 13403
Lid geworden op: 29 aug 2004, 10:30

Bericht door Bee » 07 mar 2007, 19:42

Kan je niet een Custom Profile Fields MOD gebruiken? Je hebt er zat tegenwoordig.
... Maar ik modereer (nog) niet.

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 08 mar 2007, 14:32

Ik heb het al gezien ja, maar dat ziet er dus echt niet uit zoals ik het wil..

halsiemp3
Berichten: 363
Lid geworden op: 10 mar 2005, 13:24

Bericht door halsiemp3 » 08 mar 2007, 16:34

dan is het miss handig om een curcus php en msql te gaan beginnen..;)

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 08 mar 2007, 16:43

Er moet er 1 bestaan denk ik

Gebruikersavatar
Ramon Fincken
Berichten: 2552
Lid geworden op: 27 nov 2005, 23:15
Locatie: Diemen
Contacteer:

Bericht door Ramon Fincken » 09 mar 2007, 00:59

erm je moet zorgen dat je in een functions.inc.php of een header.inc.php
op de 1e regels die phpbb code zet, zodat het op iedere pagina
wordt uitgevoerd :)
Freelance webdevelopment, including phpbb2 scripting!

Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 09 mar 2007, 08:24

Maar volgens degene van een paar posts terug, is het niet mogelijk.. is dat waar?

Gebruikersavatar
Ramon Fincken
Berichten: 2552
Lid geworden op: 27 nov 2005, 23:15
Locatie: Diemen
Contacteer:

Bericht door Ramon Fincken » 09 mar 2007, 09:38

nee, ik weet niet alleen dat het kan, ik gebruik de code ook en weet dat het gewoon werkt.

heb je iets van een bestand dat op iedere pagina als eerste aangeroepen wordt met include of include_once toevallig?
Freelance webdevelopment, including phpbb2 scripting!

Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com

fn002449
Berichten: 326
Lid geworden op: 09 nov 2005, 13:59

Bericht door fn002449 » 09 mar 2007, 11:54

Mik schreef:Maar volgens degene van een paar posts terug, is het niet mogelijk.. is dat waar?
die iemand was ik....

en als je goed had gelezen zei ik niet dat het NIET mogelijk was. Maar dat het niet mogelijk was ZONDER php kennis.

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 09 mar 2007, 18:06

Bestanden die included zijn bij (bijna) alle bestanden

Code: Selecteer alles

<?php 
error_reporting(E_ALL & ~E_NOTICE);
/*********************************************************
 * Author: John Astill (c)
 * Date  : 10th December 2001
 * File  : systemvars.php
 * Desc  : Global data definitions. This is where the 
 *       : prediction league is configured for the 
 *       : specific installation.
 ********************************************************/



require "userclass.php";
require "logfunctions.php";
require "error.php";

//////////////////////////////////////////
// System variable and configuration
//////////////////////////////////////////
//////////////////////////////////////////
// Constants
//////////////////////////////////////////
define("VERSION","1.11");

/////////////////////////////////////////////////
// Default points for scoring, this can be 
// set in the config screen.
/////////////////////////////////////////////////
$corrHomeScore = 1;
$corrAwayScore = 1;
$corrMargin = 1;
$corrResult = 1;
$corrScore = 3;

//////////////////////////////////////////////////////////////
// Modify the values from here to where you are told to stop.
// The numbers match those in the installation steps in
// the file INSTALL.TXT.
//////////////////////////////////////////////////////////////
//////////////////////////////////////////
// 1.Prediction League Title
// The title of the Prediction League.
// Change the value between the "" to 
// give the prediction league the title
// of your choice
//////////////////////////////////////////
$PredictionLeagueTitle = "StraightHiphop Toto";

//////////////////////////////////////////////////////////////
// 2. Header Row
// This is the header to be displayed in 
//all the pages. It can contain HTML code.
//////////////////////////////////////////////////////////////
$HeaderRow = "<table cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"center\" class=\"TBLHEAD\"><font class=\"TBLHEAD\"><img border=\"0\" src=\"banner.jpg\"></font></td></tr></table>";

//////////////////////////////////////////////////////////////
// 3. Database hostname
// Database hostname
// The fqdn of the host containing the
// database
//////////////////////////////////////////////////////////////
$dbaseHost = "localhost";

//////////////////////////////////////////////////////////////
// 4. Base Directory Name
// The directory storing the prediction
// league files
//////////////////////////////////////////////////////////////
$baseDirName = "toto";

//////////////////////////////////////////////////////////////
// 5. Username
// User name
// The username to be used for logging
// into the database
//////////////////////////////////////////////////////////////
$dbaseUsername = "xx";

//////////////////////////////////////////////////////////////
// 6. Password
// Password to be used for logging into
// the database
//////////////////////////////////////////////////////////////
$dbasePassword = "xx";

//////////////////////////////////////////////////////////////
// 7. Database Name.
// This is the name of the database. This *MUST* be the same
// name as the name you used when creating the database.
//////////////////////////////////////////////////////////////
$dbaseName = "xx";

//////////////////////////////////////////////////////////////
// 8. The email address of the administrator. Set this to your 
// own address
//////////////////////////////////////////////////////////////
$adminEmailAddr = "admin@straighthiphop.nl";

//////////////////////////////////////////////////////////////
// 9. The signature of the admin to use at the end of the 
//    email welcoming the user. This can be a simple name,
//    or something more complex.
//////////////////////////////////////////////////////////////
$adminSignature = "\nhttp://www.straighthiphop.nl/";

//////////////////////////////////////////////////////////////
// 10. The default icon to use for a new user. The icons are
// displayed when the user is logged on. If you have an icon
// named default.gif, you can leave this as default.gif.
//////////////////////////////////////////////////////////////
$defaulticon = "default.gif";

//////////////////////////////////////////////////////////////
// 11. The URL of the associated chat room.
// This link can be used to point to chatroom, or discussion
// area you may have for your prediction league.
// If this is empty, the menu link is not shown.
//////////////////////////////////////////////////////////////
$chatRoomURL = "/viewforum.php?f=15";

//////////////////////////////////////////////////////////////
// 12. The URL of the associated home page
// Add the URL of your home page. This is shown in the menu.
//////////////////////////////////////////////////////////////
$homePage = "http://www.straighthiphop.nl";
$homePageTitle = "StraightHiphop Home";

//////////////////////////////////////////////////////////////
// 13. The name of the log file. 
// "" disables the logfile functionality.
//////////////////////////////////////////////////////////////
$logfile = "";

//////////////////////////////////////////////////////////////
// 14. To allow more than one user per email address set
//     this variable to TRUE .
//     e.g. $allowMultipleUserPerEmail = "TRUE";
//////////////////////////////////////////////////////////////
$allowMultipleUserPerEmail = "FALSE";

//////////////////////////////////////////////////////////////
// 15. If your server is in a different timezone than the
//     country in which the games are played then enter the 
//     difference in hours here.
//     This does not allow for differences when daylight 
//     savings times are encountered.
//     e.g. Server is in Wash DC, USA and league in UK. Then
//     $timezoneOffset = -5.
//////////////////////////////////////////////////////////////
$timezoneOffset = 1;

//////////////////////////////////////////////////////////////
// 16. Set this flag to true to show the fixtures in reverse
//     date order in ShowMyPredictions. Setting this to
//     FALSE will display the fixtures in date order, first
//     date first.
//////////////////////////////////////////////////////////////
$reverseUserPredictions = "FALSE";

//////////////////////////////////////////////////////////////
// 17. Change this flag to define which language file to use.
//     Language files must be in subfolder lang.
//     Default value = "lang.english.php"
//////////////////////////////////////////////////////////////
$languageFile = "lang.dutch2.php";

//////////////////////////////////////////////////////////////
// 18. Change this flag to enable auto predictions.
//     Auto predictions allow the user to have the scripts
//     make predictions for games where they have not made
//     there own prediction.
//////////////////////////////////////////////////////////////
$autoPredict = "FALSE";

//////////////////////////////////////////////////////////////
// 19. Use the 24 hour clock
//////////////////////////////////////////////////////////////
$Use24Hr = "TRUE";

//////////////////////////////////////////////////////////////
// 20. Allow users to upload icons.
// Setting the icon directory is an absolute value. This 
// will have a path something along the lines of 
// "".
// The MaxIconFileSize in in Kb. This for a maximum 50Kb
// image the value is set to 50.
//////////////////////////////////////////////////////////////
$UploadIcons = "FALSE";
$MaxIconFileSize = 50;
$IconDirectory = "";

//////////////////////////////////////////////////////////////
// 21. Encrypt passwords.
// This variable determines whether encryption is enabled.
// The value is also configured in the config screen.
// If you previously chose not to encrypt passwords then you
// need to make sure that the users use the forgot password 
// feature to get their new passwords.
//////////////////////////////////////////////////////////////
$PasswordEncryption = "TRUE";

/*************************************************************
**************************************************************
* The following values should not be modified unless you
* REALLY know what you are doing.
**************************************************************
**************************************************************/
/*************************************************************
// Data Tables
// The following is where you define the names of your
// database tables.
*************************************************************/
/*************************************************************
// This allows the default directory for session files
// to be changed. This should only be changed if you really
// know what you are doing.
// This should only need to be changed if you are having
// problems with sessions on your server.
// The directory you choose must exist and be writeable
// by the server.
*************************************************************/
$sessionFileDir = "";

/*************************************************************
// The League ID. Future support for multiple leagues.
*************************************************************/
$leagueID = "0";

/*************************************************************
// The name of the table to be used for the configuration Data.
// This value *MUST* be the same as the value defined when 
// creating the tables.
*************************************************************/
$dbaseConfigData = "plconfigdata";

/*************************************************************
// The name of the table to be used for the User Data.
// This value *MUST* be the same as the value defined when 
// creating the tables.
*************************************************************/
$dbaseUserData = "pluserdata";

/*************************************************************
// The name of the table to be used for the Prediction Data.
// This value *MUST* be the same as the value defined when 
// creating the tables.
*************************************************************/
$dbasePredictionData = "plpredictiondata";

/*************************************************************
// The name of the table to be used for the Match Data. This
// value *MUST* be the same as the value defined when creating
// the tables.
*************************************************************/
$dbaseMatchData = "plmatchdata";

/*************************************************************
// The name of the table to be used for the user messaging.
// This value *MUST* be the same as the value defined when 
// creating the tables.
*************************************************************/
$dbaseMsgData = "plmsgdata";

/*************************************************************
// The name of the table to be used for the current standings.
// This value *MUST* be the same as the value defined when 
// creating the tables.
*************************************************************/
$dbaseStandings = "plstandings";

/*************************************************************
** The home page for the Prediction League
*************************************************************/
$PLHome = "http://www.straighthiphop.nl/toto";

/*************************************************************
** Should the users predictions be visible
*************************************************************/
$ViewUserPredictions = "TRUE";

/*************************************************************
** The number of fixtures to show when making multiple
** fixtures.
*************************************************************/
$NumMultFixts = 12;

/*************************************************************
** The number of users to display on each page of the 
** prediction league. This is the default value. Each user
** can select their own.
*************************************************************/
$usersPerPage = 80;

//////////////////////////////////////////////////////////////
// 22. LockGame
// This variable allows the game to be locked so that only
// power users can create users.
//////////////////////////////////////////////////////////////
$LockedGame = "FALSE";

/////////////////////////////////////////////////
// Storage lengths
/////////////////////////////////////////////////
$userlen = 32; // Storage length for the username.
$passlen = 40; // Storage length for the password.
$fnamelen = 128; // Storage length for any filenames (or URLs).
$teamlen = 30; // Storage length for team names.
$emaillen = 60; // Storage length for email addresses.

/*************************************************************
** The maximum allowed number of admin users.
** If this value is increased it is essential that 
** the user is created as this could present a security 
** hole.
*************************************************************/
$maxAdminUsers = 1;

/////////////////////////////////////////////////////////
// Character set required. The default character set.
// This can be overridden in the language files.
/////////////////////////////////////////////////////////
$charset = "ISO8859-1";

/*************************************************************
** Maintain the logged in users data.
*************************************************************/
require "sessiondata.php";
require "dbasefunctions.php";

?>

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 09 mar 2007, 18:07

Code: Selecteer alles

<?php
/*********************************************************
 * Author: John Astill (c)
 * Date  : 20th March 2003
 * File  : configvalues.php
 *********************************************************/
  $link = OpenConnection();
  $query = "select * from $dbaseConfigData where lid='$leagueID'";

  $result = mysql_query($query) 
    or die("Unable to read config data: $query<br>\n".mysql_error());
  if ($result != FALSE) {
    $arr = array();
    while ($line = mysql_fetch_array($result)) {
      $param = $line["param"];
      $val = $line["value"];
      $arr["$param"] = $val;
    }

    // There is a tight cohesion between the coding and the contents of the config
    // database.
    $hideNoPredictions = $arr["HIDE_0_PREDS"];
    $useMessaging = $arr["USE_MESSAGING"];
    $corrHomeScore = $arr["CORR_HOME_SCORE"];
    $corrAwayScore = $arr["CORR_AWAY_SCORE"];
    $corrMargin = $arr["CORR_MARGIN"];
    $corrResult = $arr["CORR_RESULT"];
    $corrScore = $arr["CORR_SCORE"];
    $PredictionLeagueTitle = $arr["PRED_LEAGUE_TITLE"];
    $defaulticon = $arr["DEF_ICON"];
    $homePage = $arr["HOME_PAGE_URL"];
    $homePageTitle = $arr["HOME_PAGE_TITLE"];
    $allowMultipleUserPerEmail = $arr["MULT_USERS"];
    $timezoneOffset = $arr["TZ_OFFSET"];
    $reverseUserPredictions = $arr["REV_USER_PREDS"];
    $usersPerPage = $arr["USERS_PER_PAGE"];
    if ($usersPerPage < 1) {
      $usersPerPage = 10;
    }
    $maxAdminUsers = $arr["MAX_ADMIN_USERS"];
    //$isauto = $arr["ISAUTO"];
    $NumMultFixts = $arr["NUMMULTFIXTS"];
    $ViewUserPredictions = $arr["VIEWUSERPREDS"];
    $Use24Hr = $arr["USE24HR"];
    $UploadIcons = $arr["UPLOADICONS"];
    $MaxIconFileSize = $arr["ICONSIZE"];
    $PasswordEncryption = $arr["PASSWORDENCRYPT"];
    $LockedGame = $arr["LOCKEDGAME"];
  }

  CloseConnection($link);
?>

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 10 mar 2007, 15:39

Hmm.. ja het is echt moeilijk maar ik wil het echt heel graag!

Gebruikersavatar
Ramon Fincken
Berichten: 2552
Lid geworden op: 27 nov 2005, 23:15
Locatie: Diemen
Contacteer:

Bericht door Ramon Fincken » 10 mar 2007, 17:16

ik zie een systemvars en configvalues,

is er nergens een file die altijd direct als eerste

include('filename.php');
of
include_once('filename.php');

heeft?

zonee, probeer dan de configvalues eens, dus direct na de
<?php
de phpbb code neerzettten.
Freelance webdevelopment, including phpbb2 scripting!

Website founder van: phpBBinstallers.net phpBBantispam.com
Mods: zie op http://www.phpbb.com Blog in wording: RamonFincken.com

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 11 mar 2007, 14:30

Het is er niet, dus heb ik de 2e optie toegepast in configvalues, maar als ik daarna probeer in te loggen dan gebeurd er niks, dan kom ik gewoon terug op de index pagina

Mik
Berichten: 247
Lid geworden op: 23 nov 2005, 13:01
Contacteer:

Bericht door Mik » 13 mar 2007, 11:47

Kom op mensen! Ik wil gewoon alle gebruikers van het forum op een ander systeem gebruiken (toto)

Gesloten