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
Latest forum activity ?

 
Post new topic   Reply to topic    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
loodi.sale



Joined: 15 Feb 2006
Posts: 99
Location: Zenica, BA

PostPosted: 07.12.2006 10:23    Post subject: Latest forum activity ? Add user to your forum ignore list Reply with quote

Digao sam phpBB forum.. sljedeca je stranica na redu, pa me zanima kako da na naslovnu stranicu ubacim ovo sto vidim na mi3 i jos nekim stranicama da se vide ono posljednje teme sa foruma, i iznad da se mogu korisnici odmah logovati prije nego na forum odu ?

_________________
http://dotsasa.deviantart.com _visit.me
Back to top
View user's profile Send private message Visit poster's website
snyder



Joined: 21 Dec 2005
Posts: 57
Location: Zagreb

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

prikaz zadnjih postova na phpBB forumu
Code:
<?php
define("TOPIC_COUNT", 10);
define("PHPBB_PATH", "forum/");
define("PHPBB_LOCATION", "forum/");
define("TIME_FORMAT", "H:i");
$phpbb_root_path = PHPBB_PATH;

if ( !defined('IN_PHPBB') )
{
  define('IN_PHPBB', true);
  include(PHPBB_PATH . 'extension.inc');
  include(PHPBB_PATH . 'config.php');
  include(PHPBB_PATH . 'includes/constants.php');
  include(PHPBB_PATH . 'includes/db.php');
}
$sql = "SELECT DISTINCT t.topic_title, t.topic_last_post_id, p.post_time, f.forum_name
  FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f
  WHERE
    t.forum_id = f.forum_id
      AND f.auth_view = " . AUTH_ALL . "
      AND p.topic_id = t.topic_id
      AND p.post_id = t.topic_last_post_id
  ORDER BY p.post_time DESC LIMIT " . TOPIC_COUNT;
$nt_result = $db->sql_query($sql);

if(!$nt_result)
{
    die("Trenutno u nemogucnosti prikaza liste aktivnih tema...".mysql_error());
}
else
{
    $nt_data = $db->sql_fetchrowset($af_result);
}
   
if ( count($nt_data) == 0 )
{
    die("Nije nadjena niti jedna tema");
}
else
{
  for ($i = 0; $i < count($nt_data); $i++)
  {
    $title = $nt_data[$i]['topic_title'];
    $url = PHPBB_LOCATION . 'viewtopic.' . $phpEx . "?" . POST_POST_URL . "=" . $nt_data[$i]['topic_last_post_id'] . "#" . $nt_data[$i]['topic_last_post_id'];
    $on_forum = 'Na ' . $nt_data[$i]['forum_name'] . ' forumu';
    $post_time = date(TIME_FORMAT, $nt_data[$i]['post_time']);
?>
<div><b>&raquo; </b><a href="<?php echo $url; ?>" title="<?php echo $on_forum; ?>" target="_blank"><?php echo $title; ?></a></div>
<?php
  }
}
?>

aha, da, i login
Code:
<form action="forum/login.php" method="post">
Username<br />
<input name="username" type="text" size="15" maxlength="40" />
Password<br />
<input name="password" type="password" size="15" maxlength="32" /><br />
<input type="checkbox" name="autologin" checked="checked" /> Autologin <br />
<input type="submit" name="login" value="Login" />
<input type="hidden" name="redirect" value="../index.php" />
</form>
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
loodi.sale



Joined: 15 Feb 2006
Posts: 99
Location: Zenica, BA

PostPosted: 07.12.2006 13:24    Post subject: Add user to your forum ignore list Reply with quote

Thank you very much ljubim te u forehead Smile

_________________
http://dotsasa.deviantart.com _visit.me
Back to top
View user's profile Send private message Visit poster's website
snyder



Joined: 21 Dec 2005
Posts: 57
Location: Zagreb

PostPosted: 07.12.2006 14:25    Post subject: Add user to your forum ignore list Reply with quote

još jedna stvar koju sam zaboravio, ako želiš nekome tko je logiran prikazati nešto drugo, recimo koliko on ima postova, ima li privatnih poruka, itd...
Code:
<?php
define('IN_PHPBB',true);

$phpbb_root_path = "forum/"
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_LOGIN);
init_userprefs($userdata);
?>

