PDA


View Full Version : Integrating Other vB Pages & Hacks tutorial -- question about this, please help


TbChampions
01-25-2006, 06:27 PM
Sorry, but I'm very new. What does the bolded part mean? What file specifically? I tried one of the module files (navigation) that I wanted to keep on the left side of the forum page, but that didn't work in a big way, adding those 2 lines of code. Please help. Thanks!

-----------------------------------------------

Integrating Other vB Pages & Hacks
We have tried to make it as easy as possible to integrate vBadvanced CMPS with other vBulletin files and hacks. This section covers how to integrate them.

Let's say you wanted to add your left column to your forum's homepage, as many people seem to like. Simply follow these steps:
Open your /forum/includes/functions.php file.

If you are running vBulletin 3.0.x, look for this code within that file: if ($vboptions['addtemplatename'])
Or, if you are running vBulletin 3.5.x, look for this code: if ($vbulletin->options['addtemplatename'])
Just Above this code, add: if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_SCRIPT') AND !defined('NOPMPOPUP'))
{
define('SKIP_OUTPUT', true);

global $home;

print_portal_output($home, $vartext);
}

Log into your Admin CP.
Click on the 'Add Page' link listed under your 'vBa CMPS' options in the left frame, and then click on 'Module Page.
Once there, enter a Title and a Page Identifier for your page. You may call these two options whatever you would like, just be sure to make a note of what you used for the 'Page Identifier' option. For this example we are going to use 'include' for both.
Since we only want to include the modules in the left column on this page, uncheck all modules that are in your right and center columns, with the exception of your 'Custom Page Content' module. This module is what will be used to display the content from the page you are integrating, so it must be active on this page. Or of course if you would like other modules to be active then you may leave them as active.
Set any additional options that you would like, and then save the page.
Now you will want to open the vBulletin file that you would like to integrate. In the file, right after the opening <?php tag, you will want to add this code:

define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');Note that if you changed the 'Page Identifier' setting for this page above then you will want to replace 'include' (marked in bold above) to whatever you used for the 'Page Identifier' option.
Upload the file and you are done.
To start integrating other pages, simply follow steps 5 & 6 with the other files.

Brian
01-25-2006, 06:34 PM
The bolded part means exactly what it says... You open the vBulletin file that you want to integrate (ex: index.php, forumdisplay.php, showthread.php, etc) and add that code to the top. There's no reason to touch your CMPS module files, or any other CMPS files for that matter.

ConqSoft
01-25-2006, 06:35 PM
You edit the vBulletin pages. ie, /forum/index.php, /forum/forumdisplay.php, /forum/showthread.php, etc. depending on what pages you want the CMPS modules to display.

ConqSoft
01-25-2006, 06:35 PM
Wow. We even listed the same examples. :D

TbChampions
01-25-2006, 06:55 PM
Thanks, guys. Sorry if it was a stupid question. ;-)

I'd want it to show up on all my forum pages, so......

ConqSoft
01-25-2006, 06:55 PM
...so you need to edit a lot of files.... If you mean all pages, like UserCP, Calendar, etc.

TbChampions
01-25-2006, 07:01 PM
I gotcha now.... it's working well. Much thanks to both of you. ;-)

Fargo
06-20-2006, 11:47 PM
im really quite surprised that no one has made use of the plugin system for this job.

DSB
09-30-2006, 01:06 AM
will this work for vb3.6.1 ?

I only ask because it says "If you are running vBulletin 3.0.x or 3.5.x"

eJM
09-30-2006, 11:13 PM
Yes, it works as described for vB 3.6.1 and earlier.

easyskillz
10-18-2006, 08:51 AM
If i edit the global.php file like it's said on the tutorial...It works on all pages but i get a bug on cmps where it displays only the RIGHT column !! in the middle of the page...

so is there a way to make this work on all pages without having to edit php by php ! ?

thanks :)

easyskillz
10-18-2006, 09:17 AM
And also i noticed that this technique slows the website a lot or i am mistaken ?

Brian
10-18-2006, 03:52 PM
easyskillz - Can you post a link to your site so I can see the problem with the main CMPS page? As for it slowing the site down, it could depeding on what modules you're using.

easyskillz
10-18-2006, 06:03 PM
www.maroceve.com

