1
Kalobotz
Would it be possible to make the modules load only and not the whole page on every buitton click?
  • 2004/5/28 18:30

  • Kalobotz

  • Not too shy to talk

  • Posts: 133

  • Since: 2004/5/26


Does the entire page reload each time? It sends me back to the top of the page on every button click. Is this a cookie setting issue?
Would it be possible to just load in one module at a time and not have the site send me back to the top of the page.
Also, what is the best to set the cache size for each block? Everything seemed slow a little until I set each block at 30 seconds cache then the site became very fast.

2
ajaxbr
Re: Would it be possible to make the modules load only and not the whole page on every buitton click
  • 2004/5/29 0:31

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Short answer: yes, just like with any other page that you want to update only in part, by using a frameset or iframes.

Long answer: err... I don't have one yet, but you could take a look at this story.

edit: also check this post. I'll try this theme based approach first.

3
Kalobotz
Re: Would it be possible to make the modules load only and not the whole page on every buitton click
  • 2004/5/29 22:25

  • Kalobotz

  • Not too shy to talk

  • Posts: 133

  • Since: 2004/5/26


Ok.I'll check that out. I also noticed that in Netscape the screen does not flah on button click while in Explorer it does. Would you know why?

Here is the sight where is does that:
http://www.thinkresults.com

4
ajaxbr
Re: Would it be possible to make the modules load only and not the whole page on every buitton click
  • 2004/5/29 23:45

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Well it doesn't flash in my IE (6.0) nor in my Mozilla (1.6), but I believe you'll notice "flashing" in any browser when the page loads slowly: the whole page is downloaded for each link you click.

I've found an easy way to split your XOOPS site in frames, but I didn't have the time to solve some small problems and this will make a site very hard to navigate without the menu frame being loaded.

Anyway, here's what I got so far:

1st- Clone your default template and give the new one a cool name (like "framed").
2nd- Edit system_block_user.html, system_block_mainmenu.html, system_block_themes.html and add
target="content"

to any or tag in them (and to any other system block template).

So far, no harm done. From now on, be very carefull and never do this to a production site until we discuss this method a lot.

3rd- Go to your blocks admin and choose what you'll display in the menu frame as left blocks, to be displayed in Top Page only (edit each of these items individually).

3rd and a halfth- I didn't try this with any righ blocks on, so be warned that they might spoil everything. No block should be visible on all pages

4th- System admin->Preferences: set default template to "framed" (or whatever you named it) and "update theme files" to "yes".

5th- Copy the Default theme to a new folder under /themes, something like /framed. Copy this stuff below and sabe as /framed/theme.html (overwriting your original theme.html file inside /framed/ )
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<
head>
<
meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
<
meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<
meta name="robots" content="<{$xoops_meta_robots}>" />
<
meta name="keywords" content="<{$xoops_meta_keywords}>" />
<
meta name="description" content="<{$xoops_meta_description}>" />
<
meta name="rating" content="<{$xoops_meta_rating}>" />
<
meta name="author" content="<{$xoops_meta_author}>" />
<
meta name="copyright" content="<{$xoops_meta_copyright}>" />
<
meta name="generator" content="XOOPS" />
<
title><{$xoops_sitename}> - <{$xoops_pagetitle}>title>
<
link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
<
link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
<
link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />

<
script type="text/javascript">

script>
head>
<
body>
  
  <
table cellspacing="0">
    <
tr>
        <{if 
$xoops_lblocks != ""}>

      <
td id="leftcolumn">
        
        <{foreach 
item=block from=$xoops_lblocks}>
          <{include 
file="default/theme_blockleft.html"}>
        <{/foreach}>
        

      td>

        <{/if}>
<{if 
$xoops_ccblocks != "" || $xoops_clblocks != ""}>
      <
td id="centercolumn">
<{
$xoops_ccblocks}> <{$xoops_clblocks}> <{$crblocks}>
        
        <{if 
$xoops_showcblock == 1}>

        <
table cellspacing="0">
          <
tr>
            <
td id="centerCcolumn" colspan="2">

            
            <{foreach 
item=block from=$xoops_ccblocks}>
              <{include 
file="default/theme_blockcenter_c.html"}>
            <{/foreach}>
            

            td>
          tr>
          <
tr>
            <
