1
fulconarrow
Displaying SMF in Xoops?

Hi gents,

I have a XOOPS website and recently moved away from phpbb as our host includes a supported forum in our package. With phpbb it would be displayed within the template. With SMF i know you need to include the mainfile, header and footer in the index.template.php file of the SMF theme.

Xoops is pirmarily on the website in the first directory, but SMF is installed in a secondary directory called Forum2. I need to put the include path php code in but i dont know where in the index.template.php to place them or exactly what paths to use.

SMF are struggling to solve this one, any help on this subject would be good. Here is my current code:

[code]
// Version: 1.1 RC1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context, $settings, $options, $txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1 RC1';
}

// The main sub template above the content.

function template_main_above()

include("/home/soloel2/public_html/mainfile.php");
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

// Show right to left and the character set for ease of translating.
echo '






', $context['page_title'], '';

// The ?rc1 part of this link is just here to make sure browsers don't cache it full of wronfulness.
echo '

';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
';

// Show all the relative links, such as help, search, contents, and the like.
echo '


';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '

';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '


';

include("/home/soloel2/public_html/header.php");

echo'










';

template_menu();
echo'




*

















';
}

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

include("/home/soloel2/public_html/footer.php");

echo '



';

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '










', theme_copyright(), '
';

// Show the load time?
if ($context['show_load_time'])
echo '
', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '';

echo '
' , $context['user']['is_admin'] ? 'Go to Admin Center' : '' , '





Theme © by Tippmaster


';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
';
}

echo '



'
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Show the [home] and [help] buttons.
echo '
', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator'], '
', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $txt[119]), '', $context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
', ($settings['use_image_buttons'] ? '' . $txt[182] . '' : $txt[182]), '', $context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
', ($settings['use_image_buttons'] ? '' . $txt[2] . '' : $txt[2]), '', $context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
', ($settings['use_image_buttons'] ? '' . $txt[79] . '' : $txt[467]), '', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
', ($settings['use_image_buttons'] ? '' . $txt['calendar24'] . '' : $txt['calendar24']), '', $context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
', ($settings['use_image_buttons'] ? '' . $txt[34] . '' : $txt[34]), '', $context['menu_separator'], '
', ($settings['use_image_buttons'] ? '' . $txt[97] . '' : $txt[97]), '';
}
// Otherwise, they might want to [logout]...
else
echo '
', ($settings['use_image_buttons'] ? '' . $txt[108] . '' : $txt[108]), '';
}

?>
[code/]

2
fulconarrow
Re: Displaying SMF in Xoops?

Sorry i thought id better mention i only want this forum to display in the site, i dont want FULL intergration of usernames etc.

3
gediminasbyt
Re: Displaying SMF in Xoops?

Is iframe an option in your case or you need just a staticp link to you forum be displayed?

If an iframe just create an iframe block on your site.

4
fulconarrow
Re: Displaying SMF in Xoops?

Perfect 'idea@. Just tried it: http://www.solo-elite.com/modules/myiframe/index.php?iframeid=1 As you can see it works well but i want it to stretch the website template and NOT create scroll bars. I messed about with the margin settings etc but they didnt do anything. Will myiframe 1.4 be any better for this if so where can i download it?

Login

Who's Online

429 user(s) are online (56 user(s) are browsing Support Forums)


Members: 0


Guests: 429


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits