-
Posts
70 -
Joined
Profile Information
-
Gender
Not Telling
-
Location
Europe
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
LMD's Achievements

Full Member (4/6)
81
Reputation
-
Well, this is embarassing, I did actually try it yesterday and it didn't work, but I tried again this morning and it works just fine now. I don't know what changed - maybe I forgot to save something before. Sorry about that!
-
Thanks for this great module! I was wondering if it would be possible to add support for making it work with custom image/file fields templates? At the moment the option to enable it is crossed out in FieldtypeFile modeule settings (in PW 3.0.211 dev).
-
[Note to moderators: this topic is no longer about ProcessWire specifically, could it moved to the Dev Talk forum?] @Commander_Gal I think the first thing you need to do here is work out your budget. How much money do you have to spend per month/year? Your budget will determine your hosting plan. You can always expand it later. Secondly, how much experience with web development do you have? Have you ever had a website before, specifically, have you got experience running a web server? That will determine what type of hosting plan you have. For a personal project, you might be better off with shared hosting where you do not have to manage the server yourself (whether physical or virtual/cloud) - it is also cheaper. As for developing the site, you will need some sort of local webserver to build the site on your computer (I use Laragon, free and fairly easy to use/learn) and I recommend a PHP-friendly IDE (Integrated Development Environment) to code with (I use Visual Studio Code, again free and open source). That is not an easy thing to set-up. I took a look at PeerTube (https://joinpeertube.org) and noted on their home page "PeerTube platforms you visit are built, managed and moderated by their owners" -- that means you have to build and maintain a server (although the FAQ does say it can be a virtual machine, see the FAQ: Should I have a big server to run PeerTube?), and you host the videos uploaded to your instance.
-
Hi there, TL;DR: Start by building your own personal site to learn ProcessWire/PHP, while considering all the implications of becoming a content host/publisher. Which it sounds like you're planning on anyway. It's very exciting when you have an idea for a new project isn't it? A few years ago I had a webcomic I used to run on ProcessWire. (long since archived to a static site* that never updates) and it was a such a pleasure to build on that I had the same idea to set-up my own comic hosting site using ProcessWire as the engine. I even got as far as starting to develop modules for it. Ultimately, I abandoned the idea for the following reasons: Hosting costs money. Hosting images costs more money than text. Like... a lot more. The larger and higher-quality the image, the more it costs to host, and comics tend to need high quality images. You also mention videos - are these to be hosted too, or linked via YouTube (for example)? Ok, so you could use a third-party image hosting service, but then that too will cost money if your needs grow. Also, any site that hosts user content is going to need regular backups, which will also grow in size and require safe storage. Your users won't appreciate their hard work going *poof* in the night. Technical support. Any site that has users creating and uploading content will need 24hr (or near 24hr) technical support -- not just for site maintenence, but also user support. Security. You need to ensure user data is safe and secure. Now, out of the box ProcessWire is one of the most secure CMS out there, but you still need to ensure the database and user data is secure (remember those backups? They need to be stored securely). The exact details of the hoops you need to jump through and what laws you need to comply with vary depending on where the site is hosted. Responsibility. Like it or not, you will be a publisher. You will be responsible for the content put on your site. You will need a cast-iron acceptable use policy... run it by a lawyer! You will also need to enforce it, have a reporting system etc. And how will you deal with DMCA takedown notices? Acceptable content. When it comes to what is acceptable content, will it be child-safe only? If not, how will you ensure kids can't access it? Even if it is intended to be child-safe, what safeguarding features will there be to protect kids? I looked at the above list and decided "fudge it, I'm too old for this sh*t". You, however, may reach a different conclusion, or may have thought of everything already! There is one more issue that was less applicable to me: technical starting knowledge. When I had the idea, I was already a PHP programmer of several years (before ProcessWire, I hand-build a site to publish my comic), but I get the strong impression that you are not just new to ProcessWire, but new to PHP (maybe even programming? Forgive me if not) in general. Now, as Jan suggested, building a small site first is a great way to learn - my comic is how I learned a lot of my craft. I recommend you build a site for your own personal content while you learn, and it will give you time to consider all the other things in my List of Concerns above. We will be here to help as you learn. --- * Which was super-simple to do with ProcessWire too!
-
Thanks, that page doesn't quite answer my question, although it leads to pages that might, so I have a lot of reading to do. My main concern is that it must be really easy for my client -- they are definitely not tech savvy, so if a process is remotely tricky (e.g., just setting up an account in the first place), it's just not going to work. They have used PayPal in the past and did not like it!
-
I have never used Stripe before, but I am wondering if it what I need for a client... Does Stripe allow sellers to charge the buyer's card when items are shipped (which could be several days/a week later) instead of immediately when an order is placed? I am not talking about invoicing. As far as the buyer is concerned the process is a regular shopping cart experience, except their card won't be charged immediately. If it doesn't, is there any UK available payment gateway that does? This is for a small-scale business with <£300 per month of online sales (they are mostly a "bricks and mortar" store). I'm asking in the PW forum, because if it does, I'll be looking to use Padloper as the shopping cart. Right now my client is locked into Woocommerce and a discontinued CC (PCI compliant!) payment processor.
-
That, and many other reasons, is why I use one ?
-
To use a namespaced (or non-namespaced) class inside another namespaced file, you need to add a slash ('\') before the included classes' namespace. Otherwise, it is looking for the class relative to the file's namespace. While it works -- and in this instance doesn't appear to cause issues -- removing a file's namespace negates the reason for using namespaces in the first place. Here is an ammended version of your code: <?php namespace ProcessWire; class ProcessSocial extends WireData implements Module, ConfigurableModule { public function init() { $file = __DIR__ . '/vendor/autoload.php'; if (file_exists($file)) { require_once $file; } } protected function testFeed($user){ // Note the '\' before 'GetStream' $client = new \GetStream\Stream\Client($api, $key); $feed = $client->feed('User', $user); return $feed->getActivities(); } } If you find you are calling a class a lot, then you can use a 'use' statement at the top of the file, like this example: <?php namespace ProcessWire; use \GetStream\Stream\Client; // Namespace path to the classname (inc. the classname too) class ProcessSocial extends WireData implements Module, ConfigurableModule { public function init() { $file = __DIR__ . '/vendor/autoload.php'; if (file_exists($file)) { require_once $file; } } protected function testFeed($user){ // Now you don't need to add the namespace at all here $client = new Client($api, $key); $feed = $client->feed('User', $user); return $feed->getActivities(); } } Hope that helps.
-
Another approach I use on my local dev environment, for completely unrelated projects on different hosts, is to simply symlink the 'wire' folder. My Setup/Structure: /www <-- my localhost root (I'm using Laragon). /processwire <-- folder dedicated to ProcessWire projects. /wire <-- the ACTUAL location of the wire folder that the symlinks point to. /project_a <-- each separate project (treat this folder as the web root: http://project_a.localhost/ ) /site <-- the project's ProcessWire /site folder /wire <--- this is a SYMLINK to the /www/processwire/wire folder /.htaccess <-- the ProcessWire .htaccess file. /index.php <-- the ProcessWire index.php file. /...etc <-- any other files that you'd put in the web root of a project (robots.txt etc). /project_b <-- same folder/file structure as above When I want to update the ProcessWire version, I just download it and copy the 'wire' folder over into /www/processwire (I actually rename the old folder, copy over the new and check everything works before deleting the old folder). Adding a New Project My process for adding a new project, we'll call it 'project_c', is then: Create the project in the ProcessWire projects folder: /www/processwire/project_c Create a local url for the project (http://project_c.localhost/) and point it to the newly created folder above. In the 'project_c' folder, unpack a copy of ProcessWire (the same version as the current shared wire folder for simplicity). In the browser visit http://project_c.localhost/ and run the installer as usual (& create the DB). Once installed successfully, delete the /www/processwire/project_c/wire folder (or rename it and delete later if it all works ok) and create a symlink to the shared 'wire' folder. The advantage of this for me, is that it does away with the need for naming the site folders 'site-project_a', 'site-project_b' etc.
-
There are probably as many ways of doing this as there are people who use ProcessWire, but this is how I would do it based on what I understand of your set-up. On the template: <?php // Just include one partial here (the HTML code in 'block-sidebar' and 'block-sidebar-settings' appears identical) include('views/blocks/block-sidebar.php'); ?> Now in "block-sidebar.php" <?php $aside = page()->aside; // first get the current page aside if ($aside === "") { // If the current page aside is empty, try and get the settings aside $aside = $pages->get('1032')->settings_aside; } ?> <?php // Only show the entire block of code if $aside is not empty (if neither the current page nor settings have content) if ($aside !== "") : ?> <div class="uk-card card-bg uk-padding-small uk-margin-small-bottom"> <h6 class="uk-margin-remove uk-text-uppercase uk-text-normal" style="letter-spacing: 1px; margin-bottom: .5rem !important;"><span uk-icon="icon: info"></span> Aktuelles</h6> <?=$aside?> </div> <?php endif; ?>
-
I do not understand what you were trying in your examples -- I think maybe you are muddled about how $sanitizer works? All it does it return the sanitized value. All you need to do is this: $activepost = $sanitizer->selectorValue($page->title); $articles = $pages->find("template=post, cbpage2=$author, limit=2, title!=$activepost, sort=-cbdate" ); /** * OR: in case you need to use it unsanitized elsewhere */ $activepost = $page->title; // note the position of the sanitizer method $articles = $pages->find("template=post, cbpage2=$author, limit=2, title!=" . $sanitizer->selectorValue($activepost) . ", sort=-cbdate" ); /** * OR (again): if $activepost is only used in the selector, you can ditch it altogether and use $page->title directly */ $articles = $pages->find("template=post, cbpage2=$author, limit=2, title!=" . $sanitizer->selectorValue($page->title) . ", sort=-cbdate" ); */
-
[solved] Changed Mysql-password, get an internal server error
LMD replied to biber's topic in Getting Started
@biber No problem, we've all been there at some point. -
[solved] Changed Mysql-password, get an internal server error
LMD replied to biber's topic in Getting Started
Did you remember to update your password to the new one in your ProcessWire config file (/site/config.php)? -
Another like for the CKEditor plugin custom folder change! Regarding the download page of the website: I suspect this may have been mentioned before, but the displayed version still appears to be stuck on 3.0.174, when we are actually on version 3.0.178.
-
@ryan This is an excellent addition to the core. For a particular use-case I have, I am wondering if something is possible -- either something already possible I've overlooked, or as a feature request. Sometimes it is useful to have the page info when building a selector for a page reference field — so I was wondering whether it could be possible to use placeholder tokens to pass the current page being edited to the ajax request? For example, in the "Text Tags" section of the field setup, we could enter something like this for the "Ajax URL" : /find-fieldname/{page.id}/?q={q} Where "{page.id}" is replaced with the ID of the page being edited at runtime. Similar to other places in the PW admin where we can insert placeholder tokens. Then in the hook itself, we have: $wire->addHook("/find-fieldname/([0-9]{4})/", function($e) { $pageID = $e->arguments(1); // ... the rest of the code }); I'm using page ID as an example, but it could be any valid page or template variable.