vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Latest Threads On Forum Home (https://vborg.vbsupport.ru/showthread.php?t=60544)

Death Star 11-12-2005 08:03 AM

Quote:

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

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


Tried it :disappointed:

Lea Verou 11-12-2005 08:13 AM

Quote:

Originally Posted by Death Star
Tried it :disappointed:

What was the problem?

Zidane007nl 11-13-2005 09:06 PM

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. :)

MRGTB 02-17-2006 11:24 AM

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

MRGTB 02-26-2006 05:28 PM

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.

fatwillie 02-27-2006 01:18 AM

Will this hack work on a non VB page?

MRGTB 03-05-2006 09:47 PM

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

norma-aguilera 09-10-2006 03:49 PM

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

norma-aguilera 09-10-2006 04:53 PM

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;

trickfly 01-06-2007 05:57 PM

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


All times are GMT. The time now is 11:12 PM.

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

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

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

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