PDA

View Full Version : Latest XX Threads on Forumhome Page


TECK
08 Sep 2002, 11:26
This hack will add your latest xx threads to your forum home page.
The good part is that you can do all this with only 1 query.

The following options are available:
- number of threads displayed
- alternating background color (same like the showthread view)
- thread's title (with link)
- thread's title lenght (just in case you use it in a small table)
- thread's icon
- thread's date and time
- thread's starter (with link)
- thread's no. of views
- thread's no. of replies

The hack uses each forum's permissions.
In other words, if you have a private forum, your private threads will not show unless you have permissions to view them.

ESTIMATED INSTALL TIME: 5 minutes
REQUESTED BY: Nobody
TESTED IN VERSION: 2.2.7

To download the latest version of this hack, click below:

TECK
08 Sep 2002, 11:27
A screenshot with all options enabled, installed on a unhacked forum...
For a customized look check the next post.

TECK
08 Sep 2002, 11:27
My customized look...

TECK
08 Sep 2002, 11:31
Just in case you wonder what do I use for translator, here it is the html code:
<select name="trans"
onchange="window.location=('http://translate.google.com/translate_c?hl=en&amp;langpair='+this.options[this.selectedIndex].value+'&u=$bburl')">
<option value="-1" selected>Translate from...</option>
<option value="-1">------------------------------</option>
<option value="en|fr">English to French</option>
<option value="en|es">English to Spanish</option>
<option value="en|de">English to German</option>
<option value="en|it">English to Italian</option>
<option value="en|pt">English to Portuguese</option>
<option value="fr|en">French to English</option>
<option value="es|en">Spanish to English</option>
<option value="de|en">German to English</option>
<option value="it|en">Italian to English</option>
<option value="pt|en">Portuguese to English</option>
<option value="de|fr">German to French</option>
<option value="fr|de">French to German</option>
</select>

Erwin
08 Sep 2002, 11:39
:)

I have had my own version of this running on my forumhome for a few months now - yeah, mine runs with 1 query too. I also have the latest reply poster in as well as the forum category that the thread is in, using JOIN. Took me days to figure out how to join them - in the end Chen helped. :)

TECK
08 Sep 2002, 11:47
there is no need to use a join. just use the $thread['lastposter'] or whatever other option you want to add that is usually displayed in the showthread. i found that is already alot of information in there. look at my customized look, i only use the thread title and link. :)

Chris M
08 Sep 2002, 12:05
Cool hack m8:)

Satan

[D]Vincent
08 Sep 2002, 13:32
Great hack, I've have it installed when I have some extra time :D

Velocd
08 Sep 2002, 15:29
I have this but it's the one installed on vBhome lite.

alibaba
08 Sep 2002, 15:57
Add the $threadbits string anywhere you like in your forumhome template.
????

where???

Chris M
08 Sep 2002, 16:15
Anywhere:)

Satan

TECK
08 Sep 2002, 17:16
Originally posted by hellsatan
Anywhere:)

Satan :)
Originally posted by Velocd
I have this but it's the one installed on vBhome lite. you mean nakkid's hack?? :) ;)
now, the way is written this hack it will save you 4queries... the perms are used from the actual forumhome ones.

oscardelahoya
08 Sep 2002, 18:41
Is there any way to use it with server side includes in an shtml page? I badly need this.

Thanks in advance.

Velocd
08 Sep 2002, 20:05
4 queries eh? I'll have to upgrade ;)

TECK
08 Sep 2002, 21:37
Originally posted by oscardelahoya
Is there any way to use it with server side includes in an shtml page? I badly need this.

Thanks in advance. ya. you can use it... just look at my hack "vbHome (lite)" abd extract the code there... make from it a php page and insert it onto your shtml file.

snyx
09 Sep 2002, 00:03
anyway I can get it to show the last xx most replied threads from the last 24 hours? this would be extremely usefull for me, thanks :)

TECK
09 Sep 2002, 19:22
just as a simple curiosity, why do you need this? it shows the last 10 (or whatever value you need) threads. in the last 24hrs you might have 100 threads started... i dont understand, please explain to me...

