Leaderboard
Popular Content
Showing content with the highest reputation on 05/17/2016 in all areas
-
I'm sorry to hear of your problems - but this forum is dedicated to support of the ProcessWire CMS/CMF platform. There seem to be answers to this sort of question already available. You might also try asking in DNSBL related forums or perhaps in DNSBL IRC channels (if there are any) or even on ServerFault. As this is not PW related and it is your first post on the forums I'm locking this thread. If you have PW specific questions, feel free to ask them in these forums; they will be most welcomed.5 points
-
Hi JeevanisM Oh, terribly, terribly old! No idea where those files are now, to be honest, but they were built with an older version anyway. However, it is not really necessary. Basically, the trick is in parent-child relationships. The simplest way to build a news portal is to create a home page and then create pages under that - one for each article. Using the PW API you can then list them on the homepage. See here: https://processwire.com/api/ref/page/children/ The first example produces all the children in an unordered list: <?php echo "<ul>"; // Render navigation for all child pages below this one foreach($page->children() as $child) { echo "<li><a href='$child->url'>$child->title</a></li>"; } echo "</ul>"; You can see that you could use any html markup you like, for instance your blocks. Processwire does not hamper what html/css/js you use - just think of the /site/templates/ folder as the root of your site and put it together as you would do for a static site - just with the API, if you get my drift. Now, that is the simplest example, but you can go lots of ways from there. If you wanted to have simple categories, then you can create category pages under your home page and then articles under those: home -- news -- -- I lost the election -- sport -- -- I won the race -- food -- -- I got fat That is the most logical site and you can use the parent-child relationships in the api to list things. With this sort of site, you can almost get away with creating just one template-file and using it for everything, as long as you want everything to look the same. However, you can get much more complicated. Using the Page Field, this allows you to list pages in your template that have a specific parent. So, for instance, you can use this for tags. Home -- tags (hidden page) -- -- tag1 -- -- tag2 By being hidden, the tags parent page does not appear in any menu structure you may create and nor is it accessible easily. However, the tag pages, the children are. Using a page field, you can now list those pages as a select dropdown. But you can also tell the field to allow you to create new pages from the dropdown - making it a perfect tagging system. Just a note: Don't be put off by the expression "page." In processwire, that is basically one data record. It can contain just one field or hundreds - doesn't matter. Basically, everything chunk of data that relates to a template is a page - but may not be used as a "web page" as such. However, it means all data, however simple, is treated uniformly throughout the entire system and is accessible using the API. There you go - not a tutorial as such, but maybe some clues for you. Good luck3 points
-
Good Day. I can only speak for my experiences and I am not a talented coder, like many others on this forum. Yes, this is one of the many great and helpful features of Form Builder That I am not completely sure, however I believe it's possible. Someone with more experience will have to chime in. Form Builder is a module that saves you time, when it comes to doing forms. It's a well thought out form solution. Ryan has a solid money back guarantee on this product, so you shouldn't be wary about making a purchase. You also gain access to the Form Builder VIP Forum, where you will have access to a treasure trove of information about Form Builder and different implementations. The customization features of Form Builder are there to help you implement the solution you desire. It's very convenient and I believe a solid time saver. Good luck in making your choice.3 points
-
PW aborts the page in a case the page isn't viewable or not found and renders the 404 instead. A 404 is never a redirect to the 404 page. A 404 always stays at the requested URL and sends a 404 header instead. The rendering of the 404 page does a $page->render(), thus calling the init.php again. That's why you should include() a functions php with required_once() or alike to avoid redeclarations.3 points
-
Hello Neo, you could approach this different and make the parent page "portfolio" visible. Then you could exclude it from your navigation and search function. At last step you have to exclude it from your XML sitemap. For this I prefer using a fork of the original module by tpr. Another approach could be to create your own XML sitemap, but that needs a little more effort. Regards, Andreas3 points
-
While discussing categories, we must not forget kongondo's evergreen write up on the subject https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/2 points
-
addHookMethod !== addHook, but wire() is namespaced as ProcessWire/wire() since 3.0.2 points
-
Ben provided the correct hook here: https://github.com/ryancramerdesign/ProcessWire/issues/1832 So we end up with: $pages->addHookBefore("ProcessPageEdit::processInput", function($event) { $page = $event->object->getPage(); // apply job title if a quote is selected, apply customer address if customer selected if ($page->template->id == 48) { if ($page->page_quote && empty($page->title)) { $page->setAndSave("title", $page->page_quote->title); } if ($page->page_customer && empty($page->textarea_1)) { $page->setAndSave("textarea_1", $page->page_customer->textarea_1); } } });2 points
-
Not on hover, but I suppose you know you can view them always by specifying your settings in template -> advance -> List of fields to display....2 points
-
Soma is talking about the "second" <ul> in you code. However, where do you close <ul class='nav navbar-nav'>? I cannot seem to find it. By taking a look at the validity of your generated HTML also helps to iron out your algorithm that generates the output. Adrian's Tracy Debugger module can help: http://modules.processwire.com/modules/tracy-debugger/ as it has validation features as discussed here: https://processwire.com/talk/topic/12208-tracy-debugger/?p=119538 If you do not want to use the module, you can just use the service manually: https://validator.nu2 points
-
You can ignore my last post - @dg decided to go with the approach of sending all debugger bar requests with: XDEBUG_SESSION_STOP=1 which seems to solve the issue for me. So for those of you who manually switched to the stable branch, I would suggest updating to the latest version of this module and switching back to master. I will be removing the old stable option (or swapping them when the master is released as 2.4 stable). Please let me know if things are running fast again with the new version and master branch - thanks!2 points
-
I'm also running it on Digital Ocean, using forge.laravel.com panel to config Let's Encrypt and everthing else #lazyweb So far so good. Didn't fully tested it yet because the project is in alpha state but it looks great so far on a quick webpagetest run. And yes, you must avoid concatenation of all files as your request will be bigger than it needs to be depending on your page. Basically, forget almost all you learned about http connection optimizations. Read: https://www.smashingmagazine.com/2016/02/getting-ready-for-http2/2 points
-
I've tried segments but didn't know I have to turn it on in template.. Thanks!1 point
-
Unless I am missing something obvious, it should just be a matter of enabling url segments on your home template, then using the value of the segment to get the page details for that user name. https://processwire.com/docs/tutorials/how-to-use-url-segments/1 point
-
Hello JeevanisM and welcome to the forum! Joss is still an active member, so I suppose he will be able to properly answer your question, but in the meantime, I would like to point out that his tutorial is rather old, and a lot of new features that make things a lot easier to implement has been added to ProcessWire since then. Probably the most current and therefore one of the most recommended tutorials is this: http://blog.mauriziobonani.com/processwire-basic-website-workflow-part-1/ The only "issue" with it is that is uses Twig, which you might not want to use, however, I recommend to read it anyway. Another resource I recommend reading is the old wiki: http://wiki.processwire.com/index.php/Main_Page Yeah, it is old too, however it is mainly discussing general concepts which has not changed at all, so it's worth reading.1 point
-
hi @depone, I assume you're referring to the latest master version which is only compatible with PW 2.x. I don't want to add any features to this version anymore. Sorry for that. But I decided to add this feature to the feature/devns branch which supports PW 3.x. There is a new module setting where you're able to set a reply-to email address. If you want to use a value from the entries of the form, you have to pass this as an option to the render function: $options = array('emailReplyTo' => $input->scf_email); echo $modules->get('SimpleContactForm')->render($options);1 point
-
Thanks for your response, AndZyk. I excluded the "portfolio" page from the menu using the selector-option in the SimpleNavigation-Module. I installed the fork you recommended and tried to exclude the page via the template-name: template=portfolio-list However, I had to delete the browser cache several times until it worked. But it seems to work now.1 point
-
https://processwire.com/talk/topic/7864-conditional-module-autoload/ This might be of interest for you.1 point
-
The images field is getting superb, thanks! I may have an issue here in Lister (default, not ListerPro). Adding an image column to the columns shows no image though they worked fine before. Might be a CSS-only issue because disabling these rules shows the image: .gridImage__overflow > img { /* position: absolute; */ /* top: 50%; */ /* left: 50%; */ /* transition: transform ease .3s; */ /* -ms-transform: translate3d(-50%, -50%, 0); */ /* transform: translate3d(-50%, -50%, 0); */ }1 point
-
Just tested with latest Tracy and it seems everything works fine here, no slowdowns and the bar appears even using the Master option (http & https). I wasn't using xdebug btw. Thanks!1 point
-
If it's not the php timezone, it could also be the mysql timezone setting.1 point
-
$message('your message');// or $error('error message'); $session->redirect('./') You may want to consider handling situations where the page was not successfully saved or other form errors occurred...1 point
-
Ok, so just save the field on the current page: $page->of(false); //sorry, I forgot this in the above examples $page->lp_item = $sanitizer->text($input->post->lp_item); $page->save('lp_item'); You can make it even shorter with: $page->setAndSave('lp_item', $sanitizer->text($input->post->lp_item)); That's it! Don't forget though if you have multiple users editing the same field on the same page you may want to deal with possible conflicts if they are editing at the same time.1 point
-
You have to choose a page to save data to. The template for the page has to have the lp_item field in it. You could create a new page for each form submission - maybe like this: $p = new Page(); $p->template = "my-form-template" //use the name of the template that has the lp_item and other required fields in it. $p->parent = $page //save as child of the current page, or choose another page here $p->lp_item = $sanitizer->text($input->post->lp_item); // change the sanitizer type as appropriate: https://processwire.com/api/variables/sanitizer/$p->save('lp_item'); $session->redirect('./');1 point
-
What is $u meant to be? Is that the current user? Assuming it is and lp_item is a field on the user template, then try this: $user->lp_item = $sanitizer->text($input->post->lp_item); // change the sanitizer type as appropriate: https://processwire.com/api/variables/sanitizer/ $user->save('lp_item'); $session->redirect('./');1 point
-
What is $u? The eror says $u is not an object...I am guessing you is for user? You also need to sanitize inputs before saving them, e.g. the 'lp_item'1 point
-
For your autoload scenario I’ve been doing something similar, but I execute the job via Ajax. That way it doesn’t impact the page load. It’s an extra request, but should go unnoticed by your visitors since you don’t need to wait for a response. Sorry this doesn’t answer your question specifically, but I thought it might be applicable to your scenario. With regards to caching, ProcessWire will always execute even if it only serves a cached page. That is unless you use ProCache, which allows you to serve cached HTML without invoking PW.1 point
-
Hi, I see this module : http://modules.processwire.com/modules/login-notifier/ Written by Mr. Cramer himself. I have not done any coding for user-member/access functionality in Processwire so I can't speak from experience, sorry. I would say that that module by Ryan might contain what you need or at least point you in the right direction. Can't hurt to look. Then you also have the API. - https://processwire.com/api/variables/user/ And last but not least - http://cheatsheet.processwire.com/user/user-methods/user-isloggedin/ Ok.. maybe not the last.. I found this also https://processwire.com/talk/topic/9811-frontenduser-login-logout-and-register-users-members/ . Read the features list. It has functionality to check for a user who is already logged on. Hope the above helps.1 point
-
Hello, This was caused by a ModSecurity rule on the client's hosting environment - more info here: https://www.trustwave.com/Resources/SpiderLabs-Blog/ModSecurity-Advanced-Topic-of-the-Week--Remote-File-Inclusion-Attack-Detection/ Cheers, Chris1 point
-
no before and after benchmarks with pingdom, google page speed or anything like that? I'm also wondering about how my css/jss asset work flow would work with http/2 as I've read it benfits most when assets are seperated and not concaternated (like using AIOM module). https://www.smashingmagazine.com/2016/02/getting-ready-for-http2/#concatenating-css-and-javascript1 point
-
I also have an Ubuntu droplet on Digital Ocean. After setting up the free Let's Encrypt SSL certificates, I have activated http/2 and everything runs smoothly. I haven't tweaked my sites to take full advantage of http/2, or run benchmarks to measure improvements though.1 point
-
For me, the ability to crop an image in Variations modal would be sufficient. 1. Thumbnails created automatically. 2. If necessary user could select and crop the image manually. Keeping the size and proportions of the original image. The column "NOTES" should contain information about the image, eg: "Banner image - used on homepage", "The image used in the list of posts." This information can be saved when creating thumbnails $img->size(100,100, 'Post image')->url or using a GUI in the administration panel.1 point
-
http://bfy.tw/5mfF : migrate site Please have a look at the results and let us know if you still have a specific need...1 point
-
I'm striking the same problem. I'm using Ryan's findRecentComments function (which in turn uses FieldtypeComments::findComments). This works well if you want the latest comments from any page. But I want to limit the list of latest comments to pages with a particular property. I think the only way to do this is to use the pages_id value of a comment, which stores the ID of the page the comment is on. First I was hopeful that pages_id would support sub-selectors but no joy there. So then I figured I'll build a PageArray of pages I want to limit my latest comments list to and give that to pages_id in the selector, but that doesn't work either. Even manually entering a set of bar-separated page IDs doesn't work. Is there some trick to getting pages_id to accept anything apart from a single page id? Edit: This line explains why the problem exists. I have submitted a GitHub issue / feature request.1 point
-
The easiest way to install is to paste: ElasticSearch into Modules > Site > Add New > Module Class Name I don't know much about the Elastic Search module. Another option which I know handles searching PDF files is: http://modules.processwire.com/modules/indexer/1 point
-
1 point
-
I also support these, with the additional idea of turning the labelled buttons into icon only "tools" (supported with tooltips). We need room for the filenames, so the shorter the buttons are the better. Also, we should not forget the case of a single image, confined into a narrow Column Width (mine is 30%). If we take a look at these screenshots, we can see a two glitches in my usecase: Namely #1 proportional grid mode: image extends beyond its column. We can adjust the preview size, however I can imagine a narrow image that cannot be made small enough to fit. #2 list mode: transparency is not handled1 point
-
This is what you have to love about ProcessWire. Fantastic release last week, some feedback from users, then an even better release 7 days later. 2 small requests from me. Tooltips/titles for the icons for the different views. Reset to default for the slider. Keep up the great work team.1 point
-
I can't see if you have anything selected for the login template in your settings - your screenshot is cut off. Is it definitely pointing to the login template php file? If it is, then we need to make sure the module is being loaded - can you add some debug statements to the module - I would start by making sure the "ProtectedCheck" method is being called: https://github.com/adrianbj/PageProtector/blob/master/PageProtector.module#L212 It would be great if you could get to see if it is called and then work your way through to make sure that this line: https://github.com/adrianbj/PageProtector/blob/master/PageProtector.module#L280 is being triggered. I would go with: wire('log')->save('debug', 'test'); or something similar to make sure each point in the code is being called. BTW - there is no need to manually create the login form on the login template page - just echo $loginForm and the module will take of that for you (but that shouldn't stop it from working). On another note - I see that you have the homepage protected - there is no need to protect any child pages separately unless you have specific roles assigned, but that doesn't seem to be the case - but again that shouldn't stop this from working.1 point
-
Thanks @horst! This'll do just fine. When I get v1.1 finished, I'll open specific forum thread for this and push it to the modules directory.1 point
-
Here you go: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/ Have a good read through that thread, create your form, have it process off to PayPal and then point Paypal back to an ipn.php file on your server that uses code based on: https://github.com/paypal/ipn-code-samples/commits/master/paypal_ipn.php Just bootstrap PW into that file and after processing, remove the unpublished status from the page.1 point
-
If you have a robots.txt, I would use it to specify what directories you want to exclude, not include. In a default ProcessWire installation, you do not need to have a robots.txt at all. It doesn't open up anything to crawlers that isn't public. You don't need to exclude your admin URL because the admin templates already have a robots meta tag telling them to go away. In fact, you usually wouldn't want to have your admin URL in a robots file because that would be revealing something about your site that you may not want people to know. The information in robots.txt IS public and accessible to all. So use a robots.txt only if you have specific things you need to exclude for one reason or another. And consider whether your security might benefit more from a robots <meta> tag in those places instead. As for telling crawlers what to include: just use a good link structure. So long as crawlers can traverse it, you are good. A sitemap.xml might help things along too in some cases, but it's not technically necessary. In most cases, I don't think it matters to the big picture. I don't use a sitemap.xml unless a client specifically asks for it. It's never made any difference one way or the other. Though others may have a different experience.1 point