Jump to content

TomTees

Members
  • Posts

    187
  • Joined

  • Last visited

    Never

About TomTees

  • Birthday 01/01/1970

Profile Information

  • Gender
    Male
  • Location
    Iowa

TomTees's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. So when would you use... /SomeFile.php as opposed to... SomeFile.php OR /MyFolder/SomeFile.php as opposed to... MyFolder/SomeFile.php TomTees
  2. Because the tiny_mce directory is obviously in the same directory as your calling page not the web servers root as you had used previously. I thought you needed a "/" to go into a directory? TomTees
  3. Its a client side address, so the first / points to the web servers document root. But yeah, its likely the path is incorrect. Yep, its the same pain-in-the-arse as the Rel thingy in HTML... This is the code that works... <!-- TINYMCE CODE --> <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script> Don't ask me why?! Also, I tried adding some text that I added formatting to, and while the entry was saved in my database, none of the formatting was captured so I'm not sure what the issue with that is?! TomTees
  4. Paths really screw me up in PHP. (Particularly with this author and his procedural style...) In my Web Root (in NetBeans), my main file is "index.php" (Then the series of includes starts) Index.php includes footer.html in the "includes" directory. Footer.html has this code... <li><a href="add_page.php" title="Add a Page">Add Page</a></li> "add_page.php" is in the Web Root, and it apparently appears as part of index.php by way of footer.html. (Convoluted if you ask me.) In the Web Root I have the "tiny_mce" directory. In that directory is "tiny_mce.js" which is supposed to run everything. In "add_page.php" I have this.. <!-- TINYMCE CODE --> <script type="text/javascript" src="../tiny_mce/tiny_mce.js"></script> I also tried this... <!-- TINYMCE CODE --> <script type="text/javascript" src="../tiny_mce/tiny_mce.js"></script> I *thought* I understood navigating paths pretty well, but I know that rel=... in HTML always screws me up because it doesn't work like regular paths. It works from the parent file's perspective and not the file the actual code is in. *Maybe* that is the issue with this JavaScript code which I know nothing about?? TomTees
  5. You're pretty smart. Someday maybe they'll make you a Global Moderator or something?! Thanks, TomTees
  6. I am in my motel room right now. If I disconnect from the Internet (i.e. turn off my Internet Connection), and then fire up MAMP, instead of getting the splash page, I get... If I then open up NetBeans and try to execute a PHP script, I get the same message as above. So that says to me, that without MAMP (likely Apache) having Internet access, it acts all retarded and refuses to serve up PHP pages?! That makes no sense, because all of my files are local, so even though I'm use a webserver (i.e. MAMP/Apache), it shouldn't need any Internet access. (I think I asked this question a few years ago, and someone mentioned something about a "Loop-Back Issue"??) Regardless, this is a real pain, because it means that with a live Internet connection, I can't do any development/testing (e.g. on a plane, at work, etc) Any ideas what the deal is??? TomTees
  7. Here is the HTML output from my PHP script... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- HTML HEADER --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Add a Site Content Page </title> <link rel="stylesheet" href="css/styles.css" type="text/css" /> </head> <!-- END OF HTML HEADER --> <!-- HTML BODY --> <body> <!-- WRAPPER --> <div id="wrap"> <!-- PAGE HEADING --> <div class="header"> <h1><a href="index.php">Some Title Here</a></h1> <h2>A Tagline Goes Here</h2> </div> <!-- END OF PAGE HEADING --> <!-- TAB NAVIGATION --> <div id="nav"> <ul> <li><a href="index.php"><span>Home</span></a></li><li><a href="about.php"><span>About</span></a></li><li><a href="contact.php"><span>Contact</span></a></li><li><a href="register.php"><span>Register</span></a></li> </ul> </div> <!-- END OF TAB NAVIGATION --> <!-- PAGE BODY --> <div class="page"> <!-- MAIN CONTENT --> <div class="content"> <!-- END OF HEADER --> <h3>Add a Site Content Page</h3> <form action="add_page.php" method="post" accept-charset="utf-8"> <fieldset> <legend>Fill out the form to add a page of content:</legend> <p> <label for="title"><strong>Title</strong></label><br /> <input type="text" name="title" id="title" /> </p> <p> <label for="category"><strong>Category</strong></label><br /> <select name="category" > <option>Select One</option> <option value="3">Category 1</option> <option value="5">Category 2</option> <option value="1">Category 3</option> <option value="4">Category 4</option> <option value="2">Category 5</option> </select> </p> <p> <label for="description"><strong>Description</strong></label><br /> <textarea name="description" id="description" rows="5" cols="75"></textarea> </p> <p> <label for="content"><strong>Content</strong></label><br /> <textarea name="content" id="content" rows="5" cols="75"></textarea> </p> <p> <input type="submit" name="submit_button" class="formbutton" id="submit_button" value="Add This Page" /> </p> </fieldset> </form> <!-- TINYMCE CODE --> <script type="text/javascript" src="../tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "exact", elements : "content", theme : "advanced", width : 800, height : 400, plugins : "advlink,advlist,autoresize,autosave,contextmenu,fullscreen,iespell,inlinepopups,media,paste,preview,safari,searchreplace,visualchars,wordcount,xhtmlxtras", // Theme options theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,undo,redo,removeformat,|,search,replace,|,cleanup,help,code,preview,visualaid,fullscreen", theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,bullist,numlist,|,outdent,indent,blockquote,|,sub,sup,cite,abbr", theme_advanced_buttons3 : "hr,|,link,unlink,anchor,image,|,charmap,emotions,iespell,media", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "/css/styles.css", }); </script> <!-- END TinyMCE code --> <!-- START OF FOOTER --> </div> <!-- END OF MAIN CONTENT --> <!-- SIDEBAR --> <div class="sidebar"> <!-- SIDEBAR ACCOUNT SECTION --> <div class="title"> <h4>Manage Your Account</h4> </div> <ul> <li><a href="renew.php" title="Renew Your Account">Renew Account</a></li> <li><a href="change_password.php" title="Change Your Password">Change Password</a></li> <li><a href="favorites.php" title="View Your Favorites">Favorites</a></li> <li><a href="recommendations.php" title="View Your Recommendations">Recommendations</a></li> <li><a href="logout.php" title="Logout">Logout</a></li> </ul> <div class="title"> <h4>Administration</h4> </div> <ul> <li><a href="add_page.php" title="Add a Page">Add Page</a></li> <li><a href="add_pdf.php" title="Add a PDF">Add PDF</a></li> <li><a href="#" title="Blah">Blah</a></li> </ul> <!-- END OF SIDEBAR ACCOUNT SECTION --> <!-- SIDEBAR CONTENT --> <div class="title"> <h4>Content</h4> </div> <ul> <li><a href="category.php?id=3" title="Topic 1">Topic 1</a></li> <li><a href="category.php?id=5" title="Topic 2">Topic 2</a></li> <li><a href="category.php?id=1" title="Topic 3">Topic 3</a></li> <li><a href="category.php?id=4" title="Topic 4">Topic 4</a></li> <li><a href="category.php?id=2" title="Topic 5">Topic 5</a></li> <li><a href="pdfs.php" title="Topic 6">Topic 6</a></li> </ul> <!-- END OF CONTENT SIDEBAR --> </div> <!-- END OF SIDEBAR --> <!-- FOOTER --> <div class="footer"> <p> <a href="site_map.php" title="Site Map">Site Map</a> | <a href="policies.php" title="Policies">Policies</a> © | </p> </div> <!-- END OF FOOTER --> </div> <!-- END OF PAGE BODY --> </div> <!-- END OF WRAPPER --> </body> <!-- END OF HTML BODY --> </html> Like I said in my original post, the Javascript editor I tried to add to the comments box doesn't even appear... TomTees
  8. I am using MAMP on my MacBook and don't understand why MAMP and my code in NetBeans will not run if I am offline? If I am trying to execute PHP files locally on my laptop, why should MAMP or Apache of NetBEans care if I do not have an Internet connection?! I wanted to show someone something at work where there is no Internet access, but that won't work as it currently stands. TomTees
  9. Like after I run the PHP script? TomTees
  10. Already did that. It is kind of lame. There is no editor, so that is pretty bare bone... It must be something simple. TomTees
  11. I am reading a book that shows you how to use TinyMCE so that you have an editor to use in a TextArea in the webpage. I am followed the example in the book but it isn't working. My book told me to place this code after my <form>... <!-- TINYMCE CODE --> <script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "exact", elements : "content", theme : "advanced", width : 800, height : 400, plugins : "advlink,advlist,autoresize,autosave,contextmenu,fullscreen,iespell,inlinepopups,media,paste,preview,safari,searchreplace,visualchars,wordcount,xhtmlxtras", // Theme options theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,undo,redo,removeformat,|,search,replace,|,cleanup,help,code,preview,visualaid,fullscreen", theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,bullist,numlist,|,outdent,indent,blockquote,|,sub,sup,cite,abbr", theme_advanced_buttons3 : "hr,|,link,unlink,anchor,image,|,charmap,emotions,iespell,media", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "/css/styles.css", }); </script> <!-- END TinyMCE code --> The form with TextArea appears like it should in the main page but there is no editor. What am I doing wrong? TomTees
  12. So when you are building a website, is there any logical reason to name a file as HTML? (It seems to me that it would be easier to name HTML, HTML+PHP, and PHP files just as .php for simplicity?!) TomTees
  13. Okay, but to be more correct - as I found out last week - you can have 100% HTML in a PHP file and it ill run okay, but if you have any PHP in an HTML (by your webserver default) the PHP won't run. Right? Same if it is an HTML file. That is where I screwed up. (Of course it didn't help that NetBeans tricked my into thinking I could do this... <?php <!-- Comment grayed out in NetBeans but invalid when code runs!! --> ?> Yeah, GOD FORBID someone actually tried to make their code WELL-DOCUMENTED and READABLE!! (What w-a-s I thinking?!) TomTees
  14. I know that. And since it is an HTML file, I figured I could use them. But back to my question... TomTees
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.