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 XX Threads on Forumhome Page (https://vborg.vbsupport.ru/showthread.php?t=43310)

TECK 10-02-2002 08:31 PM

use only:
Code:

<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

TECK 10-04-2002 11:48 AM

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?


All times are GMT. The time now is 02:31 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.01716 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_code_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