also, in order to use a dateline, you will need the 'SELECT count(*) AS count' and that cannot be mixed with the query i run there... unfortunatelly.

leon2u
10 Sep 2002, 20:35
Great but I need more from your hack...

Can you gimme the code that I can see a lightbulb icon in every thread on the homepage....so in my example I have a count of 5 threads to show. So in all these threads I want to have a lightbulb icon which is ON if there is a new post in that thread and off is there is no reply...the second thing is that when it is ON (so there is a new reply) I can click on the lightbulb and it brings me straight to the latest reply..

And could you make a scrolling display for your hack, so that is shows for e.g. the latest 4 posted threads in the display but if you scroll down you see a history of previous posted threads up to e.g. 100. What do you think???

stark427
13 Sep 2002, 14:39
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

\ \ - Speedy - / /
28 Sep 2002, 15:01
I dont know where to put the $threadbits's in the forumhome thread, I want it like all the rest of the fourms normal have it (to the left side of the forum) how can I do this? look at any of the pictures of this thread to understand what I mean)


~Speedy~

K.Michael
28 Sep 2002, 21:16
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
28 Sep 2002, 22:32
hello Michael, you can use something like that:
$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
29 Sep 2002, 12:02
10!
idea is clear!

MultiSync
29 Sep 2002, 12:04
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
29 Sep 2002, 12:17
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
30 Sep 2002, 04:14
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
30 Sep 2002, 04:16
hello jaxper, you cant do this, since it uses the forums perms.
just make a php file, is alot easier...

jaxper
30 Sep 2002, 04:18
So what would by query be in the php file? I guess I need to consult that lovely database schematic that vbulletin provides :)

Destee
02 Oct 2002, 07:52
Thanks TECK ... I have been wanting this, but gosh ... my
forumhome is getting a bit cluttered ... *installs anyway*.

:)

Destee

Antorz
02 Oct 2002, 21:25
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..


<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

TECK
02 Oct 2002, 21:31
use only:
<smallfont><a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]">$thread[title]</a><br></smallfont>
in whatever table you need. :)