Nevermind, i found the fix here (http://www.vbadvanced.com/forum/showthread.php?t=14233) that you posted ;)

i still have troubles with showimage.php ..making me nuts ! works on all pages but showimage.php :(

Brian
10-19-2006, 02:08 PM
Sorry, but you'd have to ask the guys at PhotoPost about that one.

1996 328ti
11-26-2006, 04:17 PM
im really quite surprised that no one has made use of the plugin system for this job.I've been looking through vb.org and here for the exact same thing. A plug in to add to index.php, forumdisplay.php and showthread.php. vBadvanced is the only addon that I still need to edit php files. :(
Not a big deal, it's only 2 lines but it still would be nice.

Tigratrus
02-07-2007, 10:18 PM
I utilized this same method to add modules to a left column on my forum and other pages, and I'm getting this error


Fatal error: Call to undefined function print_portal_output() in /home/oursite/public_html/forums/includes/functions.php on line 4864

when trying to change the sort order in forums, using the sort options at the bottom of forumdisplay pages. Has anyone else had this problem, or could someone point me in the right direction for fixing it?

Much appreciated! I don't want to have to remove this hack, as I love the functionality it adds to my forum pages. :)

Thanks!

Brian
02-08-2007, 12:33 PM
Tigratrus - Can you post a link to your site?

Tigratrus
02-08-2007, 02:26 PM
Tigratrus - Can you post a link to your site?

Thanks Brian - I've PM'd you with the information as it seems to be happening in our Private Forums only as far as I can tell. I created an account for you which is detailed in the PM, along with a direct link. Please let me know if you require anything further. Thanks!

Susan

Brian
02-09-2007, 03:39 PM
How exactly did you integrate the forums with the CMPS? Did you follow the users manual here and add something like this to your forumdisplay.php file?
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');

It seems to have that problem whenever you use the normal vBulletin URL instead of the vBSEO URL's, but that shouldn't make a difference assuming that's how you integrated things.

Tigratrus
02-09-2007, 05:34 PM
That's what I followed - copied and pasted it onto the pages we wished to integrate. Could it be something with the SEO rules?

Susan

Brian
02-10-2007, 03:34 PM
I wouldn't *think* so, but it's hard to tell without knowing exactly what vB SEO's code does. You may want to try disabling vBSEO though and see if you still have the same problem. If not, then you may need to ask the guys over at vbseo.com.

Tigratrus
02-11-2007, 11:44 PM
Hmmm...I'll have to try disabling the SEO momentarily to see if that does anything.

Susan

Scarlet H
02-12-2007, 12:05 PM
I followed the directions EXACTLY and no change at all. Ideas anyone? I'm running 3.6.0....

Brian
02-12-2007, 06:19 PM
Are you sure your old files were overwritten when you uploaded the changes? You should at least see something different if they were.

Scarlet H
02-13-2007, 01:58 AM
Are you sure your old files were overwritten when you uploaded the changes? You should at least see something different if they were.

The files were definitely overwritten (overridden<~~~LOL at my typo), but it looks EXACTLY the same as it did before. Unless....were those "AND"s supposed to be inserted as well? I just copied and pasted everything as was (changing the page identifier though ;) ) where it was supposed to go. Oh...if I am modifying forum.php, the path to the CMPS file should be to forum.php, correct? or is that where I messed up?

Scarlet H
02-15-2007, 04:54 PM
Actually, when following the CMPS links, the pages that I added are EXACTLY the same as the index page. The custom content block is not displayed with the page info (like forum.php should show forums, forum_display.php should display forum content, etc). This module is active, but not functioning.

Any thoughts that might help?

Brian
02-16-2007, 12:15 PM
Can you post the code that you've added to your forum.php and forumdisplay.php files to integrate the CMPS?

Tigratrus
02-25-2007, 08:57 PM
;) Brian and anyone else seeing our particular bug:

It *IS* VbSEO related. Fix:

Find:

if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_SCRIPT') AND !defined('NOPMPOPUP'))

in functions.php in forum/includes

and replace it with:

if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_SCRIPT') AND !defined('NOPMPOPUP') AND function_exists('print_portal_output'))

Problem magically went away;)

James and Susan

puregraf
02-25-2007, 11:08 PM
how would i go about adding the poll that shows on my vba index (changes as page is reloaded) to my photopost index.php page?

I will be very very very thankful if a nice soul can help me with this !!

Thank you!!!!
Sabrina