![]() |
|
#1
|
|||
|
|||
|
Is it possible to display the posts (on the front page of my vBAdvanced enhanced site) from ONLY specific usergroups or users?
Thanks in advance... |
|
#2
|
|||
|
|||
|
Maybe somebody knows of a mod/hack that can do it? Basically, I want to have posts from all my forums make it to the front page - however, I only want posts from a specific user or usergroup...
|
|
#3
|
|||
|
|||
|
You could modify the recentthreads.php file to do this. You would just need to modify the where clause in the main query. There are a bunch of people here that could do it for ya.
|
|
#4
|
|||
|
|||
|
Thank you.. If it's something that can be done by editing a file, I can do that - but I'd need to know how. If it's a database query, I can do that too - but I'd need to know the query...
|
|
#5
|
||||
|
||||
|
You could add a new plugin to the 'vba_cmps_module_recthreads_start' location with the following code:
Code:
$vba_threads_condition .= ' AND user.usergroupid IN(X, Y, Z)'; $rthread_join .= ' LEFT JOIN ' . TABLE_PREFIX . 'user AS user ON (thread.postuserid = user.userid)'; |
|
#6
|
|||
|
|||
|
Hi Brian,
Thank you. I tried the following: Code:
$vba_threads_condition .= ' AND user.usergroupid IN(11)'; $rthread_join .= ' LEFT JOIN ' . TABLE_PREFIX . 'user AS user ON (thread.postuserid = user.userid)'; Thanks again... |
|
#7
|
||||
|
||||
|
Did you make sure to add the new plugin to the 'vba_cmps_module_recthreads_start' hook location, and make sure to mark it as 'Active'?
|
|
#8
|
|||
|
|||
|
Quote:
Thank you... |
|
#9
|
|||
|
|||
|
Don't give up on me now!
Anyone else have any ideas? I guess this is a unique request.. I figured maybe more people would have wanted this functionality in the past. The thing is, I want to be able to have topics from all my forums on my vBa front page - but I don't want just anybody getting there...Thanks in advance... |
|
#10
|
||||
|
||||
|
Try going back to your Plugin Manager in the Admin CP, find the plugin you just added, make sure that the checkbox next to it is checked, and then click the 'Save Active Status' button at the bottom.
|
|
#11
|
|||
|
|||
|
No luck.. Are you sure this would work? If so, maybe I've just got something set incorrectly.. Could I pay you for your time for personal support?
|
|
#12
|
||||
|
||||
|
Yes, that code will work... It is the Recent Threads module that you're trying to apply this to, right?
|
|
#13
|
|||
|
|||
|
Oh, maybe that's it! My fault! Sorry! It's the "news" module!
So how would the code look for that? |
|
#14
|
|||
|
|||
|
What I tried this morning was just change the module this was applied to, to "vba_cmps_module_news_start" but I was still able to post a topic with an account outside usergroup id11..
Would the code be any different to allow only one usergroup to get those front page 'news' posts? The Execution Order is "5". Could that mean anything? Last edited by Sal Collaziano; 10-26-2007 at 07:19 AM. |
|
#15
|
||||
|
||||
|
Quote:
I saw "recent threads" somewhere in this thread, so assumed that's the module you were trying to do this with. For the news module, you would need to look in the modules/news.php file for this code:PHP Code:
PHP Code:
|
|
#16
|
|||
|
|||
|
Okay. I think I'm getting closer now.. The only issue is - the new code took out the news and recent post columns altogether.. I have the usergroup set correctly.. There's one primary member of usergroup #11..
I removed the plugin to see if that would clear things up to no avail.. I'm sorry about all these questions and bumps in the road - but I know this can work... Any ideas? Thanks again... |
|
#17
|
|||
|
|||
|
Okay, wait.. I think the user just needs to post new topics... On the other hand, I'm not sure what's wrong with the 'recent posts' area...
|
|
#18
|
|||
|
|||
|
Okay. It just took a little tweaking.. Everything's working perfectly.. Thank you for your help, Brian!
|
|
#19
|
|||
|
|||
|
how can we do it for a user?
|
|
#20
|
||||
|
||||
|
Change this:
PHP Code:
PHP Code:
__________________
Frequently Asked Questions CMPS Users Manual For vBadvanced software assistance, please use the support forums. Unsolicted PMs, IMs, and email will not be responded to. If you have a non-software related question or problem with your account, please submit a support ticket. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| When I use a promotion for my registered user to move to a new custom user group... | GamingVidz.com | "How Do I..." Questions | 3 | 12-28-2006 09:32 PM |
| "getnew" user specific NEW POSTS Module | MortysTW | "How Do I..." Questions | 5 | 06-27-2006 07:26 PM |
| New user group bug | michaelsilvia | Troubleshooting & Problems | 1 | 09-05-2005 06:09 PM |
| Custom Field visible/edit to specific group only | libertate | "How Do I..." Questions | 1 | 07-04-2005 11:16 AM |
| Make a category for a specific group | attroll | "How Do I..." Questions | 2 | 10-17-2004 11:19 PM |