
marie.mdna
-
Posts
31 -
Joined
-
Last visited
Posts posted by marie.mdna
-
-
This seems very useful! I might have a silly question as I haven't read the module's code yet, how can I simply test if the blackhole page works as expected (on local) without eventually being blocked myself? And when some bots are caught, will I see it in my backend ?
-
1
-
-
Hi everyone ! Thank you for the great module 🙂
I love using it but keep facing some trouble on live, I am getting this error :
"Error: Exception: `sass/vars` file not found for @import: line: 5, column: 1 In /site/modules/Scss/vendor/scssphp/scssphp/src/Compiler.php line 6102"
I've found this @import within the admin "/wire/modules/AdminTheme/AdminThemeDefault/styles/jquery-ui.scss" but I have no idea what is behind this error as I don't have in locally... Note that I use Uikit as my default Theme (in case it has anything to do with it).
My ready.php is as follow:
/** @var Scss $scss */ $scss = $modules->get('Scss'); // Find all files with .scss extension in /site/templates/scss. // You can adjust that to your needs! Note that this might impact your // websites performance. Usually $files->find() is very fast, but the more files // you scan, the slower it will get - so try to be specific with your find(). // Also see https://github.com/processwire/processwire-issues/issues/1791 $watchFiles = $files->find( $config->paths->templates . "styles/scss", ['extensions' => 'scss'] ); $scss->compiler()->setImportPaths($config->paths->templates . "styles/scss"); // compile input SCSS to output CSS $scss->compileIfChanged( input: $config->paths->templates . "styles/scss/default.scss", watch: $watchFiles, // you can optionally define a custom output path // if not defined it will use the input path and replace .scss with .css output: $config->paths->templates . "styles/default.css", // by default the output will be minified, use 'compressed' or 'expanded' // style: 'compressed', ); $modules->get('Scss')->watchCore();
when my default.scss is in /site/templates/styles/scss/default.scss and my output css is /site/templates/styles/default.css
Does anyone have an idea on how to solve this? For now I am only able to navigate my site when I comment the whole watchCore.Thanks in advance !
-
Hi everyone ! I come with a (maybe) specific case. I am working on a site which displays customs fonts to all users (even guests). They are unique and shouldn't be downloadable as the designer remains the owner. However I cannot figure how to set up the templates for guest to see but not access the files at any given moment (everything I've tried seems to work when I am logged in as a superuser).
I have tried $config->pagefileSecure = true; and $config->pagefileSecurePathPrefix = '-'; and tried the $files->send() method (https://processwire.com/api/ref/wire-file-tools/send/) but it only results in 500 errors.
Does anybody have a clean detailed solution for:
- securely storing font files
- calling those files within css @font-face while making them secured and not accessible (even when inspecting the page)
- managing the fact that guest can still see the fonts
I can't wait to hear your suggestions !
-
hi @strandoo, thank you for the extensive answer, this is perfect and gives a clear guidance on the steps to look for! I already made some progress based on your last answer and it already helped greatly ! Thanks again
-
@benbyf thank you for your answer, I'm pretty interested in seeing it someday !
@strandoo Oh this is very interesting ! I had no idea the it was possible to connect accounts, definitely something I'll have to look into ! Also your specific case seems to be exactly why I had in mind, would you be able to share some snippets of your pw structure ? Also, I am curious to know if there is a link to see the final product in a live environment 🙂
-
Hi ! I was wondering if this module would allow to have multiple stripe users within the same PW website? My case is that each product is sold by someone different, it would be amazing if they could then receive their payment directly. Any way to achieve this?
-
Hi @Juergen
To go more on details, I use the profile page created by the module (template fl_profilepage (so it shows as "/profilePage/username1")), just added the url segment option to show more content related to specific users. There is no error message/alert or PHP error, but a javascript related error "frontendforms.js?v=2.2.2:350 Uncaught TypeError: Cannot read properties of null (reading 'innerHTML') at xhr.onload (frontendforms.js?v=2.2.2:350:39)".
For my specific case I believe that I can manage without the url segment for the loggedin user's profile, and keep url segments in a different template to show different users' content. I mostly wondered if there was a specific reason since it is actually my first attempt with url segments but your answer already clears the air ?
Also, thanks again for the modules, I am relearning how to build forms with them and I have been enjoying this transition !
-
Hi @Juergen, sorry to bother again ! I am facing another question, I am managing profile pages for users (in combination with your module FrontendLoginRegister) using url segments. So far no form has been submitted successfully form those pages. Is there a reason, or a way to work around it ? Thanks a lot !
-
hi @Juergen!
Thank you for you very fast answer, always!
I was about to edit my comment as I got some progress, but yours feels a lot more coherent; I will add my previous solution below in case it helps someone to get to your answer ?
$upload_path = $config->paths->assets.'files/'.$page->id."/"; foreach($form->getValue('fileupload') as $filename) { $pathname = $upload_path . $filename; $p->of(false); $p->images->add($pathname); $p->save(); unlink($pathname); }
Thanks again!
-
2
-
-
Hi @Juergen !
I have a question about using the form to create new pages. It has worked nicely, but I am facing some issues with images upload. I haven't tried yet for page reference but that is also on the table...
Here is what I've got so far, as soon as I have tried to upload images I am getting errors; is there a better way?
I do have and images field in my template; and a page reference (using ASM multi select option) where I'd like to add the checked items.
<?php $content = ''; $form = new \FrontendForms\Form('myform'); // some more inputs ...... $file = new \FrontendForms\InputFile('fileupload'); $file->showClearLink(true); // show an link to empty the input field under the input field $file->setLabel($page->p_title); $file->setDescription('<span>'.$page->p_upload_label.'</span>')->setPosition('beforeLabel'); // $file->setNotes('Description fileupload notes'); $file->setRule('allowedFileSize', '60000'); $file->setRule('allowedFileExt', ['jpg','png']); $file->setRule('uniqueFilenameInDir', true); $form->add($file); $items = new \FrontendForms\InputCheckboxMultiple('items'); $items->setLabel('<p>'.$page->p_select_stickers.'</p>'); foreach($pages->get("template=items")->children() as $item){ $option = $items->addOption($item->number, $item->id); } $form->add($items); $form->setSuccessMsg('<div class="success"><h2>'. $pages->success_message .'</h2></div>'); if ($form->isValid()) { // save the content as page $p = new Page(); $p->template = $form->getValue('newPage'); $p->parent = wire('pages')->get('template=parent'); $p->title = $form->getValue('title'); $p->save(); $upload_path = $config->paths->assets . "files/{$p->id}/"; $upload_url = $config->urls->assets . "files/{$p->id}/"; if(count($form->getValue('fileupload'))) { foreach($form->getValue('fileupload') as $fileItem) { $sFile = $sanitizer->pageName($fileItem, true); $pathname = $upload_path . $sFile; // Move the uploaded file to the correct directory if (wire()->files->move($fileItem, $pathname)) { $p->images->add($pathname); $p->save(); } else { // Handle the error if the file could not be moved $form->addError('fileupload', 'The file could not be uploaded.'); } } } } $content .= $form->render(); echo $content; ?>
Thanks a lot !
-
This sounds like the perfect solution ! Thanks a lot!
-
1
-
-
Hi @Juergen! I come with a small question, in my form, I'd like to have a text input for a unique code that users receive personally beforehand; the idea is that I will store a csv file somewhere and for the form to be valid, the input needs to match one of the codes within the csv. Any suggestion on how to do this based on the module? I imagine that it is pretty similar to the CAPTCHA question system but maybe there is a better way? Thank you so much for the module, it is truly amazing to work with !
-
1
-
-
Hi @Juergen, thank you for this very fast reply ! I have access to phpmyadmin and already checked it but can't seem to find any remaining "fl_registerpage" after clearing the project from all related files from the backend and by checking around.
However, I have tried to restart a fresh project and didn't face any error, I guess that I will simply spare you the trouble and start again from this version !
-
1
-
-
Hi @Juergen, I gave a look at the module, but came across a few issues (the biggest one would be that after submitting, nothing really happened?). I am testing the module locally, on Processwire 3.0.229; PHP 8.2.0. I am a wondering what could have been missed during the installation?
- I seem to have all the module requirements
- I've got this error during installing the module via directory "Integrity constraint violation: 1062 Duplicate entry 'fl_registerpage' for key 'name'", which didn't show after submitting the module
- You mentioned that 10 templates and pages will be created (with those names fl_activationpage,...), no new template or page has been added to my site, could it be because of the previous error?
- The 8 new fields for the user have been added successfully
For this basic use of $modules->get('FrontendLoginRegister')->LoginPage(); I have got an error related to the main FrontendForms module.
$login = $modules->get('FrontendLoginRegister')->LoginPage(); $login->setPrependBody(true); echo $login->render(); $register = $modules->get('FrontendLoginRegister')->RegisterPage(); $register->setPrependBody(true); echo $register->render();
The corresponding error:
QuoteLook out… Fatal Error: Uncaught TypeError: FrontendForms\Link::setLinkText(): Argument #1 ($linktext) must be of type string, null given, called in site/modules/FrontendForms/Formelements/Textelements/Link.php on line 71 and defined in site/modules/FrontendForms/Formelements/Textelements/Link.php:55
#0 site/modules/FrontendForms/Formelements/Textelements/Link.php (71): FrontendForms\Link->setLinkText(NULL)
#1 site/modules/FrontendLoginRegister/pages/LoginPage.php (98): FrontendForms\Link->setPageLink(Object(NullPage))
#2 wire/core/Wire.php (413): FrontendLoginRegister\LoginPage->___passwordForgottenLink()
#3 wire/core/WireHooks.php (968): Wire->_callMethod('___passwordForg...', Array)
#4 wire/core/Wire.php (484): WireHooks->runHooks(Object(FrontendLoginRegister\LoginPage), 'passwordForgott...', Array)
#5 site/modules/FrontendLoginRegister/pages/LoginPage.php (410): Wire->__call('passwordForgott...', Array)
#6 site/templates/og_login.php (92): FrontendLoginRegister\LoginPage->render()
#7 wire/core/TemplateFile.php (328): require('/Users/mariemad...')
#8 wire/core/Wire.php (413): TemplateFile->___render()
#9 wire/core/WireHooks.php (968): Wire->_callMethod('___render', Array)
#10 wire/core/Wire.php (484): WireHooks->runHooks(Object(TemplateFile), 'render', Array)
#11 wire/modules/PageRender.module (574): Wire->__call('render', Array)
#12 wire/core/Wire.php (416): PageRender->___renderPage(Object(HookEvent))
#13 wire/core/WireHooks.php (968): Wire->_callMethod('___renderPage', Array)
#14 wire/core/Wire.php (484): WireHooks->runHooks(Object(PageRender), 'renderPage', Array)
#15 wire/core/WireHooks.php (1094): Wire->__call('renderPage', Array)
#16 wire/core/Wire.php (484): WireHooks->runHooks(Object(Page), 'render', Array)
#17 wire/modules/Process/ProcessPageView.module (184): Wire->__call('render', Array)
#18 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(Page), Object(PagesRequest))
#19 wire/core/Wire.php (416): ProcessPageView->___execute(true)
#20 wire/core/WireHooks.php (968): Wire->_callMethod('___execute', Array)
#21 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array)
#22 index.php (55): Wire->__call('execute', Array)
#23 {main}
thrown (line 55 of site/modules/FrontendForms/Formelements/Textelements/Link.php)This error message was shown because: site is in debug mode. ($config->debug = true; => site/config.php). Error has been logged.
I would be more than happy to receive some help on how to properly install it and use it, thanks in advance !
-
Hey ! I haven't used Padloper yet but it looks very promising, thank you for this ! I am looking forward to seeing the latest version, in the meantime, is there anywhere we could have a look at a live version (and idea of pricing?)
@kongondo sorry for the bother, is there any way to get updated/notified about the upcoming release?
-
1
-
-
Hi @Juergen, first of all, thanks for the module, it seems to be a time savior !
I now have a (probably very dumb) question, I've tried to use your code from "Create the first form" in your documentation. It worked nicely and as expected. However I left my computer and when I came back I refreshed my localhost page, got an error message mentioning that the amount of time for submitting the form had been way too long and that it could be bot behavior. My bad on this... The thing is that now I can't seem to be able to render the form anymore. Any idea on how to allow myself to keep working/discovering your module?
Best,
-
On 11/9/2022 at 2:39 PM, Guy Incognito said:
It's important that this is the case too because otherwise you could potentially be informing site engines you are using a different primary domain to one your site it actually using.
Indeed, I tried the module for the first time on a test website where I didn't care much about any SEO (so nothing had been really set for this purpose) but was then testing for upcoming projects!
-
1 hour ago, virtualgadjo said:
Hi @marie.mdna
if i'm not wrong this depends on your config file $config->httpHosts var, if the first host in the array contains the www, the sitemap will use it too (at least, that's what happens for all the websites, a lot..., for which i've this module installed ?
have a nice day
perfect! That's the point I got missing!
-
Hi @Mike Rockett! Loving the module, it is such a timesaving module! I was just quickly wondering if there would be a way to add "www." after either "http://" or "https://" since I had included those in my original sitemap?
-
$comments = $this->wire('modules')->get('fieldtypeComments')->find('text~%=., limit=20'); foreach($comments as $comment) { // do something }
Oh I see! Maybe you can try something like this, but you might have to put a limit (see this for reference https://processwire.com/api/ref/fieldtype-comments/find/ )
-
Hi @Chandini, if I understand correctly, you want to redirect to a specific url after posting the comment instead of:
http://localhost/myblogs/?comment_success=1#CommentPostNote
To change the success redirect url I went into the CommentForm.php file from the module.
You should find this :$this->wire('session')->redirect($url);
Replace this with the url you want:
$this->wire('session')->redirect("./#loader");
And yes it is possible to get all comments into another page.
2 hours ago, Chandini said:is it possible to get the all comments in a particular template? irrespective to the page associated with the template.
I would do something similar to this, first find all pages with the template having the comments field, for each one of them get the comments field, then for each comment, if it is approved and published, retrieve the data you need (cite, url, date, text, votes, stars,...) and echo them the way you need :
foreach($pages->find("template=yourTemplatewithComments") as $pageComment){ foreach($pageComment->get('comments') as $comment) { if($comment->status < 1) continue; //get what you need $cite = htmlentities($comment->cite); $commentUrl = $comment->url; $date = date('m/d/y g:ia', $comment->created); // format the date $text = htmlentities($comment->text); // do something } }
Let me know if that works for you
-
1
-
-
On 11/10/2017 at 8:57 AM, formmailer said:
Hi!
I tried to enable mail notification for users (guests), enabled "Allow commenter e-mail notifications":
The option shows up on the page:
But no e-mails are being sent. Is there something else I need to do?
Other mail notifications, like the admin notification for comments, are working just fine, so it's not a general e-mail issue.
Any help is appreciated.
//Jasper
hi @formmailer, it has been some time since your post but I have kind of the same issue except that even admin notifications aren't sent, did you find out how to deal with this?
Note: my comments are rendered via the customList but it is in the site/modules directory already, as suggested by @Juergen and I don't need comments approval, just email notifications to the page creator, as well as to all people who commented on the page.
I have tried those but still didn't receive anything yet...
Any help would be greatly appreciated!
-
On 6/1/2018 at 4:19 PM, BitPoet said:
Three solutions immediately spring to mind:
a) Create different comments fields for each group of pages (downsides: you have to keep other settings in sync and page queries may have to run over both fields)
b) If all comments pages are at the same depth (or not too deeply nested) and each has a unique (might also be grand-) parent, you can create a field on those ancestors that holds the admin contact email and use the "field:" syntax in Admin notification email:
field:parent.adminemail // or, for grandchildren field:parent.parent.adminemail
You could even set multiple sources this way if the adminemail might be either on the parent or the grandparent (just make sure it isn't set on both). The comments field will only use valid emails, so if a parent or grandparent doesn't have the field (or doesn't exist), that entry will be ignored.
field:parent.adminemail,field:parent.parent.adminemail
c) In some scenarios, you want to send notifications to the user that created the page. In that case, you can use
field:createdUser.email
The big downside of that approach is that when the creator of the page is no longer available to approve comments, the createdUser field has to be changed or a different email address assigned in their profile settings (and comment notifications might get lost if nobody thinks of that).
It should also be possible to populate $field->notificationEmail through a hook, but from the top of my head, I can't name a convenient method to hook into.
I have been trying to send email notifications but for some reason no email has ever been sent, even though I might have try all these different options I still can't get it to work.
I am currently working on a forum and need to notify the createdUser of the page as well as all the people that commented (I've let the option to disable the notification).
In the admin panel, under the Comments category, emails are there, and notify is set on All as it should.
I there some settings somewhere I might have missed? Something to edit in the module itself?
-
[edit] I found my way in, thanks again for sharing!
QuoteIt looks incredible! I would love to reuse this logic but I have some problem to visualise how the templates and fields should look like from the admin panel (especially when it comes to userProfiles). For example, how could I get 2 user info pages from the same repeater field?
On 2/20/2015 at 12:49 PM, salepg said:templates(fields):
- mailbox (generate view and calls MailboxClass as controler)
- threads (title, headline, userProfiles [FieldtypePage]),
- messages (title, threads [FieldtypePage], msgBody, dateCreated)
userProfiles contains 2 userinfo pages (sender and receiver) which title is equal to username
page structure:
- Mailbox (mailbox.php template)
-- Threads (threads.php which purpose is only as selector)
---- salepg (messages.php which purpose is only as selector)
---- salepg-1
---- mr-fan
---- lostkobrakai
I would be a great help to have some screenshots of how to set the fields and templates properly!
Blackhole
in Modules/Plugins
Posted
thank you both! just tested it all and it already feels amazing