![]() |
|
#1
|
|||
|
|||
|
Hello Brian and All,
Is it possible in the new version to add modules to specific forums? Thx Regards, |
|
#2
|
||||
|
||||
|
You should be able to use some code like this and add it as a plugin to your 'vba_cmps_include_getpage' hook location.
PHP Code:
|
|
#3
|
|||
|
|||
|
Brian, I've been needing to do this for a long time (make different blocks come up based on the folder subject.)
Can you give me a little bit more detail as to how to do what you describe above? I've searched on the code 'vba_cmps_include_getpage' and found the PHP code in includes/vba_cmps_include_top.php and xml/hooks_vbacmps.xml, but I'm a little lost as to how to connect it all together. I know how to install plugins that I've gotten from VB.org, but are you saying that I'd need to create the plugin myself? Any help you could provide would be greatly appreciated
|
|
#4
|
|||
|
|||
|
I want to be more clear about what I'm trying to do. I'm trying to make the block that displays "context sensitive" according to the forumid's subject matter.
In human language this is what I'd like to do: PHP Code:
Thank you so much! |
|
#5
|
||||
|
||||
|
Hi Pam,
The code example above should allow you to do just that. First, go ahead and integrate your forumdisplay.php and showthread.php files with the CMPS page that you would like to integrate the majority of your forums with, using the "Integration" link in your Admin CP. Next, go to your plugin manager and click the link to add a new plugin at the bottom of the page there. Enter whatever you would like for the title, and then add the code from my post above in the "Plugin PHP Code" section (after you've changed out the forumid's and $getpage variables to match what you would like for your forum), set the "Active" option to yes, and save the plugin. Going from the example you gave, the code to add would need to look something like this: PHP Code:
|
|
#6
|
|||
|
|||
|
Have either of you guys had any luck with this? I'm a little confused at what you guys are trying to accomplish and Brian's explanation. I would like to create a new page and have a particular forum and sub forums appear on that page exclusively. Not sure if that's what this is about or not.
|
|
#7
|
||||
|
||||
|
Hey Brian, I am giving this a shot and I am wondering if you change the
Code:
switch($_REQUEST['forumid']) also, I notice adv_portal_something in the getpage= part. I have that as the identifier for the cmps page that I want to use to display the forum. Is that right? Or do I need to create a template? Here is what I changed from what you have above Code:
if (isset($_REQUEST['f']))
{
$_REQUEST['forumid'] = intval($_REQUEST['f']);
}
switch($_REQUEST['forumid'])
{
// Quick example for just one forumid
case 696:
$getpage = 'towerpedia';
break;
}
__________________
TheDarkTower.com--Stephen King Fan Site |
|
#8
|
||||
|
||||
|
No, the "switch($_REQUEST['forumid'])" statement does not need to be changed. The forumid just needs to be changed below, which it seems you've done in your code assuming that the forumid is 696.
|
|
#9
|
||||
|
||||
|
yep, that is done. Then I created a page as a "module" and gave it an identifier as "towerpedia"
Probably should have been a "template" page with that as the identifier. Glad to know I understood the instructions right though. this would be the forum I wanted it to use http://www.thedarktower.com/palaver/...read.php?t=696
__________________
TheDarkTower.com--Stephen King Fan Site Last edited by towermatt; 08-18-2007 at 01:58 PM. |
|
#10
|
|||
|
|||
|
Anxious to see your results
|
|
#11
|
||||
|
||||
|
Me too!
I forgot to say what the problem is though :slaps head: when I go out to http://www.thedarktower.com/palaver/...age=towerpedia I get just a blank CMPS screen
__________________
TheDarkTower.com--Stephen King Fan Site |
|
#12
|
||||
|
||||
|
696 is the threadid for that thread. 116 seems to be the forumid that your nuwiki.php file is redirecting to, so I would assume that's most of the problem.
Going straight to cmps_index.php?page=towerpedia should not pull up anything besides the modules you have on that page as it does not have any way to pull the forum info or anything else unless you're browsing your normal forum pages. |
|
#13
|
||||
|
||||
|
Okay so I may be along the wrong path here.
Mostly what I wanted to do was make a location on my server http://www.thedarktower.com/towerpedia that would display that forum with a CMPS wrap around it only (without it wrapping my entire forum) Mostly just because not all folks who visit the site visit the forum and I wanted them to be able to see a view of it with modules like the rest of the pages. a simple solve is to just put a link in the navbar to that forum but it doesn't have the much loved CMPS wrap
__________________
TheDarkTower.com--Stephen King Fan Site |
|
#14
|
|||
|
|||
|
Quote:
|
|
#15
|
||||
|
||||
|
I have not actually tried this because I was worried about the forum. My members are against a CMPS wrap on the forums (not sure why but that was the vote).
I think, what the code above does, is use the integration to wrap specific forums (that you put in the code), so it integrates without doing it "fully"
__________________
TheDarkTower.com--Stephen King Fan Site |
|
#16
|
|||
|
|||
|
Hi,
This is working perfectly in one of my forums where I don't use vBSEO and have the forum id as a number like: case 154: On another forum where I do use vBSEO I get either a vBulletin database error or it doesn't show at all. Might this just be coincidence? Should you be using the forum ID like in the example above or the name of the forum as vBSEO displays it? case temptation: The second forum integration not working was done on a upgraded V2 cmps system where the other one is a new installation of RC2. Might be a issue as well? Thanks EDIT: Not too worry got it working like a charm... Last edited by Powerbook; 12-24-2007 at 09:26 PM. |
|
#17
|
|||
|
|||
|
Quote:
I've created the plugin and added the specific forumid - although can i just check, which 'hook location' do you recommend using? (just in case i've used the wrong one - i used CMPS_global) Thanks for any assistance in this area
|
|
#18
|
||||
|
||||
|
Yes, you need to add a new CMPS page for each different layout you want to use. The same CMPS page can be used for multiple forums/integration files though if you want the layout to remain the same on each.
Quote:
|
|
#19
|
|||
|
|||
|
Oops! Thanks again Brian, i'll give that a try.
|
|
#20
|
|||
|
|||
|
Quote:
using the code in post 2, replacing forumid with catid, but it is not working. Should other changes be made to make it work with the links directory? |
![]() |
| 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 |
| disable modules for specific style/theme | wildo69 | "How Do I..." Questions | 9 | 04-15-2011 03:36 PM |
| Trying to add links to specific forums, in between nav items.. | Emraith | "How Do I..." Questions | 1 | 03-21-2007 10:38 AM |
| left side modules - specific forums | Rebecca | "How Do I..." Questions | 2 | 03-25-2006 07:13 AM |
| Modules for specific pages | angelosms | Troubleshooting & Problems | 8 | 12-25-2005 01:08 AM |
| Modules only one a specific style | e-steki | "How Do I..." Questions | 7 | 12-23-2005 01:19 PM |