Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
bizarre12
New Member
New Member


Joined: Mar 29, 2008
Posts: 22

PostPosted: Sat Mar 29, 2008 8:14 pm Reply with quote

This is really strange problem and i couldn't really find a solution

I have this block,
Code:


if (eregi("block-treemenu.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
global $cookie, $admin, $prefix, $currentlang, $dbi;


 echo '<link rel="StyleSheet" href="blocks/treemenu/sadkjhaskdjh.css" type="text/css" />'."\n";

 

$content  .= <<<_JS_
<script type="text/javascript" src="blocks/treemenu/dtree.js"></script>

<div class="dtree">

   <p align="center"><a href="javascript: d.openAll();">open</a> | <a href="javascript: d.closeAll();">close</a></p>

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

      d = new dTree('d');

ze text
      document.write(d);

      //-->
   </script>

</div>
_JS_;


?>


everything works great, the only problem is that w3c bitching about the <link>, so i removed it from there, put the contect of the css file to style.css in my theme, everything still works great.

the only problem that it breaks firefox,
the "center index" i mean the nuke message and the news section will get mixed with the right blocks (no problem in other browsers).

i didn't really understand why so i tried something, i've put there only <link>, without rel=stylesheet, and href=... and other stuff.
basicly it points no where, there is only <link />

and it works great in firefox, it shows up fine, but w3c still bitching me about that.

so my question how do i fix it?

Only registered users can see links on this board! Get registered or login!












old post
Code:


Ok so like the other dude i have treemenu problem only it can't be solved with re uploading files.

background:
I installed latest raven nuke on localhost, installed all blocks and configured everything, everything worked great even the dtree menu i had.

I uploaded everything to my server and the only thing refuses to work is that treemenu, i managed to get some kind of idea whats the problem only i can't find a fix for it.

the relevant code from the block is:

 [code]
global $cookie, $admin, $prefix, $currentlang, $dbi;



$content  ="   <link rel=\"StyleSheet\" href=\"blocks/treemenu/dtree.css\" type=\"text/css\">";

$content  .= <<<_JS_
<script type="text/javascript" src="blocks/treemenu/dtree.js"></script>

<div class="dtree">

   <p align="center"><a href="javascript: d.openAll();">open all</a> | <a href="javascript: d.closeAll();">close all</a></p>

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

      d = new dTree('d');

           *data removed, doesn't matter



   
      document.write(d);

      //-->
   </script>
[/code]

both dtree.js and dtree.css are in treemenu directory inside the blocks directory. localy it's
/public_html/raven/blocks/treemnu/

the only thing that works is the "block" itlsef but all data missing (can't find dtree.css and dtree.js).

I've tried to put url instead local location, and who guessed, it's working (well half working, the js script loaded, but not the css).
It's not a solution because i need to chmod the directory of the blocks+treemnu so it will be possible to get those files, and because it's just aint working right.

I tried to mess around with location code but nothing, i have no idea why it doesn't working!.

on my localhost i have exactly the same dir setup.

side note:
*I've also exported the db from my localhost to the remote one.


Last edited by bizarre12 on Sat Apr 05, 2008 5:38 am; edited 1 time in total 
View user's profile Send private message
bizarre12
PostPosted: Sat Mar 29, 2008 8:38 pm Reply with quote

I"m speechless the answer was in front of me all that time Sad

So i had .htaccess file in the blocks directory that prevented from the scripts to get called

I removed the file and that fixed the problem.

had in it "deny from all"
 
bizarre12
PostPosted: Sat Apr 05, 2008 5:39 am Reply with quote

new problem, no fix Smile
edited first post.
 
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9456
Location: Arizona

PostPosted: Sat Apr 05, 2008 6:07 am Reply with quote

bizarre12, please do not edit your old posts like that as it makes it really difficult to get the true "flow" of what has transpired with the thread.

Your link to the stylesheet needs to be between the <head></head> tags in order to validate and this might also fix your problem (not sure, but worth the try).

You can either create a custom_head.php file within includes/custom_files directory or add the code to includes/javascript.php.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
bizarre12
PostPosted: Sat Apr 05, 2008 6:39 am Reply with quote

montego wrote:
bizarre12, please do not edit your old posts like that as it makes it really difficult to get the true "flow" of what has transpired with the thread.

Your link to the stylesheet needs to be between the <head></head> tags in order to validate and this might also fix your problem (not sure, but worth the try).

You can either create a custom_head.php file within includes/custom_files directory or add the code to includes/javascript.php.


well thats not my problem, my problem is that if i remove the <link> from the block-treemenu.php i have, then it breaks firefox,

Instead i called this file from header.php and same resualt, i also tried to call it from javascript.php same resualt, tried to put it in style.css in my theme same resualt, i see the effect of the style but firefox breaks it.

Note that even if i put <link> in the block php file aka
echo '<link />'."\n";

it fixes the firefox problem, so i don't think it's really css problem.


about the post sorry Razz, but i saw i allready did few posts and didn't want to spam too much Razz
 
montego
PostPosted: Sat Apr 05, 2008 10:18 pm Reply with quote

Well, it is not appropriate to put that within the block content. In fact, the way you are doing it is very unorthodox as you really should not use "echo" statements within blocks. block files are to build the $content string with the needed HTML and the *nuke handles echo'ing $content out as appropriate.

What this tells me is that you probably have conflicting class names. If you are doing this within this block, maybe you have others too and they are conflicting with this one.

It is best to do as I have told you and make sure all style files are linked between the <head></head> tags and solve the root cause of your issue, which is probably a conflict somewhere.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©