-
Posts
7,473 -
Joined
-
Last visited
-
Days Won
144
Everything posted by kongondo
-
Moderator Note @combicart Please don't double post. I am sure other forums members have seen your question above and those who have an answer will chip in. I have removed your other topic. Thanks.
-
If you have the time, never hurts to learn a new language. Python is very easy to pick up. You don't need to learn Django or use Python for web dev....there's lots of other stuff you can do with it.
-
I have never used MAMP but the following setup should work... Your MAMP htdocs folder (the one with wire inside), should have a structure like this. site site-blog site-another site-dev wire .htaccess composer.json CONTRIBUTING.md index.config.php index.php LICENSE.TXT README.md Note the index.config.php. Do you have that? Inside it reads: Your index.config.php (that you moved/copied from wire/index.config.php) <?php namespace ProcessWire; /** * ProcessWire multi-domain configuration file (optional) * * If used, this file should be copied/moved to the ProcessWire installation root directory. * * ProcessWire 3.x, Copyright 2016 by Ryan Cramer * https://processwire.com * */ if(!defined("PROCESSWIRE")) die(); /** * Multi-domain configuration: Optionally define alternate /site/ dirs according to host * * If used, this file should be placed in your web root and then edited as follows. * * This function returns an array that should be in the format where the array key * is the hostname (including domain) and the value is the /site/ directory you want to use. * This value must start with 'site-', i.e. 'site-domain' or 'site-something'. This is to * ensure that ProcessWire's htaccess file can recognize and protect files in that directory. * * Note that if your site may be accessed at either domain.com OR www.domain.com, then you'll * want to include entries for both, pointing to the same /site-domain/ directory. * * Each /site/ dir has it's own /site/config.php file that should be pointing to a separate * database. You shouldn't have two different /site/ dirs sharing the same database. * */ function ProcessWireHostSiteConfig() { return array( /* * Some Examples (you should remove/replace them if used). * Just note that the values must begin with 'site-'. * */ 'mydomainblog.com' => 'site-blog', 'www.mydomainblog.com' => 'site-blog', 'anotherdomain.com' => 'site-another', 'dev.mydomain.com' => 'site-dev', /* * Default for all others (typically /site/) * */ '*' => 'site', ); } Each site* will have its own site/config.php, with the correct credentials. ProcessWire will do the rest. Of course, you need all your domains working first, even locally. E.g. dev.mydomain.local, etc. in your hosts file.
- 1 reply
-
- 2
-
I had a feeling this was the issue. Excellent! Glad you got it sorted! ?
-
This is getting weirder! Was this a fresh/completely new install? I.e. you didn't import your backup database? If you did import your backup, have you tried with a completely fresh install? Do you still get errors? I am unsure about the steps to reproduce, could you please list them? I.e., Install ProcessWire No errror Install Hanna Code Error? If you get no errors with a fresh database, then your database is probably corrupted. If you get errors with a fresh database/install, then I'd like to try and reproduce that. Thanks for debugging!
-
Good idea but still won't work though (or rather will be malformed, ending up with beginning of time dates) as date field is a datetime field. It requires dates in the format 2015-04-25 09:15:00. Probably easiest if you edit the CSV, e.g. in Excel. Do a search and replace, then tell Excel that column has date values and tell it to change the format to what datetime expects.
-
Hi @Dzung, What is your environment so we can try and replicate (MySQL and PHP). Are there any other errors in the error logs? I am very curious about this. In addition, with respect to one of my commercial modules, a user has reported a duplicate entry MySQL error when they try to install the module. Not quite the same as your case, but a duplicate all the same. I am waiting to find out their server environment.
-
Not to hijack this thread, but recently I experienced something like this. ProcessWire said I had two identical modules but I didn't! A couple of refreshes sorted it out, so I didn't investigate it further.
-
At least you tried ?.
-
Still working fine here...
-
Hi @Orkun, I sent you a PM. Thanks.
-
Its in the source code and I doubt it will change (like Admin ID = 2). It's used internally by ProcessWire, hence I doubt if it will ever be documented. For backward compatibility, I don't think Ryan will ever change it to something else. Either way, one never knows, and like you say, it might change, though that is highly unlikely. However, a safer option is to use one's own arbitrary fixed date and a hook, e.g. 1970-01-01, or whatever.
-
If what I said above describes your situation, I have tested and the following works. I used the HTML5 datetime picker, TIME only. ProcessWire will default to a date of 2010-04-08 as mentioned in my previous post, so we use that always, just with different times. $startTimeString = "2010-04-08 09:15:00"; $endTimeString = "2010-04-08 11:00:00"; $courses = $pages->find("template=course,start_time>=$startTimeString, start_time<=$endTimeString, end_time>=$startTimeString, end_time<=$endTimeString"); bd($courses,'COURSES');
-
Maybe I misunderstood the OP but isn't the trick to always use the same date (portion) in your datetime field, just with different times? Initially, I was going to suggest that you use a hook to change the date portion of your datetime field (it's just a string) to an arbitrary fixed date (even epoch if you want) before save, until I noticed ProcessWire does the same. If date isn't relevant, then you can use the new HTML5 datetime input and only use the time portion. You will notice if you look at the database that ProcessWire will save the time to a fixed date (2010-04-08) and your selected time. It's the same date used for WireCache expireNever.
-
Blog Module - Is that the best options to add a blog?
kongondo replied to NooseLadder's topic in Getting Started
It depends on your needs. If you want something quick with ability to manage blog posts in one place, then go for it. Alternatively, for new sites, @BitPoet created blog site profiles off the Blog Module. Another alternatively is to roll out something on your own if all you need is pages, e.g. with a template 'post' and a few categories. Depends on how much time you got and the experience you are after, as well as your coding skills, to some extent. The site profiles -
OK. I'll rustle up something and PM it to you (as I don't have time atm to do commits and other testing, e.g. multilingual). It should work just fine though ? Glad you find it useful.
- 96 replies
-
- chained-selects
- dropdowns
-
(and 2 more)
Tagged with:
-
Probably inserted by the FileCompiler if your module is not namespaced :-).
-
Hi @hollyvalero Thanks for the purchase. Currently this is not possible. $ds->cat1, etc only return simple values like texts and integers. However, I should be able to add this as an extra property for $ds columns that refer to pages, i.e. add the URL. Have you seen the documentation here? https://dynamicselects.kongondo.com/documentation/using-fieldtype-and-inputfielddynamicselects-backend/fieldtypedynamicselects-api/ This would fall under 'Other Properties'. So, something like $ds->cat1URL ($ds->nameofcolumnURL format). Let me have a think and I'll get back to you. Thanks.
- 96 replies
-
- chained-selects
- dropdowns
-
(and 2 more)
Tagged with:
-
I wish I could convince you otherwise ? I won't...been there, done that.
-
I really recommend that you do. Sooner or later you will need older versions of something and it will be a pain to rebuild (and various other reasons why one should try and use some versioning system, invariably git). What IDE do you use for you coding? VSCode? The easier way is to using cloning, then push your changes from your local repository. So: Assuming you use VSCode, open the editor and CLONE your repository (using this url https://github.com/techcnet/ProcessPageViewStat.git) It will want to clone to an empty directory. You can temporarily rename the directory where your module files are to ProcessPageViewStat2 Let VSCode clone your empty repo to /site/modules/ProcessPageViewStat. It will copy the files from your project in GitHub and create a .git file. Your files will be ready for tracking. Once that's done, in your file explorer (e.g. windows explorer if on Windows), copy the local module files that you have in ProcessPageViewStat2 to the new ProcessPageViewStat VSCode will tell you that you have added new files. You can then PUSH the CHANGES to your repository. To do that, the first time, VSCode will guide you through authenticating yourself to GitHub as you are the only one with PUSH privileges. Sorry, I am in a bit of a rush. I suggest you have a look at a tutorial about the basics of git or maybe just the basics of GitHub/git and VSCode.