Antorz
02 Oct 2002, 21:46
still get the same problem, no change :(



thx for looking at it...


including a screenshot of the problem below:

\ \ - Speedy - / /
04 Oct 2002, 01:50
I dont know where to put the $threadbits's in the forumhome thread, I want it like all the rest of the fourms normal have it (to the left side of the forum) how can I do this? look at any of the pictures of this thread to understand what I mean)


~Speedy~



(No one answerd it, my thing is right now under my Authroty List *witch is all the way at the bottom, and dont reply with Anywhere, cuz I cant find anywhere lol

Pseudomizer
04 Oct 2002, 10:57
Hi @LL,

i need your help please. I installed the hack. :D
It works fine.

The problem right now is, that the permissions do not have
effect. I did it like described in the text file BUT threads from
our mod forum categorie are listet in the "latest threads" on
our start page even if you are a guest.

I double checked the source code. The old perms in the index.php
are take out with /* bla bla */ and the new source code is in.

Please help me because this is data not defined for our community
posters.

Thanks in advance.

Source Code:

/*
//Forum info
$forums=$DB_site->query('SELECT * FROM forum WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');
while ($forum=$DB_site->fetch_array($forums)) {
$iforumcache["$forum[parentid]"]["$forum[displayorder]"]["$forum[forumid]"] = $forum;
}
$DB_site->free_result($forums);
unset($forum);

//Forum perms
$forumperms=$DB_site->query("SELECT forumid,canview,canpostnew FROM forumpermission WHERE usergroupid='$bbuserinfo[usergroupid]'");
while ($forumperm=$DB_site->fetch_array($forumperms)) {
$ipermcache["$forumperm[forumid]"] = $forumperm;
}
$DB_site->free_result($forumperms);
unset($forumperm);*/

// ################################################################################ ################################

// START OF FORUM THREAD HACK

//Forum perms
$forumperms=$DB_site->query("SELECT forumid,canview,canpostnew FROM forumpermission WHERE usergroupid='$bbuserinfo[usergroupid]'");
while ($forumperm=$DB_site->fetch_array($forumperms)) {
$ipermcache["$forumperm[forumid]"] = $forumperm;
}
$DB_site->free_result($forumperms);
unset($forumperm);

//Forum info
$forums=$DB_site->query('SELECT * FROM forum WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder');
while ($forum=$DB_site->fetch_array($forums)) {
$iforumcache["$forum[parentid]"]["$forum[displayorder]"]["$forum[forumid]"] = $forum;
if ($ipermcache["$forum[forumid]"]["canview"]==1 || !isset($ipermcache["$forum[forumid]"]["canview"])) {
$iforumperms[] = $forum["forumid"];
}
}
$DB_site->free_result($forums);
unset($forum);

if (!empty($iforumperms)) {
$iforumperms = 'AND forumid=' . implode(' OR forumid=', $iforumperms);
}

//Latest threads
$maxthreads=10; //number of threads
$maxchars=60; //title lenght in characters

$threads=$DB_site->query("SELECT * FROM thread WHERE open='1' AND open<>10 $iforumperms ORDER BY lastpost DESC LIMIT $maxthreads");
while ($thread=$DB_site->fetch_array($threads)) {
$thread['title'] = unhtmlspecialchars($thread['title']);
if (strlen($thread['title']) > $maxchars) {
$thread['title'] = substr($thread['title'], 0, $maxchars - 2) . '...';
}

///////////////////////////////////////////////////////////////////////
// extra options //////////////////////////////////////////////////////

//show icon
if ($thread['iconid'] == 0) {
$thread['icon'] = '<img src="{imagesfolder}/icons/icon1.gif" border="0" align="absmiddle" alt="">';
} else {
$thread['icon'] = '<img src="{imagesfolder}/icons/icon' . $thread['iconid'] . '.gif" border="0" align="absmiddle" alt="">';
}

//show date
$threaddate = vbdate($dateformat, $thread[dateline]);

//show time
$threadtime = vbdate($timeformat, $thread[dateline]);

//alternate colors
$bgrowcolor = rowcolor();

// end extra options //////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////

eval("\$threadbits .= \"".gettemplate('forumhome_threadbits')."\";");
}
$DB_site->free_result($threads);
unset($thread);

// END of Forum THREAD HACK

TECK
04 Oct 2002, 12:48
all i can say is this. the hack is working for me and many others. double check everything.

Pseudomizer
04 Oct 2002, 16:23
Hi TECK,

your Script does NOT work correctly. This is fact. The problem is,
if you have subcategories which get their permissions from the
parent forumid.

You check if the permission for the usergroup is set to = '1'
or if it is empty.

But what happens if you have the case that you have a
subcategory ( no permissions are set ) which get their
permissions from the parent forumid and in the forum parent
category the permission is set to "0" ???? The User should have
NO ACCESS to the subforum but with your script the user HAVE
access to the subcategory.

It took me more than 6 hours to find a fix for this tricky thing.
But it works now.

Nevertheless, thanks for your quick answer.

Best regards,

Pseudomizer

croft
13 Oct 2002, 01:46
I cant even get this hack to show =( All i get is an error

Parse error: parse error in /home/sites/site159/web/index.php on line 64

I attached the index file to.

Pseudomizer
13 Oct 2002, 11:29
Hello croft,

please download from http://www.editplus.com the Edit Plus
Text Editor and open your file.

You will see, that this tool recognizes PHP source code and
will highlight different things.

You will find your problem if you look at the green lines. Green
lines should be comments in source code.

In your source 50% is comment due to line errors or { } errors.

Best regards,

Robert9
04 Nov 2002, 02:34
would it be possible to add this to say a non-vb page? and if so how would i do that? please pm me how i could do so. Thanks!

stormcrow
16 Nov 2002, 02:24
How could I add one extra line to each thread display that shows what forum it is in?

Kathy
16 Nov 2002, 15:40
Okay, can I just allow for the last XX threads from two forums I select?

We have many many forums but I have been using includes from way way long ago to include the last 4 posts from one forum, another last four posts from anothe forum...

Way way too many queries.

Any ideas? thanks!

Floris
01 Dec 2002, 13:50
Hi there TECK,

In your first post I read:

The hack uses each forum's permissions.
In other words, if you have a private forum, your private threads will not show unless you have permissions to view them.

But after installing the hack on 2.2.9 I shows as (see screenshot) with a thread from the moderators board.

The moderators board is not viewable by the guest, it will not appear on the forumhome - but it looks like the thread does.

What might I have overlooked?

btw - i clicked installed.

Two other things;

Would it be possible to have the forums from where the thread come from listed on the third row?
Like: <smalltext> Views: xxx - Replies: yyy - From forum: zzz </smalltext>

And,
If we would only like 5 threads from only 1 specific forum, what should I do? I didn't quite understand that array story. Let's say the forumid is 666 - could you advice where to change what on index.php

TECK
01 Dec 2002, 13:52
Ya the script doesnt use the access masks, since they add several queries. So you will need to set that forum the normal way, with permissions, instead of using access masks.

Floris
01 Dec 2002, 13:57
Originally posted by TECK
Ya the script doesnt use the access masks, since they add several queries. So you will need to set that forum the normal way, with permissions, instead of using access masks.

I thought the normal way was just by editing the forum and set it to private, so it won't appear for the rest but the usergroups who have permission?

Posting Options
Private forum
(Invisible to all except moderators and admins; user access masks must be on!)
Yes

I wouldn't like to go and change the way it is run now. But if we can give it to only view a given forum, then I wouldn't have to change it.

Thank you for your quick reply though. (I updated my previous post, you were too quick for me hehe)

TECK
01 Dec 2002, 13:59
That's what I ment. This way, you use access masks and you add 2 extra queries to all your pages. The wise way is to set the permissions for that forum, for each usergroup. It should take you 1minute. And you will save 2 queries.

Floris
01 Dec 2002, 14:05
Originally posted by TECK
That's what I ment. This way, you use access masks and you add 2 extra queries to all your pages. The wise way is to set the permissions for that forum, for each usergroup. It should take you 1minute. And you will save 2 queries.

But that is how it is done now ; forums > modify > edit mod forum > private: yes.
That is why I pasted it.
uhm,
could be that they do not have to option for 'use access masks' set to on?

TECK
01 Dec 2002, 14:13
Yes they do. :) Is in vBulletin options. But I don't recommend to anyone to use it, since it ads queries. That's no good, IMO.
The best way to make a forum private is this (I use it on my board):

Make sure your access masks are OFF:
vBulletin Options > User and registration options > Enable Access Masks? > No

Also, make sure you forum is not set as "private" (for mods and admins):
Forums & Moderators > Modify > Your Private Forum [edit]
Private forum
(Invisible to all except moderators and admins; user access masks must be on!)
Set it to NO.

Once done, do this:
Forums & Moderators > Permissions > Your Private Forum
(COPPA) Users Awaiting Moderation [edit] > Click on [edit]
Select "Use custom settings" > Set to "No" all options > Save Settings

Repeat this step for every group you don't want them to have access to your forum.

Your board will run alot faster and your threads will be hidden. :)
Let me know if you got any other questions.

Floris
01 Dec 2002, 14:32
Originally posted by xiphoid
Two other things;

Would it be possible to have the forums from where the thread come from listed on the third row?
Like: <smalltext> Views: xxx - Replies: yyy - From forum: zzz </smalltext>

And,
If we would only like 5 threads from only 1 specific forum, what should I do? I didn't quite understand that array story. Let's say the forumid is 666 - could you advice where to change what on index.php

^------- I still have those 2 questions :) I hope you have some time.

TECK
01 Dec 2002, 14:51
1. You can't add the forum title, unless you do a query on the loop. You will end up with 40-50 queries... or you write a function for this...
2. Find:
$threads=$DB_site->query("SELECT * FROM thread WHERE open='1' AND open<>10 $iforumperms
Replace with:
$threads=$DB_site->query("SELECT * FROM thread WHERE open='1' AND open<>10 AND forumid=xx
where xx is your unique forum you want to grab the threads from.

GTGT
02 Dec 2002, 15:08
Do I understand correcly that I can use this to draw the latest theeads tyo any other page on the site?

I want my vbulletin threads also come up on my start site

xxxx.com/index.html

Can I use this for that?

And is it fast?

Thanmks for any help!

Floris
02 Dec 2002, 18:28
That would be interesting yes,
to also use this on a seperate.html (.php) none-vBulletin page.

By the way, I have your vB powered version running here: http://www.steroidology.com/forum/ on the bottom of the forumhome page. I added an extra header for it and put it in another table (row) so it had the lines and everything.

350Chevy
03 Dec 2002, 21:07
Is there anyway to make it show the last person who replied instead of the thread starter?

GTGT
03 Dec 2002, 22:43
CaMuscleguy:

can this be done on a usual html page isnetad of the forumhome page?

The 5 latest discussions on the Anabolic Forum

Erwin
03 Dec 2002, 22:58
Originally posted by TECK
1. You can't add the forum title, unless you do a query on the loop. You will end up with 40-50 queries... or you write a function for this...
2. Find:
$threads=$DB_site->query("SELECT * FROM thread WHERE open='1' AND open<>10 $iforumperms
Replace with:
$threads=$DB_site->query("SELECT * FROM thread WHERE open='1' AND open<>10 AND forumid=xx
where xx is your unique forum you want to grab the threads from.

TECK, not really. In my own version of this hack for my forums, I have included the forum title as well as the post replier plus thread starter, all with 1 query. No loop needed - just join it to the original query. Which is why I said at the start of this thread that you need to join for forumid. :)

TECK
04 Dec 2002, 00:39
True. :)$threads = $DB_site->query("
SELECT thread.*,thread.forumid as threadforumid,thread.title as threadtitle
FROM thread
LEFT JOIN forum ON (thread.forumid=forum.forumid)
WHERE visible=1 AND open<>10 $iforumperms
ORDER BY lastpost DESC $maxthreads
");

Visionray
04 Dec 2002, 02:15
Originally posted by xiphoid
That would be interesting yes,
to also use this on a seperate.html (.php) none-vBulletin page.




You can do that by just using the code in Teck's vBHome lite hack.

obiwan8472
07 Dec 2002, 17:27
Brilliant hack. Worked first time!

Boofo
21 Dec 2002, 06:48
Originally posted by Erwin
:)

I have had my own version of this running on my forumhome for a few months now - yeah, mine runs with 1 query too. I also have the latest reply poster in as well as the forum category that the thread is in, using JOIN. Took me days to figure out how to join them - in the end Chen helped. :)

Would you be willing to share the code, "buddy"? :)

