Jump to content

JimSee

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

JimSee's Achievements

Jr. Member

Jr. Member (3/6)

3

Reputation

  1. Thank you, thank you, thank you, Robin S ! After returning and starting from "scratch," I strongly suspect that the weird invisible whitespace was the culprit. With another clean install, I typed everything Very Carefully (rather than cutting & pasting). It worked! I love my custom dates...and comments. Thank you again for your help and your patience, fbg13, Robin S and Mike Rockett !
  2. Thank you fbg13, Robin S and Mike Rockett ! For now, the Comments work good enough with page->comments->renderAll(); Still, I do look forward to the date being fixed. My last efforts were: Upgraded my Wamp so that i'm using PHP 7. Downloaded, unzipped and installed ProcessWire 3.0.62 Added Comments but first saved the array stuff in Notepad to be sure that any strange spaces were avoided. When it failed, used page->comments->renderAll(); to be sure that I didn't have some other kind of problem. Thank you again!
  3. Hello Robin S and hello again fbg13 After Robin S wrote The website is rendered as a link using the commenter's name as the link text, it's obvious...but I sure didn't see it. Thank you for that info! Thank you for your help and for persevering, fbg13! You asked, "Did you do anything else beside adding the comment field?" No, I installed ONLY the comments field. Then this code worked fine: <?php namespace ProcessWire; // basic-page.php template file // See README.txt for more information // Primary content is the page's body copy $content = $page->body; $content .= $page->comments->render(array()); $content .= $page->comments->renderForm(array()); // If the page has children, then render navigation to them under the body. // See the _func.php for the renderNav example function. if($page->hasChildren) { $content .= renderNav($page->children); } // if the rootParent (section) page has more than 1 child, then render // section navigation in the sidebar if($page->rootParent->hasChildren > 1) { $sidebar = renderNavTree($page->rootParent, 3) . $page->sidebar; } I added the example inside the array and now the changed code throws the error below: <?php namespace ProcessWire; // basic-page.php template file // See README.txt for more information // Primary content is the page's body copy $content = $page->body; $content .= $page->comments->render(array( 'headline' => '<h2>Read Comments</h2>', )); $content .= $page->comments->renderForm(array()); // If the page has children, then render navigation to them under the body. // See the _func.php for the renderNav example function. if($page->hasChildren) { $content .= renderNav($page->children); } // if the rootParent (section) page has more than 1 child, then render // section navigation in the sidebar if($page->rootParent->hasChildren > 1) { $sidebar = renderNavTree($page->rootParent, 3) . $page->sidebar; } Error log entry: Parse Error: syntax error, unexpected ''headline'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' (line 10 of C:\0\www\pwb\site\templates\basic-page.php) Thank you again for your help, Robin S and fbg13 !
  4. Thank you for your quick response, fbg13! i'm using ProcessWire 3.0.42 both online and off. i'm using PHP Version 5.5.19 (on Wamp ZeroXI - 11.5.3) and 5.5 on GoDaddy. It seems strange to me that things work fine with comment->renderAll(); and comment->render(array(); but things go haywire when i stick something inside the brackets for the array. {{{sigh}}} I just tried a clean install (intermediate version) on Wamp and have the same results. = = = = Also, do you know why the website does not show up? Thank again for your kind assistance, fbg13!
  5. Thank you for responding fbg13! I've tried to give you enough the code and some more info. Thank you !!! I added some notes to the code but here's one version: <?php namespace ProcessWire; // member.php template file // has restricted access and comments // Primary content is the page's body copy $content = $page->body; $content .= $page->chair2program; $content .= "<div class=dialogue>"; /* Before, i used the comments.css "out of the box." Now, i have * a class dialogue for my own purposes. * HOWEVER, the website url does NOT show up either way. */ $content .= $page->comment->renderAll(); /* The above works fine except for the problems with RELATIVE DATE * and the WEBSITE not showing up. * It also works fine with * $content .= $page->comment->render(); * $content .= $page->comment->renderForm(); * * BUT i get an error with the example shown * and the other errors on https://processwire.com/api/fieldtypes/comments/ */ $content .= "</div>"; if($page->hasChildren) { $content .= renderNav($page->children); } The first picture shows the code that I changed and the resulting error. I also tried different things at https://processwire.com/api/fieldtypes/comments/ The second picture shows my difficulty with dating. You can also see that I checked "Use Website Field in Comment Form." It doesn't show up although the formatted stars show up. (For the css, I used comments.css and also a slightly modified version of my own.
  6. Does anyone have experience with Comments to share? (Please!)
  7. Hello! I've finally learned enough to be dangerous...or maybe I knew that much all along. Anyway, I prepared a site to help us do some non-profit work...but... Comment Dates: The directions with dates seem clear enough and I've read them and tried all the following <?php echo date("D M j G:i:s T Y"); ?> echo date("D M j G:i:s T Y"); date("D M j G:i:s T Y") "D M j G:i:s T Y" D M j G:i:s T Y Yet, when I save the Comments field and refresh the page, I still get a relative date (such as "8 seconds ago.") Can someone help (please)? = = = = = = Comments Render Array: Using the directions at Comments, I can safely use $content .= $page->comment->render(array()); and my comments will show up. However, I get an error if I add something like the very first example $page->comment->render(array('headline' => '<h2>Read Comments</h2>',)); The error in this case was Parse Error: syntax error, unexpected ''headline'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' (line 11 of C:\0\www\pwlimit\site\templates\member.php) I've tried a variety of things... Usually, I get an error with no explanation. Can someone help (please)? = = = = = = Comments Email: When I check Allow Commenter Email Notifications, i don't get an email. Can someone help (please)? Thank you in advance for your help! Especially, thank you for your patience!
  8. Hello again, Rick: Thank you for your help and patience with me! I tried your method and got a single layer menu...but i'm trying to get a nested menu. After a bit of trial & terror earlier, I added <?php $maxDepth = 4; renderNavTree($pages->get('/'), $maxDepth);?> to _head.php. Thus, I have menus like the image below on all my pages. (The only thing that changes from page to page is the current class...so I appear to be making some minor progress.) Next, I need to figure out the CSS...plus an alternative that will render okay in phones....but that will be tomorrow. Thanks again...and, if someone has another (complete) solution, please feel free to post it.
  9. Thank you for your quick response, Rick. I am brand new to ProcessWire. I am very familiar with html. I can spell PHP and CSS. However, coding them is a different matter entirely. As far as CSS for the navigation tree, I suspect that some one (or many) have used ProcessWire in this way...so an example or two would be great. BIG Question: How do I get a complete (visible) menu on every page? I am using the function renderNavTree from the out-of-the box file _func.php (In other words, every page would have a menu like the one in the graphic in my first post...although the active page would have a different class.) Thanks again to you, Rick...and to everyone who chooses to help! jim
  10. FIRST: I am brand new and am trying to add a Navigation Tree to the beginner site. When I put renderNavTree($page, 4) into _head.php, I get a menu list like the graphic. This is great EXCEPT, I don't know how to make a horizontal menu out of it with CSS. Can someone help (please) or direct me to an example of the css? SECOND: That list is great for the Home page but when I click "program," the list only shows: How can I get the whole (visible) menu on every page? Thank you in advance! jim
×
×
  • Create New...