vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Latest XX Threads on Forumhome Page (https://vborg.vbsupport.ru/showthread.php?t=43310)

K.Michael 09-28-2002 08:16 PM

how I can get it to show :
- last ÕÕ threads in forum's 1,2,3,4
- last ÕÕ threads in all forum's excluding 6,7,8
- last XX threads in forum 9 and all subforum's

:bored: ?

TECK 09-28-2002 09:32 PM

hello Michael, you can use something like that:
Code:

$firstgrouparray = array(2, 3, 4);
$secondgrouparray = array(5 ,9);
if (in_array($thread['forumid'], $firstgrouparray)) {
  eval("\$firstgroupbits .= \"".gettemplate('forumhome_threadbits')."\";");
} elseif (in_array($thread['forumid'], $secondgrouparray)) {
  eval("\$secondgroupbits .= \"".gettemplate('forumhome_threadbits')."\";");
} elseif (!in_array($thread['forumid'], $firstgrouparray) and !in_array($thread['forumid'], $secondgrouparray)) {
  eval("\$threadbits .= \"".gettemplate('forumhome_threadbits')."\";");
} else {
  $firstgroupbits ='';
  $secondgroupbits = '';
  $threadbits = '';
}

play with it the way you like.

K.Michael 09-29-2002 11:02 AM

10õ!
idea is clear!

MultiSync 09-29-2002 11:04 AM

Quote:

Originally posted by stark427
Nice hack :)
I'd like to ask something...

I don't like the cells to be one under the other like this :

-
-
-
-
-
-

I would like them to be like 2 or 3 of them in each line... like this:

- - -
- - -
- - -

this way we have 9 latest threads which take more space horizontally and less verticaly.
I would also like this to be cetralised and not aligned at the left side of the board/page.

I guess I would have to put the $threadbits in a table and then centralise the table? (align=center)? Right?

could anyone help me with these modifications??

thanx in advance

Is there a way to do that TECK?

TECK 09-29-2002 11:17 AM

there is a way.

and for both of you k michael and you multisync.. are you that lazy to click the install button??
how do you pretend to ask information if you dont even bother to click install???
you have no respect for someone else's work. period.

jaxper 09-30-2002 03:14 AM

Great hack!

Is there any way to display all this on the first page -- that is not the first page of the forum but a home page right before the forum that has nothing to do with vbulletin yet? Will I need to set all variables from scratch?

Jax.

TECK 09-30-2002 03:16 AM

hello jaxper, you cant do this, since it uses the forums perms.
just make a php file, is alot easier...

jaxper 09-30-2002 03:18 AM

So what would by query be in the php file? I guess I need to consult that lovely database schematic that vbulletin provides :)

Destee 10-02-2002 06:52 AM

Thanks TECK ... I have been wanting this, but gosh ... my
forumhome is getting a bit cluttered ... *installs anyway*.

:)

Destee

Antorz 10-02-2002 08:25 PM

Installed!

Thanks, great hack!


Sorry about contacting you on msn, won't happen again..


As for my question, I was trying to setup your hack with a few modifications...


Basicaly I want to make it exactly like you have on your second screenshot..

This is the code I have in there right now trying to accomplish that..

PHP Code:

<table cellpadding="0" cellspacing="0" border="0" bgcolor="{categorybackcolor}" width="100%" align="center">
    <
tr>
        <
td>
            <
table cellpadding="4" cellspacing="1" border="0" width="100%">
                <
tr>
                    <
td bgcolor="{categorybackcolor}" colspan="1">
                        <
table cellpadding="0" cellspacing="0" border="0" width="100%">
                            <
tr>
                                <
td bgcolor="{categorybackcolor}">
                <
B><normalfont>Statistics</normalfont></B></td>
                            </
tr>
                        </
table>
                         </
td>
                </
tr>
                <
tr>
                    

                    <
TD bgcolor="{secondaltcolor}" width="100%">
            <
smallfont>
<
b>Top 5 New Thread Replys:</b>
<
hr>

<
table>
<
tr>
<
td width=65%><smallfont>Thread Names:</smallfont></td>
<
td width=25%><smallfont>Last Posters:</smallfont></td>
<
td width="10%"><smallfont>Replies:</smallfont></td>
<
td align="right"><smallfont>Views:</smallfont></td>
</
tr>
<
tr>
<
td width=65%><smallfont> <a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]"><b>$thread[title]</b></a></smallfont></td>
<
td width=25%><smallfont><a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$thread[postuserid]">$thread[postusername]</a></smallfont></td>
<
td width="10%"><smallfont>$thread[views]</smallfont></td>
<
td align="right"><smallfont>$thread[replycount]</smallfont></td>
</
tr>
</
table>
            </
smallfont></td>
                </
tr>
                </
table


I'm not sure what I'm doing wrong, if it's coding in the index.php or in the threadbits template..

Basicaly it just takes that table, and for each "latest XXX thread" it makes a whole new 'complete' table for it...




Any support would be greatly apreciated.
Thanks
-Antorz


All times are GMT. The time now is 10:26 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02108 seconds
  • Memory Usage 1,768KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete