Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Latest Threads On Forum Home Details »»
Latest Threads On Forum Home
Version: 1.00, by NTLDR (Coder) NTLDR is offline
Developer Last Online: Oct 2004 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-20-2004 Last Update: Never Installs: 170
 
No support by the author.

Latest Threads On Forum Home
Version: 1.0.2
vB-version: 3.0.0 Release Candidate 2
Developer: NTLDR
Install-difficulty: 1
File-edits: 2
Template-edits: 1

Description of the Hack:
This is taken from my vBindex hack and will display the latest X threads on your forum home page. Permissions are done automatically so forums users can't view will be excluded. Includes thread icon/goto new post image (if the thread is unread), title, last post info, number of views and replies.



Files modified for this Hack:
index.php


New templates for this Hack:
forumhome_latestthreadbit


Templates modified for this Hack:
FORUMHOME

New phrases for this Hack:
latest_threads

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #192  
Old 11-12-2005, 08:03 AM
Death Star Death Star is offline
 
Join Date: Oct 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Loukrhtia
guys you underestimate vbulletin.com

http://www.vbulletin.com/forum/showthread.php?t=158887

Tried it :disappointed:
Reply With Quote
  #193  
Old 11-12-2005, 08:13 AM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Death Star
Tried it :disappointed:
What was the problem?
Reply With Quote
  #194  
Old 11-13-2005, 09:06 PM
Zidane007nl's Avatar
Zidane007nl Zidane007nl is offline
 
Join Date: Jul 2004
Location: The Netherlands
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed the hack, nice work.
I inserted it into my welcome panel (only visible for users), with marquee tags, so I won't take up much space.
Reply With Quote
  #195  
Old 02-17-2006, 11:24 AM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this is an old hack, but does anybody know how you can add the forum board in the stats where the latest threads are listed. So it also shows what forum the posts the thread came from at the end of the link stats
Reply With Quote
  #196  
Old 02-26-2006, 05:28 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Michelle
Help!!!!!! I modified the code so that it displays locked thread but now it displays the threads form the hidden forums as well!!!!!!!!!
Please help, I am in despair!!!!
How did you get it to display locked threads Michelle.

Also, remember it will show threads to you in hidden boards while you logged in as admin and have access to view the hidden boards. But if you log-out then login as a member who does not have access to view the hidden boards. You will not see the threads listed from that board based on permission.

But please let me know what you did to get it to show locked threads.
Reply With Quote
  #197  
Old 02-27-2006, 01:18 AM
fatwillie fatwillie is offline
 
Join Date: Oct 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this hack work on a non VB page?
Reply With Quote
  #198  
Old 03-05-2006, 09:47 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BUMP

Does does anybody know how to make this hack so it will display "Locked Threads"?

And if possible, also show the "Forum Board" threads are taken from
Reply With Quote
  #199  
Old 09-10-2006, 03:49 PM
norma-aguilera norma-aguilera is offline
 
Join Date: Jul 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I read all of the threads and this forum, but I don't think anyone is having the same problem that i am having.

I did all of the steps in the installation, checked twice and I get this error:

Warning: Invalid argument supplied for foreach() in /index.php on line 493

Fatal error: Call to a member function on a non-object in /home/mxfimrk/public_html/Forum/index.php on line 509

I looked at the code in index.php in line 493 and this is what is trying to do:

************************************************** ********

// [START HACK='Latest Threads On Forum Home' AUTHOR='NTLDR' VERSION='1.0.0' CHANGEID= 2 ]
// #################### PROCESS LATEST THREADS #######################
// fetch the permissions for each forum
$forumperms = array();
foreach($forumcache AS $forum) {

$forumperms["$forum[forumid]"] = fetch_permissions($forum['forumid']);

// ## HIDE FORUMS WITHOUT THE CANVIEW OR CANVIEWOTHERS PERMISSION ##
if (!($forumperms["$forum[forumid]"] & CANVIEW) || !($forumperms["$forum[forumid]"] & CANVIEWOTHERS)) {
$limitfids .= ','.$forum['forumid'];
}
}

************************************************** ********

Also, I use cpanel to modify the files and I whenever I try to save the files I get the "The page cannot be displayed" error. So I tried chaning the file in my vi editor and coping and pasting to the cpanel editor and I still get that error. The second time I saved it is OK.

Had anybody experience this error or can help?

Thanks!

Norma Aguilera
Reply With Quote
  #200  
Old 09-10-2006, 04:53 PM
norma-aguilera norma-aguilera is offline
 
Join Date: Jul 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am still having the problem above. It was not a parsing error ( I had just updated the file with my original index.php).


I really want this hack for my web site, so I will really appreciate if someone can help me with any information.