td id="centerLcolumn">

            
              <{foreach 
item=block from=$xoops_clblocks}>
                <{include 
file="default/theme_blockcenter_l.html"}>
              <{/foreach}>
            

            td><td id="centerRcolumn">

            
              <{foreach 
item=block from=$xoops_crblocks}>
                <{include 
file="default/theme_blockcenter_r.html"}>
              <{/foreach}>
            

            td>
          tr>
        table>

        <{/if}>
        
      td>
      <{/if}>

      <
td>
        <
div id="content">
          <{
$xoops_contents}>
        div>
      td>


      <{if 
$xoops_showrblock == 1}>

      <
td id="rightcolumn">
        
        <{foreach 
item=block from=$xoops_rblocks}>
          <{include 
file="default/theme_blockright.html"}>
        <{/foreach}>
        
      td>


      <{/if}>
    tr>
  table>

body>
html>


Now... if your test site still works, you have to create a frameset page, say main.html, with the following:
xml version="1.0" encoding="iso-8859-1"?>


Testing XOOPS Framed


 
    
 
  
<body> <br />No frames? Too bad. <br /></body>


If you log to your site after doing everything above, it'll look pretty bad. If you're already logged, it should look ok.

Make sure that the id and name values for your content frame is the same as what you have as target in your new templates.

What needs to be done:
make login work
find a nice way to include header/footer outside of the contents frame (pretty easy to put them in there as it is)
figure out how to update menus (e.g. add submenu items, show "for registered users only" items, etc., perhaps same problem as login)

5
phppp
Re: Would it be possible to make the modules load only and not the whole page on every buitton click?
  • 2004/5/30 0:46

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


well, you can use javascript to reduce flash.
though I would suspect if it is worthy

6
ajaxbr
Re: Would it be possible to make the modules load only and not the whole page on every buitton click
  • 2004/5/31 11:06

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Quote:

phppp wrote:
well, you can use javascript to reduce flash.
though I would suspect if it is worthy


Wouldn't javascript help only if the content could be preloaded? Otherwise, the page still has to be redrawn (at least in IE), no?

But that might be a very good way to display sub menus, I have to look at that.

In a couple hours I'll be trying to improve this framing stuff, any ideas are most welcome!

7
ajaxbr
Re: Would it be possible to make the modules load only and not the whole page on every buitton click
  • 2004/6/2 4:54

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Starting to get it...
By adding a token ("?framed=Wk4O92Datu2Z1Lrp") to the frame src in the wrapper page, it seems possible to create a framed XOOPS theme that degrades gracefully in a no-frames scenario
if I'm framed or came from the framed "menu": { 
  if I'
m index.phponly show left blocks;
  else: 
show center block only;
 } ;
else: 
behave like a normal XOOPS site


But this can cause problems if the user is using frames but has referers disabled

table cellspacing="0">
    <
tr>
<{if 
$smarty.server.HTTP_REFERER == "http://XOOPSROOT/Wrapperpage" || $smarty.server.HTTP_REFERER == "http://XOOPSROOT/index.php?framed=Wk4O92Datu2Z1Lrp"}>
<{if 
$smarty.server.PHP_SELF == "/html/index.php"}>
      <
td id="leftcolumn">
        
        <{foreach 
item=block from=$xoops_lblocks}>
          <{include 
file="default/theme_blockleft.html"}>
        <{/foreach}>
        

      td>
<{/if}>
<{else}>
       <
td id="leftcolumn">
        
        <{foreach 
item=block from=$xoops_lblocks}>
          <{include 
file="default/theme_blockleft.html"}>
        <{/foreach}>
        

      td>
      <{/if}>


edit:
Now, if we take this same approach to menu links (in their template) we'd get a even better result. Making Login stuff load in the left frame might solve login problems, anyone has any ideas regarding submenus?

8
Kalobotz
Re: Would it be possible to make the modules load only and not the whole page on every buitton click
  • 2004/6/4 3:08

  • Kalobotz

  • Not too shy to talk

  • Posts: 133

  • Since: 2004/5/26


Ok. This should help out allot!

The main reason for asking this question was that the page was flashing allot on every button click only in my MS Browser.

Happy Xooping!

Login

Who's Online

166 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 166


more...

Donat-O-Meter

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

Latest GitHub Commits