SimplePortal

Support => English Support => Topic started by: PokemonS on March 15, 2014, 06:52:43 AM

Title: Standalone for shoutbox
Post by: PokemonS on March 15, 2014, 06:52:43 AM
SMF 2.0.6
SP 2.3.5

Hi,

I want a single PHP page of a shoutbox, without theme enabled.
Is it possible? Can someone make it?

It's enhanced for chat in phone.

Thanks!
Title: Re: Standalone for shoutbox
Post by: Cal on March 21, 2014, 10:39:40 AM
This is the code I use for a mobile-friendly shoutbox.  It's a little awkward (note the refresh meta tag; that's pretty ugly, and unless you have unlimited data you probably want to take that out), but it suits my purposes.  I highly recommend moving the shoutbox input to the top (http://simpleportal.net/index.php?topic=5031), also.

Code: [Select]
<?php require("SSI.php"); ?>
<html>
        <head>
                <title>Chatbox</title>
                <meta http-equiv="refresh" content="60">
                <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
                <link type="text/css" rel="stylesheet" media="all" href="Themes/default/css/index.css">
                <style>
                        ul, li { list-style-type: none; margin-left: -20px;}
                        body { margin: 5px; background: #FFFFFF;}
                        .shoutbox_input { width: 83%;}
                        .shoutbox_input_shout { width: 100% !important; margin-top: 3px;}
                        .cat_bar { display: none; }
                </style>
        </head>
        <body>
<?
require_once("Themes/default/Portal.template.php");
require_once("Sources/Subs-Portal.php");

$block = current(getBlockInfo(false, ID, false, false));  // ID is the id of the block containing your shoutbox
$block['style'] = sportal_parse_style('explode', $block['style'], false); 
template_block($block);

?>
        </body>
</html>
Title: Re: Standalone for shoutbox
Post by: AngelinaBelle on April 08, 2014, 01:52:02 PM
PokemonS -- did that help?
Title: Re: Standalone for shoutbox
Post by: PokemonS on April 12, 2014, 01:05:39 AM
Thanks Cal! That's helped me a lot. :D
I forget to solve this thread.
Title: Re: Standalone for shoutbox
Post by: AngelinaBelle on April 14, 2014, 09:33:17 AM
I'm glad to find out Cal helped you.
Thanks for marking this thread "solved".

SimplePortal 2.3.8 © 2008-2024, SimplePortal