user360
22 Dec 2002, 17:45
I've installed the hack.. it works, but I want it to display the information in Columns instead of Rows, so I can put it on top of the forums instead of the side. How can I go about doing this

PiotrasG
28 Dec 2002, 07:50
how do i change this to last post not thread is there a hack for this or can i change it from inside of this hack

WSB
31 Dec 2002, 02:55
Hi, TECK. Well done on the hack. I have just one request:

Is there any way to grab the first XX characters of the first post of the thread?

Thanks.

WSB
01 Jan 2003, 05:08
Bump.

Roody
13 Jan 2003, 13:31
hey Teck I have a question man. In your instructions you say this:| TEMPLATE forumhome |
+-----------------------------------------------+
| Add the $threadbits string anywhere you like in your forumhome template.

I dont follow what I am supposed to do? what threadbits string? Can you tell me what I need to exactly put in the forumhome template?

thx

Roody
14 Jan 2003, 03:22
bump

TECK
14 Jan 2003, 03:40
Is preferable to create a side column for this, using a new table.
The best way to do it is to fire up your html editor and create there your tables, then to aply it to the forumhome template.

Regards,
Floren.

Roody
14 Jan 2003, 12:01
Originally posted by TECK
Is preferable to create a side column for this, using a new table.
The best way to do it is to fire up your html editor and create there your tables, then to aply it to the forumhome template.

Regards,
Floren.

I'm lost. Is this an answer to my question about the threadbits?

Smoothie
14 Jan 2003, 20:34
Roody-

Is this what you want? Take a look at my forums. I have setup the main forums, then on the right, a side column for info, latest threads, etc. If you scroll down, you can see how I set it up.
http://www.macfora.com/forums/

Roody
15 Jan 2003, 05:02
something like that although the positioning i would want different. this works on a member level am i correct?

Smoothie
15 Jan 2003, 07:15
By member level you mean what? Yes, its based on permissions. You need to add a side column, in a new table and put $threadbits there. Then, adjust the forumhome_threadbits template to your liking.

You want this displayed on your forumhome page, correct? How do you want it positioned?

Roody
15 Jan 2003, 21:27
hmm so this wouldnt work at the top of the forums meaning new threads/posts being listed up top? it has to be on the side?

as for what I meant yeah I was wondering if it worked on a permissions level good to hear that it does. i think i will probably want to monkey around with this in my test forums. my problem is I suck at tables :D

Smoothie
15 Jan 2003, 22:47
Yes, you could add it to the top of the forums, as another table. You would need to make adjustments to the template.

Roody
16 Jan 2003, 17:30
ok thanks for the info Smoothie. :)

Katarn
20 Jan 2003, 07:14
I first want to say... this is awesome. I installed this at www.explosivelabs.com and used the server side include code from the vblite to insert the code. I am trying to have the latest threads listed in my forums (http://www.explosivelabs.com/forums/) as two columns like at http://www.techimo.com/forum/. But I can't figure out the code necessary to make it possible. All I can figure is placing "&nbsp;" in order to space it out.. but that just screws up the listing. I have just taken out the table format from the threadbits template ending up with

<smallfont>$thread[icon] <a href="http://www.explosivelabs.com/forums/showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]"><b>$thread[title]</b></a> by <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$thread[postuserid]">$thread[lastposter]</a></smallfont>

but that alone just lists the latest thread posts side by side. Can someone help me with this? I am still kinda new to hacking vb and new to php code....

toonarific
07 Feb 2003, 22:49
I got as far as editing the index.php file, and now Im lost. It says to edit forumhome_threadbits, but I cant find that at all in my forums admin section. Is that what we are supposed to call the ne template? Also, it says to post the $threadbits string anywhere in the forumhome page, but what is the string that we put anywhere? Can the string be placed on a page outside the forum, like my site's main index page, and pull up the last several threads?

Katarn
07 Feb 2003, 23:01
You mean like on my site?

toonarific
07 Feb 2003, 23:12
yes, that is similar to how I want it to be on the main page of my site, but I still need help with the rest

Katarn
07 Feb 2003, 23:37
did you see Tecks earlier post?

toonarific
08 Feb 2003, 00:02
Ive read the whole thread, and none of it makes sense to me. Ive added the $threadbits to my mainpage, but it comes out as just text.

toonarific
08 Feb 2003, 04:19
what exactly is the code that I am supposed to put on my index page to show the threads: $threadbits ????

I think, other than that, I have figured everything else out

PennylessZ28
24 Feb 2003, 19:13
I was going to ask how to change the amount of threads it showed, but I found it myself.

Very nice hack, worked on the first try like a charm on VB 2.3.0

Excellent work! Two Thumbs

*clicks install ;)

mattshania
06 Mar 2003, 20:26
Could this hack be set up to list threads by their time of creation (most recent) instead of their last reply time?

stryka
06 Mar 2003, 22:31
How do i include the last $posttime, instead of $threadtime... which shows the time that the thread was started...

thanx in advance...

