SimplePortal
Customization => Custom Coding => Topic started by: dusst on November 30, 2011, 02:42:40 PM
-
Hi, would like to know if it is possible to insert the SOUTBOX SimplePortal on a website external to the forum, as a main web html or php made using SSI as is done to add several things on the forum.
thank you :)
-
SSI does not contain everything needed for running a shoutbox.
So I would suggest there MIGHT BE simpler ways to achieve this, depending on how your website is set up and how you wish it to be set up.
First, though, "a website external to the forum" is going to have to be within the same domain. SMF simply won't work across domains.
Next, well, let's talk. Are you running SimplePortal in standalone or frontpage mode?
-
Portal Mode: standalone
My main site is in the same domain as the forum is a simple website in HTML.
web = www . xxxxxx . com
forum = www . xxxxxx . com/smf
-
Would it work OK to put the shoutbox on a simpleportal page by itself?
Or do you already have other parts of your website you wish to put it on?
-
The shoutbox of SimplePortal works on the site and integrated into any part of the forum.
Before I had a website with parts of the forum, using SSI, but not anymore, because now I have a simple website and putting soutbox would be nice if possible.
Things could smoothly insert the forum, shoutbox but can not.
-
Can you put a shoutbox in my forum Main Site, as if using SSI?
-
For me, this would be a little bit difficult to accomplish, since I have not done this before.
I would begin by using some of the ideas from the blog posts on blocks-in-blocks.
http://simpleportal.net/index.php?topic=5332.0
So, if your shoutbox is in block 49, you would use
$block = current(getBlockInfo(false, 49, false, false)); // Load block info
$block['style'] = sportal_parse_style('explode', $block['style'], true); //Parse block style parameters.
template_block($block); // Output the block.
You would put these lines of code where you want the block to appear on your page.
Of course, before making these calls, you would have to make sure php knew what these functions
getBlockInfo, sportal_parse_style, and template_block are.
So I searched all my files and found out that
function template_block is in Portal.template.php (in your default Themes folder)
function sportal_parse_style is in Subs-Portal.php
function getBlockInfo is in Subs-Portal.php
You would need to require_once each of these files just before you want to use them.
You will need to use the correct path to get to these files.
If you try this, something might not be quite right, because I have probably forgotten something important. It will take a little bit of debugging to get it just right.