I have started to build my new forum/portal with phpbb/mkportal. The advances mod rewrite is one of the most importand mods i need because it has such pretty urls and it will lead a lot of people to my forum from google.
Right now i have the able2know mod installed and it allsow works verry good, it gave me 3 pageranks higher. But the pretty urls and the active community have convinced me to transfer to the phpbb-seo Advanced mod Rewrite.
But i have the following problem:
on http://testforum.brandpreventieforum.nl/ you can see i have a testforum with phpbb and mkportal. I allsow have installed the Advanced mod Rewrite on the forum. As you can see in the forum the mod rewrite works perfectly, but as expected the links from the portal to the forum give ugly urls.
Luckely there are not many links from the portal tot the forum, only the latest posts in the side menu online members and latest member.
The last posts on the portal page is a seperate module and can be seperated from the rest: http://testforum.brandpreventieforum.nl/forum/topic.php
The exact content of this module is:
- Code: Select all
<?php
// Amount of active topics to show
define("TOPIC_COUNT", 8);
// Path to the phpBB 2.0 root directory
define("PHPBB_PATH", "/home/sites/webhosting/bureauvanrossum/brandpreventieforum/testforum/forum/");
// URL to the phpBB 2.0 installation
define("PHPBB_LOCATION", "http://testforum.brandpreventieforum.nl/forum/");
// Time format to output the date/time (for format see PHP manual)
define("TIME_FORMAT", "d/m/Y");
// Includes of phpBB scripts
$phpbb_root_path = PHPBB_PATH;
if ( !defined('IN_PHPBB') )
{
define('IN_PHPBB', true);
include(PHPBB_PATH . 'extension.inc');
include(PHPBB_PATH . 'config.'.$phpEx);
include(PHPBB_PATH . 'includes/constants.'.$phpEx);
include(PHPBB_PATH . 'includes/db.'.$phpEx);
}
// HTML header start
?>
<style>
a:link,
a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #496c9f;
text-decoration: none;
}
a:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #496c9f;
text-decoration: underline;
}
a:active {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #496c9f;
text-decoration: none;
}
</style>
<table border="0" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th align="center" bgcolor="#DFE6EF"><font color="#615F5F" size="2">Onderwerp</font></th>
<th align="center" bgcolor="#DFE6EF"><font color="#615F5F" size="2">Bekeken</font></th>
<th align="center" bgcolor="#DFE6EF"><font color="#615F5F" size="2">Antwoorden</font></th>
<th align="center" bgcolor="#DFE6EF"><font color="#615F5F" size="2">Laatste reactie door</font></th>
<th align="center" bgcolor="#DFE6EF"><font color="#615F5F" size="2">Datum</font></th>
</tr>
<?php
// HTML header end
$sql = "SELECT DISTINCT t.topic_title, t.topic_id,t.topic_views,t.topic_replies, t.topic_last_post_id, p.post_time,p.poster_id, f.forum_name, u.user_id, u.username
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f, " . USERS_TABLE . " AS u
WHERE
t.forum_id = f.forum_id
AND f.auth_view = " . AUTH_ALL . "
AND p.topic_id = t.topic_id
AND p.poster_id = u.user_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("Failed obtaining list of active topics".mysql_error());
}
else
{
$nt_data = $db->sql_fetchrowset();
}
if ( count($nt_data) == 0 )
{
die("No topics found");
}
else
{
$cq = 1;
$cc = FFFFFF;
// $nt_data contains all interesting data
for ($i = 0; $i < count($nt_data); $i++)
{
$title = $nt_data[$i]['topic_title'];
$Turl = PHPBB_LOCATION . 'viewtopic.' . $phpEx . "?t=" . $nt_data[$i]['topic_id'];
$LPurl = PHPBB_LOCATION . 'viewtopic.' . $phpEx . "?" . POST_POST_URL . "=" . $nt_data[$i]['topic_last_post_id'] . "#" . $nt_data[$i]['topic_last_post_id'];
$on_forum = 'Forum ' . $nt_data[$i]['forum_name'];
$post_time = date(TIME_FORMAT, $nt_data[$i]['post_time']);
//Profile profile.php?mode=viewprofile&u=23
$profile = PHPBB_LOCATION . 'profile.' . $phpEx . "?mode=viewprofile&u=" . $nt_data[$i]['poster_id'] ;
$usrname = $nt_data[$i]['username'];
// Item HTML start
if($cq%2 == 0){$cc = DFE6EF;$cq++;} else{$cc = E8EFF4;$cq++;}?>
<tr>
<td bgcolor="#<?php echo $cc;?>" align="left"><a href="<?php echo $LPurl; ?>" title="<?php echo $on_forum; ?>" target="_parent"><font face="verdana" color="#496C9F" size="1"><B><?php echo $title; ?></B></font></a></td>
<td bgcolor="#<?php echo $cc;?>" align="left"><div align="center"><font face="verdana" color="#615F5F" size="1"><?php echo $nt_data[$i]['topic_views'] ?></div></td>
<td bgcolor="#<?php echo $cc;?>" align="left"><font face="verdana" color="#615F5F" size="1"><div align="center"><?php echo $nt_data[$i]['topic_replies'] ?></div></td>
<td align="center" bgcolor="#<?php echo $cc;?>" align="left"><font face="verdana" color="#666666" size="1"><a href="<?php echo $profile; ?>" target="_parent"><font face="verdana" color="#496C9F" size="1"><B><?php echo $usrname?></B></a></td>
<td bgcolor="#<?php echo $cc;?>" align="left"><font face="verdana" color="#615F5F" size="1"><div align="center"><?php echo $post_time ?></div></td>
</tr>
<?php
// Item HTML end
}
}
// Footer HTML start
?>
</table>
I was not able to find the logic in the mod sow that i could make the changes myself
Here are the parts of the block on the right:
Site stats:
- Code: Select all
<?php
/*
+--------------------------------------------------------------------------
| MkPortal
| ========================================
| by Meo aka Luponero <Amedeo de longis>
| Don K. Colburn <visiblesoul.net>
|
| Copyright (c) 2004-2006 mkportal.it
| http://www.mkportal.it
| Email: luponero@mclink.it
|
+---------------------------------------------------------------------------
|
| > MKPortal
| > Written By Amedeo de longis
| > Date started: 9.2.2004
|
+--------------------------------------------------------------------------
*/
if (!defined("IN_MKP")) {
die ("Sorry !! You cannot access this file directly.");
}
$content = "";
$link_user = $mklib_board->forum_link("profile");
$counter = $this->config['counter'];
$stat = $mklib_board->get_site_stat();
$count_holder = sprintf ("%07d", "$counter");
$countgal = $this->stats['tot_gallery'];
$countdown = $this->stats['tot_download'];
$countblog = $this->stats['tot_blog'];
$countsite = $this->stats['tot_topsite'];
$countrev = $this->stats['tot_reviews'];
for ($n = 0; $n < strlen($count_holder); $n++) ($nbhits .= "<img src=\"$this->images/led/{$count_holder[$n]}.gif\" style=\"border: solid 1px #ffffff;\" alt=\"\" />");
$content .= "
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">{$stat['total_posts']}</span> {$this->lang['posts']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$stat['topics']} {$this->lang['topics']}
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$stat['replies']} {$this->lang['replies']}<br />
</td>
</tr>";
if (!$this->config['mod_blog']) {
$content .= "
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countblog</span> {$this->lang['blog']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['user_created']}<br />
</td>
</tr>";
}
if (!$this->config['mod_gallery']) {
$content .= "
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countgal</span> {$this->lang['images']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['in_gallery']}<br />
</td>
</tr>";
}
if (!$this->config['mod_downloads']) {
$content .= "
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countdown</span> {$this->lang['files']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['in_download']}<br />
</td>
</tr>";
}
if (!$this->config['mod_topsite']) {
$content .= "
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countsite</span> {$this->lang['sites']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['in_topsite']}<br />
</td>
</tr>";
}
if (!$this->config['mod_reviews']) {
$content .= "
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countrev</span> {$this->lang['reviews']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['in_reviews']}<br />
</td>
</tr>";
}
$content .= "
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">{$stat['members']}</span> {$this->lang['u_registered']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['last']}: <a class=\"uno\" href=\"$link_user={$stat['last_member']}\">{$stat['last_member_name']}</a>
</td>
</tr>
<tr>
<td class=\"tdblock\">
{$this->lang['access_counter']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
<center>$nbhits</center>
</td>
</tr>
";
unset($link_user);
unset($counter);
unset($stat);
unset($count_holder);
unset($query);
unset($countgal);
unset($countdown);
unset($countblog);
unset($countsite);
unset($countrev);
?>
and online people:
- Code: Select all
<?php
/*
+--------------------------------------------------------------------------
| MkPortal
| ========================================
| by Meo aka Luponero <Amedeo de longis>
| Don K. Colburn <visiblesoul.net>
|
| Copyright (c) 2004-2006 mkportal.it
| http://www.mkportal.it
| Email: luponero@mclink.it
|
+---------------------------------------------------------------------------
|
| > MKPortal
| > Written By Amedeo de longis
| > Date started: 9.2.2004
|
+--------------------------------------------------------------------------
*/
if (!defined("IN_MKP")) {
die ("Sorry !! You cannot access this file directly.");
}
$lonlinelist= $mklib_board->forum_link("onlinelist");
$users= $mklib_board->get_onlineblock();
$logged_visible_online = $users[0];
$logged_hidden_online = $users[1];
$guests_online = $users[2];
$online_userlist = $users[3];
unset ($users);
$total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;
$content = "
<tr>
<td width=\"100%\">
<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"1\">
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$total_online_users</span> {$this->lang['onlineusers']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
<b>$guests_online</b> {$this->lang['guests']}<br /><b>$logged_hidden_online</b> {$this->lang['anons']}<br /><b>$logged_visible_online</b> {$this->lang['noanons']}:<br /> $online_userlist
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class=\"tdblock\">
<img src=\"$this->images/atb_members.gif\" align=\"left\" alt=\"\" /> <a class=\"uno\" href=\"$lonlinelist\">{$this->lang['lastclick']}</a>
</td>
</tr>
";
unset($lonlinelist);
unset($logged_visible_online);
unset($logged_hidden_online);
unset($guests_online);
unset($online);
unset($total_online_users);
?>
Could someone help me rewrite these urls? Than the mod rewrite would work perfectly!
Greets Emiel

English |
French


