Leaderboard
Popular Content
Showing content with the highest reputation on 06/14/2015 in all areas
-
FieldtypeStarRating Module for ProcessWire - Field that stores an integer by using a star rating interface. Current version: 1.0.0 Module page: http://modules.processwire.com/modules/fieldtype-star-rating/ Github: https://github.com/Rayden/FieldtypeStarRating To install Copy to /site/modules/ and go to Admin > Modules > Check for new modules. Tested on ProcessWire 2.6.2 dev Usage back-end Create a new field with the fieldtype Star Rating. Set the amount of stars you want to show, by default it is set to 5 stars. Assign the field to any template. Now you can set the field value by selecting any of the 5 stars. The number saved to the database equals the number of stars that are highlighted. Hovering the stars will show a reset icon, which will reset the value to 0 by clicking on it.1 point
-
Hi, after looking at the 300 open "issues" on Github, it turns out that a lot of them, including some of mine, are labeled "enhancement" / "feature request". To get the increasing number of issues down there (which might give a wrong impression on how well maintained PW is), and to do sort of a cleanup I was planning to set all of my "issues" which are labeled "enhancement"/"feature request" as closed. I am assuming that the idea was either good enough and had been recognized for an enhancement consideration and thus stored in a to-do list somewhere else, or the the idea was not good enough and did not survive. In either case, an "issue" like this,does not need to be open forever, imho. Is closing it the best way to deal with it - or should we leave the step to Ryan (or anyone maintaining this)? (Also there are many "fixed" / "completed" issues that could be closed eventually.)1 point
-
The problem is that you are choosing 6 from each category, and not 6 from all. The ideal would be to get all the portfolio pages with one selector. There are several ways of doing this, the one that looks more logical in your case is to select by template: $portfolio_pages = $pages->find("template=portfolio-item, limit=6, sort=random"); foreach($portfolio_pages as $item) { // echo here }1 point
-
In your inline style you are missing the url() part. And the api call to the image is also not correct. Is the image field storing only 1 ore multiple images? If it is multiple, you need to do something like <div class="thumbnail"> <a href="..."> (Link to my gallery) <div class="flex-item6" style="background-image: url(<?php echo $page->images->first()->url; ?>)"> <span class="overlay">stuff</span> </a> </div>1 point
-
I found a cleaner way of adding modals to $jsConfig. Instead of writing out the whole array, we can do: $jsConfig['modals'] = $config->modals; This way also changes to the core get picked up.1 point
-
Just wanted to note here that with PW 2.6.x the pwimage plugin stopped working. So I couldn't insert images in CKEditor anymore. I discovered that in the config json array with PW 2.6 a element "modals" got added (through /wire/config.php around line 848). You need to add this to the $jsConfig like: <script> <?php $config = $this->wire('config'); $jsConfig = $config->js(); $jsConfig['modals'] = array( 'large' => "15,15,30,30,draggable=false,resizable=true,hide=250,show=100", 'medium' => "50,49,100,100", 'small' => "100,100,200,200", 'full' => "0,0,0,0", ); $jsConfig['urls'] = array( 'root' => $config->urls->root, 'admin' => $config->urls->admin, 'modules' => $config->urls->modules, 'core' => $config->urls->core, 'files' => $config->urls->files, 'templates' => $config->urls->templates, 'adminTemplates' => $config->urls->adminTemplates ); ?> var config = <?php echo json_encode($jsConfig); ?>; </script> Then the modal popups for inserting images will work again. See also my thread about pwimage plugin in frontend forms.1 point
-
After an upgrade from 2.5.2 to 2.6.3 my setup stopped working I cannot choose and insert images anymore in my frontend form CKEditor field with the pwimage plugin. If I click on the insert image button in the editor toolbar, nothing happens and it throws a js error: It seems the way the pwimage plugin works changed significantly. I guess I need to load some additional scripts in the frontend to make this work again but I can't seem to find what is missing. Any help would be much appreciated. EDIT To make frontend forms work, I added this to the head: <?php if ($user->isLoggedin()) { ?> <script> <?php $jsConfig = $config->js(); $jsConfig['urls'] = array( 'root' => $config->urls->root, 'admin' => $config->urls->admin, 'modules' => $config->urls->modules, 'core' => $config->urls->core, 'files' => $config->urls->files, 'templates' => $config->urls->templates, 'adminTemplates' => $config->urls->adminTemplates ); ?> var config = <?php echo json_encode($jsConfig); ?>; </script> <?php } ?> This outputs a JS config variable in json format. When I compare the output of config from the admin page edit source to my frontend page edit source, I find that following part is missing in the config json on the frontend: "modals": { "large": "15,15,30,30,draggable=false,resizable=true,hide=250,show=100", "medium": "50,49,100,100", "small": "100,100,200,200", "full": "0,0,0,0" }, "JqueryWireTabs": { "rememberTabs": 0 }, Now what do I need to add when building the json via PHP so that this gets included also on the frontend? EDIT2: I think I found it. In wire/config.php around line 848 there is $config->modals = array( 'large' => "15,15,30,30,draggable=false,resizable=true,hide=250,show=100", 'medium' => "50,49,100,100", 'small' => "100,100,200,200", 'full' => "0,0,0,0", ); I added this to my code so it now reads: <?php if ($user->isLoggedin()) { ?> <script> <?php $config = $this->wire('config'); $jsConfig = $config->js(); $jsConfig['modals'] = $config->modals; $jsConfig['urls'] = array( 'root' => $config->urls->root, 'admin' => $config->urls->admin, 'modules' => $config->urls->modules, 'core' => $config->urls->core, 'files' => $config->urls->files, 'templates' => $config->urls->templates, 'adminTemplates' => $config->urls->adminTemplates ); ?> var config = <?php echo json_encode($jsConfig); ?>; </script> <?php } ?> And, voila, the modal for selecting images is now working again on my frontend form1 point
-
As a more general response (since you have asked other questions lately about compatibility with other tools - PW can be used in conjunction with just about anything because it doesn't dictate any front-end markup. I use PW together with D3js (and various mapping, charting, visualization tools based on D3) and AngularJS. I have also built sites that use Mapnik (using python) with the resulting maps displayed on a PW site. In some cases I let PW handle the data (use the Profields Table field) and sometimes I write manual DB queries to dedicated database tables (if I am dealing with huge amounts of data). In one case I use some custom scripts to query a database of "big data", run it through some algorithms to analyze and synthesize the data, and then populate a Profields Table with the final values that need to be mapped/charted - in this case the analyses is only run once a year and the queries take too long to do on-the-fly. My point in all that is that you can use PW in many different ways to handle certain aspects of a site and still use other tools to query and analyze the data and/or contribute to the final user interface. Hope that helps to provide some insights about what can be done with PW. That said, if there is no need for content management (text, images), user management etc, and the front-end interface is purely about data analysis and manipulation then you might be better off with custom written server-side code that displays your data on the front-end - maybe even something built on nodejs - maybe meteorjs or a MEAN stack which includes Angularjs. So many options1 point
-
I'm not too familiar with the whole concept of predictive analytics, or big data for that matter, but taking a look at the tools you mentioned they seem to focus on visualising collected data (D3.js, scikit-learn) and making mathematical predictions based on it (scikit-learn). Please correct me if I'm wrong, though; the thick cloud of buzzwords surrounding some of these tools and concepts makes it very hard to figure out what it is that they actually do/mean. As such, I'd say that "compatibility with ProcessWire" as a question makes little sense. ProcessWire is a great tool for defining data types and storing huge amounts of data, if that's what you're looking for. It's also a great tool for formatting and outputting said data in any way you – or another application – needs it. What it isn't, though, is an out-of-the-box tool for collecting data (but you could always build something like that yourself). I'm not sure what kind of data you want to collect and analyse, so that's just about the extent I can go into this topic If you're looking into technical details regarding the tools you've mentioned above, scikit-learn is based on Python, so you'd need hosting that supports that. I'm not sure if the "python" you mentioned is a specific tool or the Python language, but I'm assuming you mean the latter, which again leads to the conclusion that you need to look for a web host offering Python support. D3.js is a JavaScript library running client-side, and thus server-side considerations don't apply there. Note: I've just moved this topic to the Off Topic / Dev Talk area of the forum, which seems like a better fit here. This question is very loosely related to ProcessWire itself, and has a lot more to do with other tools.1 point
-
It may look a bit special because of the lower case spelling but it's the GET variables you're using mostly with forms. Everything after "domain.com/?variable=value".1 point
-
http://owlgraphic.com/owlcarousel/ Almost used this one on a project. Really slick and has seemingly pretty good documentation.1 point
-
Hi, I've just found (about) http://opensource.com and have used the Contact page form to mention the ProcessWire CMF/CMS. We will see if it is added here: http://opensource.com/resources/projects-and-applications I've seen this at the end of an article (about a Python/PostgreSQL CMS): "This article is part of the The Open CMS column coordinated by Robin Muilwijk. Share your stories about working with open source content management systems (CMS) and platforms like Drupal, Joomla, Plone, WordPress, and more." So if someone is ready to write a nice story...1 point
-
Oh, sorry for that and thank you for your time! You made me realize that I was a bit late in term of PW versions. I have a fresh one now, thanks again.1 point
-
I utilized the method demonstrated by MR FAN. Add a page field to your template, or in my case an autocomplete field with the part of the tree that houses categories or for the tags part of the tree for the tags. Then you just search for pages that have that page title within them. //look for get strings if($searchString = $sanitizer->selectorValue($input->get->tag)){ $tagTitle = $pages->get("template=tag,sort=-created,name=$searchString")->title; $query = $defaultQuery.",tags.name=".$searchString; $headerText = 'Posts tagged with "'.$tagTitle.'"'; }elseif($searchString = $sanitizer->selectorValue($input->get->cat)){ $catTitle = $pages->get("template=category,sort=-created,name=$searchString")->title; $query = $defaultQuery.",categories.name=".$searchString; $headerText = 'Posts relating to "'.$catTitle.'"'; }else{ $query = $defaultQuery; $headerText = "Current posts"; } //find posts based on query $posts = $pages->find($query);1 point
-
Hello, Do you mean something like (php short tag(s) version)?: <a href="<?=$config->urls->root?>"><?=$pages->get('/')->title?></a> Edit: Also: <a href="<?=$pages->get('/')->url?>"><?=$pages->get('/')->title?></a> Or $homepage = $pages->get('/'); and <a href="<?=$homepage->url?>"><?=$homepage->title?></a>1 point
-
HI! Here's a simple site I finished recently for cotswoldletterpress.co.uk. modules: redirects batcher thumbnailCropImage AIOM template notes page delete pagetree reverse js: jquery unslider1 point
-
To catch up with a new question, without telling us and what went wrong doesn't feel right to me... probably it's just me....1 point
-
Cathegories...are simple by pagefields. (Even nice functions like "See also" could be just simple pagefield to select.) Easy example on a site for a diary like newssystem with use of URL segments....really great stuff for little functions like /archive/ or /2015/ or /my-cat/ just with different URL segements... Newspage: http://waldkindergarten-altfraunhofen.de/aktuelles/#start URL Segment for archive show all: http://waldkindergarten-altfraunhofen.de/aktuelles/archiv/#start URL Segment 2 for year: http://waldkindergarten-altfraunhofen.de/aktuelles/archiv/2015/#start or for cathegory name: http://waldkindergarten-altfraunhofen.de/aktuelles/archiv/ausfluege/#start every single item lives under /aktuelles/: http://waldkindergarten-altfraunhofen.de/aktuelles/unser-waldkater-2015-05-11/ (it get on creation a name + date combination) some codeexamples for URL Segments are here - this works with just a few lines of code so great, so easy, so cool...ähh sorry but in every second post i have to write how much i like PW!! https://processwire.com/talk/topic/9476-new-project-a-nice-growing-kindergarten/#entry91259 (attention - it's may not the best code but it works so far) some backend pics... I only have one single cat to choose since i use this in the isotope view to sort! best regards mr-fan1 point
-
We think it's an issue between the latest Chrome and TypeKit, as we haven't heard of it occurring in any other browsers. Also haven't heard of it re-occuring after a refresh, so most likely they made some change at TypeKit that needed a JS refresh. Though please let me know if it continues to recur, or if anyone else sees it occur in any other browser.1 point