$userdata je array u kojem ti je sve iz baze o korisniku koji je logiran, imena polja su ti kao i imena polja iz user tablice u bazi, znaci ako hoces znati id korisnika bit ce ti $userdata['user_id'], itd...
nadam se da sam pomogao Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ivan.tk



Joined: 30 Dec 2004
Posts: 47

PostPosted: 23.02.2007 15:13    Post subject: Add user to your forum ignore list Reply with quote

a koji je array za broj privatnih poruka?
Back to top
View user's profile Send private message
snyder



Joined: 21 Dec 2005
Posts: 57
Location: Zagreb

PostPosted: 23.02.2007 15:36    Post subject: Add user to your forum ignore list Reply with quote

za nove poruke $user_data['user_new_privmsg'], a za neprocitane $user_data['user_unread_privmsg']
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ivan.tk



Joined: 30 Dec 2004
Posts: 47

PostPosted: 23.02.2007 16:21    Post subject: Add user to your forum ignore list Reply with quote

E fala fala Smile
Uspia san nać za pročitane ali nikako za nepročitane.
Back to top
View user's profile Send private message
nomes



Joined: 07 May 2006
Posts: 292
Location: Zagreb

PostPosted: 23.02.2007 19:55    Post subject: Topics anywhere Add user to your forum ignore list Reply with quote

Probaj naci topics anywhere na phpbb.com skini to i instaliraj , sve sto je potrebno je da ubacis java scriptu koju on sam generira Cool

_________________
Last fm
Back to top
View user's profile Send private message
ivan.tk



Joined: 30 Dec 2004
Posts: 47

PostPosted: 26.02.2007 21:58    Post subject: Add user to your forum ignore list Reply with quote

E još jedno pitanje.
Stavia san ovu formu za logiranje, ali volia bi da se pojavljuje samo kad user nije logiran (sada mi se pojavljuje i kad je logiran i kad nije). Jel zna iko kako se to može?
+mi javlja ovu grešku .
Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/stkofi/public_html/index2.php:6) in /home/stkofi/public_html/forum/includes/sessions.php on line 293


Najidealnije bi bilo kad bi dok je user logiran da ispisuje ono koliko ima nepročitanjih poruka bla bla, a kad nije onda formu za logiranje
Back to top
View user's profile Send private message
snyder



Joined: 21 Dec 2005
Posts: 57
Location: Zagreb

PostPosted: 27.02.2007 09:05    Post subject: Add user to your forum ignore list Reply with quote

ovaj dio di se gleda dal je korisnik logiran ide prije bilo kakvog outputa, recimo stavi ga u user_cookie.php i include (ili require) prije doc type.
i onda imas dal je korisnik logiran:
Code:
if ($user_data['user_id'] != '-1') {
include('file_u_kojem_se_ispisuje_broj_poruka_i_kaj_vec_hoces.php');
}
else {
include('login_forma.php');
}
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Hawk



Joined: 27 Feb 2007
Posts: 2

PostPosted: 27.02.2007 12:10    Post subject: Add user to your forum ignore list Reply with quote

Pozdrav!

Kako bi se moglo napraviti da se u gornjoj skripti za ispis zadnjih 10 topica foruma odredi koje forume želimo da se prikazuju, jer imam slučaj da mi je jedna kategorija za strane korisnike, pa nju ne bih htio uključiti unutar prikaza na hrv dijelu i obrnuto?
Back to top
View user's profile Send private message
ivan.tk



Joined: 30 Dec 2004
Posts: 47

PostPosted: 27.02.2007 12:38    Post subject: Add user to your forum ignore list Reply with quote

Evo uspia san, sad mi je jedini problem šta se nemogu odlogirat sa foruma.
Zna li iko kako to rješit?
Izbrisa san cookies ali ništa.

snyder puno fala Wink

Last edited by ivan.tk on 27.02.2007 12:44; edited 1 time in total
Back to top
View user's profile Send private message
ivan.tk



Joined: 30 Dec 2004
Posts: 47

PostPosted: 27.02.2007 12:41    Post subject: Add user to your forum ignore list Reply with quote

Hawk wrote:
Pozdrav!

