Leaderboard
Popular Content
Showing content with the highest reputation on 04/14/2016 in all areas
-
So this is sufficient, as in most cases in PW like fields. No isset() or empty() etc. if($session->cart_item){ .... exists or is populated } else { .... doesn't exists or is empty } You can also write, as always in PW $session->get("cart_item"); You can also use namespaced session $session->seFor("myshop", "cart_item", $cart_item); and get it with $cart_item = $session->getFor("myshop", "cart_item"); BTW what happens if hack your code and enter a "template=user, id=40, check_access=0" into your "product_id" POST?5 points
-
biber, Here's an idea for you. I haven't tried this myself, so no guarantees: Install the TextformatterNewlineBR module. Go to your image field's settings and switch to the "Details" tab. Scroll down and find the textformatters box. Add "Newlines to XHTML Line Breaks" formatter to the image - and make sure it is listed after "HTML Entity Encoder" (if you have that setup on your field.) View your page. Hope that helps. Steve4 points
-
You are lucky your wish comes repeatedly in fulfillment. There are multiple ways for your needs in PW: Fieldtype Repeater Fieldtype RepeaterMatrix (ProField) Fieldtype Table (ProField) Fieldtype PageTable Fieldtype Page + Module AdminPageEditLinks4 points
-
Fieldtype Compatibility Overview doesn't work Fieldtype PageTable inside Repeater or RepeaterMatrix Fieldtype Page + 3d Party module AdminPageEditLinks inside Repeater or RepeaterMatrix works Fieldtype RepeaterMatrix inside RepeaterMatrix Fieldtype Repeater inside Repeater Fieldtype Repeater inside RepeaterMatrix and the other way round Fieldtype Page inside Repeater or RepeaterMatrix Fieldtype PageTable inside Page and the other way round @Martijn (next post) thanks, updated list4 points
-
3 points
-
CloudFlare helps us additionally in the defense against DDoS attacks. We have a few projects of customers who like to be the focus of attackers and often attempt to paralyze the servers. With CloudFlare, we have this blocked quickly. The service blocks the attacks, but leaves the real visitors through.3 points
-
Edit: Netcarvers solution is the recommended one. But here an approach from the API side: I think the only way is to use a Textformatter like Markdown or in your case TextformatterNewlineBR. If you want to format your description inside the template use a Textformatter like Markdown or in your case TextformatterNewlineBR. Your description : 'Description with \n Line break' should output: 'Description with <br/> Line break' in your Template: $desc = $page->image->description; $desc = $modules->get('TextformatterNewlineBR')->format($desc); You maybe have to set $page->of(false) before grabbing $desc. Just try out. @netcarver You where quicker and better I didn't know this ...3 points
-
If you have control over your nameservers, it's a complete non-issue. You just configure CloudFlare to point to your hosting, and point your nameservers at CloudFlare. For historical reasons (ie I didn't know any better) all my own domains are with Godaddy, while my hosting is elsewhere (currently vidahost, who have been excellent in the couple of years I have used them and before that nearlyfreespeach), and CloudFlare sits between them nicely. Even with the free account you get end to end encryption (CF accepts a self-signed cert for traffic from your server to them and provides a free cert for traffic from them to the browser), HTTP2/SPDY, minification, automatic injection of GA scripts, email obfuscation, CDN features and a whole slew of other stuff, even on the free account. Feel free to visit my blog which uses CloudFlare (link in sig) and have a sniff around. There's at least one post on there specifically about using CF with PW sites.3 points
-
3 points
-
2 points
-
2 points
-
And (again) $session->cart_item is not a variable, it just does return or receive one. You need to update the array separately. $cart_item = $session->cart_item; $cart_item[10]['quantity'] = 20; $session->cart_item = $cart_item:2 points
-
$session->cart_item is not a variable, which you could check for existance. It's an object ($session), which you ask for a specific key (cart_item). This will either return the item or null if the key is not found.2 points
-
Last summer we hosted big event website (also very heavy site with lots of big images, videos, embeds ets), that got well over 300 000 visits during weekend. We prepared for that with combination of ProCache + Cloudflare and we didn't get any reports of performance or availability problems (first time ever said the event organizer and it was also first time Avoine hosting the site). We were using the paid plan of Cloudflare though. It saved tons of servers from our side (just like ProCache did also).2 points
-
PHP type comparison tables http://php.net/manual/en/types.comparisons.php2 points
-
Try the multiplier fieldtype: https://youtu.be/xahmOuhec-o. It is one of Ryan's ProFields.2 points
-
I may not completely understand your requirements, however I believe you are maybe talking about the existing Fieldsetopen fieldtype. https://processwire.com/talk/topic/176-fieldsetopen-fieldsettabopen-%E2%80%93-what-is-it/2 points
-
I may not completely understand what your requirements are however, I believe you could use the Profields: TextAreas module:2 points
-
A few of the many links to get you started (google is your friend): https://processwire.com/talk/topic/10394-content-block-builder-in-processwire/ https://processwire.com/talk/topic/7350-smart-widgets-blocks/ https://processwire.com/talk/topic/10769-static-content-blocks/2 points
-
I took a conservative approach and added some stylesheet onload bookkeeping. I'm optimistic this will fix the flash of unstyled content once and for all.2 points
-
ProcessSlider Module (alpha version) Repository https://github.com/mauricius/ProcessSlider Introduction Like many of you, I came to ProcessWire from Wordpress and immediately I fell in love with its power and its clean syntax. I have to say that PW has become my default choice for building websites. However there is only one thing that me and my clients miss from WordPress and is the ability to visually build image sliders through plugins (Nivo, Revolution Slider, LayerSlider, just to name a few). So I decided to create a module for this purpose. ProcessSlider essentialy is an editor for the wonderful Jssor plugin (http://www.jssor.com/) which is absolutely free. The module creates a new page under the Setup menu which allows users to easily add image sliders on the site using an intuitive visual editor. To each slider you can easily add images and other custom and animate them using the transition effects provided by the Jssor slider. The ProcessSlider module in reality is composed by three different modules: ProcessSlider: the main module InputfieldSlider/FieldtypeSlide: allows the user to use an existing slider inside a page MarkupSlider: converts the slider into Jssor compatible markup and optionally provides the necessary initialization script Features Custom slider size Drag and Drop interface Move and resize elements Slides background with images from existing PW pages Slider Preview (with the provided MarkupSlider module) Predefined style classes for Elements Add or remove Slides Add or remove elements Change slide order visually Jssor skins and bullets support Visual Timeline Optional responsive/fullwidth slider Predefined elements: Images, Text, Links, Image as link, Div blocks, Youtube Videos Animation Options (In and Out): Animation type, Delay, Duration The editor is built with Vue.js+Webpack and uses jQuery for D&D and resize functionalities. Release I'm going to release the module in a couple of weeks, there are still some minor tweaks and improvements that I would like to add. Demo Screencast (be sure to watch it at least at 720p) I hope it will be helpful to the community and I would be glad to get feedback or suggestions for improvement! Please also consider that it is my first PW module, so probably I'm missing some best practices, hopefully the most experienced developers can throw me some hints1 point
-
Hello, One thing that I really would like is a group fieldtype. This group fieldtype is just for grouping other fieldtypes. E.g.: "dates" as group field has "dateStart" and "dateEnd" (both datetime fieldtype) as fields. This would be a great feature! Is something like this currently possible?1 point
-
hi cb, i think addhookafter "saveReady" should be fine. and just set the values, the save will take place afterwards: // change this $page->setAndSave("title", $page->page_quote->title); // to that $page->title = $page->page_quote->title;1 point
-
1 point
-
Just thinking out loud... a TextformatterNewCar could come handy1 point
-
That's just not how processwire does work. Templates do each have a dedicated fieldgroup. This fieldgroup can just hold fields and not groups. One could build a system around that, which does automatically update the fieldgroups of selected templates, but Ryan didn't seems to consider – in other topics about the same request – adding the ability to add groups as equal members of a template as fields. It just doesn't work that way in the internals.1 point
-
1 point
-
I could be wrong but I think LostKobrakai edited his post from $page->text_1 = "test"; to $page->setAndSave('text_1', "test"); as I revisited his solution and it worked fine.1 point
-
Or do you mean Repeater? Here you can group (via Template) fields together and use them multiple times in one page.1 point
-
You should look at the TextAreas in the ProFields ($) package. The catch is that all the grouped fields are the same type but datetime is one of the 20 or so types available. Very handy.1 point
-
Documentation Update (Work in Progress!) http://blog.kongondo.com/ Blog docs are back! Still work in progress though. Some latest methods and almost all methods' $options not yet covered in the docs. Will get there eventually. Site may not work properly on all devices (you know me and CSS, sigh... )1 point
-
Documentation (Work in Progress!) http://mediamanager.kongondo.com/ Still working on this but at least the basics to get you up and running are covered Getting started Adding media to Media Manager fields in ProcessWire pages Currently, site might not work properly on all devices :1 point
-
There are already a bunch of topics about exactly that topic. Currently your options are pagetable, pagetable extended or matrix fields, where the last one is a commercial pro module. Depending on the specific need one might be a better fit than the other.1 point
-
You can do this from your forum account -> Client Area1 point
-
So it finally happened – I (re)launched my first multilingual site built with PW. For the first time, I do not have to mention that the site is in German only and most of you will probably not be able to etc. etc. blues-baltica.de is a site for a couple of events surrounding the most important of them – the BluesBaltica or Bluesfest Eutin, which is considered to be Europe's second most important Blues festival. It will take place for the 27th time in a couple of weeks, as it does every year in May in the small town (about 17K people) in northern Germany that I live in. It's an admission-free, open-air festival. In addition, the association organizing it also hosts the German Blues Challenge & Awards, which is the German qualifiers for the International Blues Challenge in Memphis, TN. Okay, technical stuff. It's multilingual, which is the biggest thing about it for me since it was my first multilingual site. And it's been a blast. Seriously, all that multilingual stuff in PW? The multi-language fields, the alternate language fields, the tabbed interface? It's friggin' perfect. Whoever came up with all that is a genius. Other than that, it uses just a few modules, most of them are my “go-to modules” that I use in every project, like Markup Simple Navigation and Markup Sitemap XML. Used Hannah Code for the first time to include the code for the Piwik opt-in iframe in a WYSIWYG editor field – works like a charm. Also use Scheduled Pages since this site sometimes needs news posts to go live in the middle of the night. And Export Site Profile because it's the easiest way to back this up regularly. As for the design, it is a bit “special” because the main organizer, who is my contact person, it a bit particular about it. Also, they really don't have a huge budget, so this is kind of a pet project anyway. The main objective besides moving away from the old CMS really was to make it easier to maintain in the backend. But it is HTML5, responsive and even uses SVG sprites for icons, and hopefully performs well for everyone despite the about 60 301 redirects it needed after moving from Contao to PW.1 point
-
When it comes to handle multilingual content ProcessWire really outperformes any other system I've ever seen.1 point
-
The genius here is I believe adamspruijt for creating languagefieldtabs1 point
-
Thanks to Ryan the language fields on MarkupCookieconsents option work with this patch for devns. So either apply yourself (like I did) or wait for the next release, probably coming on friday. https://github.com/ryancramerdesign/ProcessWire/commit/2fe134b7b059fff023f0f37c7f172a9853c88af2 You only need to update ProcessModule.module from the linked GitHub page, the other fix is as mentioned in the title not needed for the language fields to work.1 point
-
Hi kathep! You just need to store the images in a variable just like $content is. So, change the loop: if (count($page->images)) { $images = ''; foreach($page->images as $image) { $image = $image->size(800); $images .= "<img src='{$image->url}' /><br />"; } } ... rest of code // Primary content goes here $content = $assignment_w_heading . $semester . $images . $page->body; You can remove the <br /> after each image if you prefer.1 point
-
At X-com we build and maintain ticketingsoftware, named Itix. About 20 Dutch Theatres run our software and since we've dropped maintentance on our own CMS, we're slightly migrating more and more of those theatres towards a ProcessWire powered website. Using various API's and synchronisation tools, all needed information and actions are provided to the ProcessWire frontend, resulting in a cool e-commerce solution which is flexible towards the client and scalable for us. Another one was released this week, go see the result at http://www.maaspoort.nl The design was done by http://www.dejongensvanboven.nl The technical implementation by us at http://www.x-com.nl Other Itix theatres running on ProcessWire include: http://www.schouwburgvenray.nl/ http://www.dnk.nl/ http://www.rabotheater.nl/ http://www.deleest.nl/ http://www.hof88.nl/ http://www.demeenthe.nl/ http://www.muziekgebouweindhoven.nl/1 point
-
Hi, you can find some basic search logic in the search.php of the default site profile: https://github.com/ryancramerdesign/ProcessWire/blob/master/site-default/templates/search.php In https://github.com/ryancramerdesign/ProcessWire/blob/master/site-default/templates/_main.php#L61 you find the code for the search form. This should get you started. EDIT: If you should later decide to use AJAX, there is Soma's module: https://github.com/somatonic/AjaxSearch1 point
-
I made a template for add new page. Page is added under home page. <?php include('./_header.php'); ?> <?php // Load FormHelper module and also set wire('fh') variable $fcm = $modules->get('FrontendContentManager'); // add a new page based on a template and a parent object $parent = $pages->get('name=home'); $form = $fcm->add($parent, $parent->template); // jsConfig needed by ckeditor echo $fcm->JsConfig(); // outpunt needed scripts for inputfield modules, ... foreach ($config->styles as $file) { echo "<link type='text/css' href='$file' rel='stylesheet' />\n"; } foreach ($config->scripts as $file) { echo "<script type='text/javascript' src='$file'></script>\n"; } ?> <div class="uk-container uk-container-center"> <h1><?php echo $page->title; ?></h1> <?php // output the forom echo $form; ?> </div> <?php include('./_footer.php'); ?> and only result I get is this. Any help? https://www.dropbox.com/s/2mwtksa20qxs5bk/Screen%20Shot%202016-03-10%20at%2011.52.48.png?dl=01 point
-
The module is quite uninteresting. It's just generating a list of those mentioned classes. But I can show you what I mean by migration (not db migrations, which would be tedious as shit). The Migration class is just an abstract class, that does make sure everything is according to contract and holds some helper methods not used here. And it's extending Wire so all the processwire api variables are injected properly. class Migration_2015_10_22_13_15 extends Migration { public static $commit = ""; public static $description = "Install MapMarker\nCreate map fields"; public function update() { $this->modules->install("FieldtypeMapMarker"); $from = new Field(); $from->type = $this->fieldtypes->get("FieldtypeMapMarker"); $from->name = "travel_from"; $from->label = "Start"; $from->defaultLat = "…"; $from->defaultLng = "–"; $from->defaultType = "ROADMAP"; $from->defaultZoom = 14; $from->save(); $fg = $this->templates->get("invoice")->fieldgroup; $last = $fg->get("annotation_internal"); //annotation_internal $fg->insertAfter($from, $last); $fg->save(); } public function downgrade() { // Remove fields $f = $this->fields->get("travel_from"); foreach ($f->getFieldgroups() as $fg) { $fg->remove($f); $fg->save(); } $this->fields->delete($f); // Remove module if($this->modules->isUninstallable("FieldtypeMapMarker")){ $this->modules->uninstall("FieldtypeMapMarker"); } } } Edit: This is more about building up the same state everytime instead of migrating a current state over to another installation.1 point
-
------------------------------------------------------------------- LanguageFieldTabs is now included in ProcessWire by default (version 2.4). Unless you are using version 2.3 DO NOT install this module, instead navigate to Modules and then core and you will find the module in the Language section ------------------------------------------------------------------- LanguageFieldTabs Beautify and organize you Field Languages into tabs! DOWNLOAD - Github DEFAULT UI UI IN "UNIFY" ADMIN THEME Sorry for the lack luster write up, will add to Modules Directory later, late, long day tomorrow. Enjoy! (very much beta maybe alpha, minimal testing, just quick evening idea at this point). Changelog v1.0.2 Improved styling capabilities (added surrounding class "LangTabsContainer" ) Added admin wide support Fixed description text order (was being pushed to bottom) v1.0.3 Added support for toggling tabs display and faded labels to represent empty fieldsv1.0.4 Fixed tabs destroy error Moved toggle into Inputfield ui-widget-header1 point
-
SomeDay Tool I'm working on a series of restricted collaborative websites that are geared towards me working with my clients. It's a mashup of CRM, Project/Task Management, Tracking, Documentation and Configuration Control features. Everything is controlled by PW Roles. It's a tool that allows me to have a great deal of transparency with those I work with. The objective is to easily know the who, what, when, where and how of whatever is being worked on. I call it a Collaborative Resource Management System (CRMS) which has the nickname of SomeDay. I currently have one of these websites for each of my important clients and an additional one to keep track of my internal work. They all use the inherent native power of PW to produce specialized status reports. The websites intentionally incorporates the front-end and back-end of the PW platform. There is a lot of information stored within this type of website, what I like to call an Information Portal. You are able to easily query a status and get a good view of what's going on. This is a long-term ongoing project and I will update this post as more features/capabilities are added. Meanwhile, here are a few pictures of the CRMS Tool: Figure 1-3 (The SomeDay Tool for one of my clients) Figure 1 (Login courtesy of Adrian's Protected Mode Module) Figure 2, Homepage is a summary of all information Figure 3, Each item can be clicked on to get to detailed information Figures 4-7 (My internal SomeDay Tool website) Figure 4, (Login) Figure 5, Homepage Summary for my internal work Figure 6 , Homepage Summary Figure 7, FlagPages showing Bookmarks Figures 8-11 (Looking at a Task) Figure 8, Front-end view Figure 9, Back-end view (editing) Figure 10, Place for adding Priority or Statuses Figure 11, Private Tab only available to selected PW Roles Figures 12 and 13 (Site Structure) Figure 12, CRMS structural flow Figure 13, Tasks and Sub-Tasks can be added to Projects Figures 14-16 (Customized Reports) Figure 14, Review all items based on what type of work it is Figure 15, Review items based on their status Figure 16, Listing of all items with a status category of Active That's it for now.1 point
-
I can definitely see the need for just being able to show the time picker. I have a custom inputfield for entering lists of hours that does this. The JS in the module customizes the picker to only show date — even though it's using the core datetimepicker.js $(document).on("focus", ".InputfieldHours .datepicker", function() { $(this).timepicker({ timeFormat: 'h:mm tt', ampm: true }); }); bah! Just noticed some alignment issues on my time picker in safari. :/1 point
-
I've built a processwire website for a friend and had lots of problems with "this request was aborted because it appears to be forged" after putting it on the production server. Now, after some weeks of searching for the problem (also at the provider...) solution was very simple and I like to share: The Webspace on the server was full. And cause every visit creates a session (inside assets/sessions/ folder) no new session could be created (new sessions files were created, but size was zero). The result was the "forged" message. So perhaps this could be one more solution, if anyone else has this problem...1 point
-
I'm assuming this is for use on the 'front-end' part of your site? Facebook, Twitter and G+ all have ways to use their auth system. They are Oauth based. See: https://developers.facebook.com/docs/guides/web/#login https://dev.twitter.com/docs/auth/sign-twitter https://developers.google.com/+/api/oauth and http://www.9lessons.info/2011/10/login-with-google-plus-oauth.html I guess you would build from that. What kind of functionality do you want to offer users who login with FB, G+, Twitter, Yahoo id etc. ?1 point