MyBB Community Forums

Full Version: DVZ Shoutbox on Portal page.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

First, I decided to change the portal page to the default home page. So portal.php is now index.php and the forum page was index.php, now forum.php.

I've got the plugin DVZ Shoutbox running on my forum page (forum.php), but now I want it on the portal page (index.php) too.
Problem is: It doesn't show up.

I tried adding the codes

$plugins->add_hook('global_end', ['dvz_shoutbox', 'global_end']);
$plugins->add_hook('portal_end', ['dvz_shoutbox', 'portal_end']);

to the plugins file, but it's still not working.

How to solve? Smile
Add these hooks for dvz_shoutbox function in inc/plugins/dvz_shoutbox.php
$plugins->add_hook('global_end', ['dvz_shoutbox', 'global_end']); 
$plugins->add_hook('xmlhttp',    ['dvz_shoutbox', 'xmlhttp']);
$plugins->add_hook('index_end',  ['dvz_shoutbox', 'load_window']);
$plugins->add_hook('portal_end', ['dvz_shoutbox', 'load_window']);

Open theme template portal to edit.

Search for view above announcements:
<td valign="top">
{$announcements}
{$multipage}

Replace whole part with:
<td valign="top">
{$dvz_shoutbox}
{$announcements}
{$multipage}

or

Search for full width view:
<body>
{$header}

Replace whole part with:
<body>
{$header}
{$dvz_shoutbox}


and attach the theme css file dvz_shoutbox.css also to portal.php
[attachment=33597]
(2015-01-24, 02:46 PM)SvePu Wrote: [ -> ]Add these hooks for dvz_shoutbox function in inc/plugins/dvz_shoutbox.php

$plugins->add_hook('global_end', ['dvz_shoutbox', 'global_end']); 
$plugins->add_hook('xmlhttp',    ['dvz_shoutbox', 'xmlhttp']);
$plugins->add_hook('index_end',  ['dvz_shoutbox', 'load_window']);
$plugins->add_hook('portal_end', ['dvz_shoutbox', 'load_window']);

Open theme template portal to edit.

Search for view above announcements:

<td valign="top">
{$announcements}
{$multipage}

Replace whole part with:

<td valign="top">
{$dvz_shoutbox}
{$announcements}
{$multipage}

or

Search for full with view:

<body>
{$header}

Replace whole part with:

<body>
{$header}
{$dvz_shoutbox}


and attach the theme css file dvz_shoutbox.css also to portal.php

It works!
Thank you very much Big Grin

I don't know when this happened, but suddenly my 'recent posts' box content also doesn't show up.
Does this have something to do with changing file names? Or the DVZ Shoutbox?

[Image: KBUwwog.png](It's Dutch)
^ which theme you are using ?
custom code in index template gets latest threads content from actual portal.php file.
you have to change the file name in index template code to get the latest threads content back.
(2015-01-24, 03:58 PM).m. Wrote: [ -> ]^ which theme you are using ?
custom code in index template gets latest threads content from actual portal.php file.
you have to change the file name in index template code to get the latest threads content back.

It's the 'Vienna' theme.
That box used to show latest activity, so recent posts, not threads.
When I change 'forum.php' back to 'index.php' it still doesn't work.
^ please check by renaming portal page file as original portal.php
(2015-01-24, 04:45 PM).m. Wrote: [ -> ]^ please check by renaming portal page file as original portal.php

Thanks, it worked.
But how to set portal.php as default homepage?

Nvm!
I added 'DirectoryIndex portal.php index.php index.html' to htaccess, now it all works correctly Smile
Thanks for your help
Hi I had created page, how can i display shoutbox in those pages?
forum.inserver.in/banlist.php