![]() |
I made this script basically just for my own needs, but figured others might appreciate it as well. :)
Man, this permissions thing is giving me a headache. Nakkid, I can't say exactly why that part of code of yours is adding 1 query for every thread, but it does suck and it's hell trying to get around it. :( |
well i'm not sure, why there is sometimes an error and sometimes not
i think you can solve this problem, with making an extra query for each message news, i have made it so an it works: PHP Code:
PHP Code:
try it and say it to me if it works or not. If not, i will check it a more :) |
That should work fine, from what I see, but it adds a query for each news item, and I'm trying to get rid of that since I _know_ this can be done using only 2 queries.
With your code, the default setup would add 8 queries to the 10~12 that global.php runs already. Seems to me as not very efficient. :( Besides, that's how my _old_ script was run. One query for the newsforum, and one for each news item..... I was hoping to _advance_ :( Thanks though. Well-appreciated :):up: |
How can I pull news from more than one forum
Code:
$newsforum = 5; |
Kurafire:
To get the permissions issued addressed on my site I used Code:
if (ismoderator($forumid) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) { Parker |
AndyTSJ:
try replacing that line with PHP Code:
Parker: have you tried that out as a normal registered member? come to think of it, would this piece of code work? PHP Code:
(I'm off for some things so I can't test it myself right now :() |
That works !!!!!!!!!!!!!!!!! COOL :) :)
|
Kurafire:
I tried the $getperms['canview'] before I tried what I suggested above and that didn't work. The code that I suggested works on my board just fine and it will only allow those admins, etc. that are allowed to view a private forum see the thread listed. If you are a regular member you will not see the ones that you set up in $forumexclude. Parker |
Parker: ah yes, I saw that already but the thing is, I'm one of those people who have more than the default usergroups. I have 1 category with 4 forums in it that is only accessible to users in a certain usergroup, and 1 forum elsewhere that is only accessible to users in yet Another special usergroup.
Using your code wouldn't help at all for my board, nor for people who have something similar. However, it DOES indeed work on boards where there's only admins, S-mods and normal members, I guess. Thanks for that addition, therefore, because it will at least allow people with such board-setups to include permissions in this script already. :) |
kura, PPN rewrote the perms code i had there in a much more elegant way. take a look and insert it also in your script:
https://vborg.vbsupport.ru/showthrea...924#post248924 |
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|