Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
rino
Newbie
Newbie



Joined: Feb 03, 2008
Posts: 2

PostPosted: Tue Jun 09, 2009 11:47 am Reply with quote

Hi,
I tried to add at Shortlink the new block-block Center_phpBB3 which is not make the queries vs Forums module but on the new PHPBB3 Standalone version. My question is : its possible create a new GTB-block-Center_Block_phpBB3.php so a rewrite in a block not connected at a module? Thanks!
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Tue Jun 09, 2009 3:51 pm Reply with quote

Definitely would not be able to ShortLink a standalone phpBB3 forum, however, if this block is being presented by *nuke, yes, it should be able to have its links shortened. You just need to have the right "taps" in the block file and .htaccess file.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
rino
Newbie
Newbie



Joined: Feb 03, 2008
Posts: 2

PostPosted: Wed Jun 10, 2009 4:15 am Reply with quote

Thanks for answer.
So i have this block
Code:
<?php
if ( !defined('BLOCK_FILE') ) {
    Header("Location: ../index.php");
    die();
}

global $prefix, $user_prefix, $db, $language, $sitename;

@include("language/bcf/lang-$language.php");

/**********************************/
/*                                */
/* Configuration parameters       */
/*                                */
/**********************************/
// When set to 1 then Forums permissions which View and/or Read are NOT set to 'ALL' will NOT be displayed in the center block
$HideViewReadOnly = 1;
// Show only 15 last new topics
$Last_New_Topics  = 12;                           

/**********************************/
/*                                */
/* Don't Edit Below !             */
/*                                */
/**********************************/
$border           = 0;
$cellspacing      = 0;

/* Total Amount of Topics */
$result = $db->sql_query( "SELECT * FROM ".$table_prefix."phpbb_topics" );
$Amount_Of_Topics = $db->sql_numrows( $result );

/* Total Amount of Posts */
$result = $db->sql_query( "SELECT * FROM ".$table_prefix."phpbb_posts" );
$Amount_Of_Posts = $db->sql_numrows( $result );

/* Total Amount of Topic Views */
$Amount_Of_Topic_Views = 0;
$result = $db->sql_query( "SELECT topic_views FROM ".$table_prefix."phpbb_topics" );
while( list( $topic_views ) = $db->sql_fetchrow( $result ) )
{
   $Amount_Of_Topic_Views = $Amount_Of_Topic_Views + $topic_views;
}

/* Total Amount of Topic Replies */
$Amount_Of_Topic_Replies = 0;
$result = $db->sql_query( "SELECT topic_replies FROM ".$table_prefix."phpbb_topics" );
while( list( $topic_replies ) = $db->sql_fetchrow( $result ) )
{
   $Amount_Of_Topic_Replies = $Amount_Of_Topic_Replies + $topic_replies;
}

/* Last X New Topics */
$Count_Topics = 0;
$Topic_Buffer = "";
$result1 = $db->sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$table_prefix."phpbb_topics ORDER BY topic_last_post_id DESC" );
                                 //topic_title FROM phpbb_topics AS t, phpbb_forums AS f WHERE f.forum_id=t.forum_id ORDER BY topic_time DESC LIMIT 10
while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result1, $dbi ) )

