Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Wyciągnięcie na stronę zawartości forum
dorth_24
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 14.07.2005

Ostrzeżenie: (0%)
-----


Witam
chciałbym zrobić coś takiego by na stronie startowej (np. www.cos.pl/index.php) pokazywały się nowe tematy z forum PHPBB (on jest w www.cos.pl/forum/) ale zupełnie nie wiem jak to wyciągnąć. Może już ktoś coś takiego robił i pomoże mi
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
kocurkiewicz
post
Post #2





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 6.11.2005

Ostrzeżenie: (0%)
-----


  1. <?php
  2. mysql_connect(host,user,pass); 
  3. mysql_select_db(dbname);  
  4. $result = mysql_query('SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.po
    st_time, p.post_username
  5. FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2
  6. WHERE t.topic_poster = u.user_id
  7. AND p.post_id = t.topic_last_post_id
  8. AND p.poster_id = u2.user_id
  9. ORDER BY t.topic_last_post_id DESC
  10. LIMIT 7');
  11. while($row = mysql_fetch_array($result)) { 
  12. $b .='<strong><big>ˇ</big></strong> <a href="http://forum.bruinena.net/viewtopic.php?t='.$row['topic_id'].'">'.substr($row['topic_title'], 0, 20).' '.((strlen($row['topic_title']) > 20) ? "..." : '').' ('.$row['topic_replies'].')</a><br>'.$row['user2'].'<br> ';
  13. } 
  14. ?>


Teoretycznie jest dobrze, jeśli chcesz więcej to wgraj sobie "Topics Anywhere"
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 11.10.2025 - 14:45