Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Need help splicing PHP header/menu on top of Filebrowser

edited May 2007 in Vanilla 1.0 Help
Gents, As usual, I am pressed a bit for time. I will be working on this today. You have been helpfull in the past. I am hoping for some assistance to today. I figured out a way to do this with filethingie. Now I need to find a way to do it with filebrowser. I have a top menu that shows up on my site that is mostly Javascript and I splice it in to each page as an include header.php I am looking for some insight into where to splice the commands with filebrowser so that the menu sits similarly above the filebrowser information when viewed by a customer. Can you help save me some trial and error time? Where do I splice it in? I realize I may need to do some output buffering in PHP. You want to see the site in action and under construction go to www.highlandsmedicine.com and login as user: testcase , and password: password

Comments

  • Options
    You'll probably be OK to include the header right after the tag...
  • Options
    edited May 2007
    Thanks, In the file index.php, right? That's where I am poking around now. Which tag? The open tag <? I am sure I will get it eventually, but help will speed me up. Why does his tag not open with <?PHP why is it just <? ????
  • Options
    In the past it wasnt such good practice (most setups didn't require it) to open with <?php. You still don't *have* to in a lot of situations (they're called short tags I believe) but since PHP5 (i think) it's become standard to use the full <?php tag.
  • Options
    I suspected as much about the tag <? Thanks for the history. It's not working just after that open tag, as usual, not without some tweaking for sure, but I am getting closer. I am still open to suggestions.
  • Options
    What about somewhere round here..
    // ------------------ // 5. WRITE PAGE HEAD // ------------------ // Define the current folder path $RootPath = substr(CurrentWebPath(),0,strlen(CurrentWebPath())-1); $CurrentPath = "<a href=\"$RootPath?fpp=".$Config->FilesPerPage."\">".str_replace("http://","",$RootPath)."</a>"; echo("<?xml version=\"1.0\" encoding=\"utf-8\"?> <!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\" xml:lang=\"en-ca\"> <head>
  • Options
    OK, That section may well work, too, for a splice spot, but it turns out that splicing in my menu/header call DOES work after the open tag <? as Wallphone suggested. However, because Filebrowser reads a lot of files I put it in a subdirectory folder below the others and that is really messing with the paths/relative paths. It appears I am not sure how to fix it given the complexity of the Javascript, even after adjusting a relative path or two. The menu is self-destructing. I may have a workaround, though. I realize I can hide a lot of files, so I can put filebrowser back at the level of the rest and should have little trouble if I can hide everything else from it but the files it is supposed to read. My question is can I configure it to hide folders or subdirectories as well as files? Can I put folder names in here in _config.xml also? <HideFiles>thumbnailer.php,index.php,.htaccess</HideFiles> I guess I can just test it, but if it fails, it would be great to know how to hide folders, as well. Thanks for the help today, guys. I am making real progress. P.S. I know that I have got to be able to find a way to get it to work the other way to by adjusting the menus paths, but as I adapted that, as well, it may turn out to be a real timesink.
  • Options
    Whoops. I meant to say <body> tag, but the html formatter stripped it.

    Never considered javascript conflicts... those are a headache for me. Good luck!
  • Options
    Actually, I did splice it in right after the open tag <? which is the same spot I spliced it in for filethingie, as well. It worked. My workaround worked. The javascript menu that I adapted seemed to have some limitations moving up and back through subdirectory folders to display files (or pages), so I just moved it to the same level as the rest of the application source creation files, and then hid all of the source creation files and the folders. The hide files command in _config.xml works quite well -- I could even hide the folder names. I am pretty pleased. It''s still a bit crude in its display, but this is a handy tool to have. If I get a chance, I will try to beautify the display. Thanks for the help/morale support.
This discussion has been closed.