View Full Version : Instruct CMPS Homepage to parse 'phpinclude_start' template
Milorad
07-09-2004, 11:45 AM
How would I get the homepage to parse the 'phpinclude_start' template?
This is almost related to SmashMaster's thread about including extra variables... but not quite, which is why I didnt post in his thread.
Thanks for the help :)
Brian
07-10-2004, 02:23 PM
It should already parse this template in the same way that your forums do...
Milorad
07-10-2004, 04:51 PM
hmm...
well, I'm using Floris' Professional Style which has a custom constructed greeting based on time of day which is displayed in the navbar.
This greeting is constructed in the phpinclude_start, by the looks of things.
I would post it, except I dont want to publicise anything I shouldnt.
Anyway, this greeting works perfectly on forumhome, but not on the root page. On that page there is simply no greeting displayed at all (as if the variable is empty).
I hope I'm making sense.
jj jacobi
07-28-2004, 06:15 PM
I'm having this problem as well -- the phpinclude_start is getting parsed and evaled. The variable $vbnl_greeting IS set correctly, but by the time the navbar is created for the cmps page that variable is not available or empty. I'm contining to look into it, but if someone has this solved already that would be helpful. Thx.
--jj
jj jacobi
07-28-2004, 06:27 PM
Got the answer -- (by reading other threads on this board about phpinclude_start) :)
Any globals defined in phpinclude_start will not be available to the cpms pages UNLESS those globals are exported in vba_cmps_include_bottom.php.
To make floris' style work do the following:
1) Open vba_cmps_include_bottom.php
2) Look for the line:
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox;
3) Replace with:
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $vbnl_greeting;
That should fix it.
Maybe in the future there will be a cmps option in the control panel to specify globals that should be available to cmps? Not sure that's the right solution -- just an idea.
Thanks,
--jj
Natch
07-29-2004, 12:02 AM
Maybe in the future there will be a cmps option in the control panel to specify globals that should be available to cmps? Not sure that's the right solution -- just an idea.Great idea!
Milorad
07-29-2004, 06:39 AM
fantastic! thanks JJ :)
Brian
07-29-2004, 01:48 PM
That should fix it.
Maybe in the future there will be a cmps option in the control panel to specify globals that should be available to cmps? Not sure that's the right solution -- just an idea.
Actually that will be taken out of a function in the next version so that won't be necessary anyways. A function is necesary for the links directory and other scripts like that that we'll have available, so I may look into something like that for those scripts.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.