Jump to content

Lance O.

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Lance O.

  1. I just took a look using Firebug and while some JavaScript errors are reported, they are in relation to the missing header and footer. So unfortunately, this isn't providing me any insight, but thanks for the suggestion.
  2. I've just installed PW on Media Temple Grid server using an exported site profile, and for some odd reason, some of the pages in the Admin are not loading the header and footer into the page. This appears to be random. For instance, I just verified that the /processwire/access/ page was loading properly, but after visiting it again, it only loads the following: <dl class='nav'> <dt><a class='label' href='/processwire/access/users/'>Users</a></dt> <dd>Manage system users</dd> <dt><a class='label' href='/processwire/access/roles/'>Roles</a></dt> <dd>Manage user roles and what permissions are attached</dd> <dt><a class='label' href='/processwire/access/permissions/'>Permissions</a></dt> <dd>Manage system permissions</dd> </dl> And then after refreshing the page, it loads properly with header and footer in place. However, any page that I edit displays the Admin page without the header and footer. I installed the site using a fresh copy of PW, substituting only modules, templates, and install folders. In fact, I've done this twice, with the same results. At first I thought it might be a permissions problem, but it doesn't seem like that would produce random results. Anyone have any ideas? I couldn't find reference to this problem in the forums.
  3. If I upload an image to a multiple images field, then add the image to the body field of the same page and select No alignment, the following class is assigned to the image ("No Alignment"): <p><img class="No Alignment" src="/site/assets/files/1001/image.png" alt="Example" /></p> This seems like a bug since it registers as two separate classes ("No" and "Alignment"). Can this be changed to a single (lowercase) class that doesn't include a space (or not included altogether, since it assumes the image is inline)?
  4. 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.
  5. 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
  6. 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.
  7. Ah jeez. I'll work with the host on a resolution. Thanks for your quick response, teppo!
  8. 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.
  9. Magic! Discovering a hidden gem like this always makes my day. Thanks, diogo!
  10. 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!
  11. 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?
  12. It works perfectly now with that tiny edit. Thanks for the insight, Ryan!
  13. @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());
  14. 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)
  15. 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.
  16. 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!
  17. Whoops, nevermind! I just discovered the "More Search Options" button on the "Member List" page.
  18. Is there a way to search for PW forum members by location? I'm interested in finding other PW developers in my local area.
  19. @3fingers Sorry, I haven't had a chance to start this side project.
  20. EDGE is a responsive site designed by Salvato + Coe Group and developed by myself: http://edgela.com/
  • Create New...