I did ALL of the steps specified on the hack, but I am still having this error:

************************************************** **********

Warning: Invalid argument supplied for foreach() in /index.php on line 492

Fatal error: Call to a member function on a non-object in /home/mxfimrk/public_html/Forum/index.php on line 509

I highlighted these two lines below.

Thanks!

************************************************** **********

// get total members and newest member from template
$numbermembers = vb_number_format($vbulletin->userstats['numbermembers']);
$newusername = $vbulletin->userstats['newusername'];
$newuserid = $vbulletin->userstats['newuserid'];
$activemembers = vb_number_format($vbulletin->userstats['activemembers']);
$show['activemembers'] = ($vbulletin->options['activememberdays'] > 0 AND ($vbulletin->options['activememberoptions'] & 2)) ? true : false;

// [START HACK='Latest Threads On Forum Home' AUTHOR='NTLDR' VERSION='1.0.0' CHANGEID= 2 ]
// #################### PROCESS LATEST THREADS #######################
// fetch the permissions for each forum
$forumperms = array();
foreach($forumcache AS $forum) {

$forumperms["$forum[forumid]"] = fetch_permissions($forum['forumid']);

// ## HIDE FORUMS WITHOUT THE CANVIEW OR CANVIEWOTHERS PERMISSION ##
if (!($forumperms["$forum[forumid]"] & CANVIEW) || !($forumperms["$forum[forumid]"] & CANVIEWOTHERS)) {
$limitfids .= ','.$forum['forumid'];
}
}
unset($forum);

if ($vboptions['threadpreview'] > 0) {
$previewfield = ', post.pagetext AS preview';
$previewjoin = 'LEFT JOIN '.TABLE_PREFIX.'post AS post ON(post.postid = thread.firstpostid)';
}

$getthreads = $DB_site->query("
## GET LATEST THREADS ##
SELECT thread.*,thread.iconid AS threadiconid $previewfield
FROM ".TABLE_PREFIX."thread AS thread
LEFT JOIN ".TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
$previewjoin
WHERE open = '1'
AND forumid NOT IN (0$limitfids)
AND thread.visible = '1'
AND deletionlog.primaryid IS NULL
ORDER BY lastpost
DESC LIMIT 5");

while($thread = $DB_site->fetch_array($getthreads)) {

$threads = true;
$thread['title'] = fetch_censored_text(fetch_trimmed_title(unhtmlspec ialchars($thread['title']), 22));
$thread['date'] = vbdate($vboptions['dateformat'], $thread['lastpost'], 1);
$thread['time'] = vbdate($vboptions['timeformat'], $thread['lastpost']);
$thread['preview'] = preg_replace('#\[quote(=("|"|\'|).*\\2)?\](.*)\[/quote\]#siU', '', $thread['preview']);
$thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbc ode(fetch_censored_text($thread['preview']), false, true), $vboptions['threadpreview']));
$thread['replycount'] = vb_number_format($thread['replycount']);
$thread['views'] = vb_number_format($thread['views']);

// thread icon
$show['icon'] = false;
$icon = fetch_iconinfo($thread['iconid']);

if (is_array($icon)) {
$show['icon'] = true;
$thread['threadiconpath'] = $icon['iconpath'];
$thread['threadicontitle'] = $icon['title'];
}

// show goto new post
$show['firstnew'] = false;
$bbforumview = fetch_bbarray_cookie('forum_view', $thread['forumid']);

if ($bbforumview > $bbuserinfo['lastvisit']) {
$lastread = $bbforumview;
} else {
$lastread = $bbuserinfo['lastvisit'];
}

if ($thread['lastpost'] > $lastread) {

$threadview = fetch_bbarray_cookie('thread_lastview', $thread['threadid']);

if ($thread['lastpost'] > $threadview) {
$show['firstnew'] = true;
$show['icon'] = false;
}
}

exec_switch_bg();

eval("\$threadbits .= \"".fetch_template('forumhome_latestthreadbit')."\ ";");
}
if ($threads) {
$show['latestthreads'] = true;
}
// memory saving
unset($thread, $threads);
$DB_site->free_result($getthreads);
// [END HACK='Latest Threads On Forum Home' AUTHOR='NTLDR' VERSION='1.0.0' CHANGEID= 2 ]



// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTTA HERE... ###
($hook = vBulletinHook::fetch_hook('forumhome_complete')) ? eval($hook) : false;
Reply With Quote
  #201  
Old 01-06-2007, 05:57 PM
trickfly trickfly is offline
 
Join Date: Jan 2007
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there,

I've used your script and it is working fine (thanks!)

but how do I make it look like the one on:

http://www.cosforums.com/

Please PM me back thanks.

James
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14103 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete