Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> JavaScript
Author Message
sexycoder
Spammer and overall low life



Joined: Feb 02, 2009
Posts: 82

PostPosted: Mon Feb 02, 2009 10:10 am Reply with quote

Hello to everyone. I installed a navigation menu (which works with javascript) in the last version of RN 2.30. I wonder if I can fix this issue since I am using a block which use javascript. The install went fine, everything seems to work, but as for content displaying inside the block, I've got nothing. I created a couple of links to try it out, they show up in the admin area, but inside the block, nothing. Just an empty block. Any ideas where I might start looking for the problem?

Thanks in advance!
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Mon Feb 02, 2009 11:23 am Reply with quote

Turn on error reporting and see if you are receiving any errors.
 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Mon Feb 02, 2009 12:46 pm Reply with quote

What script you using for the menu?
 
View user's profile Send private message Visit poster's website
sexycoder







PostPosted: Mon Feb 02, 2009 1:46 pm Reply with quote

No, I am not getting any error but when u talk about turning on the error reporting.

Are u talking about config.php where

Code:
$display_errors = false;


$display_errors = true;


This is the only way I can do.I guess because I was looking for inside ADMINISTRATION CONTROL PANEL but I didnt see anything there to activate.
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Feb 02, 2009 2:23 pm Reply with quote

It is probably a javascript problem and that is not going to show up as an error in PHP.

Can you provide us a link to a download of the menu you are trying to use?

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
jakec







PostPosted: Tue Feb 03, 2009 1:22 am Reply with quote

Can you also confirm if the block is using $dbi anywhere?
 
spasticdonkey







PostPosted: Tue Feb 03, 2009 9:46 am Reply with quote

Are you using Sommaire?
 
sexycoder







PostPosted: Tue Feb 03, 2009 2:55 pm Reply with quote

This is the block. I did some tests today adding more html tags to my config.php and I dont get it to work.

This is the block

Code:
global $db, $prefix;


$content .=   '<link rel="StyleSheet" href="blocks/wsnavlinks/dtree.css" type="text/css" />';
$content .= '<script type="text/javascript" src="blocks/wsnavlinks/dtree.js"></script>';


$content .="<div class=\"dtree\">

   <script type=\"text/javascript\">
      <!--

      d = new dTree('d');";
$content .="d.add(0,-1,'Main Menu');";
$sql = sprintf("SELECT * FROM %s_ws_nav_links WHERE sub <1 ORDER BY main_order ASC",
                $prefix);
      $result = $db->sql_query($sql);
      $num = $db->sql_numrows($result);
      for($r =0; $r <$num; $r++){      
   $row = $db->sql_fetchrow($result);
   $k = $r+1;
   if($row['link_url'] !=''){
$content .="d.add(".$k.",0,'".$row['link_name']."', '".$row['link_url']."', '".$row['link_desc']."');";
}else{
$content .="d.add(".$k.",0,'".$row['link_name']."', '', '".$row['link_desc']."');";
}


$sql2 = sprintf("SELECT link_desc, link_name, link_url FROM %s_ws_nav_links WHERE sub='%d' ORDER BY sub_order ASC",
                $prefix, $row['lid']);
      $result2 = $db->sql_query($sql2);
      $num2 = $db->sql_numrows($result2);
   if($num2 >0){
      
for($t =0; $t <$num2; $t++){
$y = $t+1;
$u = $num+$y;
$row2 = $db->sql_fetchrow($result2);
$content .="d.add(".$u.",".$k.",'".$row2['link_name']."','".$row2['link_url']."', '".$row2['link_desc']."');";

}

}

}
$content .="document.write(d);

      //-->
   </script>

</div>";


I noticed u cant expand your code here! oops
 
sexycoder







PostPosted: Fri Feb 06, 2009 10:23 am Reply with quote

Any suggestion about this block?
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Fri Feb 06, 2009 8:03 pm Reply with quote

Your code seems to be fine. phpNuke shouldn't be filtering that if you're using a file block

We'll need to see the actual HTML generated on your site to determine where the problem is. Please activate this block on your site so we can take a look

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
spasticdonkey







PostPosted: Sun Feb 08, 2009 5:53 am Reply with quote

it may not be correctly loading the stylesheet as it shouldn't really be loaded from within the block file. you might try removing these 2 lines from the block
Code:
$content .=   '<link rel="StyleSheet" href="blocks/wsnavlinks/dtree.css" type="text/css" />';

$content .= '<script type="text/javascript" src="blocks/wsnavlinks/dtree.js"></script>';

and adding these lines to includes/javascript.php
Code:
echo '<link rel="StyleSheet" href="blocks/wsnavlinks/dtree.css" type="text/css" />'."\n";

echo '<script type="text/javascript" src="blocks/wsnavlinks/dtree.js"></script>'."\n\n";
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> JavaScript

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©