Author |
Message |
sexycoder
Spammer and overall low life

Joined: Feb 02, 2009
Posts: 82
|
Posted:
Mon Feb 02, 2009 10:10 am |
|
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! |
|
|
|
 |
jakec
Site Admin

Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Mon Feb 02, 2009 11:23 am |
|
Turn on error reporting and see if you are receiving any errors. |
|
|
|
 |
spasticdonkey
RavenNuke(tm) Development Team

Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Mon Feb 02, 2009 12:46 pm |
|
What script you using for the menu? |
|
|
|
 |
sexycoder

|
Posted:
Mon Feb 02, 2009 1:46 pm |
|
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
|
Posted:
Mon Feb 02, 2009 2:23 pm |
|
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. |
|
|
 |
jakec

|
Posted:
Tue Feb 03, 2009 1:22 am |
|
Can you also confirm if the block is using $dbi anywhere? |
|
|
|
 |
spasticdonkey

|
Posted:
Tue Feb 03, 2009 9:46 am |
|
|
|
 |
sexycoder

|
Posted:
Tue Feb 03, 2009 2:55 pm |
|
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

|
Posted:
Fri Feb 06, 2009 10:23 am |
|
Any suggestion about this block? |
|
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Fri Feb 06, 2009 8:03 pm |
|
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 |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
 |
spasticdonkey

|
Posted:
Sun Feb 08, 2009 5:53 am |
|
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";
|
|
|
|
|
 |
|