vb.org Archive

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

TECK 03-12-2002 05:38 PM

nick, try something like that to. let me know if it worked.
PHP Code:

<?php
error_reporting
(7);

$templatesused "home_newthreads,home_latestthreads";
require(
"./global.php");

$maxthreads=30;

$doforumperms=$DB_site->query("SELECT forumid FROM forum");
$forumslist="";
while (
$forumperms=$DB_site->fetch_array($doforumperms)) {
  
$forumid=$forumperms[forumid];
  
$getperms=getpermissions($forumid);
  if (
$getperms[canview]) {
    
$forumslist.=",$forumid";
  }
}

$newsql=$DB_site->query("SELECT * FROM thread WHERE forumid IN (0$forumslist) AND visible=1 ORDER BY lastpost ASC LIMIT 0,$maxthreads");
while (
$new=$DB_site->fetch_array($newsql)) {
  
$getforumid=$new[forumid];
  
$getnewsql=$DB_site->query_first("SELECT * FROM post WHERE forumid=$getforumid");
  
$forumname=$DB_site->fetch_array($getnewsql);
  
$geticonid=$new[iconid];

  if (
$new[iconid]==0) {
    
$newicon="<img src=\"{imagesfolder}/icons/icon1.gif\" border=\"0\">";
  } else {
    
$newicon="<img src=\"{imagesfolder}/icons/icon$newconid.gif\" border=\"0\">";
  }

  
$getthreadid=$new[threadid];
  
$gettitle=$new[title];
  
$getforumname=$forumname[title];
  
$getreplycount=$new[replycount];
  
$getusername=$new[postusername];
  
$getuserid=$new[postuserid];
  
$gettime=vbdate($timeformat,$new[dateline]);
  
$getdate=vbdate($dateformat,$new[dateline]);

  eval(
"\$newthreads .= \"".gettemplate('home_newthreads')."\";");
}

eval(
"dooutput(\"".gettemplate('home_latestthreads')."\");");
?>


mondaynightmike 03-12-2002 09:21 PM

wow this is a good idea.

N!ck 03-12-2002 09:25 PM

nakkid,
i think i might have a solution looking at your code. i didn't even THINK about using the getpermissions() function!

MrLister,
the "special edition" is going to have a bunch of features that some might consider "bloatware" - so that's why it's not going to be an "ordinary" release.
expect it sometime this weekend, i'd say. it will include almost all the features of the Forum Display page, will show announcements, and will have some other options that i don't even know of yet!!! :)

so yeah, this weekend...thanks for the suggestion nakkid...

cditty 03-12-2002 09:43 PM

How would I go about adding a refresh button to force a refresh within the same window? I added a simple refresh and it opens a full sized window.

Also, how would I go about adding the current users on the very bottom? I looked at a few existing templates but couldn't figure it out.

Chris

N!ck 03-12-2002 10:16 PM

add target="_self" to the <a> tag.

cditty 03-12-2002 10:19 PM

Oh gesh.....I can't believe it was that. I'm gonna go crawl under my rock. Call me when the new version is ready. :)

Chris

lordofgun 03-13-2002 02:42 AM

AWESOME JOB!

Quick question: This might sound stupid, but is there any way to get this to auto-refresh every few minutes or so?

lordofgun 03-13-2002 03:34 AM

NEVER MIND! I am a retard...found it in the "latest" template.

MrLister 03-13-2002 03:59 AM

lol is it just me or is everybody pposting multiple threads in a row. first sayan guy, then another one, then in this topic two more people

MrLister 03-13-2002 04:01 AM

just like this


All times are GMT. The time now is 01:46 AM.

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.00968 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

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

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