21
Coplan
Re: Highlighting in NewBB with IE
  • 2004/4/20 15:25

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


What, specifically, should I be checking about the DIV tags?




22
Coplan
Re: Blocks
  • 2004/4/15 3:31

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


Alright...I can't seem to figure it out. Here's the source code for my file:

<?php
/*****************************************************************************
    Tune Tracker Database
    Written Exclusively For: SceneSpot.org
    By:  D. Travis "Coplan" North
    
******************************************************************************/
include_once(XOOPS_ROOT_PATH.'/modules/tunetracker/system.php');

function 
b_tunetracker_current_tunes() {
  global 
$xoopsDB$tt_sinfo$tt_users$tt_songs;

  
// This part is temporary until I get include working
  
$tt_users   $xoopsDB->prefix("users");
  
$tt_sinfo   $xoopsDB->prefix("tt_sinfo");
  
$tt_songs   $xoopsDB->prefix("tt_songs");

  
$block = array();

  
$sth $xoopsDB->query('SELECT *, DATE_FORMAT(s_date, "%b %d %Y") as f_date FROM '.$tt_sinfo.' ORDER BY s_date DESC LIMIT 8') or die (mysql_error());
  
  
$cnt 0;
  while (
$row $xoopsDB->fetchArray($sth)) {
    
$block['tunes'][$cnt]['url'] = XOOPS_URL.'/modules/tunetracker/viewsong.php?id='.$row[sinfo_id];
    
$block['tunes'][$cnt]['s_name'] = $row[s_name];
    
$block['tunes'][$cnt]['date'] = $row[f_date];

    
$a_sth$xoopsDB->query('SELECT uname FROM '.$tt_songs.' LEFT JOIN '
                       
.$tt_users.' ON '.$tt_songs.'.user_id='.$tt_users
                       
.'.uid WHERE sinfo_id="'.$row[sinfo_id]
                       .
'" ORDER BY uname') or die (mysql_error());

    
$ac 0;
    while (
$arow $xoopsDB->fetchArray($a_sth)) {
      if (
$ac >= 1) { $block['tunes'][$cnt]['artist'] .= ', '; }
      
$block['tunes'][$cnt]['artist'] .= $arow[uname];
    
      
$ac++;
    }
  
    
$cnt++;
  }

  return 
$block;
}


?>


system.php has a bunch of subroutines and definitions that I need (such as $tt_sinfo, etc). You'll notice I had to put a little tidbit in there until I can get this file included.

Also....
I discovered another symptom along the way. I can include files from other modules -- just not my module. Anything from this module gets spit out as a blank page containing only "<html><body></body></html>" and nothing more. And it doesn't matter what file I try to include. I checked my directory settings, and everything seems to be okay. Anyone have any more ideas as to why I can't include files in my block?

As always, i appreciate the help.



23
Coplan
Re: Blocks
  • 2004/4/13 20:00

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


None.

Viewsource reveals:

Quote:

<html>
</html>


I'm going to rip out the block file and start from scratch to see what happens. I've gone over the code several times now. It must be a punctuation thing or something. I'll keep you in the loop.



24
Coplan
Re: Blocks
  • 2004/4/13 15:56

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


I tried that...and all I get is a blank screen (no errors, nothing). I'll continue to trouble-shoot...but I have no idea why that one line could cause the problem.



25
Coplan
Re: Highlighting in NewBB with IE
  • 2004/4/13 15:53

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


Actually...it's not limited to the forums.

I did some experimentation with the site. If I change the default theme to the default theme, the behavior ceases. Thats why I thought, perhaps, that it was a theme issue.

So it must be the theme.

Does anyone have any idea what HTML errors could cause such a behavior? I need to tweak my theme so this behavior doesn't happen anymore.



26
Coplan
Highlighting in NewBB with IE
  • 2004/4/13 11:29

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


A couple of my users (at scenespot.org) have been complaining about highlighting within the forums while using IE. They go to highlight one word, and pretty much the whole page seems to highlight.

For the most part, I don't experience the same behavior here.

Is that potentially a theme issue? Or is that a bug that might have been squashed with 2.0.6? I'm currently using 2.0.5 on my site.

Any theories?



27
Coplan
Re: Blocks
  • 2004/4/9 4:57

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


Okay...the module seems to be working pretty well now. The whole $block thing was throwing me for a loop, as it isn't typical of the smarty stuff I've been using for the rest of the module.

I have one more related question though:

My module is set up so that there's a common php script that gets included into each script. This file is called functions.php. In the blocks routines, however, I am not able to include this file.

The blocks file is in "tunetracker/blocks/tt_blocks.php"
The functions script is in "tunetracker/functions.php"

I was using the command "include('../functions.php'), but alas, it doesn't seem to be loading.

What should I do here to be able to include that file?

Thanks for the help.



28
Coplan
Blocks
  • 2004/4/7 5:34

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


Could someone shed some light on the subject of blocks? I'm coding a module, and I want to code some blocks for it. Unfortunately, I can't find the necessary docs in Wiki, and the search hasn't brought up anything useful. Is there some secret documentation somewhere?

I have the block info defined in the xoops_version.php file. I have the block template set up. I even have a function defined within the blocks directory. But at that point, I'm lost. The block (whcih is really just a template file at this point) isn't showing at all...and I have permission to view it, and it is set to visible.

And now I'm just frustrated.

Any help would be greatly appreciated.



29
Coplan
Re: ModDev: PHPSESSID in URL
  • 2004/4/7 2:23

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


I figured it out.

Just a warning...use the internal functions to create the link. In theory, this could have been a bug later on if someone had a different setup than I.

Here's my old code for the link creation:
Quote:

$slink = '<a href="viewsong.php?id='.$id.'">'.$sname.'</a>';


And here's how I do it now (and how it should be done):
Quote:

$slink = '<a href="'.XOOPS_URL.'/modules/tunetracker/viewsong.php?id='.$id.'">'.$sname.'</a>';



My theory is that somehow, either PHP or the HTML passed the POST data into the URL as GET data. Nevermind that, but using the XOOPS_URL fixed all this. NO redundant URL data anymore.


Thanks for the help. Dave_L, your info wasn't the end-all, but it was a definate step in the right direction.



30
Coplan
Re: ModDev: PHPSESSID in URL
  • 2004/4/6 21:08

  • Coplan

  • Just popping in

  • Posts: 51

  • Since: 2002/10/2


No one?




TopTop
« 1 2 (3) 4 5 »



Login

Who's Online

221 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 221


more...

Donat-O-Meter

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

Latest GitHub Commits