Jump to content
Larry Ullman's Book Forums

manic

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About manic

  • Rank
    Newbie
  1. Thank you for your response. The idea was to adapt the original add_page.php form into an edit form, so that a first draft of a page which was originally entered via the add_page form and stored on the database could be amended/updated. In order to get the stored data to display on the edit form, I was setting it to $_POST['content'], so that when the form loaded, the create_form_input() function would display the content in the editor. You are right, (of course!), entities are being used. I substituted your mysqli_real_escape_string for htmlspecialchars (mainly because I am not familiar with mysqli. For example, I am using $pdo to connect to the database. After some investigation, I am using html_entity_decode() to return the entities to the corresponding symbols, and the CKEditor is now correctly formatting these and so is a WYSIWYG text editor once again. Thank you for pointing me in the right direction on this!
  2. Hi again! Have downloaded and installed CKEditor. It shows on my add page form ok. I can add text and add the page ok, and the content is safely stored in the database. However, when the add_page redisplays with the confirmation message, the content appears in the textarea field (CKeditor panel) as plain text together with formatting tags. ie it is not behaving as a WYSIWYG editor. How do I get this to display as WYSIWYG content? PS the allowed formatting tags are correctly stored on the database and the actual page displays properly when I visit it, so this is about getting the $_POST['content'] to display properly in the CKeditor field on the form. Any clues? Have I failed to install/configure the editor properly, or do I need to manipulate the $_POST['content'] in some way?
  3. Thanks. with the benefit of hindsight, it now seems all rather obvious, but at the time, I was wrestling with a lot of new stuff. The bootstrap framework, sticky-footer-with-navbar template was all very new and I felt a bit over-faced when I expected to load it and it all work. Although, that said, I am still struggling to understand why a template which advertises a navbar, has that element preset to collapse! Is it supposed to appear if one hovers near the top of the page? ! am pleased that I got most of the way there by myself in the end. although, the page 'button' for $this_page still does not highlight automatically, and I noticed that the grey header and footer bar does not show up in safari. Any clues?
  4. Hi Chapter 5, page 124 offers some SQL commands to populate the pages table, available to download from your website. Please could you guide me to them, as I cannot find them?
  5. RESOLVED It appears that the header template includes a <div with the class="nav-collapse collapse" . This class is not defined in either the bootstrap.css or the sticky-footer-navbar.css and yet somehow makes the navbar not appear. Once I added an exclamation mark (!) to the relevant div tags, eg: <!div class="nav-collapse collapse"> <!/div><!-- / .nav-collapse --> the navbar magically appeared! Perhaps this bit of styling is supposed to make the navbar appear, if you hover near the top of the page, but this was not happening for me. Bottom line: To make the grey bar appear at the top of the page, you need to add the following to the sticky-footer-navbar.css: .navbar { height: 60px; background-color: #f5f5f5; } To make the page buttons appear inside the navbar, in the header template, you need to: disable the navbar collapse <div class="nav-collapse collapse"> and corresponding </div> tag, by adding an exclamation mark immediately after the opening '<' symbol. And whilst we are at it, to get the page content to line up into a left hand margin and main section, I too needed to: amend the <div class="col-3"> and <div class="col-9> tags to read class="col-md-3" and class="col-md-9" respectively. Now all I need to do, is to get the current/active page to be automatically highlighted in the nav bar ...
  6. IGNORE PART OF MY LAST the <li> elements of course have a class of "dropdown", unless this is superceded by "active". I am wondering if anything has changed with the latest release of bootstrap, ie v3.3.2?
  7. UPDATE I have a really slow internet connection and once when I loaded my home page, the page loaded temporarily without any CSS formatting. ie no grey navbar. I could see the home, about, contact, register items as an unordered list on the page, so it seems to me that there is not a problem with the php code for the navbar but there is some problem linking the relevant navbar elements to the css in order to get them to display properly. In the template header, I have the following between the <head> tags: <link href="/includes/scripts/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="/includes/scripts/bootstrap/css/sticky_footer/sticky-footer-navbar-ex1.css" rel="stylesheet"> I haven't touched the bootstrap.min.css script. As mentioned previously, the grey bar was not showing at all so I added some code to the sticky-footer-navbar-ex1.css script. However, the rest of the page displays with all the styling that I would expect, so it seems that some kind of link to the css is being made. Perhaps there is a problem with the classes I have assigned to the navbar elements? <div class="navbar navbar-fixed-top"> <div class="container"> <button type="button" class="navbar-toggle" ... <span class="icon-bar"> <a class="navbar-brand" <div class="nav-collapse collapse"> <ul class="nav navbar-nav"> <li if( $this_page == $value ) { echo 'class="active"'; }> NB there is no class specified for inactive <li> elements, but this is all how it is in the book. Any clues as to how to get the navbar buttons to show up in the grey bar at the top of the page?
  8. Hi - love your book and cannot wait to get going with applying your very clear php and sql code. However, I am falling at the first hurdle wrestling with the twitter bootstrap framework. Can you help? You can see where I have got to at http://www.worldsgreatestchallenge.com . I have downloaded the latest version of bootstrap and incorporated the sticky-footer-navbar.min.css. from your downloadable code from ex1. However, the navbar does not display at the top. I have managed to add the grey stripe at the top by adding the following to the sticky-footer-navbar.css: .navbar { height: 60px; background-color: #f5f5f5; } However, try as I might, I cannot get the nav buttons and dropdown menus to display. I have checked and rechecked the html/php code and all seems in order. I would paste it here but I cannot get any of the paste buttons in the wysiwyg panel above to work. Any ideas? PS the categories do not display on my site because I have not yet created the relevant table.
×
×
  • Create New...