Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
mi3dot home $ phpBB2
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 12.06.2004 20:43    Post subject: mi3dot home $ phpBB2 Add user to your forum ignore list Reply with quote

Kako da napravim na home-u da se mogu loginati ili registrirati za forum isto kao što ima na mi3dot-u? forum mi je isto phpbb2

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 13.06.2004 09:49    Post subject: Add user to your forum ignore list Reply with quote

Code:

<form action="path_do_logina/login.php" method="post" target="_top">
<table width="100%" cellpadding="4" cellspacing="1" border="0"  align="center">
<tr>
<th height="25">Upišite svoj juzernejm i pessvourd.</th>
</tr>
<tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td colspan="2" align="center">&nbsp;</td>
</tr>
<tr>
<td width="45%" align="right">Username:</td>
<td><input type="text" name="username" size="25" maxlength="40" value="" /></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><input type="password" name="password" size="25" maxlength="32" />
</td>
</tr>
<tr align="center">
<td colspan="2">Zapamti me: <input type="checkbox" name="autologin" /></td>
</tr>
<tr align="center"><td colspan="2">
<input type="submit" name="login" class="mainoption" value="Log in" /></td>
</tr>
<tr align="center">
<td colspan="2"><a href="profile.php?mode=sendpassword" class="gensmall">Zabil sam pessvourda</a></span></td>
</tr>
</table></td></tr></table>
</form>


ja sam kopi pejsto, pa ispravljao.

moras promjeniti action u tagu <form> na pocetku i ostalo po zelji.
ali nemoj dirati imena input polja <input name>. ok? ok.
aj bok

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 13.06.2004 11:48    Post subject: Add user to your forum ignore list Reply with quote

E hvala ti, a znaš li kako mogu napraviti da ako je netko logiran da mi pokaže koliko ima poruka, koji su korisnici na forumu itd, to sve na home-u??

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 13.06.2004 12:21    Post subject: Add user to your forum ignore list Reply with quote

Code:
baza.php:

