>>  Site Map >>  Forums >>  Blocks 7x

Forum module - topics in forum:



Blocks 7x - Discussions regarding PHP-Nuke Blocks. 7x



Forums center block

Hi there i used to use this block on my site but since i put a new theme on it throws the theme out because its to wide when looked at with 1024 768.so i got another block which looks fine at 1024 but any bigger res then the block looks like it isnt centered.

Code: :
<?php



########################################################################

# PHP-Nuke Block: fiapple Center Forum Block v.9              #

# Made for PHP-Nuke 6.5 ONLY!!                                         #

#                                                                      #

# Made by mikem http://www.nukemods.com                                #

# Edited by William Wickings http://www.amateur-online.net             #

########################################################################

# This program is free software. You can redistribute it and/or modify #

# it under the terms of the GNU General Public License as published by #

# the Free Software Foundation; either version 2 of the License.       #

# If you modify this, let me know for fun. =)                          #

########################################################################



if (eregi("block-fiapple-Forum.php",$PHP_SELF)) {

    Header("Location: index.php");

    die();

}



global $prefix, $dbi, $sitename, $admin;



$HideViewReadOnly = 1;



$Last_New_Topics  = 10;

$show = "  <tr>

    <td height=\"28\" colspan=\"6\" align=\"center\" class=\"catbottom\" background=\"themes/fiapple/forums/images/cat_bkg.gif\">&nbsp;</td>

  </tr>

</table></td>

        </tr>

      </table></td>

  </tr>

</table>";



$Count_Topics = 0;

$Topic_Buffer = "";

$result = sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC", $dbi );

while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result, $dbi ) )



{

   $skip_display = 0;

   if( $HideViewReadOnly == 1 )

   {

      $result1 = sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'", $dbi );

      list( $auth_view, $auth_read ) = sql_fetch_row( $result1, $dbi );

      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 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$topic_poster'", $dbi);

list($username, $user_id)=sql_fetch_row($result2, $dbi);

$avtor=$username;

$sifra=$user_id;



$result3 = sql_query("SELECT poster_id, FROM_UNIXTIME(post_time,'%m/%d/%Y at %H:%i') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);

list($poster_id, $post_time)=sql_fetch_row($result3, $dbi);



$result4 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);

list($username, $user_id)=sql_fetch_row($result4, $dbi);



                         $viewlast .="  <tr>

    <td height=\"30\" nowrap bgcolor=\"#f5f5f5\" class=\"row1\"><img src=\"themes/fiapple/forums/images/folder_new.gif\" border=\"0\" /></td>

    <td width=\"80%\" bgcolor=\"#f5f5f5\" class=\"row1\">&nbsp;<a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id#$topic_last_post_id\">$topic_title</a></td>

    <td align=\"center\" bgcolor=\"#ececec\" class=\"row2\">$topic_replies</td>

    <td align=\"center\" bgcolor=\"#ececec\" class=\"row3\"><a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$sifra\">$avtor</a></td>



    <td align=\"center\" nowrap bgcolor=\"#ececec\" class=\"row3\"><font size=\"-2\"><i>&nbsp;&nbsp;$post_time&nbsp;</i></font><br>

      <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\">$username</a>&nbsp;<a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><img src=\"themes/fiapple/forums/images/icon_minipost_new.gif\" border=\"0\" alt=\"Latest Post\"></a></td>

  </tr>";

}



   if( $Last_New_Topics == $Count_Topics ) { break 1; }



}



    $content .= "<table width=\"80%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">

  <tr>

    <td><table width=\"80%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">

        <tr>

          <td bgcolor=\"#D1D7DC\"><table width=\"80%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\">

  <tr>

    <th height=\"25\" colspan=\"2\" align=\"center\" nowrap background=\"themes/fiapple/forums/images/cat_bkg.gif\" class=\"thcornerl\"><font color=\"#000000\"><strong>Topics</strong></font></th>

    <th width=\"50\" align=\"center\" nowrap background=\"themes/fiapple/forums/images/cat_bkg.gif\" class=\"thtop\"><font color=\"#000000\"><strong>&nbsp;Replies&nbsp;</strong></font></th>

    <th width=\"80\" align=\"center\" nowrap background=\"themes/fiapple/forums/images/cat_bkg.gif\" class=\"thtop\"><font color=\"#000000\"><strong>&nbsp;Author&nbsp;</strong></font></th>



    <th align=\"center\" nowrap background=\"themes/fiapple/forums/images/cat_bkg.gif\" class=\"thcornerr\"><font color=\"#000000\"><strong>&nbsp;Last Post&nbsp;</strong></font></th>

  </tr>";

    $content .= "$viewlast";



 $content .= "$show";





?>





heres a screen of the block. can anyone show me how to center the block.



thanks

Tom






Should imagine it would do, it's for use with fiapple.

BTW, screenshot doesnt work.






yes sorry fixed now, i added the folder for fiapple and if i get working ill rearrange the images.

Tom






Why not try a generic block that should be ok on all themes.

http://phpnuke-uk.net/downloadview-details-56-Forum_Center_Block_6.5.html






LOL, i tell you what ill use that one. works a treat thanks!

also is there a generic top posters center block like the above?

Thanks

Tom






Not that I know of.






ARgh thanks anyway mate!

Tom






Oooh, you could try ravens all in one block, I think it's the one on his mainpage.

http://ravenphpscripts.com/modules.php?name=Downloads&d_op=viewdownloaddetails&cid=7&lid=86&ttitle=Collapsing_Recent_Forums_Post_List#dldetails






Thanks again, i dont like that block to be honest because of the drop down thing but i will ask on ravens site.

Thanks

Tom






It seems to be all configurable.

Code: :
$tickerWidth         = '100%';
$tickerBGColor       = "$bgcolor2";
$tickDelay           = 4000; // in miliseconds
$HideViewReadOnly    = TRUE;
$Last_New_Topics     = 75; // Number of topics to show when list is expanded
$Count_Topics        = 0;
$Topic_Buffer        = '';
$postTimeOffset      = -1;  //(-1)*60*60;
$showTopTen          = 2;  // 0=None, 1=Username - no avatar,  2=Username and avatar
$showJumpBox         = TRUE;







yes it looks like it starts of with the list collapsed though, ill give it ago i think would be best lol.

Tom




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS