Jump to content

neildaemond

Members
  • Posts

    134
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.neilpahl.com

Profile Information

  • Gender
    Male
  • Location
    Hong Kong

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

neildaemond's Achievements

Sr. Member

Sr. Member (5/6)

41

Reputation

1

Community Answers

  1. I just had an interesting issue. I suspect that the web host did something with apache which caused a short timeframe in which the "index.php" file was served instead of the PHP generated output. Firefox found the correct response when it was available(or didn't ever receive the index.php file) , but Chrome and Edge seemed to cache the index.php file. When I tried the link via Chrome thereafter, the index.php would just download with the filename "download". After clearing the cache and cookies, it was fine. but it took some time, worrying, and convo with support before I concluded that I had received an index.php and cached it. Now, I'm wondering if there is anything I can do to fix the issue for anyone else affected by the issue other than telling them "clear your cache and cookies". Anyone ever have similar experiences? Should we have a statement like: Header("Cache-Control: max-age=3000, must-revalidate"); in our default index.php file? Cheers,
  2. Some unusual stuff happening on Freenode since the change in ownership (https://lwn.net/Articles/857252/). I got banned from freenode as a spammer just because I mentioned the word 'libera' in a room. Libera (https://libera.chat/) seems to be the place where the Freenode staff channels are are moving to & I've opened up a channel there. Please join!
  3. I use the terminal client weechat. After finding a nice little site https://tilde.club , use their ssh login and have weechat open with a screen all the time. I've just connected weechat-android to it which is a nice irc client for the mobile which ssh relays into the originally running weechat client. However, it only keeps history while logged on.. and what that tilde.club server restarts, I have to reconnect ? . I'm looking for a way to keep history during those restarts.
  4. I'm glad this channel is still up. I've recently joined on IRC and am keen to chat with anyone else in the PW community who would like to hang out there as well ?
  5. I recently joined #processwire on freenode and plan to hangout there. I hope others who want to try IRC or are already use it will join as well :) I found that everyone has their preferred communication channels and there isn't really a need to make everyone conform to one official one. Of course, using the less popular option means that you're not entitled to receive all the newest updates unless someone relays it. Processwire's newsletter already works quite well for me in that regard.
  6. It's been so long I don't remember the details. But, I found that js file here now: http://archived.neilpahl.com/PWformToWizard-validate.js
  7. I'm I was (solution below) experiencing the same as below on PW 2.5.2, after installing via softaculus(which uses minimal site profile) on a cpanel based hosting: except, When I try to reach www.seconddomain.com it displays as if I'm using www.maindomain.com Also, http://www.seconddomain.com/www.seconddomain.com/ redirects to http://www.seconddomain.com/ SOLVED: needed to add www.seconddomain.com to $config->httpHosts in /site/config.php
  8. I've sorted it. I just had to re-install the PageLinkAbstractor plugin and all those {~root_url} and {~page_5813_url} started getting converted.
  9. I'm seeing this in a site which I'm migrating... how should I go about fixing it? I still have access to the working legacy site.
  10. I still see an extra "</script>" tag at the bottom right before the </body> ... I saw it by viewing the source in the browser and it's there on all pages. It's probably some extra markup in your foot.inc file... if you kept using those files.
  11. It's been a while since I first made this site, and there has been some updates The old site design which I first posted about was kept on corporate.ccw-global.com and I've done bootstrap based redesigns (UI focused) for www.ccw-global.com and hk.ccw-global.com Processwire has allowed or content writer to plant focused article/blog feeds and maintatin a SEO friendly URL structure. Article feeds are like those found on: http://hk.ccw-global.com/specialist-insurance/specialist-articles/ http://hk.ccw-global.com/health-insurance/resources/articles/ We've been able to upload TONS of pages, and keep them well organized with PW's nice backend and were able to use custom fields extensively to allow content writers to insert proper meta-data. Very happy with how it's working for us. Almost forgot, we added muli-language capability on http://www.ccw-global.com/es/
  12. sorry to highjack the thread but WOW, multi-language urls have come a long ways since I've last implemented the hacked urlsegment detection version we used to have... do links in the content switch to the appropriate language url automatically? Alice, I think that diogo was saying how instead of creating two branches of pages, you could use multi-language fields and urls in your pages to give them multi-language capability. This will result in much less overhead of creating duplicate pages... but, slightly less flexible if you wish to have different content based on the language (which doesn't seem to be te case). If all your pages are going to be translated, I recomend using multi-language fields and urls.
  13. I'm seeing an issue with importing Chinese. I have a column which is importing Chinese text. However, only the rows which contained an English letter in it will import. The imported field will omit the initial Chinese, then start with the English segment, then the rest of the Chinese will follow as expected.
  14. hey guys, I tried putting the following code into /site/modules/SetPublishDate.module /** * * "Set Publish Date" module * */ class SetPublishDate extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( 'title' => 'Set Publish Date', 'version' => 001, 'summary' => 'your summary', 'singular' => true, 'autoload' => true ); } /** * Initialize the module * * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called * when ProcessWire's API is ready. As a result, this is a good place to attach hooks. * */ public function init() { // add a hook after the $pages->save $this->pages->addHookAfter('save', $this, 'afterSave'); } public function afterSave($event) { // get page object saved $page = $event->argumentsByName('page'); // only on pages that have a publish_date field if(!$page->template->hasField('publish_date')) return; if($page->is(Page::statusUnpublished)) { // if unpublished, empty the field if not empty already if(!$page->publish_date) return; $page->publish_date = ''; $page->save('publish_date'); } else if(!$page->publish_date) { // if page (published) and field not populated, add current timestamp $page->publish_date = time(); $page->save('publish_date'); } } } However, in the module section it will detect the module but then shows as version 0.0.0 and summary 'inactive' after pressing 'install', if get these errors: /** * * "Set Publish Date" module * */ class SetPublishDate extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( 'title' => 'Set Publish Date', 'version' => 001, 'summary' => 'your summary', 'singular' => true, 'autoload' => true ); } /** * Initialize the module * * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called * when ProcessWire's API is ready. As a result, this is a good place to attach hooks. * */ public function init() { // add a hook after the $pages->save $this->pages->addHookAfter('save', $this, 'afterSave'); } public function afterSave($event) { // get page object saved $page = $event->argumentsByName('page'); // only on pages that have a publish_date field if(!$page->template->hasField('publish_date')) return; if($page->is(Page::statusUnpublished)) { // if unpublished, empty the field if not empty already if(!$page->publish_date) return; $page->publish_date = ''; $page->save('publish_date'); } else if(!$page->publish_date) { // if page (published) and field not populated, add current timestamp $page->publish_date = time(); $page->save('publish_date'); } } } Error Class 'SetPublishDate' not found (line 437 of /var/www/xxxx/wire/core/Modules.php) This error message was shown because you are logged in as a Superuser. Error has been logged. Any ideas? I'm using PW2.2.9 EDIT (SOLVED) -> I left out the "<?php" at the beginning of the file.
×
×
  • Create New...