Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: [1] 2

Author Topic: Frames with sNews cause some odd errors upon clicking links.  (Read 5590 times)

Buhmanator

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 52
Frames with sNews cause some odd errors upon clicking links.
« on: October 10, 2007, 02:33:16 am »

Hello all,

     In the website I am creating, I am trying to make music play and continue playing even if the viewer clicks different links.  Currently, I have converted my mp3 to a swf (with Flash CS3 Professional which may or may not be a legal copy [cough]) and I load the flash file in a separate frame (as small as I can make it) to make the music keep playing while different pages load.  When you click other links however, it appears that the number of frames multiply and the actual page fails to load (silently).  Is there a way to remedy this? or is there a different way to load music and have it play through different pages.  Any help would be hot.

So Long,
Zack
« Last Edit: October 10, 2007, 02:35:40 am by Buhmanator »
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #1 on: October 10, 2007, 09:19:27 pm »

Can we see some code from the output of your page, please.
Logged
Yes! I have no siggy.

Buhmanator

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 52
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #2 on: October 11, 2007, 01:10:06 am »

Hello all,

     Here is the frameset [index.php].  You may visit the site yourself to see the error at: http://zjblabs.co.nr/
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<frameset rows="0,700" cols="*">
  <frame src="frame.php" />
  <frame src="index1.php" />
</frameset>
<noframes><body>
</body>
</noframes></html>
Here is the music frame (frame.php) :
Code: [Select]
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','1','height','1','src','music/Music','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','music/Music' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="1" height="1">
  <param name="movie" value="music/Music.swf" />
  <param name="quality" value="high" />
  <embed src="music/Music.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1" height="1"></embed>