<?php
$host="localhost";
$username="username";
$password="password";
$baza="baza";
mysql_connect($host,$username,$password) or die("nemogu se spojiti na bazu);
mysql_select_db($baza);
?>

-- end baza.php --

index.php:

<?php
include "baza.php";

$kveri_topics=mysql_query("select topic_id from phpbb_topics");
$kveri_postevi=mysql_query("select post_id from phpbb_posts");
$brojtopica=mysql_num_rows($kveri_topics);
$brojposteva=mysql_num_rows($kveri_postevi);

echo "Poslano topica: $brojtopica, poslano posteva: $brojposteva<br>";
?>

OVDJE IDE TVOJ HTML KOD
-- end index.php --



ovu liniju koja pocinje sa echo stavis kamo zelis a unutar nje izmjenis po zelji tekst, osim imena varijabli Smile

moras promijeniti varijable $host, $baza, $username, $password u baza.php
u index php moras izmjenit from phpbb_posts i phpbb_topic, osim ako si instalirao forum po difoltu.

Za imena juzera online nisam gledao, no mislim da se odredjuju na neki divlji nacin, po sessionu. kad cu imati vremena, postat cu ti ovdje.

Last edited by Phiber on 13.06.2004 14:23; edited 1 time in total

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 13.06.2004 13:34    Post subject: Add user to your forum ignore list Reply with quote

Ovo mi radi problem
Code:
 mysql_num_rows

napiše ovo:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /is/htdocs/29582/www.hudik.de/tibor/add/links.php on line 9

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /is/htdocs/29582/www.hudik.de/tibor/add/links.php on line 10

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 13.06.2004 14:04    Post subject: Add user to your forum ignore list Reply with quote

tipfeler kod $kveri_postevi. promjeni "select if" u "select id"

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 13.06.2004 14:08    Post subject: Add user to your forum ignore list Reply with quote

Znam to sam vidio i promjenio, a pogledaj ovo, to sam našao na:
http://hr.php.net/mysql_num_rows
Spojio sam njihov kod i tvoj pogledaj:
Code:

$link = mysql_connect($host,$username,$password) or die("nemogu se spojiti na bazu");
mysql_select_db($baza);
$kveri_topics = mysql_query("SELECT * FROM phpbb_topics", $link);
$kveri_postevi = mysql_query("SELECT * FROM $phpbb_posts", $link);
$1 = mysql_num_rows($kveri_topics);
$2 = mysql_num_rows($kveri_postevi);

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 13.06.2004 14:11    Post subject: Add user to your forum ignore list Reply with quote

nema to veze.
kod tvojeg koda koristi vise memorije, uzima vise polja jedne stavke.

rjeseno. vidi kod gore.
kod mene sve sljaka...
www.xatrix.org/fr/index.php

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 13.06.2004 14:29    Post subject: Add user to your forum ignore list Reply with quote

Kako pa meni neće!!!!
De mi stavi u atachment te fajlove
nemoraš staviti samo svoje mySQL podatke..

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 13.06.2004 14:34    Post subject: Add user to your forum ignore list Reply with quote

ma kopi pejstaj gresku koju ti ispisuje ili daj url

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 13.06.2004 14:45    Post subject: Add user to your forum ignore list Reply with quote

TOOOOO RADI problem je bio kod ovoga:
Code:

mysql_connect($host,$username,$password) or die("nemogu se spojiti na bazu");

nisu bili zatvoreni navodnici u zagradi...

http://www.hudik.de/tibor/

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 13.06.2004 14:50    Post subject: Add user to your forum ignore list Reply with quote

A kako napraviti da kada se netko logina, da on ostane na indexu, ali da mu se više nepokazuje login, nego da mu piše, recimo, pozdrav njegovo_ime ??

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 13.06.2004 14:53    Post subject: Add user to your forum ignore list Reply with quote

da bi bio ulogiran na forum i site, te da oboje koristi istu bazu i tablicu, moras ponesto znati o sessionima.
ovako, nadaleko je tesko to objasniti.
odi na php.net i gledaj dokumentaciju vezanu uz sessione

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 13.06.2004 15:03    Post subject: Add user to your forum ignore list Reply with quote

Ok hvala ti, a jel znaš možda kako bi napravio da kada se netko logira, da neode na forum nego da ostane na indexu, samo to mi je sada važno, a za sve ostalo ću kasnije...

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 13.06.2004 15:57    Post subject: Add user to your forum ignore list Reply with quote

u login.php nakon sto skripta provjeri username i password, stavis

Code:
header ("Location: http://www.server.com/nekifile.php");


sa razlicitim verzijama phpbb, razlicita je verzija i logina Smile
uglavnom, mozes zamijenit onaj prvi "redirect(append_sid(...."

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
unLog!c



Joined: 27 May 2004
Posts: 185
Location: Osijek

PostPosted: 13.06.2004 16:36    Post subject: Add user to your forum ignore list Reply with quote

De mi molim te u ovo ubaci gdje bi to trebalo ići, to ti je login.php
nemam blage gdje bi to trebao saviti...
Code:

<?php
/***************************************************************************
 *                                login.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: login.php,v 1.47.2.13 2003/06/20 07:40:27 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

//
// Allow people to reach login page if
// board is shut down
//
define("IN_LOGIN", true);

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

//
// Set page ID for session management
//
$userdata = session_pagestart($user_ip, PAGE_LOGIN);
init_userprefs($userdata);
//
// End session management
//

// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
   $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
   $sid = '';
}

if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) )
{
   if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] )
   {
      $username = isset($HTTP_POST_VARS['username']) ? trim(htmlspecialchars($HTTP_POST_VARS['username'])) : '';
      $username = substr(str_replace("\\'", "'", $username), 0, 25);
      $username = str_replace("'", "\\'", $username);
      $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';

      $sql = "SELECT user_id, username, user_password, user_active, user_level
         FROM " . USERS_TABLE . "
         WHERE username = '" . str_replace("\\'", "''", $username) . "'";
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql);
      }

      if( $row = $db->sql_fetchrow($result) )
      {
         if( $row['user_level'] != ADMIN && $board_config['board_disable'] )
         {
            redirect(append_sid("index.$phpEx", true));
         }
         else
         {
            if( md5($password) == $row['user_password'] && $row['user_active'] )
            {
               $autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;

               $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin);

               if( $session_id )
               {
                  $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx";
                  redirect(append_sid($url, true));
               }
               else
               {
                  message_die(CRITICAL_ERROR, "Couldn't start session : login", "", __LINE__, __FILE__);
               }
            }
            else
            {
               $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : '';
               $redirect = str_replace('?', '&', $redirect);

               $template->assign_vars(array(
                  'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">")
               );

               $message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' .  sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');

               message_die(GENERAL_MESSAGE, $message);
            }
         }
      }
      else
      {
         $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "";
         $redirect = str_replace("?", "&", $redirect);

         $template->assign_vars(array(
            'META' => "<meta http-equiv=\"refresh\" content=\"3;url=login.$phpEx?redirect=$redirect\">")
         );

         $message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"login.$phpEx?redirect=$redirect\">", '</a>') . '<br /><br />' .  sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');

         message_die(GENERAL_MESSAGE, $message);
      }
   }
   else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] )
   {
      if( $userdata['session_logged_in'] )
      {
         session_end($userdata['session_id'], $userdata['user_id']);
      }

      if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect']))
      {
         $url = (!empty($HTTP_POST_VARS['redirect'])) ? $HTTP_POST_VARS['redirect'] : $HTTP_GET_VARS['redirect'];
         redirect(append_sid($url, true));
      }
      else
      {
         redirect(append_sid("index.$phpEx", true));
      }
   }
   else
   {
      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx";
      redirect(append_sid($url, true));
   }
}
else
{
   //
   // Do a full login page dohickey if
   // user not already logged in
   //
   if( !$userdata['session_logged_in'] )
   {
      $page_title = $lang['Login'];
      include($phpbb_root_path . 'includes/page_header.'.$phpEx);

      $template->set_filenames(array(
         'body' => 'login_body.tpl')
      );

      if( isset($HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) )
      {
         $forward_to = $HTTP_SERVER_VARS['QUERY_STRING'];

         if( preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si", $forward_to, $forward_matches) )
         {
            $forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1];
            $forward_match = explode('&', $forward_to);

            if(count($forward_match) > 1)
            {
               $forward_page = '';

               for($i = 1; $i < count($forward_match); $i++)
               {
                  if( !ereg("sid=", $forward_match[$i]) )
                  {
                     if( $forward_page != '' )
                     {
                        $forward_page .= '&';
                     }
                     $forward_page .= $forward_match[$i];
                  }
               }
               $forward_page = $forward_match[0] . '?' . $forward_page;
            }
            else
            {
               $forward_page = $forward_match[0];
            }
         }
      }
      else
      {
         $forward_page = '';
      }

      $username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '';

      $s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />';

      make_jumpbox('viewforum.'.$phpEx, $forum_id);
      $template->assign_vars(array(
         'USERNAME' => $username,

         'L_ENTER_PASSWORD' => $lang['Enter_password'],
         'L_SEND_PASSWORD' => $lang['Forgotten_password'],

         'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),

         'S_HIDDEN_FIELDS' => $s_hidden_fields)
      );

      $template->pparse('body');

      include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
   }
   else
   {
      redirect(append_sid("index.$phpEx", true));
   }

}

?>

_________________
Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
View user's profile Send private message MSN Messenger
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 13.06.2004 19:09    Post subject: Add user to your forum ignore list Reply with quote

Stribor vs. Phiber! Applause

Još nisam vidio ovolki topic sa samo dva čovjeka...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 13.06.2004 19:56    Post subject: Add user to your forum ignore list Reply with quote

ma kul je ovo, bar je sve razjasnjeno na jednom mjestu pa ako ce nekome trebati BAS ova stvar - phiber i stribor su sve rekli Smile
Back to top
View user's profile Send private message
PsychoPod



Joined: 05 Oct 2003
Posts: 166

PostPosted: 14.06.2004 00:21    Post subject: Add user to your forum ignore list Reply with quote

upravo tako, a i pohvalna je pomoc koju phiber pruza.
Applause
Back to top
View user's profile Send private message
Phoenix
mi3.crew


Joined: 07 Sep 2003
Posts: 283
Location: Zgb

PostPosted: 14.06.2004 11:06    Post subject: Add user to your forum ignore list Reply with quote

hihi, ovo je bijo phpsex!

gg all!
Back to top
View user's profile Send private message Send e-mail
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 14.06.2004 16:00    Post subject: Add user to your forum ignore list Reply with quote

nadji ovo:
Code:

if( md5($password) == $row['user_password'] && $row['user_active'] )
            {
               $autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;

               $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin);

i nakon toga napisi ovo:
Code:

header ("Location: kamo_da_redirekta.php");


2 svi: to vam je primjer besplatne tehnicke podrske za one koje nemaju acc. kod mene.
sad si zamislite sto dobivaju ovi koji imaju acc. Smile

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 14.06.2004 16:39    Post subject: Add user to your forum ignore list Reply with quote

nekako mislim da ce ostati na tome da cemo zamisljati Wink
Back to top
View user's profile Send private message
PsychoPod



Joined: 05 Oct 2003
Posts: 166

PostPosted: 14.06.2004 17:06    Post subject: Add user to your forum ignore list Reply with quote

mislim da ima puno tehnicke podrske kod nas.
na kojem uglu ti poslujes? Twisted Evil cc
jk Smile
Back to top
View user's profile Send private message
Phiber



Joined: 18 Apr 2004
Posts: 319
Location: Čakovec, Kroejša

PostPosted: 14.06.2004 18:33    Post subject: Add user to your forum ignore list Reply with quote

2 maxy: thanks.
2 psychopod: a. šenoe, a ti?

_________________
- Xatrix Security news portal -- redizajn napravljen, al radim css Smile
- - TIP / Rapid IT : web design & hosting -- za ovog ne, taj je u ladici Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PsychoPod



Joined: 05 Oct 2003
Posts: 166

PostPosted: 16.06.2004 23:48    Post subject: Add user to your forum ignore list Reply with quote

ja sam ribica u moru..finding nemo je sitnica ako trazis menei. ja sam fizicki tech support na faxu Laughing Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group