{
   $skip_display = 0;
   if( $HideViewReadOnly == 1 )
   {
      $result5 = $db->sql_query( "SELECT auth_view, auth_read FROM ".$table_prefix."phpbb_forums where forum_id = '$forum_id'" );
      list( $auth_view, $auth_read ) = $db->sql_fetchrow( $result5 );
      if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }
   }
   
   if( $topic_moved_id != 0 )
   {
     // Shadow Topic !!
      $skip_display = 1;
   }
   
   if( $skip_display == 0 )
   {
     $Count_Topics += 1;
      $result2 = $db->sql_query( "SELECT topic_id, poster_id, FROM_UNIXTIME( post_time,'%d/%m/%Y - %T') as post_time FROM ".$table_prefix."phpbb_posts where post_id = '$topic_last_post_id'" );
      list( $topic_id, $poster_id, $post_time ) = $db->sql_fetchrow( $result2 );

      $result3 = $db->sql_query( "SELECT username, user_id FROM ".$table_prefix."phpbb_users where user_id='$poster_id'" );
      list( $uname, $uid ) = $db->sql_fetchrow( $result3 );
      $LastPoster = "<a href=\"forums/memberlist.php?mode=viewprofile&u=$poster_id\"> $uname </a>";
     
      $result4 = $db->sql_query( "SELECT username, user_id FROM ".$table_prefix."phpbb_users where user_id='$topic_poster'" );
      list( $uname, $uid ) = $db->sql_fetchrow( $result4 );
      $OrigPoster = "<a href=\"forums/memberlist.php?mode=viewprofile&u=$uid\"> $uname </a>";
   
$ThemeSel = get_theme();   
   
      $TopicImage = "<div align=\"center\"><img src=\"themes/$ThemeSel/images/imgforum.png\" width=\"16\" height=\"9\"         border=\"0\"></div>";
      $TopicTitleShow = " <a href=\"forums/viewtopic.php?f=$forum_id&amp;t=$topic_id\">$topic_title</a>";
   
      $Topic_Buffer .= "<tr width=\"100%\" height=\"5\"><td nowrap background=\"/images/sf_bl_forum0.gif\" height=\"5\">$TopicImage  </td><td background=\"/images/sf_bl_forum0.gif\" height=\"5\">$TopicTitleShow</td><td nowrap background=\"/images/sf_bl_forum0.gif\" height=\"5\"><div align=\"center\">$OrigPoster</div></td><td nowrap background=\"/images/sf_bl_forum0.gif\" height=\"5\"><div align=\"center\"><b>$topic_views</b></div></td><td nowrap background=\"/images/sf_bl_forum0.gif\" height=\"5\"><div align=\"center\"><b>$topic_replies</b></div></td><td nowrap background=\"/images/sf_bl_forum0.gif\" height=\"5\" align=\"center\">$LastPoster<br><font size=\"-2\"><i>$post_time</i></font></td></tr>";
   }
   
   if( $Last_New_Topics == $Count_Topics ) { break 1; }
     
}

/* Write Table to Screen */
$content = "";

$content49 .= "<table width=\"100%\">";
$content49 .= "<tr height=\"5\"><td background=\"/images/sf_bl_forum.gif\" align=\"center\"><b>&raquo;</b></center></td><td background=\"/images/sf_bl_forum.gif\" align=\"center\"><b>"._NM."</b></td><td background=\"/images/sf_bl_forum.gif\" align=\"center\"><b>"._AUTORI."</b></td><td background=\"/images/sf_bl_forum.gif\" align=\"center\"><b>"._VISTI."</b></td><td background=\"/images/sf_bl_forum.gif\" align=\"center\"><b>"._RISPOSTE."</b></td><td background=\"/images/sf_bl_forum.gif\" align=\"center\"><b>"._URISPOSTE."</b></td></tr>";
$content49 .= "$Topic_Buffer";
$content49 .= "<tr height=\"5\"><td background=\"/images/sf_bl_forum.gif\" align=\"left\" colspan=\"6\">"._ARGOMENTI."<b>$Amount_Of_Topics</b> <b>|</b> "._MESSAGGI."<b>$Amount_Of_Posts</b> <b>|</b> "._VISITE."<b>$Amount_Of_Topic_Views</b> <b>|</b> "._REPLICHE."<b>$Amount_Of_Topic_Replies</b> <b></left></td></tr>";
$content49 .= "<tr height=\"5\"><td background=\"/images/sf_bl_forum.gif\" align=\"center\" colspan=\"6\">[ <a href=\"forums\">"._FORUM."</a> ]   [ <a href=\"forums/search.php\">"._CERCA."</a> ]</center></td></tr>";
$content49 .= "</table>";

?>




this is the url generated whitout rewrite
Code:
http://www.yoursite.com/forums/viewtopic.php?f=50&t=1729

http://www.yoursite.com/forums/memberlist.php?mode=viewprofile&u=58

http://www.yoursite.com/forums/memberlist.php?mode=viewprofile&u=1886


My attempts have failed, unfortunately. Can you create the GTB-block and the line for.htaccess ?
Thanks in advance
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Wed Jun 10, 2009 3:08 pm Reply with quote

What do you have currently in your GTB-* file?

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch