View Full Version : Latest XX Threads on Forumhome Page
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:
A screenshot with all options enabled, installed on a unhacked forum...
For a customized look check the next post.
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&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
09-08-2002, 10:39 AM
:)
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. :)
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
09-08-2002, 11:05 AM
Cool hack m8:)
Satan
[D]Vincent
09-08-2002, 12:32 PM
Vincent]Great hack, I've have it installed when I have some extra time :D
Velocd
09-08-2002, 02:29 PM
I have this but it's the one installed on vBhome lite.
alibaba
09-08-2002, 02:57 PM
Add the $threadbits string anywhere you like in your forumhome template.
????
where???
Chris M
09-08-2002, 03:15 PM
Anywhere:)
Satan
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
09-08-2002, 05:41 PM
Is there any way to use it with server side includes in an shtml page? I badly need this.
Thanks in advance.
Velocd
09-08-2002, 07:05 PM
4 queries eh? I'll have to upgrade ;)
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.
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 :)
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
09-10-2002, 07:35 PM
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
09-13-2002, 01:39 PM
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 - / /
09-28-2002, 02:01 PM
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
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: ?
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
09-29-2002, 11:02 AM
10õ!
idea is clear!
MultiSync
09-29-2002, 11:04 AM
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?
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.
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..
<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
use only:
<smallfont><a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]">$thread[title]</a><br></smallfont>
in whatever table you need. :)
Antorz
10-02-2002, 08:46 PM
still get the same problem, no change :(
thx for looking at it...
including a screenshot of the problem below:
\ \ - Speedy - / /
10-04-2002, 12:50 AM
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
10-04-2002, 09:57 AM
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
all i can say is this. the hack is working for me and many others. double check everything.
Pseudomizer
10-04-2002, 03:23 PM
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
10-13-2002, 12:46 AM
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
10-13-2002, 10:29 AM
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
11-04-2002, 01:34 AM
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
11-16-2002, 01:24 AM
How could I add one extra line to each thread display that shows what forum it is in?
Kathy
11-16-2002, 02:40 PM
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
12-01-2002, 12:50 PM
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
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
12-01-2002, 12:57 PM
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)
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
12-01-2002, 01:05 PM
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?
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
12-01-2002, 01:32 PM
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.
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.
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
12-02-2002, 05:28 PM
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
12-03-2002, 08:07 PM
Is there anyway to make it show the last person who replied instead of the thread starter?
CaMuscleguy:
can this be done on a usual html page isnetad of the forumhome page?
The 5 latest discussions on the Anabolic Forum
Erwin
12-03-2002, 09:58 PM
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. :)
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
12-04-2002, 01:15 AM
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
12-07-2002, 04:27 PM
Brilliant hack. Worked first time!
Boofo
12-21-2002, 05:48 AM
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
12-22-2002, 04:45 PM
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
12-28-2002, 06:50 AM
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
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.
Roody
01-13-2003, 12:31 PM
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
01-14-2003, 02:22 AM
bump
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
01-14-2003, 11:01 AM
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
01-14-2003, 07:34 PM
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
01-15-2003, 04:02 AM
something like that although the positioning i would want different. this works on a member level am i correct?
Smoothie
01-15-2003, 06:15 AM
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
01-15-2003, 08:27 PM
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
01-15-2003, 09:47 PM
Yes, you could add it to the top of the forums, as another table. You would need to make adjustments to the template.
Roody
01-16-2003, 04:30 PM
ok thanks for the info Smoothie. :)
Katarn
01-20-2003, 06:14 AM
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 " " 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
02-07-2003, 09:49 PM
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
02-07-2003, 10:01 PM
You mean like on my site?
toonarific
02-07-2003, 10:12 PM
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
02-07-2003, 10:37 PM
did you see Tecks earlier post?
toonarific
02-07-2003, 11:02 PM
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
02-08-2003, 03:19 AM
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
02-24-2003, 06:13 PM
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
03-06-2003, 07:26 PM
Could this hack be set up to list threads by their time of creation (most recent) instead of their last reply time?
stryka
03-06-2003, 09:31 PM
How do i include the last $posttime, instead of $threadtime... which shows the time that the thread was started...
thanx in advance...
Aaron1
04-15-2003, 07:40 AM
03-06-03 at 11:20 PM mattshania said this in Post #81 (https://vborg.vbsupport.ru/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
05-21-2003, 10:40 PM
Can this hack be loaded onto a non-vb page?
discussfitness
06-22-2003, 08:47 PM
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
07-13-2003, 03:18 AM
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
08-04-2003, 02:48 PM
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
08-09-2003, 02:31 AM
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
08-13-2003, 04:50 PM
Hi,
Is there a way to show also the name of the Forum where the post is in the latest thread summary ?
shadow187
10-06-2003, 08:55 AM
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
10-16-2003, 11:18 AM
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
10-17-2003, 07:48 PM
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
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
11-19-2003, 07:01 PM
Is there a way to show also the forum name in which this thread is posted on the index screen ?
dontpanic
12-03-2003, 11:06 PM
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
12-29-2003, 04:12 PM
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
01-22-2004, 12:20 AM
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
03-07-2004, 08:38 AM
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
03-12-2004, 04:39 PM
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
03-12-2004, 05:09 PM
just use $lastpostdate and $lastposttime in your template to show time and date of the last post.
vdich
03-12-2004, 07:45 PM
thanks, but it dont work... the line ist still white
vdich
03-12-2004, 07:47 PM
i want it in the new template "forumhome_threadbits"
Onkel_Tom
03-12-2004, 07:52 PM
For me it works with $lastpostdate and $lastposttime in forumhome_threadbits but I use vB 2.3.4 and not 3 !
vdich
03-13-2004, 06:41 AM
i use 2.3.3. too.....
Who can me help ?
I want to inside $lastpostdate and $lastposttime in forumhome_threadbits
WoodiE
03-18-2004, 02:31 AM
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
05-11-2004, 09:00 PM
Still looking for a way to exclude a forum from the list.
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
12-20-2004, 06:48 AM
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
04-16-2005, 02:52 PM
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
04-16-2005, 04:21 PM
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
04-16-2005, 04:25 PM
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?
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
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??
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.