Jump to content

Broxden

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by Broxden

  1. Thank you for that additional information, it's much appreciated.
  2. Thank you very much for taking the time to reply. I used your suggestion for a CSV file uploaded to a page field and it works perfectly!
  3. Hello I hope someone can help me. I'm trying to make an HTML table from a CSV file. I have a test CSV file and a test PHP script, both of which work as expected when I upload them into the root of public_html. What I want to do is upload the file into my page using a Files field and then access the CSV data to produce an HTML table via my template. This code works when I place it in the root of my site... <?php echo "<html><body><table>\n\n"; $f = fopen("site/assets/files/1619/dundee.csv", "r"); while (($line = fgetcsv($f)) !== false) { echo "<tr>"; foreach ($line as $cell) { echo "<td>" . htmlspecialchars($cell) . "</td>"; } echo "</tr>\n"; } fclose($f); echo "\n</table></body></html>"; ?> However, when I add the code to my template as follows, the page does not render at all. Am I doing something wrong? <h2>Perth Memberships</h2> <div class="uk-overflow-auto"> <table class="uk-table uk-table-striped"> <?php $f = fopen("site/assets/files/1619/dundee.csv", "r"); while (($line = fgetcsv($f)) !== false) { echo "<tr>"; foreach ($line as $cell) { echo "<td>" . htmlspecialchars($cell) . "</td>"; } echo "</tr>\n"; } fclose($f); ?> </table> </div> I also tried using $files->url/dundee.csv to get file path but that didn't help.
  4. Thank you for replying. I have filed an issue but not confident about stripping out Fancybox. John
  5. Hello Is anyone using the Batcher Module successfully in Processwire 3.07? I'm trying to change the template on several pages and the Actions... link at the foot of the page doesn't appear to be working. I've tried on Firefox and Chrome in Windows and Safari on OSX and it's the same result in each browser. John I've just noticed that on my Macbook the version of Processwire is 3.03 but batcher still not working in that version either.
  6. Hi Wanze Thank you for taking the time to reply. You are correct and I have it working how. John
  7. Hello I am trying to setup multi sites in accordance with this article - https://processwire.com/api/modules/multi-site-support/ I am using option 1, multiple sites with multiple databases. I have created a new processwire installation at http://broxden.biz/tmp and it works ok. I have created a folder called site-starter1 which is in the root of broxden.biz and I have copied the files from the site folder of my /tmp installation to that folder. I have moved the index.config.php file from the wire folder to the root level and I have edited it as follows: function ProcessWireHostSiteConfig() { return array( /* * Some Examples (you should remove/replace them if used). * Just note that the values must begin with 'site-'. * */ 'startup-juice.co.uk' => 'site-suj', 'starter.broxden.biz' => 'site-starter', 'starter1.broxden.biz' => 'site-starter1', 'foundation6.broxden.biz' => 'site-foundation6', 'guesthouse.broxden.biz' => 'site-guesthouse', /* * Default for all others (typically /site/) * */ '*' => 'site', ); } I have also created a subdomain in cpanel for each of the subdomains listed above pointing to the various sub-folders. When I try to access starter1.broxden.biz, I get the following: --- ForbiddenYou don't have permission to access / on this server. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. --- Have I missed something out? Any suggestions gratefully received. John
  8. OK, understood. I checked and all seems OK. I'm logged in as superuser anyway. Replaced the index.php and wire folder with older versions and all started working as expected again.
  9. Thanks but we did not change any access / visibility settings. It just stopped working when we upgraded to 2.6.6, which we downloaded today (July 1st).
  10. Hi I have a field called Category and its type is set to Page. Its input type is set to PageListSelectMultiple. The field is contained in a template called Directory Entry. When I add a page based on the Directory Entry template, I used to see an add button that let me select from the categories and all worked OK. Today I upgraded to 2.6.6 and I no longer see the add button. I see a text field with the comma separated list of IDs of the pages already added and there is no way to add any more. What has changed in 2.6.6 to break this? John
×
×
  • Create New...