Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 922
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Auto refresh

Started by wiecher, April 14, 2011, 05:33:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wiecher

Is it possible to auto refresh only a block ?
In PHP script ?

AngelinaBelle

Auto-Refreshing only a block would require some way of getting that block's information asynchronously.
This could be done if
1) the block contained an iframe (which is a way to include an entire web page)
2) the block were specially written for dynamic, asynchronous updating using some combination of javascript on the browser side and something like XML or JSON on the server side. The shoutbox, for example, is done in AJAX (asynchronous javascript and XML).
This would be a bit of a custom coding project.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

wiecher

It is for a Ajax chat block.
Sorry for mi bad english.

AngelinaBelle

I think maybe I understand.
It is possible to put an AJAX chat box in a php block.
The result would be similar to the SimplePortal shoutbox in a SimplePortal shoutbox block.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

wiecher

This is my block php...

<?php
global $txt,$context,$boarddir;

//Ajax Chat | belongs to Smart Shoutbox Detection Block for Simple Portal <> by Blue @ Chrome!
if (file_exists($boarddir . '/chat/lib/'))
{
   if (allowedTo('shout_access')){
      echo'
         <div id="ShoutBox">
            ', getShoutBoxContent() ,'
         </div>';
     }
   elseif($context['user']['is_guest'])
      echo $txt['yshout_no_guests'];
}
?>

AngelinaBelle

Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

wiecher


AngelinaBelle

I'm glad to hear it. I've marked the topic solved.
Thanks for sharing!
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

wiecher

Quote from: AngelinaBelle on April 18, 2011, 08:25:53 AM
I'm glad to hear it. I've marked the topic solved.
Thanks for sharing!
No sorry auto refresh don`t work with the code.

AngelinaBelle

Sorry to hear the block does not work great.
It could be tricky to track the problem down. This problem may or may not be related to SimplePortal itself.
I am assuming you got this code from http://simpleportal.net/index.php?topic=2233.0 or one of the topics that referred to it. If I had this installed on my forum, I would be thinking:
1) Is this code out of date? That post is from 2009. Maybe something about AjaxChat has changed, and I should check what code AjaxChat would add to my forum to accomplish the same thing.
2) Is there some javascript problem with AjaxChat. I would turn debugging on and look for any javascript errors.
3) Does this problem occur for everyone, or is it only a problem for certain browsers, for certain members, or does it only happen from certain IP addresses (problem with proxy or firewall, etc.).
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

wiecher

The block is working fine but i want it to auto refresh it.
Yes that is the one http://simpleportal.net/index.php?topic=2233.0
:nervous-happy:

AngelinaBelle

My advice to find the solution to your problem is
* check to see if you get any Javascript errors when the problem occurs
* check if EVERYONE has this problem, or just some users (does it depend on their browser or their location?)
* Check if this is still the proper way to put AjaxChat in your shoutbox. Check the code Ajax chat would add to your template.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?