Jump to content


tinacious

Member Since 10 Mar 2012
Offline Last Active Apr 22 2013 10:56 AM
-----

Topics I've Started

Sort by date range

08 April 2013 - 09:01 AM

Hi everyone, I'm wondering what the best way to sort a page by date is. I have a few pages that render a list of pages based on specific criteria, e.g. template. I want to provide 2 date pickers on each of those pages to allow users to search by date range on that specific page. I'm wondering what the best way to go about it is.

 

The date has formatting attached to it. I'm wondering if I should use the unformatted version instead of the formatted one. Would this make it easier to work with in this situation?

 

I was thinking of using jQuery UI datepickers and a button to submit the form and apply the date range filter to the results that are rendered on the page. 

 

if($page->id == 1) {
    $events = $pages->get("name=event")->children;
} else if($page->name == 'users') {
    $events = $pages->find("created_users_id=$username, template=log-item");
} else {
    $sort_type = $page->template;
    $events = $pages->find("$sort_type=$page");
}
if(count($events)) { 
	foreach($events as $event) { 
		// ... 
	} 
}

 

 

The date I will be working with has been stored in the $page->date_start field. Currently it is formatted using ProcessWire's options.

 

I'm wondering what the best way to tie date filtering functionality into the above query would be, if even possible, and if not, which way should I go about doing it?

 

Thanks!


Default landing page for specific role

06 April 2013 - 05:44 PM

Hi all, I would like to redirect the session after successful login for a specific role. I want to keep a specific role in the front-end most of the time and upon successful login, would like to redirect them to the front page instead of the Pages section in the back-end. How would you suggest hooking into the login function and redirecting that role upon successful login? I know I'll need to use $session->redirect(). Thanks!


Can I limit page editing to the user that created that page?

06 April 2013 - 12:55 PM

Hi all, I am creating a site that will have multiple users in ProcessWire and I want to be able to limit the ability to edit pages so users can only edit the pages that they themselves created.

 

I noticed the default functionality allows you to assign roles yet anyone with this role appears to be able to edit whatever pages and templates have access to that role.

 

Thank you for your help! 


Musician Website for opera singer

25 March 2013 - 02:50 AM

Hey everyone. I've created another screencast for a ProcessWire site I developed. Another you ask? My first one was of my own site, here

 

I developed this website for a Toronto-based opera singer from Norway. Nils needed a website where clients could go to learn about him, listen to his music, watch his videos, look at pictures and see where he'll be performing.

 

The website features custom Responsive Design and a separate mobile image gallery for phones and devices.

 

Read about the project and see some screenshots here, visit the website here, or view the screencast on YouTube here.

 

The admin theme used is a modified version of an older version of the Teflon admin theme.


Online directory of ProcessWire professionals

26 February 2013 - 06:03 PM

I was wondering if maybe the ProcessWire site could have a directory of contractors that work in ProcessWire kind of like how the ModX site has. I think it would be a great way to make connections and spread the word about ProcessWire.