Aaron1
15 Apr 2003, 08:40
03-06-03 at 11:20 PM mattshania said this in Post #81 (http://www.vbulletin.org/forum/showthread.php?postid=362062#post362062)
Could this hack be set up to list threads by their time of creation (most recent) instead of their last reply time?

Yes that's what i like to know aswell!
Anyone?

Splitfyre
21 May 2003, 23:40
Can this hack be loaded onto a non-vb page?

discussfitness
22 Jun 2003, 21:47
TECK are you still around?

This bug is great, but it doesn't show whether you've viewed a thread or not or whether it's new since your last visit.

Anyway of adding this?

Onkel_Tom
13 Jul 2003, 04:18
Hi all,
Very nice hack ! thank you.

What must be changed to exclude some forum ID's to be shown at the "latest Threads summary".
For example we have a testforum for testing signatures and vb Code. This treads should be not shown on the summary list.

My program skills are not so good to implement a array with the forum ID's by my own.
Can anybody help ???

thanks in advance
Tom

EVO VIII Chris
04 Aug 2003, 15:48
Alright I dont want to bring up old threads but I am trying to install this on my home page which IS NOT my forum home page. It is my main page at www.vorspann.net I want it to show the Recent Discussions at my main page and not my main forum page. How do I install it to do this?

toonarific
09 Aug 2003, 03:31
That's exactly what I want to do too; have xx threads appear on my main website index page, not on a VB page.

Onkel_Tom
13 Aug 2003, 17:50
Hi,
Is there a way to show also the name of the Forum where the post is in the latest thread summary ?

shadow187
06 Oct 2003, 09:55
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..


<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


I get the same problem, can any1 help me out here PLEASE !!!

FreeTerran
16 Oct 2003, 12:18
Could someone here post the code that the users they didn't have access to the forum see any other name something like "Secret" ?

gldtn
17 Oct 2003, 20:48
Is there a way I can use this code on an Index.php page on my root folder other than my Forum folder.. So instead of me putting this code in my forumhome template.. I'll just put it on an index page outside of my forum's directory.

thanks a lot

dkny
23 Oct 2003, 17:20
can someone tell me how I can change the code to link to the 1st page of each thread instead of the last and want "Thread Starter" instead of "Last Poster. Any help would be much appreciated. I actually got this hack to work with my postnuke site.

Onkel_Tom
19 Nov 2003, 20:01
Is there a way to show also the forum name in which this thread is posted on the index screen ?

dontpanic
04 Dec 2003, 00:06
Is there a way to show also the forum name in which this thread is posted on the index screen ?A friend and I have been working on this off an on for some time, but we can't get the table joins right.

vdich
29 Dec 2003, 17:12
Hi

is it possible to put in the $threadbits in the forumhome_forumbit_level1_nopost Template ?

What should i change ?

thanks a lot for your help... !

WeBBy
22 Jan 2004, 01:20
This hack can be modified to show the latest posts from a single forum simply by putting forumid=xx in the index.php file (instructions are provided in this discuission). However, I have multiple index pages that are template controlled and would like to call the forumid through the template rather than index.php. Is that possible??

I removed the forumid=xx and it lists the latest posts from all forums (as expected). Inserting the Forumid in the template, e.g.,
showthread.php?s=&forumid=3&$session[sessionhash]&threadid=$thread[threadid]
doesnt do anything.

Does anyone know how this might be acomplishised?

Thanx

vdich
07 Mar 2004, 09:38
Hi thanks for the great hack, but what should i do, when i want inside the Latest XX Threads on Forumhome Page in the Footer ?!?!?

Thanks for your answer

vdich
12 Mar 2004, 17:39
Hi thanks for the great hack, it works perfect (www.informatikboard.ch)

But i have another question.

the $threaddate and $threadtime is always the time from the beginning of the thread.

Is it possible to show always the time from the last answer ?

thanks

Onkel_Tom
12 Mar 2004, 18:09
just use $lastpostdate and $lastposttime in your template to show time and date of the last post.

