-
Posts
49 -
Joined
-
Last visited
Everything posted by tuxy
-
-
Hello, For a basic-page a used CKEditor for the body-field in the template-file: <div class="content"> <?php echo $page->body; ?> </div> The content in the editor: And here you see the result: You can see that some markup is gone! Here you see the source-code from the browser: ... <div class="content"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam officia, a! Ipsam qui, blanditiis reprehenderit molestias consequatur ad eaque quo? Minus beatae consequuntur ullam error ab repudiandae quos ipsum, reprehenderit!</p> <blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam officia, a! Ipsam qui, blanditiis reprehenderit molestias consequatur ad eaque quo? Minus beatae consequuntur ullam error ab repudiandae quos ipsum, reprehenderit!</p> </blockquote> <p><br class="Apple-interchange-newline" /><img alt="Stieren" class="align_left" src="/site/assets/files/1014/serie-stier.jpg" style="line-height:22.3999996185303px;" /></p> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam officia, a! Ipsam qui, blanditiis reprehenderit molestias consequatur ad eaque quo? Minus beatae consequuntur ullam error ab repudiandae quos ipsum, reprehenderit! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam officia, a! Ipsam qui, blanditiis reprehenderit molestias consequatur ad eaque quo? Minus beatae consequuntur ullam error ab repudiandae quos ipsum, reprehenderit!</p> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam officia, a! Ipsam qui, blanditiis reprehenderit molestias consequatur ad eaque quo? Minus beatae consequuntur ullam error ab repudiandae quos ipsum, reprehenderit!</p> </div> ... How can I made the same layout in the browser? Ex: image left and the text right, italic quote, ...? Editor version: (I don't use htmlspecialchars) What do I wrong?? Regards, Christophe
-
Hi BitPoet, Thanks for your advice. I try it! Regards, Christophe
-
Thanks guys, if ($page !== $homepage) { .. } Works perfect
-
Hello, Thanks for this nice and simple contactform. It works very well For Anti Spam adding a input-field with a sum: 2+2 = ? But how can I adding the field in an if-condition? I made this on an other site in php-code, and works good: ... if (($_POST['human'] == '4')) ... PW is new for me and don't now how implement this with the API-field. <?php // Mailform $sent = false; $error = ''; $emailTo = 'myname@gmail.com'; // or pull from PW page field // sanitize form values or create empty $form = array( 'fullname' => $sanitizer->text($input->post->fullname), 'email' => $sanitizer->email($input->post->email), 'comments' => $sanitizer->textarea($input->post->comments), ); // check if the form was submitted if($input->post->submit) { // determine if any fields were ommitted or didn't validate foreach($form as $key => $value) { if(empty($value)) $error = "<div class='alert alert-danger' role='alert'>Please check that you have completed all fields.</div>"; } // if no errors, email the form results if(!$error) { $msg = "Naam: $form[fullname]\n" . "Email: $form[email]\n" . "Comments: $form[comments]"; mail($emailTo, "Contact Form", $msg, "From: $form[email]"); // populate body with success message, or pull it from another PW field echo "<div class='alert alert-success' role='alert'>Dank je wel, uw emailbericht is verstuurd.</div>"; $sent = true; } } if(!$sent) { // sanitize values for placement in markup foreach($form as $key => $value) { $form[$key] = htmlentities($value, ENT_QUOTES, "UTF-8"); } // append form to body copy echo <<< _OUT $error <form action="./" method="post"> <div class="form-group"> <label>Naam</label> <input type="text" class="form-control" id="fullname" name="fullname" value="$form[fullname]" /> </div> <div class="form-group"> <label>Email</label> <input type="email" class="form-control" name="email" id="email" value="$form[email]" /> </div> <div class="form-group"> <label>Comments</label> <textarea rows="5" id="comments" class="form-control" name="comments">$form[comments]</textarea> </div> <!-- Anti Spam --> <div class="form-group"> <label>Hoeveel is 2+2 (Anti Spam!)</label> <input type="text" class="form-control" name="human" placeholder="?" id="human" > </div> <div class="form-group"> <button type="submit" name="submit" value="Submit" class="btn btn-default">Verstuur</button> </div> </form> _OUT; }; ?> Regards, Christophe
-
Hello, I installed the shop-module. - Adding the sc_price and sc_qty to my product-template. The product-template has no template-file, because I made a (parent) list products.php This list works, also displays the 'sc_price' for each product. I mean this code below generates a 'buy'-button? echo $modules->get("ShoppingCart")->renderAddToCart(); I put this in my products.php template: <?php $products = $pages->find("template=product"); foreach($products as $product) { echo "<h3>{$product->title}</h3>"; echo "<p>{$product->sc_price}</p>"; echo $modules->get("ShoppingCart")->renderAddToCart(); }; ?> But it don't show a 'buy'-button or whatever Sorry, i'm a newbie, what do i wrong?? Who can help me? Is there a good tutorial with screenshots or video-tutorial how setup this modules(s)? At this moment only the ShoppingCart-module is installed. Grtz, Christophe
-
Hi guys, Now it works! I changed the PHP version on my hosting to 5.4. Grtz, Christophe
-
Hi, I show the breadcrumbs this way: Parent >> Child >> Current-page Parent and Child are links. The Current-page is no link. That works with this code: <?php foreach($page->parents() as $parent){ echo "<a href='{$parent->url}'>{$parent->title}</a> > "; } // current page is no link echo $page->title; But when I go to the homepage (root), the breadcrumb shows: Home How can I develop that no breadcrumb (current-page) shows on the homepage? I try it adding this code: <?php foreach($page->parents() as $parent){ echo "<a href='{$parent->url}'>{$parent->title}</a> > "; } $homepage = $pages->get("/"); if (!$homepage) { echo $page->title; } This don't work!
-
Jacmaes, Wauw! That's excellent how make automatic titles. The multiple related dropdowns are for the front end. When select a province (parent), another dropdown shows the related cities (childs). This weekend a person ask me for make a website and now i'm happy that I can make this for the first time in PW. After a few days of searching on the forum, look PW videos, asking, ... now I understand how the CMS/CMF works! Simple, good, robust, flexible, .... I like this nice CMS/CMF. A happy newbie Christophe
-
Hello, How can upload an image in CKEditor. When I click on the image-icon in the toolbar then don't display an upload popup How can I upload images in the editor? Christophe
-
Hi @jacmaes, This is very helpful I understand what you explain In attachment you see the beginning of the events-project, with icons (thank you @LostKobrakai) : The provinces has childs: Province. Each province has childs: cities. Provinces - West-Vlaanderen -- Nieuwpoort -- Koksijde -- ... - Antwerpen -- Berchem -- Zwijndrecht -- ... (Belgium has 588 cities and 11 provinces) Each city has childs events. Ok, I follow your advice => add an event for each date. (if the same event 2 times a year, then this are 2 pages, but each with his own DateTime). Is it possible make a dropdown for provinces? And if a province selected, the related cities are displaying? Is this difficult in PW? In your screenshots i see a lot of info in the title. Is this add manually? Or is this automatic generated (combined fields) Sorry for all this questions. I learn a lot ;-) Christophe
-
Hello, The PW demo 'Skyscrapers' is also a good point to start my project! Yesterday reading the interesting tutorial that @diogo advice me. After research the best solution for structure the pages is: ../province/city/event Ok, this part is solved, for a good start in PW! An important question... A city has 2 different events (by date): 1. Events thats repeat every week the same day (ex: every friday or every friday and saterday) 2. Events that NOT repeatly every week/month, but once or more times in a year on random dates. What is the best solution the combine this to different events? Point 1: the biggest problem here is when add an event that repeat every week (1 or more days), this is a lot of work add every date for this event for a whole year. (Drupal has a Date-module for this with options for repeat an event every week/month) Is the best way for this a multiselect/dropdown days: monday, tuesday, ... , sunday ? Point 2 : is simplest with events-module, i think What is the best solution for combine this to different events-types in one template (content-type) for PW? Christophe Okay, thats interesting Thank you!
-
jacmaes, In your page-tree, I see 'related' icons: 'geo' and 'calendars' This is very logical. How can I make this similar? Show this icons automaticlly when add a 'DateTime'-field or a 'Geo'-field in a template? Sorry but i'm a newbie with PW And also sorry for my bad english Christophe
-
I checked and the server has 96MB RAM I don't know if this enough
-
Hi @Soma, On my local computer the Module MAnager works well. But i try install on a production-server and a clean PW-install. It gives a Internal Server Error . I removed the the ModuleManager-dir and the site works again. Have anyone an idea what the problem is? This is the phpinfo from the shared hosting: http://phpinfo.antagonist.nl/ Regards, Christophe
-
I found the problem! The first module i installed was Module Manager, and this give the Internal Server Error . I remove via FTP the ModuleManager directory and now the PW-site works well. I install another module 'Events', successfully! Now I will find a solution why the Module Manager gives an error. How can this module installed without problems?
-
Thanks for the fast help, but nothing helps I try set the permissions to 777 for ../sessions/ and ../cache/ . There is now errors.txt file in ../logs/ I searching the forum, but didn't find a solution for this. On my MacBook it works succesful. But on the server, i can login and edit pages, settings, ... but if i will 'refresh' or other things like download a module then this gives an 'internal server error'. The core modules works well This is the errorlog from the server: [Thu Feb 12 18:06:22 2015] [error] [client 2a02:1811:8013:3f00:1946:c1f4:445c:56ed] [host www.market-locator.com] Error sending request(GET /wire/login/module/ HTTP/1.1); uri(/wire/index.php?it=login/module/) content-length(0) (lsphp is killed?): ReceiveLSHeader: nothing to read from backend socket, referer: http://www.market-locator.com/wire/login/module/?new
-
Hi @jacmaes, You have develop a beautiful event-site My first work is read the tutorial that @djogo advice. But your post is very interesting with the screenshots. This is veryveryvery helpful The structure is very important, it is the foundation of a good page-structure. Thank you very much for helping me Regards, Christophe
-
Hello, I installed PW on my MacBook succesful (MAMP-server). Now I installed on a server in a subdomein (pw.market-locator.com). The install-procedure has no problems. I can login and edit pages, but when install a module, it gives a Internal Server Error (see attachment) Follow the troubleshooting guide https://processwire.com/docs/tutorials/troubleshooting-guide/ with no succes My (shared) hosting: https://www.antagonist.nl/ PHPinfo: http://phpinfo.antagonist.nl/ I try also another subdir: market-locator.com/pw/ but the same problem. Who can help me resolve the error?? Christophe
-
Hi @diogo, Thanks The goal of this project: - a portal for guests - a platform for vendors (members) Wauw! Thanks for the link to this great tutorial I print it out, and read it this evening Regards, Christophe
-
Hello, I will redesign an old project, event site, http://www.market-locator.com/ , this site is made in Drupal. This site is a portal site with all the weekly markets in Belgium. For the moment this site is outdated Now I have new motivation with this new CMS and will try this site alive and updated in PW. The site has a contenttype market , and this are the fields: - City (textfield) - Market (select/taxonomy) weekly, brocante, car, animal, ... - Dates (module with option for repeatly weekly/mothly) - Adress/Location (with lat/lon) - Province (select/taxonomy) - Notes (textfield) - Voting - ... I think for a good experience searching markets with a combination of 2 field-elements: - Date-field (populate with the jQuery datapicker) - Province (Dropdown/select) (Like this for example: http://www.market-locator.com/marktkalender?province=1 ) The sort of url segments in Drupal is now: ../province/Market/City ex: http://www.market-locator.com/markten/west-vlaanderen/weekmarkt/nieuwpoort I think this URL is the most logical solution ? Or not? (After the remake i will the site expandable with a registration form for market-vendors and give the vendors one page for advertising, but that is for the future) What is the best (future-proof) solution for remake this in PW? Christophe
-
Hi guys, Thanks for all these clear info. You are helpful people! I like it Regards, Christophe Grtz from Belgium!
-
Hi @LostKobrakai, Thx for the fast reply. Hmm, ok. I look inside the (core) modules. My apologies for this wrong tread! Christophe
-
Hello PW'ers, I'm a PW newbie and my first post in this forum. In the last years i was a 'hardcore' Drupal user, but i'm confused about the 'bloated' code. Make your own Drupal-theme is a hell. A few days ago I find PW. My first impression, HOW WORKS THIS??? Reading many posts in this forum, and a lot of searching on the net for good simple tutorials to understand PW. Today follow a first 'beginner' tutorial, finding in Docs of the PW-site. Wauw!! Thats an amazing CMS/CMF. I searching for a tutorial how make a select/dropdown/tag-list (similar as 'Taxonomies' in Drupal) and find it: http://wiki.processwire.com/index.php/Page_Field I try it succesfully. Ok, I have a question: I found a good tutorial in this forum how make a simple form (thanks @soma!). But how know with options a module have? Example: $field = $modules->get("InputfieldText"); $field->label = "Name"; $field->attr('id+name','name'); $field->required = 1; $form->append($field); In the above code, i see a label, attr, required But how can I know with options are available for a module? PS: Sorry for my bad english Regards, Christophe