Jump to content

Lance O.

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Lance O.

  1. Facepalm. "template" didn't show up in the You may enter one or more of these fields listing, so I didn't even try, but it is exactly what I needed.
  2. To clarify, viewing the list of pages within PW typically looks like this: About Us 3 | edit | view | new | move Our Board edit | view | new | move Our Leadership edit | view | new | move Our Partners edit | view | new | move I'd like the ability to add the template name next to the page title, using the List of fields to display in the admin Page List from the Advanced tab of template. About Us (template-a) 3 | edit | view | new | move Our Board (template-b) edit | view | new | move Our Leadership (template-c) edit | view | new | move Our Partners (template-d) edit | view | new | move
  3. It would be great to have the ability to add the template name in the list of fields to display in the admin Page List. This would be helpful on sites where there are a lot of pages and templates.
  4. Ah jeez. I'll work with the host on a resolution. Thanks for your quick response, teppo!
  5. I'm getting the following error when installing PW on a client's server. It appears after I've entered admin account information. Unfortunately, my client's hosting customer support is worthless and hasn't been able to help. Does anyone have any idea why this error is occurring? ERROR: MCRYPT_CREATE_IV(): COULD NOT GATHER SUFFICIENT RANDOM DATA (LINE 161 OF C:\HOSTINGSPACES\CPVINCCO\RETHINKPAINT.COM\WWWROOT\WIRE\CORE\PASSWORD.PHP) THIS ERROR MESSAGE WAS SHOWN BECAUSE /INSTALL.PHP STILL EXISTS. ERROR HAS BEEN LOGGED.
  6. Magic! Discovering a hidden gem like this always makes my day. Thanks, diogo!
  7. This happened to me when using the jQuery Cycle 2 plugin. If I remember correctly, the images were displaying in the same order they were loading into the page, so the order was different for different users. A simple script setting adjustment fixed the problem. The great thing about problems like this is that once you've spent time discovering the solution, you at least know what to look for if you manage to make the same mistake!
  8. How can I add fields to the user page in the PW Admin? I'd like to add a field for a user's full name. The blog profile created by Ryan uses a similar field named "Display name (first and last name)," but I can't figure out how that field is added to the page. I've combed through the forum and I can't find the answer to my question. Is this something done through the PW Admin or through a script?
  9. It works perfectly now with that tiny edit. Thanks for the insight, Ryan!
  10. @ryan, Sorry, I should have provided the code that I am using from your Blog site profile. I'm not sure where I would add the "start=0." function getArchives( $year = 0, $limit = 0 ) { if ( $year ) { $firstYear = $year; $lastYear = $year; } else { $oldest = wire('pages')->get( "template=post, date>0, sort=date" ); $newest = wire('pages')->get( "template=post, date>0, sort=-date" ); if ( !$newest->id ) return ''; $firstYear = date('Y', $oldest->getUnformatted('date')); $lastYear = date('Y', $newest->getUnformatted('date')); } $_limit = $limit > 1 ? (int) $limit : 2; $years = array(); for ( $y = $lastYear; $y >= $firstYear; $y-- ) { $months = array(); $numPostsYear = 0; for ( $month = 1; $month <= 12; $month++ ) { $firstDay = strtotime( "$y-$month-01" ); $lastDay = strtotime( "+1 month", $firstDay ) - 1; $posts = wire('pages')->find( "template=post, date>=$firstDay, date<=$lastDay, limit=$_limit, sort=-date" ); $numPosts = $posts->getTotal(); if ( !$numPosts ) continue; $numPostsYear += $numPosts; $months[$month] = array( 'url' => wire('config')->urls->root . "blog/archive/$y/$month/", 'name' => strftime('%B', $firstDay), 'posts' => $limit > 0 ? $posts : array(), 'total' => $numPosts ); } if(!$numPostsYear) continue; $years[$y] = array( 'url' => wire('config')->urls->root . "blog/archive/$y/", 'name' => $y, 'total' => $numPostsYear, 'months' => $months ); } return $years; } function renderArchives(array $years) { $out = ''; foreach ( $years as $year ) { $t = new TemplateFile(wire('config')->paths->templates . 'includes/archives.php'); $t->set('year', $year['name']); $t->set('total', $year['total']); $t->set('months', $year['months']); $t->set('url', $year['url']); $out .= $t->render(); } return $out; } $archives = renderArchives(getArchives());
  11. I'm using the getArchives() and renderArchives() functions found in the /templates/archives.php file from the Blog Profile developed by Ryan. These functions are used independently of the blog profile and have been added to a site that has already been developed in PW. The year/month archive listing in the sidebar work fine on all blog pages expect for pages that are paginated. I'm thinking that the additional URL segment is throwing things off, but that's just a guess. Has anyone had any experience with displaying a date-based archive listing of blog posts? The listing needs to be structured like this: 2011 > January (1) 2010 > June (2) > July (1) > November (1) 2009 > November (1) 2008 > February (1) 2006 > January (1)
  12. I'm working on a simple blog that requires date-based archives and I'm having a difficult time wrapping my head around pagination with urlSegments. I've modified Marty's code from this post: http://processwire.com/talk/topic/1356-news-section-archives/?p=12313 My modified code: $thisyear = date("Y"); $year = (int) $input->urlSegment1; $blog = $pages->find( "parent=/blog/, template=post, limit=2, sort=-date, date>=$year-01-01, date<=$year-12-31" ); foreach ( $blog as $blogitem ) { $str = "{$blogitem->date}"; $publishyear = strtotime( $str ); $urlyear = date( "Y", $publishyear ); echo "<h2><a href='{$blogitem->url}'>{$blogitem->title}<span class='date'>{$blogitem->date}</span></a></h2>"; echo "<p class='summary'>{$blogitem->summary}</p>"; } My code for pagination: $pagination = $blog->renderPager(array( 'numPageLinks' => '10', // Default: 10 'getVars' => '', // Default: empty 'baseUrl' => '', // Default: empty 'listMarkup' => "{out}", 'itemMarkup' => "{out}", 'linkMarkup' => "<a href=\"{url}\">{out}</a>", 'nextItemLabel' => 'Next', 'previousItemLabel' => 'Previous', 'separatorItemLabel' => '', 'separatorItemClass' => '', 'nextItemClass' => '', 'previousItemClass' => '', 'lastItemClass' => '', 'currentItemClass' => 'current' )); echo '<div id="posts-nav">' . $pagination . '</div>'; My blog structure looks like this: http://domain.com/blog/archive/2010/11/ And should look like this when paginated: http://domain.com/blog/archive/2010/11/page2/ But instead looks like this: http://domain.com/blog/archive/page2 The year and month segments aren't being written into the pagination links. I've read the documentation on pagination and scoured the forum for an example of how to get this to work, but I haven't had any luck and am at a loss at this point. I'd really appreciate it if someone could point me in the proper direction.
  13. I'm currently working on a site that includes a blog. Individual blog posts can be assigned multiple "categories" using a Page field type in the post that references pages using the "category" template. When I perform the following, the correct posts are displayed on each category page: $posts = $pages->find( "parent=/blog/, template=post, categories=$page->name, start=0, limit=20, sort=-date" ); But, when I modify the code to limit the number of posts that are displayed, the same two posts display on every paginated page within a category: $posts = $pages->find( "parent=/blog/, template=post, categories=$page->name, start=0, limit=2, sort=-date" ); My "category" template is set to "Allow Page Numbers" and the pagination is displaying on each paginated category page. But any posts beyond the first two never display. It has been a long working Sunday and I'm sure that whatever I'm doing wrong is silly, but I'm too tired to see it!
  14. Whoops, nevermind! I just discovered the "More Search Options" button on the "Member List" page.
  15. Is there a way to search for PW forum members by location? I'm interested in finding other PW developers in my local area.
  16. @3fingers Sorry, I haven't had a chance to start this side project.
  17. EDGE is a responsive site designed by Salvato + Coe Group and developed by myself: http://edgela.com/
  18. Thank you for your responses. The consensus is the site should be hosted at *.processwire.com. Since others are now purchasing domain alternatives and there were no offers to contribute to the design and development of the site, I'm going to back down on this idea. But thank you for your valuable input.
  19. I'd like to set up a site that showcases projects built with ProcessWire. As an full-time independent developer, I'm hoping a site like this will promote ProcessWire and help persuade clients into using ProcessWire for future projects. My current favorite inspirational showcase site is http://www.siteinspire.com/ With that being said, I have a few questions for the ProcessWire community: 1. Is this a good or bad idea? Has anyone already started something similar? 2. Does this step on Ryan's or the official ProcessWire site's toes? 3. Would you submit your projects to a site that isn't officially maintained by Ryan? 4. I've purchased several possible domains. Is there one you prefer more than the others? builtwithprocess.com builtwithprocesswire.com madewithprocess.com madewithprocesswire.com 5. If you think this is a good idea, what features would you like to see on the site?
  20. Thanks, Ryan. Is this information on the install screen new to ProcessWire 2.9? If not, how could I have missed it?
  • Create New...