phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Last 10 topics on web

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
::  
Author Message
JanoF



Joined: 30 May 2006
Posts: 43

Last 10 topics on webPosted: Sun Sep 10, 2006 11:34 am    Post subject: Last 10 topics on web

This use on the Web, outside phpbb

Code:
<?php
$topicnumber = 10;
$urlPath = "http://www.phpbb.sk";
include 'config.php';
$table_topics = $table_prefix. "topics";
$table_forums = $table_prefix. "forums";
$table_posts = $table_prefix. "posts";
$table_users = $table_prefix. "users";
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect");
mysql_select_db("$dbname") or die("Could not select database");
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
WHERE t.topic_id = p.topic_id AND
f.forum_id = t.forum_id AND
t.topic_status <> 2 AND
p.post_id = t.topic_last_post_id AND
p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT $topicnumber";
$result = mysql_query($query) or die("Query failed");
print "<table class='bodyline' width='180' border='0' cellspacing='1' cellpadding='4'><tr><td class='cat' align='center'><span class='cattitle'>Posledné témy</span></td></tr>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo  "<tr><td class='row1'><span class='siteTextMed'>&bull; " . date('d M Y', $row["post_time"]) . "</span><br /><span class='siteTextSmall'><a href=\"$urlPath/viewtopic.php?t=$row[topic_id]\">" . $row["topic_title"] . "</a></span></td></tr>";
}
print "</table>";
mysql_free_result($result);
?>


He knew could this somebody adjust like this that it will be screen seo addresses et non viewtopic.php?t=1

thx

_________________
www.pcforum.sk | www.pcforum.cz | jan.fecik.sk
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Last 10 topics on webPosted: Sun Sep 10, 2006 12:11 pm    Post subject: Re: Last 10 topics on web

Maybe you could start working from this script, as it's already checking censoring and such.

It should be easy to adapt the output to what you like.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
JanoF



Joined: 30 May 2006
Posts: 43

Last 10 topics on webPosted: Sun Sep 10, 2006 12:26 pm    Post subject: Re: Last 10 topics on web

thx

_________________
www.pcforum.sk | www.pcforum.cz | jan.fecik.sk
Back to top
Visit poster's website
JanoF



Joined: 30 May 2006
Posts: 43

Last 10 topics on webPosted: Sun Sep 10, 2006 8:32 pm    Post subject: Re: Last 10 topics on web

dcz wrote:
Maybe you could start working from this script, as it's already checking censoring and such.

It should be easy to adapt the output to what you like.

++

I was trying this and doesn't work this repair me this this www.phpbb.sk/viewtopic.php?t= et non rewrite record

_________________
www.pcforum.sk | www.pcforum.cz | jan.fecik.sk
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Last 10 topics on webPosted: Sun Sep 10, 2006 9:54 pm    Post subject: Re: Last 10 topics on web

Try quoting my post and grab the code from there, there is a problem (it's adding spaces in the text breaking the code) with the wrapping function I never have time to fix Wink

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
JanoF



Joined: 30 May 2006
Posts: 43

Last 10 topics on webPosted: Mon Sep 11, 2006 1:06 pm    Post subject: Re: Last 10 topics on web

dcz wrote:
Try quoting my post and grab the code from there, there is a problem (it's adding spaces in the text breaking the code) with the wrapping function I never have time to fix Wink
ok, thx

_________________
www.pcforum.sk | www.pcforum.cz | jan.fecik.sk
Back to top
Visit poster's website
JanoF



Joined: 30 May 2006
Posts: 43

Last 10 topics on webPosted: Tue Sep 12, 2006 8:26 am    Post subject: Re: Last 10 topics on web

Try I am this and doesn't work this.
http://www.phpbb.sk/features.php
he knew ought me repair the kod like this that functioned on 100% ?

_________________
www.pcforum.sk | www.pcforum.cz | jan.fecik.sk
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Last 10 topics on webPosted: Tue Sep 12, 2006 11:10 am    Post subject: Re: Last 10 topics on web

Please post the code you are using Wink

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
JanoF



Joined: 30 May 2006
Posts: 43

Last 10 topics on webPosted: Tue Sep 12, 2006 12:00 pm    Post subject: Re: Last 10 topics on web

Code:
<?php
$topicnumber = 10;
$urlPath = "http://www.phpbb.sk";
include 'config.php';
$table_topics = $table_prefix. "topics";
$table_forums = $table_prefix. "forums";
$table_posts = $table_prefix. "posts";
$table_users = $table_prefix. "users";
$link = mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("Could not connect");
mysql_select_db("$dbname") or die("Could not select database");
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
WHERE t.topic_id = p.topic_id AND
f.forum_id = t.forum_id AND
t.topic_status <> 2 AND
p.post_id = t.topic_last_post_id AND
p.poster_id = u.user_id
ORDER BY p.post_id DESC LIMIT $topicnumber";
$result = mysql_query($query) or die("Query failed");
print "<table class='bodyline' width='180' border='0' cellspacing='1' cellpadding='4'><tr><td class='cat' align='center'><span class='cattitle'>Posledné témy</span></td></tr>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo  "<tr><td class='row1'><span class='siteTextMed'>&bull; " . date('d M Y', $row["post_time"]) . "</span><br /><span class='siteTextSmall'><a href=\"$urlPath/viewtopic.php?t=$row[topic_id]\">" . $row["topic_title"] . "</a></span></td></tr>";
}
print "</table>";
mysql_free_result($result);
?>

And non-he shows me references to last contribution but only on a given subject

_________________
www.pcforum.sk | www.pcforum.cz | jan.fecik.sk
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14279

Last 10 topics on webPosted: Tue Sep 12, 2006 4:09 pm    Post subject: Re: Last 10 topics on web

I meant, the other one, as it is working, so I though I could see the mistake fast.

Your code is not checking censor nor it is able to use the format_url function, as it not in phpBB session.

So I think, starting from the other one would be better.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: