Jump to content

davo

Members
  • Content Count

    283
  • Joined

  • Last visited

Community Reputation

94 Excellent

About davo

  • Rank
    Sr. Member

Profile Information

  • Gender
    Not Telling
  • Location
    Bournemouth, uk
  1. davo

    Hi Pete, I remember you talking years ago about a hotel booking module. Did you ever progress this? 

  2. I gave the upgrade to 3 a go today, but i'm hitting a couple of problems. I have a functions file but when it is called from in a template I get this error: Error: Call to undefined function wire() (line 155 of /var/www/vhosts/dudmc.com/httpdocs/site/templates/myfunctionlib.inc) Do I have to amend anything to make this work again?
  3. Hi I'm about to prepare to do an upgrade from ProcessWire 2.8.33 to 3.0.39. Has anyone experience any complications or issues that I should be aware of? Davo
  4. davo

    www. rewrite

    I do indeed. I've sorted it now though. I adjusted the preferred domain in plesk. I don't think the server can have mod rewrite installed
  5. Hi, I have a site running PW 2.8. I moved it to a new server and (possibly foolishly) did the 2.8 upgrade at the same time. Now, all the pages are no longer using the www prefix which has screwed with search engine indexing somewhat. I don't know if it's the way the host file was created on the server or because i have over written the htaccess file. I though that on the .htaccess file I could uncomment the following two lines to prepend www but when i do this i'm getting a 500 error: # ----------------------------------------------------------------------------------------------- # 13. OPTIONAL: Redirect users to the 'www.' version of the site (uncomment to enable). # For example: http://processwire.com/ would be redirected to http://www.processwire.com/ # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Any advice please? Davo
  6. After a week of testing in 2.8 this appears resolved. I suspect a bug in 2.7 .3 thanks for the help
  7. Adrian, I think the upgrade to 2.8 may have sorted it. I'll keep testing tomorrow but first impressions looks good. ta
  8. That's what I tried. But i get this complaint back when viewing the page: Error: Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column '_sort_parent_title.title' in 'order clause' (in /var/www/vhosts/dudmc.com/httpdocs/wire/core/PageFinder.php line 298)#0 [internal function]: PageFinder->___find(Object(Selectors), Array)#1 /var/www/vhosts/dudmc.com/httpdocs/wire/core/Wire.php(398): call_user_func_array(Array, Array)#2 /var/www/vhosts/dudmc.com/httpdocs/wire/core/Wire.php(333): Wire->runHooks('find', Array)#3 /var/www/vhosts/dudmc.com/httpdocs/wire/core/Pages.php(216): Wire->__call('find', Array)#4 /var/www/vhosts/dudmc.com/httpdocs/wire/core/Pages.php(216): PageFinder->find(Object(Selectors), Array)#5 [internal function]: Pages->___find('template=dmc, D...')#6 /var/www/vhosts/dudmc.com/httpdocs/wire/core/Wire.php(398): call_user_func_array(Array, Array)#7 /var/www/vhosts/dudmc.com/httpdocs/wire/core/Wire.php(333): Wire->runHooks('find', Array)#8 /var/www/vhosts/dudmc.com/httpdocs/site/templates/myfunctionlib.inc(35): Wire->__call('find', Array)#9 /var/www/vhosts/dud This error message was shown because you are logged in as a Superuser. Error has been logged.
  9. Thanks Adrian, Are there any issues with upgrading to 2.8? I couldn't easily find what the name space issue is. How do you mean adding the sort to the selector? I already have one sort there and can't seem to add parent.title
  10. I've been using a function for some time now which sorts an array by the title of a linked page 'DMC_country_represented' title but then should reorder it by the parent page title to group the pages together. Recently the order is no longer working and a couple of the list items are out of alphabetical order. The only thing i'm aware of recently that has changed is a core upgrade to 2.7.2. Any advice welcome please. function dmc_list($names){ $dmcs = wire('pages')->find("template=dmc, DMC_represented=1, sort=DMC_country_represented"); $dmcs->sort("parent.title"); $total = $dmcs->count(); $items_per_column = ceil($total / 3); $count = 0; echo"<div class='row'>"; echo "<div class='col-md-4'>"; //start the first column echo '<ul>'; // start your first list foreach($dmcs as $dmc){ $region = $dmc->parent->title; $regionid = $dmc->parent->id; if($region !== $new_region) echo "<li class='list-group-item list-group-item-info'><b>{$region} {$regionid} </b></li>"; if($names=="names") { $showname = " - " . $dmc->title; } $link = "<a href='$dmc->url'>{$dmc->DMC_country_represented->title} {$dmc->sub_country->title} $showname {$regionid} {$count} of {$items_per_column} in total {$total}</a>"; echo "<li>{$link} </li>"; if(++$count%$items_per_column) { // this will be false when we are on the last item in column echo ""; } else { // this part will run when we are on the last item in the column echo "</ul></div>"; if($count !== $total) echo "<div class='col-md-4'><ul>"; // this will start a new column unless we're on the last item. } $new_region = $dmc->parent->title; // why the same variable? } // end foreach echo "</div>"; // end row }
  11. davo

    Processwire to iOS app

    Thanks Alxndre' So didn't actually do the app programming myself, but I what I did have to do know my own site structure well and then learn how that related to the real database structure behind processwire; which for a novice like me wasn't instantly obvious. I'm sure there's far more technical ways of interpreting the schema, but the way I like to think of it is processwire makes virtual tables of the real sql tables.I then had to explain all the structures to the developer who i have to admit is far more proficient at databases than I! The app is build for iOS and android. The iOS can be frustrating as everytime we iron out a bug it takes a while to get back into itunes. The nice thing about this is the client has been used to working in the back end of processwire now for a couple of years and have a very deep site. The app is read only to the db and when there is a connection it looks for live data, if you're out of signal it uses a cached copy of all the data.The good news is the client only has to work on one console ie processwire back end and the content changes are reflected on the live site, android and iOS. It looks like you're doing two way communication then with processwire; i thought about doing this safely using someone like url query string segments to allow pw to handle security/formatting etc. what was your approach?
  12. So a while ago I started a thread about using an existing processwire as the back end for a mobile app. There was some discussion about how viable it was, but i've been working with another developer and we've started to get somewhere. This iOS app https://appsto.re/gb/mtaH_.i uses http://www.dudmc.com/ as the back end. It's not perfect but we're pretty pleased so far.
  13. Thanks guys. I'll do some research into each of those methods and see what I can do. It's only for a prototype to prove the concept so authentication isn't a real issue... The model is likely to go to a bespoke developer once proved. Cheers
  14. Have a read of this: http://www.w3schools.com/html/default.asp Then use php to output some of those statements like this. just try creating a file named mypage.php with the following content: <? php echo "<h1>The title of the page is....</h1>; echo $page->title ; ?> You'll then need to apply in processwire that template to a page you make.
×
×
  • Create New...