vdich
12 Mar 2004, 20:45
thanks, but it dont work... the line ist still white

vdich
12 Mar 2004, 20:47
i want it in the new template "forumhome_threadbits"

Onkel_Tom
12 Mar 2004, 20:52
For me it works with $lastpostdate and $lastposttime in forumhome_threadbits but I use vB 2.3.4 and not 3 !

vdich
13 Mar 2004, 07:41
i use 2.3.3. too.....

Who can me help ?
I want to inside $lastpostdate and $lastposttime in forumhome_threadbits

WoodiE
18 Mar 2004, 03:31
Hi all,
Very nice hack ! thank you.

What must be changed to exclude some forum ID's to be shown at the "latest Threads summary".
For example we have a testforum for testing signatures and vb Code. This treads should be not shown on the summary list.

My program skills are not so good to implement a array with the forum ID's by my own.
Can anybody help ???

thanks in advance
Tom

Has anybody been able to do the above? As I too am looking for a way to exclude one forum from the list.


-Michael

WoodiE
11 May 2004, 22:00
Still looking for a way to exclude a forum from the list.

fabz
13 May 2004, 22:24
I did it on my website plongeur.com (home page) but doing a mysql query for excluding forum ID's.
I show last threads subjects with icons for every forums excluding the ones I don't want, and below I show the same thing just for only one forum.
Below again, I use PluhNews to show the last XX threads of one forum, including contents.

Have a look on it and tell me if it's what you want.

MeTaL_oRgY
20 Dec 2004, 07:48
I've installed this and it works perfectly if I add the $threadbits variable on my forumhome template... but is there a way to have the latest threads on the header instead of forumhome?? it would be greatly appreciatted!

wolfyman
16 Apr 2005, 15:52
I would like to include this hack on my main (non vb) index. Can somebody please give some easy to use instructions on how to do this? It looks like quite a few people are interested, and I read this thread three times without finding the answer.

Vb is an addition, not the main focus of my site so I don't want to change my index page to use the vbhomelite hack. I'm new, so the more details the better, thanks!

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.

would it be possible to add this to say a non-vb page? and if so how would i do that? please pm me how i could do so. Thanks!

Do I understand correcly that I can use this to draw the latest theeads tyo any other page on the site?

I want my vbulletin threads also come up on my start site

xxxx.com/index.html

Can I use this for that?

And is it fast?

Thanmks for any help!

CaMuscleguy:

can this be done on a usual html page isnetad of the forumhome page?

The 5 latest discussions on the Anabolic Forum

Can this hack be loaded onto a non-vb page?

Is there any way to use it with server side includes in an shtml page? I badly need this.

Thanks in advance.

Alright I dont want to bring up old threads but I am trying to install this on my home page which IS NOT my forum home page. It is my main page at www.vorspann.net I want it to show the Recent Discussions at my main page and not my main forum page. How do I install it to do this?

That's exactly what I want to do too; have xx threads appear on my main website index page, not on a VB page.

Is there a way I can use this code on an Index.php page on my root folder other than my Forum folder.. So instead of me putting this code in my forumhome template.. I'll just put it on an index page outside of my forum's directory.

thanks a lot

Marco van Herwaarden
16 Apr 2005, 17:21
What vB version are you running? Since you are new, i doubt that it is vB2.

This is a 3 year old thread about vB2.

wolfyman
16 Apr 2005, 17:25
What vB version are you running? Since you are new, i doubt that it is vB2.

This is a 3 year old thread about vB2.


is there an updated way to accomplish the same thing then?

fabz
17 Apr 2005, 00:42
I told it a long time ago.
I do it and use such thing on my home page http://www.plongeur.com

I run vb 3.0.7

zurv
27 Mar 2006, 16:44
Hello,

I would like to show the latest threads on my right hand menu which is displayed on all pages. Can I just include the $threadbits in my right hand menu template? Or does it have to be on forum home??

Will click install once I get it installed :)

Also i just noticed this is an old hack, how do I get it to work with 3.5.4??