mrjasongorman

Members
  • Content count

    68
  • Joined

  • Last visited

Community Reputation

47 Excellent

About mrjasongorman

  • Rank
    Full Member

Contact Methods

  • Website URL
    https://www.jasongorman.uk

Profile Information

  • Gender
    Male
  • Location
    UK

Recent Profile Visitors

1,757 profile views
  1. Ah brilliant, so kind of like transients in Wordpress. Thanks for all the help!
  2. Thanks for taking a look at this. I didn't realise $input had those options. The thing is I automatically generate a list of location options based on the data provided in the unit-option's. So I need to generate the full list of locations for a select box above the listings regardless of whether a $location has been provided or not. It then renders listings of unit-options grouped by the unit they're children of, and sorted based on the unit name. The ->explode() method is cool, I didn't realise it was in the API. Thanks again!
  3. This is the current code $unitOptions = $pages->find("template=unit-option"); $temp_array = array(); foreach( $unitOptions as $item ){ if( $item->get('unit_location') ): array_push($temp_array, $item->get('unit_location')); endif; } $locations = array_unique($temp_array, SORT_STRING); sort($locations); $myLocation = ( !empty($_GET['location']) ) ? $sanitizer->text($_GET['location']) : null; $unitResults = null; if( $myLocation ){ $unitResults = $pages->find("template=unit-option, unit_location=$myLocation, sort=unit_name_ref"); }else{ $unitResults = $pages->find("template=unit-option, sort=unit_name_ref"); }
  4. I'll try and explain the data structure better Area > Level > Path ----------------> Unit > Study Location The -------> is a page reference. So the query is $pages->find("template=study-location, sort=unit_name_ref");
  5. I have a website with a slow page load mainly due to a slow query on a listing. I think there might be a better way to query the data / arrange the data back end which is what's causing the query to be slow. So the data is like this Area -> Level -> Path, the path then links to a pool of units included within that path. The units then have study locations listed as child pages for that unit with contact information etc. I have a page where i list all the study locations, but because i'm going through every unit and then every child study location page it takes quite a while. I have over 200 units with around 5 locations as sub pages. Any way i can reorganise the data to make this listing faster to load?
  6. It just seems a shame that the forum auto redirects but the main site doesn't?
  7. haha, so there is, 10 months is a long time in software development, and clearly a long time for my memory
  8. I tried to find a thread that spoke about this, but couldn't find one, so i thought this thread mentioning the processwire.com site itself was a good place. I've noticed that processwire.com has a wildcard SSL certificate, however it doesn't automatically redirect to HTTPS or use HSTS header to inform the browser to prefer HTTPS connections. Just wondered if there was a reason for this? To clarify this only seems to happen on the main site, not the forum. going to http://processwire.com
  9. I think i may have a similar problem, i currently have two websites running on the same server but under different subdomains, i have user data that needs to persist across subdomains, i'm using PHP's $_SESSION variable to store the data on the non ProcessWire site, though when i attempt to access the variables in PW they don't show up. I've got the ini_set('session.cookie_domain', '.example.com'); and i can see the PHPSESSID cookie does show up for both subdomains. However in PW when i echo session_id() it displays the session id from the wire cookie. So i guess $_SESSION variable has been taken over by that? Is there a way to still access the original $_SESSION variables from PHPSESSID ? Any help on this would be great.
  10. I recently had a revelation when building HTML emails, what's the difference between HTML emails, and HTML web pages? Other than the horrible table syntax, the result is the same, it's still HTML. This got me thinking why not use a CMS to help generate the HTML emails based on a template? Just like we using a CMS to help generate HTML web pages. We started by setting up ProcessWire (our usual CMS of choice) and added the relevent fields for the sections of the email. Then we took a previous email moved the content into ProcessWire and hooked up the code to pull that content back into the correct places. Repeater fields allowed us to have repeatable sections that are easy to add too, change order of or remove, giving us huge flexibility when a client changes their mind last minute. The speed of setting up and dealing with ProcessWire allowed us to go from concept to working prototype within a day. To use the emails, we just view source of the generated page, and copy and paste into the email system. Sometimes Litmus inliner is required to allow the email to work in Outlook, but we can run it through that before pasting into the email system. Future development could be integrating a css inliner into the generation step, to avoid using litmus inliner. Hope this helps show how ProcessWire can be used in a different scenario.
  11. Looking at the requirements i think these privileges should be enough? Data: SELECT, INSERT, UPDATE, DELETE Definition: CREATE, ALTER, DROP Extra: INDEX Similar to this requirement from Wordpress... http://wordpress.stackexchange.com/questions/6424/mysql-database-user-which-privileges-are-needed Also points out a nice config conditional trick where by a higher privileged DB user is used in the admin area, and normal pages use lower privileges (possibly just SELECT). Hope this helps keep ProcessWire setups even more secure.
  12. I'm just wondering exactly what MySQL permissions are required for ProcessWire? From a security point of view i would prefer to lock down the MySQL user that ProcessWire uses to the least amount of privileges needed. I guess it's SELECT, INSERT, UPDATE, DELETE, but do any modules create additional indexes? Any help on this would be great.
  13. @Mike Rockett Ah ok i see, i may have not read the thread properly, my bad.