Kako bi se moglo napraviti da se u gornjoj skripti za ispis zadnjih 10 topica foruma odredi koje forume želimo da se prikazuju, jer imam slučaj da mi je jedna kategorija za strane korisnike, pa nju ne bih htio uključiti unutar prikaza na hrv dijelu i obrnuto?


ja to nisan rješia pomoću gornje skirpte već pomoću topics anywhere.
http://www.phpbbhacks.com/download/2057
Instaliraj to, vidit ćeš dalje sam. U njemu imaš biranje tema koje želiš da ti se prikažu.
Back to top
View user's profile Send private message
snyder



Joined: 21 Dec 2005
Posts: 57
Location: Zagreb

PostPosted: 27.02.2007 13:29    Post subject: Add user to your forum ignore list Reply with quote

ne kuzim, kak se nemres odlogirati? logout ne reagira il se odlogira pa logira kod refresha?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Hawk



Joined: 27 Feb 2007
Posts: 2

PostPosted: 27.02.2007 15:11    Post subject: Add user to your forum ignore list Reply with quote

A jesi uspio riješiti problem sa čćžšđ, meni iako je forum u iso-8859-2 i sajt u iso-8859-2 charsetu izbacuje hieroglife umjesto naših znakova.

Edit: snašao sam se, stavio sam gornju skriptu za hrv dio s obzirom da tako svi gledaju sve, a za englesku iskoristio topics anywhere koji prati samo engleski dio.
Back to top
View user's profile Send private message
ivan.tk



Joined: 30 Dec 2004
Posts: 47

PostPosted: 27.02.2007 19:58    Post subject: Add user to your forum ignore list Reply with quote

snyder wrote:
ne kuzim, kak se nemres odlogirati? logout ne reagira il se odlogira pa logira kod refresha?

ja se kao odlogiram i sad opet imam na dnu foruma ono standardno za upisati user name i password, ali moje ime je još među "registiranim oline".

Hawk wrote:
A jesi uspio riješiti problem sa čćžšđ, meni iako je forum u iso-8859-2 i sajt u iso-8859-2 charsetu izbacuje hieroglife umjesto naših znakova.

Edit: snašao sam se, stavio sam gornju skriptu za hrv dio s obzirom da tako svi gledaju sve, a za englesku iskoristio topics anywhere koji prati samo engleski dio.


I meni se javlja isti problem.
Koju gornju skriptu?

Svar je šta meni i inaće na bilo kojen forumu kad napišen u subject topica neki od hrv znakova izbaci herioglife
Back to top
View user's profile Send private message
snyder



Joined: 21 Dec 2005
Posts: 57
Location: Zagreb

PostPosted: 01.03.2007 20:00    Post subject: Add user to your forum ignore list Reply with quote

ups, evo skuzio gresku kod ovog sa logiranjem sa podacima sa foruma na sajtu.
array nije $user_data nego $userdata
jebiga Very Happy
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ivan.tk



Joined: 30 Dec 2004
Posts: 47

PostPosted: 01.03.2007 20:51    Post subject: Add user to your forum ignore list Reply with quote

Sve ispravljeno, sve radi Laughing Laughing
Samo se idalje nemogu odlogirat sa foruma Laughing Laughing
Nekad uspijem al ono..
Back to top
View user's profile Send private message
sef_mafije



Joined: 22 Feb 2012
Posts: 1

PostPosted: 22.02.2012 15:17    Post subject: Add user to your forum ignore list Reply with quote

ivan.tk wrote:
Hawk wrote:
Pozdrav!

Kako bi se moglo napraviti da se u gornjoj skripti za ispis zadnjih 10 topica foruma odredi koje forume želimo da se prikazuju, jer imam slučaj da mi je jedna kategorija za strane korisnike, pa nju ne bih htio uključiti unutar prikaza na hrv dijelu i obrnuto?


ja to nisan rješia pomoću gornje skirpte već pomoću topics anywhere.
http://www.phpbbhacks.com/download/2057
Instaliraj to, vidit ćeš dalje sam. U njemu imaš biranje tema koje želiš da ti se prikažu.


instalirao sam topics anywhere na forum, nasao sam ga u Cpanelu foruma pod MODS podesio ali nijei zbacio nikakav kod koji cu zalijepit na index.php ?????

mozes limi napisati taj kod ???

pozdrav
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
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