PDA


View Full Version : Integrating Other vB Pages & Hacks w/Plugin?


jonnyquest
01-22-2006, 10:35 PM
Is it possible to integrate vBa modules into a forum using this technique: http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=6 but doing it through vB's plugin system instead of editing the files?

pennylessz28
01-22-2006, 10:37 PM
nope

jonnyquest
01-23-2006, 02:32 AM
I can see that the integration into functions.php wouldn't work as there is no hook in that location.

If I was looking to add a column to every page on my forum, could I do this using a single hook that hits every page? Alternatively, is there a single file I could add this code to:

define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');

that would put the code on every page of the forum?

Brian
01-23-2006, 02:37 AM
You could add that near the top of your global.php file. You would probably want to change it to something like this though so it won't affect the cmps_index.php file.
if (!defined('VBA_PORTAL'))
{
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');
}

jonnyquest
01-25-2006, 02:37 AM
And if I only want it to show up on specific forumdisplay pages? I tried this in global.php:

if (!defined('VBA_PORTAL'))
{
if ($forumid=1088)
{
define('VBA_PORTAL', true);
define('VBA_PAGE', 'forumpage');
}
}

but had no luck. I also tried with just $f.

jonnyquest
01-25-2006, 03:39 AM
Tried dropping this code into the top of forumdisplay.php. You can't put it in the top as there are no forumid variable defined at that point. You can put it in the first hook location, however, you then get an error that print_portal_output is undefined in functions.php.

Seems like everyone has problems with this at first and then eventually gets it. Doesn't seem like the instructions as written here: http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=6 work perfectly or am I just being dumb?

Brian
01-25-2006, 02:37 PM
The instructions in the users manual will work perfectly if you follow them and add the exact code.

If you want to integrate the CMPS with one forum then try adding this to your forumdisplay.php file:
if ($_REQUEST['f'] == 1088 OR $_REQUEST['forumid'] == 1088)
{
define('VBA_PORTAL', true);
define('VBA_PAGE', 'forumpage');
}

jonnyquest
01-26-2006, 03:11 AM
I just started from scratch and did all changes on the instructions page and in this email. I am getting this error:


Fatal error: Call to undefined function: print_portal_output() in /domain.com/forum/includes/functions.php on line 2569


BTW, I know you say the instructions are perfect, however, they changed since yesterday. It didn't effect us as we had already included that line in global.php but you can see how folks would have problems.

Thanks.

Brian
01-26-2006, 04:13 PM
Where exactly did you add the define('VBA_PORTAL', true); code at?

BTW, I know you say the instructions are perfect, however, they changed since yesterday. It didn't effect us as we had already included that line in global.php but you can see how folks would have problems.
They changed yesterday because of the release of 2.1.0. The file change mentioned there was required in previous CMPS versions, but not in 2.1.0. That's why it has the note about the code possibly already being there. ;)

jonnyquest
01-26-2006, 09:14 PM
just as you suggested in the above post:

if ($_REQUEST['f'] == 1088 OR $_REQUEST['forumid'] == 1088)
{
define('VBA_PORTAL', true);
define('VBA_PAGE', 'forumpage');
}

jonnyquest
01-28-2006, 04:02 PM
can you tell me the correct place to add this code?

Brian
01-29-2006, 03:34 PM
Just below the <?php mark at the top of the file.

easyskillz
02-14-2007, 05:17 AM
Allright, I have been working with this edit to integrate a right colum to all my vbulletin php by editng global.php.

However i have been having this bug :

the attachment.php would show the header and the column too.

my cmps shoutcast players script would also load in a FULL PAGE instead of just a little popup ...

basically this method ends up screwing up a lot of things ....


Is there something i am missing ? or should i just go on and edit the php pages one by one instead of the global.php ?

Thanks Brian :)

Brian
02-14-2007, 11:35 AM
Open your shoutcast player page and see what THIS_SCRIPT is defined as at the top. Then change your CMPS integration code to something like this:

if (THIS_SCRIPT != 'attachment' AND THIS_SCRIPT != 'whatever')
{

define('VBA_CMPS', true);
define('VBA_PAGE', 'include');

}

easyskillz
02-14-2007, 12:02 PM
it's a cmps module...


so where do i look ? There is no such code in shoutcast_lite.php nor in it's templates.

and the players are like using this kind of templates "for mp for example"$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$scdef MediaPlayer</title>
$headinclude
</head>
<body>
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat">
<a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_radio')"><img id="collapseimg_forumhome_radio" src="$stylevar[imgdir_button]/collapse_tcat.gif" alt="" border="0" /></a>
<div align='center'>$scdef: $servertitle</div></td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_radio" style="{$vbcollapse['collapseobj_forumhome_radio']}">
<tr>
<td class='page' align='center' id='radio'>
<OBJECT
ID="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE=
"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
width=320 height=50
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<PARAM NAME="FileName" VALUE="$listenlnk">
<PARAM NAME="TransparentAtStart" Value="true">
<PARAM NAME="AutoStart" Value="true">
<PARAM NAME="AnimationatStart" Value="false">
<PARAM NAME="ShowStatusBar" Value="true">
<PARAM NAME="ShowControls" Value="true">
<PARAM NAME="autoSize" Value="false">
<PARAM NAME="displaySize" Value="0">
<Embed type="application/x-mplayer2"
pluginspage=
"http://www.microsoft.com/Windows/MediaPlayer/"
src="$listenlnk"
Name=MediaPlayer
AutoStart=1
Width=320
Height=50
transparentAtStart=0
autostart=1
animationAtStart=0
ShowStatusBar=1
ShowControls=1
autoSize=0
displaySize=0></embed>
</OBJECT>
</td>
</tr>
</table>
</body>
</html>

easyskillz
02-14-2007, 12:09 PM
something even more simple for you i guess is this attachment bug.

My header shows in the attachment page along with the right column. is that normal ?