</object></noscript>
</body>
</html>
Finally, here is the actual site (index1.php):
Code: [Select]
<?php session_start(); include('snews.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<?php title(); ?>
<meta name="Robots" content="index,follow" />
<meta name="Generator" content="sNews 1.6" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-articles/" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-pages/" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss-comments/" />
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>

<div id="topbar">
<div class="content">
<div id="icons">
<a href="/" title="Home page"><img src="images/home.gif" alt="Home" /></a>
<a href="/contact/" title="Contact us"><img src="images/contact.gif" alt="Contact" /></a>
<a href="/sitemap/" title="Sitemap"><img src="images/sitemap.gif" alt="Sitemap" /></a>
</div>
<div class="url">
<a href="#" title=""><?php echo s('website_title'); ?></a>
</div>
            <div>
</div>
  </div>
</div>

<div id="top">
<div class="content">
<div id="menu">
<ul>
                <li><a href="/" title="Articles"><span>Home</span></a></li>
<li><a href="/archive/" title="Gallery"><span>Archive</span></a></li>
<li><a href="/contact/" title="Affiliates"><span>Contact</span></a></li>
<li><a href="/sitemap/" title="Articles"><span>Site Map</span></a></li>
</ul>
</div>
<h1><a href="#" title="">ZJB Labs</a></h1>
<h2>Smarter Choice</h2>
<?php searchform(); ?>
  </div>
</div>


<div class="content">
<div id="main">
<div class="right_side">
<div class="pad">
<h3>Thank you for visiting!</h3>
<p>
ZJBLabs.com was created on the 6 of October 2007.
  </p>
<h3>Latest News:</h3>
<ul>
<?php menu_articles(0,3); ?>
</ul>
<h3>New Comments:</h3>
<ul>
<?php new_comments(530); ?>
</ul>

<a href="/rss-articles/" title="RSS Feed"><img src="images/rss.jpg" alt="RSS Feed" /></a>

</div>
</div>


<div class="right_side">
<div class="pad">
<h3>Directory</h3>
  <ul>
<?php categories(); ?>
</ul>
  <h3>Warzung Latest Release: </h3>
<p>Warzung 0.0.1.0</p>
        <h3>Overview of Warzung:</h3>
  <p>Warzung is a 3D development role playing game that will feature next generation technologies. The game will feature a vivid learning AI that adjusts to the user's skill to make it a truly immersive and thrilling role playing game.</p>
       
  </div>
</div>

<div id="left_side">
<div class="intro">

</div>
<div class="mpart">
            <?php center(); ?>
                <?php extra(); ?>
  </div>
</div>
</div>
<div id="footer">
        <?php breadcrumbs(); ?>
      <br />
<div class="right">&copy; Copyright 2007, ZJB Labs</div>
        <?php login_link(); ?>
<?php rss_links(); ?>
           
</div>
</div>
</body>
</html>

So Long,
Zack
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #3 on: October 11, 2007, 02:34:55 am »

http://w3schools.com/tags/tag_frame.asp
http://w3schools.com/tags/tag_a.asp

I think you are lacking the frame "target". If you want the main frame to open in 'itself', use target="_self" in the anchor tag.
Logged
Yes! I have no siggy.

Buhmanator

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 52
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #4 on: October 11, 2007, 02:41:48 am »

Hello again,

     jlhaslip: I'm not sure what you mean, but I think you want me to format all of my links like this <a href="link.htm" target="target.htm">Link Text</a>.  I don't think you really understand my problem (just a hunch).  I looked at your links, and the only visible difference is it opens a new tab by including the target in the link.  I can simulate this by right clicking and click open in a new tab.

    Have you looked at the site?  I believe it is something to do with sNews.php because it works just fine without the sNews.php script (just no content on the site).

    Its actually very perplexing, why in the world would I get a result of an excess of 6 frames by clicking a link?  Logically, I think only 1 additional frame should open.  Though if I'm wrong, I would love someone to tell me what is really happening.

Goodbyes,
Zack

« Last Edit: October 11, 2007, 02:47:43 am by Buhmanator »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #5 on: October 11, 2007, 03:12:42 am »

I notice that all links to other pages or comments leads to a blank page. You noted that your template file is called index1.php and... if this is so... that's what causes the blank pages since the .htacess file is (by default) creating SEF links that include index.php... not index1.php. Besides... Apache isn't able to recognize index1.php as a default 'home' page... it only looks for index pages.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #6 on: October 11, 2007, 03:37:08 am »

Code: [Select]
<a href="link.htm" target="_self">Link Text</a>

Is what I meant  you to have the links changed to. The link  needs to have a place to go. The default is a new window (or tab, depending on your Browser).
Yes I had looked at your  site, and totally missed the point which keyrocks made about the php extension and the relationship sNews has with .htaccess.
Please understand that I was only trying to assist, based on my experience, which does not (yet) include a full understanding of the intricacies of sNews.
I'm learning a little at a time, and this discussion will be noted and, hopefully, registered, as a step on the learning curve.
And I have no clue why 6 pages open.

keyrocks,
An .htaccess entry can change the filename of the default home page. But, as you say, sNews looks for index.php. And the 'hidden' frame technique is the only way I can think of to have a persistent Music Player across pages. Ajax, perhaps?
« Last Edit: October 11, 2007, 03:43:46 am by jlhaslip »
Logged
Yes! I have no siggy.

Joost

  • Guest
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #7 on: October 11, 2007, 03:58:46 am »

or is there a different way to load music and have it play through different pages.  Any help would be hot.
Just a thougth: How about  using iframes? I never use it myself, so I don't know how it behaves. Would it reload on every page and stop the music or just go on?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #8 on: October 11, 2007, 02:20:31 pm »

or is there a different way to load music and have it play through different pages.  Any help would be hot.
Just a thougth: How about  using iframes? I never use it myself, so I don't know how it behaves. Would it reload on every page and stop the music or just go on?
I have done one site with the iframe method. This site has a fixed header using the iframe. I have not tried it but... I am assuming... that if one might be able to include the music-player doo-hickie within the header (on that particular site) and it should stay playing all the time while the pages change in the panel below the header. So... I also assume that whatver Iframe structure one might use... putting the music doo-hickey in the part that never changes would do the trick. But... again... I've never tried it so it is only a hunch.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Buhmanator

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 52
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #9 on: October 11, 2007, 02:23:40 pm »

Hello,

     Well everyone, my dilema with changing the filename from index1 to index, is that the frameset needs to be index for apache to load it first.  So how would I fix this?  I do realize now that sNews must be pointing to index.php (a no-duh realization).  I wonder what I would have to do to load the frameset first, but have the template labeled index.php?

     Keyrocks, that iframe deal you have sounds interesting.  How do you make the iframe with a static header?

Very boggled,
Zack
« Last Edit: October 11, 2007, 02:26:30 pm by Buhmanator »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #10 on: October 11, 2007, 02:41:59 pm »

@ Buhmanator... that particular site is a static one, done a few years ago in FrontPage 2003. FrontPage generated the fixed parts in a separate file, pretty much like you had done... so that is still an issue as the fixed part and scrollable bottom part load separately.

Now... here is an sNews 1.6 template I have working with one of six online demos running as modules using my MEMU package with Bob Baker's template switch system. This one has a fixed header and footer using Stu Nicholl's CSS Frame Layout. This keeps it all in one template file rather than splitting it up. Perhaps this might work, if you were to have your music doo-hickey script within the fixed header portion of the template (index.php) file somehow.

If you have a copy of my latest MESU package running on your local-machine, you can download and install a bare-bones generic copy of this template from the "Drop-in Templates" part of - this post - and simply add it to the MESU templates folder to experiment with. To switch templates from the Admin Panel, choose "Settings" then scroll down and expand the "Templates" panel & choose it from the drop-down & save..
« Last Edit: October 11, 2007, 04:55:52 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Buhmanator

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 52
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #11 on: October 17, 2007, 01:31:08 am »

Hello,

     Well, I was already planning to switch to the multi-user version and it looks like it has the same enhancements.

     I have successfully made static frames. 

     BTW:  I love everyone at the sNews forum, I have never gotten so much help from a forum (for anything) in my life!

Thanks,
Zack
« Last Edit: October 17, 2007, 03:02:57 am by Buhmanator »
Logged

Joost

  • Guest
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #12 on: October 17, 2007, 01:46:27 am »

Stu's frame replacement doesn't do what Buhmanator intends to do: Keep the music going.
Stu's frame replacement fixates the frame visual, but reloads over and over when visiting other pages. So the music will restart on each call.
Logged

Buhmanator

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 52
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #13 on: October 17, 2007, 01:48:57 am »

Hello,

      Joost:  Oh, I realize that now.  Well its at least an improvement because it only plays on home sef.  Soo, how do we solve this boggle?

Hmm,
Zack
« Last Edit: October 17, 2007, 03:04:02 am by Buhmanator »
Logged

jlhaslip

  • Sr. Member
  • ****
  • Karma: 16
  • Posts: 374
    • My snews with AEF Forum site
Re: Frames with sNews cause some odd errors upon clicking links.
« Reply #14 on: October 17, 2007, 08:01:38 am »

Have a look at  http://jlhaslip.trap17.com/snews/ and click on the Forum link.
The Forum is inside an I-frame. Does that help? I haven't checked to see if the outer frame actually refreshes if the Forum is actively changing the I-frame contents.
The instructions for including the Forum are here: http://snewscms.com/forum/index.php?topic=5993.0

Could be that if this approach is used that you might be able to achieve what you want? Sorry that I don't have time to perform a test on it right now...

Just thought it might be an approach that could be worth looking at.
Logged
Yes! I have no siggy.
Pages: [1] 2