How to integrate vBulletin into a complex PHP site?
I'm managing a PHP-built site that uses a multi-tier Smarty templating system, with a main template including sub-templates, etc. The site itself has dynamic features of its own, including user profile displayed in the header, footer sitemap and menu dropdowns dependent on user access levels, etc.
I now need to put a vBulletin forum in the middle of it all.
One of my options is, of course, making vBulletin "look like" the site, with a plugin for a header and footer - but that is pretty much out of the question, as some of the site's features should override forum access entirely (maintenance periods, user access restrictions, occasional "splash page" redirections), we have JavaScripts and header bits, and then there's the part about whole-site templates I mentioned. Large bits of page code would need to be duplicated and that's something I'd really rather avoid.
So I went the other way and started including the forum's files through a "wrapper" PHP script, hoping to capture its output entirely in an output buffer, and put it into my template proper. I even simulated REQUEST_URIs and other $_SERVER fields, to make the forum think it's being run standalone. It fought me back fiercely, breaking out of ob_start()s and die()ing instead of returning at certain points, so much that I went back to the drawing board.
My other option is to hack my own site in a gruesome way, to provide a severed header and footer the forum would use - but then there'd be the bits and scripts to combine. Also I'd lose the ability to produce one page in one run, and having one-time generated content synchronized between the header and footer would become a nightmare.
What other options do I have? Do all the sites using vBulletin stick to simple headers and footers, or is there something obvious I'm missing?
Update: What would completely solve my problem would be if vB supported a "template wrapper" plugin, called with all of the forum's generated HTML buffered as a parameter; "here's the output, go ahead and do whatever the hell you want with it". But is there support for that? Or is it feasible to hack it in?
php templates smarty integration vbulletin
|
show 3 more comments
I'm managing a PHP-built site that uses a multi-tier Smarty templating system, with a main template including sub-templates, etc. The site itself has dynamic features of its own, including user profile displayed in the header, footer sitemap and menu dropdowns dependent on user access levels, etc.
I now need to put a vBulletin forum in the middle of it all.
One of my options is, of course, making vBulletin "look like" the site, with a plugin for a header and footer - but that is pretty much out of the question, as some of the site's features should override forum access entirely (maintenance periods, user access restrictions, occasional "splash page" redirections), we have JavaScripts and header bits, and then there's the part about whole-site templates I mentioned. Large bits of page code would need to be duplicated and that's something I'd really rather avoid.
So I went the other way and started including the forum's files through a "wrapper" PHP script, hoping to capture its output entirely in an output buffer, and put it into my template proper. I even simulated REQUEST_URIs and other $_SERVER fields, to make the forum think it's being run standalone. It fought me back fiercely, breaking out of ob_start()s and die()ing instead of returning at certain points, so much that I went back to the drawing board.
My other option is to hack my own site in a gruesome way, to provide a severed header and footer the forum would use - but then there'd be the bits and scripts to combine. Also I'd lose the ability to produce one page in one run, and having one-time generated content synchronized between the header and footer would become a nightmare.
What other options do I have? Do all the sites using vBulletin stick to simple headers and footers, or is there something obvious I'm missing?
Update: What would completely solve my problem would be if vB supported a "template wrapper" plugin, called with all of the forum's generated HTML buffered as a parameter; "here's the output, go ahead and do whatever the hell you want with it". But is there support for that? Or is it feasible to hack it in?
php templates smarty integration vbulletin
Don't mix the two sites, keep them completely separate and deploy vbulletin standalone on a subdomain. (This also gives you the added benefit of opting to utilize their cloud hosting.)
– Alex Howansky
Nov 14 '18 at 22:23
1
That's out of the question. The forum needs to be integrated, not standalone.
– Sinus Mackowaty
Nov 14 '18 at 22:25
Define integrated.
– Alex Howansky
Nov 14 '18 at 22:26
I never like doing this but have you considered using (i)frames?
– user10226920
Nov 14 '18 at 22:27
@AlexHowansky Integrated, as in: looking and functioning exactly as part of the site, not as a separate feature. For example the logged-in user's name and avatar is handled as part of the core site, and needs to remain so. Cloud hosting would completely disable that.
– Sinus Mackowaty
Nov 14 '18 at 22:33
|
show 3 more comments
I'm managing a PHP-built site that uses a multi-tier Smarty templating system, with a main template including sub-templates, etc. The site itself has dynamic features of its own, including user profile displayed in the header, footer sitemap and menu dropdowns dependent on user access levels, etc.
I now need to put a vBulletin forum in the middle of it all.
One of my options is, of course, making vBulletin "look like" the site, with a plugin for a header and footer - but that is pretty much out of the question, as some of the site's features should override forum access entirely (maintenance periods, user access restrictions, occasional "splash page" redirections), we have JavaScripts and header bits, and then there's the part about whole-site templates I mentioned. Large bits of page code would need to be duplicated and that's something I'd really rather avoid.
So I went the other way and started including the forum's files through a "wrapper" PHP script, hoping to capture its output entirely in an output buffer, and put it into my template proper. I even simulated REQUEST_URIs and other $_SERVER fields, to make the forum think it's being run standalone. It fought me back fiercely, breaking out of ob_start()s and die()ing instead of returning at certain points, so much that I went back to the drawing board.
My other option is to hack my own site in a gruesome way, to provide a severed header and footer the forum would use - but then there'd be the bits and scripts to combine. Also I'd lose the ability to produce one page in one run, and having one-time generated content synchronized between the header and footer would become a nightmare.
What other options do I have? Do all the sites using vBulletin stick to simple headers and footers, or is there something obvious I'm missing?
Update: What would completely solve my problem would be if vB supported a "template wrapper" plugin, called with all of the forum's generated HTML buffered as a parameter; "here's the output, go ahead and do whatever the hell you want with it". But is there support for that? Or is it feasible to hack it in?
php templates smarty integration vbulletin
I'm managing a PHP-built site that uses a multi-tier Smarty templating system, with a main template including sub-templates, etc. The site itself has dynamic features of its own, including user profile displayed in the header, footer sitemap and menu dropdowns dependent on user access levels, etc.
I now need to put a vBulletin forum in the middle of it all.
One of my options is, of course, making vBulletin "look like" the site, with a plugin for a header and footer - but that is pretty much out of the question, as some of the site's features should override forum access entirely (maintenance periods, user access restrictions, occasional "splash page" redirections), we have JavaScripts and header bits, and then there's the part about whole-site templates I mentioned. Large bits of page code would need to be duplicated and that's something I'd really rather avoid.
So I went the other way and started including the forum's files through a "wrapper" PHP script, hoping to capture its output entirely in an output buffer, and put it into my template proper. I even simulated REQUEST_URIs and other $_SERVER fields, to make the forum think it's being run standalone. It fought me back fiercely, breaking out of ob_start()s and die()ing instead of returning at certain points, so much that I went back to the drawing board.
My other option is to hack my own site in a gruesome way, to provide a severed header and footer the forum would use - but then there'd be the bits and scripts to combine. Also I'd lose the ability to produce one page in one run, and having one-time generated content synchronized between the header and footer would become a nightmare.
What other options do I have? Do all the sites using vBulletin stick to simple headers and footers, or is there something obvious I'm missing?
Update: What would completely solve my problem would be if vB supported a "template wrapper" plugin, called with all of the forum's generated HTML buffered as a parameter; "here's the output, go ahead and do whatever the hell you want with it". But is there support for that? Or is it feasible to hack it in?
php templates smarty integration vbulletin
php templates smarty integration vbulletin
edited Nov 15 '18 at 9:01
Sinus Mackowaty
asked Nov 14 '18 at 22:13
Sinus MackowatySinus Mackowaty
10617
10617
Don't mix the two sites, keep them completely separate and deploy vbulletin standalone on a subdomain. (This also gives you the added benefit of opting to utilize their cloud hosting.)
– Alex Howansky
Nov 14 '18 at 22:23
1
That's out of the question. The forum needs to be integrated, not standalone.
– Sinus Mackowaty
Nov 14 '18 at 22:25
Define integrated.
– Alex Howansky
Nov 14 '18 at 22:26
I never like doing this but have you considered using (i)frames?
– user10226920
Nov 14 '18 at 22:27
@AlexHowansky Integrated, as in: looking and functioning exactly as part of the site, not as a separate feature. For example the logged-in user's name and avatar is handled as part of the core site, and needs to remain so. Cloud hosting would completely disable that.
– Sinus Mackowaty
Nov 14 '18 at 22:33
|
show 3 more comments
Don't mix the two sites, keep them completely separate and deploy vbulletin standalone on a subdomain. (This also gives you the added benefit of opting to utilize their cloud hosting.)
– Alex Howansky
Nov 14 '18 at 22:23
1
That's out of the question. The forum needs to be integrated, not standalone.
– Sinus Mackowaty
Nov 14 '18 at 22:25
Define integrated.
– Alex Howansky
Nov 14 '18 at 22:26
I never like doing this but have you considered using (i)frames?
– user10226920
Nov 14 '18 at 22:27
@AlexHowansky Integrated, as in: looking and functioning exactly as part of the site, not as a separate feature. For example the logged-in user's name and avatar is handled as part of the core site, and needs to remain so. Cloud hosting would completely disable that.
– Sinus Mackowaty
Nov 14 '18 at 22:33
Don't mix the two sites, keep them completely separate and deploy vbulletin standalone on a subdomain. (This also gives you the added benefit of opting to utilize their cloud hosting.)
– Alex Howansky
Nov 14 '18 at 22:23
Don't mix the two sites, keep them completely separate and deploy vbulletin standalone on a subdomain. (This also gives you the added benefit of opting to utilize their cloud hosting.)
– Alex Howansky
Nov 14 '18 at 22:23
1
1
That's out of the question. The forum needs to be integrated, not standalone.
– Sinus Mackowaty
Nov 14 '18 at 22:25
That's out of the question. The forum needs to be integrated, not standalone.
– Sinus Mackowaty
Nov 14 '18 at 22:25
Define integrated.
– Alex Howansky
Nov 14 '18 at 22:26
Define integrated.
– Alex Howansky
Nov 14 '18 at 22:26
I never like doing this but have you considered using (i)frames?
– user10226920
Nov 14 '18 at 22:27
I never like doing this but have you considered using (i)frames?
– user10226920
Nov 14 '18 at 22:27
@AlexHowansky Integrated, as in: looking and functioning exactly as part of the site, not as a separate feature. For example the logged-in user's name and avatar is handled as part of the core site, and needs to remain so. Cloud hosting would completely disable that.
– Sinus Mackowaty
Nov 14 '18 at 22:33
@AlexHowansky Integrated, as in: looking and functioning exactly as part of the site, not as a separate feature. For example the logged-in user's name and avatar is handled as part of the core site, and needs to remain so. Cloud hosting would completely disable that.
– Sinus Mackowaty
Nov 14 '18 at 22:33
|
show 3 more comments
1 Answer
1
active
oldest
votes
After some searching, I found that vBulletin 5 happens to have a hookFrontendBeforeOutput hook, which can operate on the entirety of the output produced by vBulletin's template rendering. I can thus create a plugin which will capture vB's output, correct it where needed, and feed it into my own template system for a final presentation - as well as fire the site's login and other logic mechanisms.
This forum thread has an example, demonstrating that very hook, albeit in a much simpler case.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53309529%2fhow-to-integrate-vbulletin-into-a-complex-php-site%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
After some searching, I found that vBulletin 5 happens to have a hookFrontendBeforeOutput hook, which can operate on the entirety of the output produced by vBulletin's template rendering. I can thus create a plugin which will capture vB's output, correct it where needed, and feed it into my own template system for a final presentation - as well as fire the site's login and other logic mechanisms.
This forum thread has an example, demonstrating that very hook, albeit in a much simpler case.
add a comment |
After some searching, I found that vBulletin 5 happens to have a hookFrontendBeforeOutput hook, which can operate on the entirety of the output produced by vBulletin's template rendering. I can thus create a plugin which will capture vB's output, correct it where needed, and feed it into my own template system for a final presentation - as well as fire the site's login and other logic mechanisms.
This forum thread has an example, demonstrating that very hook, albeit in a much simpler case.
add a comment |
After some searching, I found that vBulletin 5 happens to have a hookFrontendBeforeOutput hook, which can operate on the entirety of the output produced by vBulletin's template rendering. I can thus create a plugin which will capture vB's output, correct it where needed, and feed it into my own template system for a final presentation - as well as fire the site's login and other logic mechanisms.
This forum thread has an example, demonstrating that very hook, albeit in a much simpler case.
After some searching, I found that vBulletin 5 happens to have a hookFrontendBeforeOutput hook, which can operate on the entirety of the output produced by vBulletin's template rendering. I can thus create a plugin which will capture vB's output, correct it where needed, and feed it into my own template system for a final presentation - as well as fire the site's login and other logic mechanisms.
This forum thread has an example, demonstrating that very hook, albeit in a much simpler case.
answered Nov 19 '18 at 22:54
Sinus MackowatySinus Mackowaty
10617
10617
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53309529%2fhow-to-integrate-vbulletin-into-a-complex-php-site%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Don't mix the two sites, keep them completely separate and deploy vbulletin standalone on a subdomain. (This also gives you the added benefit of opting to utilize their cloud hosting.)
– Alex Howansky
Nov 14 '18 at 22:23
1
That's out of the question. The forum needs to be integrated, not standalone.
– Sinus Mackowaty
Nov 14 '18 at 22:25
Define integrated.
– Alex Howansky
Nov 14 '18 at 22:26
I never like doing this but have you considered using (i)frames?
– user10226920
Nov 14 '18 at 22:27
@AlexHowansky Integrated, as in: looking and functioning exactly as part of the site, not as a separate feature. For example the logged-in user's name and avatar is handled as part of the core site, and needs to remain so. Cloud hosting would completely disable that.
– Sinus Mackowaty
Nov 14 '18 at 22:33