Jump to content

Lance O.

Members
  • Content Count

    305
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Lance O.

  1. Wow, how did I miss the addition of the field export/import capability to ProcessWire? This is fantastic and exactly what I needed! Thanks, kongondo!
  2. Adding fields via the API is much faster than adding them using the Admin. If I can create a library of custom field sets, I can save a lot of time setting up a site or adding to an existing one. Thanks for your response, kongondo. I'll check out the resources you mentioned.
  3. I would like to create sets of custom fields that can be added using the API to sites as I need them. For example, if one of my clients has an existing site developed in ProcessWire and needs a blog added, I would like to use the API to add a set of custom fields specific to a blog. As another example, I may need to add a set of custom fields for social media links. Unfortunately, I can't seem to find a resource that lists every property needed for each field type. How do I know which properties to set? Or is there a way to output fields and properties for an existing installation of ProcessWire?
  4. Include the slideshow code in the template where you want the slideshow to display.
  5. Depending on the project, I'll set up slides in one of two ways: I'll create a repeating field named "slideshow" that contains an image, a text field, and a link field. This repeating field resides in a tab on templates that use a slideshow, such as the Home page. Or, I'll create a parent template named "slideshow," then create a child template named "slide" that contains an image, a text field, and a link field. The text and link fields are optional and only need to be included if each slide contains HTML text and/or is linked. Once the slides are populated in the CMS, I'll use Cycle2's API to set the slideshow options for that particular project in my template. http://jquery.malsup.com/cycle2/api/ Here is a simplified example of the code. You'll need to set your own options for the slideshow based on your project requirements. $items = $page->slideshow_repeater; // if using repeater field // $items = $page->children("template=slide,sort=sort"); // if using pages echo "<div id='slideshow'>"; echo "<div class='cycle-slideshow'"; echo " data-cycle-fx='fade'"; echo " data-cycle-loader='wait'"; echo " data-cycle-slides='> .slide'"; echo " data-cycle-speed='500'"; echo " data-cycle-swipe='true'"; echo " data-cycle-timeout='4000'"; echo ">"; foreach ( $items as $item ) { echo "<div class='slide'>"; echo "<a href='{$item->link}'>"; echo "<img src='{$item->image->url}' alt='{$image->description}'>"; echo "</a>"; echo "</div>"; // slide } echo "</div>"; // cycle-slideshow echo "</div>"; // slideshow Here is a site I developed earlier this year that uses different implementations of the Cycle2 plugin and ProcessWire: http://prcss.in/rosendale
  6. I highly recommend jQuery Cycle 2. I've been using it and the earlier version for years and absolutely love it. And I can easily integrate slides into ProcessWire. http://jquery.malsup.com/cycle2/
  7. @soma Looks like that fix did the trick! Thank you for updating. I think I'm going to get a lot of use from this module.
  8. Oops, for some reason, the module isn't detecting my custom CSS file. My path is correct: site/templates/notes/notes.css and the file exists when I visit it in a browser. I'm using PW 2.4.0.
  9. This is a great module and a simple solution to providing contextual help for my clients. Thank you, Soma!
  10. I tried resetting the password, but the same error occurs. I'm considering downgrading to 2.3.0.
  11. Is this as easy as replacing core files with version 2.3.0 files, or is modification to the 2.4.0 database needed?
  12. Is it possible to downgrade ProcessWire from 2.4.0 to 2.3.0?
  13. @Pete Yes, the installer tells you which PHP version you need, but that's only if you are using the installer. I was exporting/importing the database from a development server to a production server. The site ran fine until I tried to log into the admin and received a "Unable to generate password hash" error.
  14. Any reason why the requirements page hasn't been updated? That's the page that I send to my clients and their hosting companies. How do I explain to my hosting company contact that I've been providing them with the wrong information and they have wasted their time this week trying to get this site running correctly? Grrrrr.
  15. The ProcessWire requirements page states that ProcessWire requires PHP version 5.2.4 or greater. http://processwire.com/about/requirements/ Yet when I just tried to install ProcessWire 2.4.0, I receive the following error: ProcessWire requires PHP version 5.3.8 or newer. You are running PHP 5.3.3-7+squeeze19" I'm installing on a host I've never used before, and I'm not sure what "squeeze19" is. Why is ProcessWire giving me this error? What are the actual PHP version requirements?
  16. Thank you Soma, adrian, and horst! This seems to work: foreach ( $results as $item ) { if ( $item->matches("template=resource-category|resource-subcategory|resource-file|resource-link") ) { foreach ( $item->parents() as $parent ) { if ( $parent->template->filenameExists() ) { $url = $parent->url; $title = $parent->title; } } } else { $url = $item->url; $title = $item->title; } echo "<a href='{$url}'>{$title}</a>"; }
  17. Is there a way to find a page's closest parent that has an uploaded template file if I don't know what that template file name is?
  18. A site I am currently developing has a need for multiple levels of container pages, named as "Category" and "Subcategory" below. Pages that include files can be added as children to both the "Category" and "Subcategory" container pages. Pages named "Page" and "Subpage" display the content of child "Category", "Subcategory", and "File" pages. The "Category", "Subcategory", and "File" pages do not use a an uploaded template, so viewing those pages in a browser will produce a 404 error. - Home -- Page 1 --- Category 1 ---- File 1 ---- File 2 ---- Subcategory 1 ---- File 3 ---- File 4 -- Page 2 --- Subpage 1 ---- Category 2 ----- File 5 ----- File 6 ----- Subcategory 2 ------ File 7 ------ File 8 My question is, when a user performs a find on the site and finds one of the "Category", "Subcategory", or "File" pages, how I do I display the found page's closest parent that uses an uploaded template? For example, in the file structure above, how can I display the "Page 1" page when a user searches for "File 1" or "File 3"? How can I display "Subpage 1" when a user searches for "File 5" or "File 7"?
  19. Removed my reply and moved it into a new post.
  20. When you are in the modal and can select an alignment, first select something other than the No Alignment option. Then, immediately change your selection to No Alignment and insert the image. The No Alignment class appears in the code. So it looks like it only appears when the alignment option is changed to No Alignment from one of the other options.
  21. Ah, I just found the solution on the PW forum! As discovered by Sylvio, Media Temple Grid has PHP by default as FastCGI and this doesn't go well with PW. Changing it to CGI (stable) solved the problem. http://processwire.com/talk/topic/4309-no-css-rendering-in-admin/#entry42209
  22. 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.
  23. 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.
  24. 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)?
×
×
  • Create New...