View Full Version : Addition Integration Options
XtAzY
06-01-2007, 12:11 AM
I was wondering since you can now integrate specific php files, I was wondering if you can add an option that allow you to add specific forum ids. For example, I want to see the integration with forumdisplay.php but only to specific forum, not the rest of the forum.
Lionel
06-01-2007, 12:38 AM
A quick and dirty way would be to place this at the very top of forumdisplay.php after <?php
if($_REQUEST['f']=='XX' )
{
define('VBA_PORTAL', true);
define('VBA_PAGE', 'myforumpage');
}
XtAzY
06-21-2007, 12:39 AM
I like the dirty trick, but I was wondering if it's possible and add this feature without file edits. This feature is used in Geek GARS script and its very useful for integrations with specific forums and it would be a nice addition for this CMPS 3.0
Lionel
06-21-2007, 02:42 AM
I *think* I saw Brian post something like that somewhere... Do a search
Brian
06-21-2007, 11:32 AM
You can place that same code in the 'vba_cmps_include_getpage' plugin to avoid the file edits.
XtAzY
07-09-2007, 06:33 PM
You can place that same code in the 'vba_cmps_include_getpage' plugin to avoid the file edits.
Awesome! Now let say I want all threads in that specific forum to be integrated as well when it is using showthread.php. How would i do that? If i just integrate the showthread.php file, then all threads in every forums will be integrated.
Lionel
07-10-2007, 12:56 AM
I don't think this would be possible without file edit. You would need to get the forumid for the threadid, and if that forumid is in_array of the desired forums, then you'd display what you want for those showthreads. And there again, it could be quite a gymnastic to get that forumid since cmps does it's thing first.
For the forumid in first example above you get it via the $_REQUEST, that's easy and you can put specific commands at top of file before everything else.
Your best bet, I think, would be to parse the forumid in showthread.php so the link becomes showthread.php?t=xx&f=yy
Then you can get the yy value and do an if (in_array (yy,$forumlist)) .... you get the picture?
You would have to edit every link that leads to showthread.php
Brian
07-10-2007, 09:26 AM
http://www.vbadvanced.com/forum/showthread.php?t=22591&highlight=forumid+integrate
Use the code from the 2nd post there and it should carry over to your showthread.php file as well. You will also need to use the normal integration options to integrate your showthread.php and forumdisplay.php files, but the CMPS page(s) you specify in the plugin from that link will override the page you set.
XtAzY
07-11-2007, 09:27 PM
Ah, thanks Brian and Lionel. Now I can finally get it to work. I guess I can create a tutorial some point in the future =]. I'm glad v3 is so much flexible now than before.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.