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)
-   -   Simple newsportal / thread overview to add to your board... (https://vborg.vbsupport.ru/showthread.php?t=38334)

KuraFire 05-07-2002 08:30 PM

Thanks, checking it out right away. :):up:

inetd 05-07-2002 08:49 PM

good hack
/me installed this hack

KuraFire 05-07-2002 08:56 PM

didn't work one bit, so far, awaiting PPN's response....

(edit: this pertaining to PPN's permissions code in the other thread)

kreftt 05-08-2002 01:59 AM

this one is really cool

i added a few things, and now i wont need vbportal (for smaller sites) anymore :D
we shouldnt forget that vbportal has some functions that i personally wouldnt wanna code myself...

greets

kreftt

leeherron 05-08-2002 05:01 AM

I worked on a project like this a while back, never polished up enough to release. The twist I took was I had it run when someone submitted post; it created an HTML that could be served many times with no queries. The theory: thread reads = a lot, posts submissions = not as many.

TECK 05-08-2002 06:35 AM

kura.. if you have a chance, look at the perms included in the vbHome hack. they work, but perms = alot of queries, as firefly mention it to me earlier. PPN was kind enough to look at my hole file i wrote. i will let you know what he says about the perms, then i will post here the mods PPN did to the code, so you can insert it also in your hack.

team work. :)

TECK 05-08-2002 06:52 AM

here it is kura, from my file the code that works (thanks PPN):
Code:

// latest threads ***************************
$doperms=$DB_site->query("SELECT canview,forumid FROM forumpermission WHERE usergroupid='$bbuserinfo[usergroupid]'");
while ($doperm = $DB_site->fetch_array($doperms)) {
  $perms["$doperm[forumid]"] = $doperm;
}
$DB_site->free_result($doperms);
unset($doperm);

$forum=$DB_site->query("SELECT forumid FROM forum");
while ($forums=$DB_site->fetch_array($forum)) {
  if($perms["$forums[forumid]"]["canview"] == 1 || !isset($perms["$forums[forumid]"]["canview"])) {
    $forumperms[]=$forums["forumid"];
  }
}
$DB_site->free_result($forum);
unset($forums);

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

$dothreads=$DB_site->query("SELECT * FROM thread WHERE open=1 AND open<>10 $forumperms ORDER BY lastpost DESC LIMIT 10");
while ($dothread=$DB_site->fetch_array($dothreads)) {
  $dots='';
  if (strlen($dothread[title])>29) {
    $dots='...';
  }
  $forumid=$dothread[forumid];
  $threadid=$dothread[threadid];
  $threadtitle=substr($dothread[title], 0, 32);

  $lastthreadbits .= '<a href="showthread.php?s='.$session[sessionhash].'&forumid='.$forumid.'&threadid='.$threadid.'">'.$threadtitle.$dots.'</a><br>';
}
unset($dothread);

i use this code in corelation with a higly modified forumdisplay.php file. it involved several mods to the tables. but the result is nice, i think:
https://vborg.vbsupport.ru/attachmen...&postid=249059

try the code and let me know what you think. i will update my vbHome hack also. later on today... ;)

KuraFire 05-08-2002 09:09 AM

I didn't use your code above nakkid, but I used PPN's new code (his former had a wrong var.name) and it works.

The first post is updated and the hack now includes permissions. Re-download if you have this installed and overwrite newsportal.php and re-set your variables, to include the permission checking (works like a charm! :D)

KuraFire 05-08-2002 09:11 AM

Okay I just wanna say a big THANK YOU NAKKID for helping me out, sure PPN did the actual code-writing but nakkid pointed me to it and helped out nonetheless. Thanks Nakkid! :):up:

pattox2k1 05-08-2002 10:40 AM

hey kreft on that test forum i like dat avatar............where u got it from???? or could u PLZ pm me it??????


All times are GMT. The time now is 04:58 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.00984 seconds
  • Memory Usage 1,735KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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