Leaderboard
Popular Content
Showing content with the highest reputation on 03/30/2015 in all areas
-
Hi all, With interest of everyone and love for Processwire, I will send a the PR to wireshell . So it will be a a one click installer.4 points
-
To make the Reno theme the default use this in /site/config.php: /** * Default admin theme * * Module name of default admin theme for guest and users that haven't already selected one * * Core options include: **AdminThemeDefault** or **AdminThemeReno**. * Additional options will depend on what other 3rd party AdminTheme modules you have installed. * * @var string * */ $config->defaultAdminTheme = 'AdminThemeReno'; Read this on the option to have multiple copies of a module: http://processwire.com/blog/posts/processwire-core-updates-2.5.14/3 points
-
It does indeed sound like fulfilling this need would benefit from a completely different approach: instead of being able to globally state that "in order to see the Settings tab, your role has to have the tab-settings-view permission", this could mean creating multiple rulesets, each of which defines affected roles, uses a selector field to find pages, and allows selecting visible (or hidden, either way would work) tabs separately. Sorry, just thinking out loud..3 points
-
Nice one. I use this http://www.generatedata.com/. Installed locally, totally free, no row limit (check the About tab to download the script)3 points
-
wireshell 1.0.0 is out See Bea's post -------- Original post ----------- Now this one could be a rather long post about only an experimental niche tool, but maybe a helpful one for some, so stay with me Intention Do you guys know "Artisan" (Laravel) or "Drush" (Drupal)? If not: These are command line companions for said systems, and very useful for running certain (e.g. maintenance, installation) task quickly - without having to use the Admin Interface, first and foremost when dealing with local ProcessWire installations. And since it has a powerful API and an easy way of being bootstrapped into CLIs like this, I think such a tool has a certain potential in the PW universe. It's totally not the first approach of this kind. But: this one should be easily extendable - and is based on PHP (specifically: the Console component of the Symfony Framework). Every command is tidily wrapped in its own class, dependencies are clearly visible, and so on. ( Here was the outdated documentation. Please visit wireshell.pw for the current one )2 points
-
As long as you don’t need to physically store the files in one central directory, I’d create a page that accepts the file names as urlSegments, and serve them from there. The file names would have to be unique anyway for your proposal to work, so you should have no problem fetching them. The only problem would be that this solution does not guarantee unique upload file names, because the files would still be in separate directories. You could ignore this or hook into the file upload somewhere to make sure. E. g. you may do this: $filename = $sanitizer->selectorValue($input->urlSegment1); $p = $pages->get('images=' . $filename); if ($p->id > 0) header('Location: ' . $p->images->get($filename)->url); else throw new Wire404Exception(); die(); Bit crude but you get the idea.2 points
-
On the edit page of the user role, below the checkboxes, it says: To do this, go to Setup→Templates and edit one of your templates. To keep it simple, you may choose the template of your Frontpage, as all other pages will inherit the permissions you set here. In the Access tab, check page-edit for the roles of your choosing.2 points
-
@Matzze: You installed the module the right way and everything works as expected. This module provides some spam protection methods - and if this fails you will be redirected to the root page (I should add this to the readme!). Have a look at site ▸ assets ▸ logs ▸ simplecontactform-spam-log.txt. I guess there is an error like "2015-03-30 13:38:50 Date difference is out of range." The reason is antiSpamTimeMin (It parses the time the user needs to fill out the form. If the time is below a minimum time, the submission is treated as Spam.) in module settings. The html list is unstyled, you could/should change the html structure to your own needs as well as adding custom css. @Mike Anthony, @Ivan Gretsky : I know this is not the best solution, if somebody has an idea to improve this, just let me know! It's really important to enter and save the module settings first because depending on this the template(s) will be created.2 points
-
I will be sending a PR to wireshell . Hope we can improve something https://processwire.com/talk/topic/9494-experimental-wireshell-an-extendable-processwire-command-line-interface/2 points
-
There are resource-intensive tasks, though, and especially for very dynamic sites where caching is less helpful this could be a good thing. I'll admit that it probably doesn't mean shit for my personal site, but in the case of large services (or if you're hosting a lot of stuff) smaller savings here and there add up. So, if anyone's looking to build the next Facebook completely in PHP, better wait until 7 is out. Would be interesting to hear how PHP7, with all it's speed improvements, compares to HHVM though.. or is that comparing apples to oranges? I'll have to agree with LostKobrakai too. It'll take a very long time until this is widely used. For the most part 7 coming out will just mean that we can start using it for our own, cutting-edge projects (or projects big enough to justify setting up a customised server environment).2 points
-
That's only half the truth. It's true that content duplication is bad for seo, but using the meta canonical tag in the head does prevent this. You can have as much entry points to content, only the canonical url in the meta tag needs to be the same on all of them. A redirection is not necessary. As for "relevant keywords". Keywords is the meta tag least important for seo. Google doesn't even evaluate them anymore.1 point
-
So here is the gist: https://gist.github.com/uiii/f1877686bca81fe6d668. See the comment below the gist.1 point
-
Thanks for the proposals regarding an installer process, @HariKT and @Richard. A command named "new" definitely promises more than a download, that's right. But for this command I was just tipping my toe in the water, and testdriving the Console component, mimiking "laravel new" (which actually just is a download since there's no installation in the classic sense). Actually your thread about a command line installation of PW got me started with Wireshell in the first place So it's really cool that you'll contribute. Looking forward to the PR! @Richard, it would be cool if you can post your approach to this. Frankly speaking I'm still in the learning phase regarding whats really possible with the API and would be glad if we could discuss in this thread the best approach about this - probably - most important command of Wireshell1 point
-
This thing is supposed to be the ghost element while drag-and-droping a tag. Congrats jQuery UI... I'll see if I can namespace this thing somehow. Edit: it's fixed for the dev branch. Will push it to master as soon as I've included a defaultAdminTheme.css as well.1 point
-
Assuming you are using javascript for the dropdowns (jQuery or the like), you could add a CSS class that way, and not need to change the module. If you want to post a sample of the markup you are outputting, we'll give it a go.1 point
-
I'm really sorry, but I can't get it to work. I'm new at processwire, so maybe I did something wrong. I tried to follow all instructions and what I get and see on my contact page is an embedded form, with an unstyled list of input files (which is ok, styling will not be the problem). If I click the (empty or filled out) form, the front page of my processwire is loading. And that's it. No mail sent, no error or success message. Possibly there is an error in my template. The only difference I made is – instead of $content = $modules->get('SimpleContactForm')->render(); I had to change to echo $modules->get('SimpleContactForm')->render(); In my contact template. Maybe this causes the error? Maybe someone can help? Thank you very much!1 point
-
I'm on the same page as teppo. I'd much rather see something like a repeater where one selects roles (asm select), templates / pages and limits them with the checkboxes you're using. Maybe one could use a global permission which enables the role to be selectable and so that other devs can notice that this is managed by the module and not by the traditional permission system. OT: Sound quite like the dynamic roles module. Never really used it and it's quite silent about it here in the forum.1 point
-
@tpr Maybe you want to check out my module: https://github.com/wanze/TemplateEngineFactory It works similair to your workflow, e.g. using the ProcessWire templates as controller. Advantages: It does all the setup for you and provides you an API variable to interact with the template engine. Latte is not supported at the moment, but it would be pretty easy to implement. Drop me a line if you'd need help with the implementation. *Advertisment mode off* Cheers1 point
-
That is indeed an option, but some kind of drag-and-drop solution would be great. The reason I didn't investigate it futher is because currently there is one Page Edit view and how do you manage a drag-and-drop solution? On a page basis or template basis? What if you make a small change and you have to change 24 other templates as well. I myself don't really see how to abstract those things or how to put an extra "layer" on top of the Page Edit screen. Thanks adrian! Do you have any idea how to order those fields (see my comment above)?1 point
-
It's very rare to php be a bottleneck regarding most websites and apps. 2 sec pageload contains very little php processing. So huge performance boost there will give very little to overall loading times. Not saying it's bad thing (of course not), but most of the usual website performance is front end.1 point
-
@LostKobrai, well in general terms type hinting is a good sanity check when developing anything remotely complex. The fact that you can hint any class but not string, arrays, int or else has always been an annoyance of mine (not passing the right type will give a fatal error). Most of these are niceties I agree though. I'm mostly excited to run benchmarks on non cached PW instances. Can it really get any faster ? Will the page load before even clicking links ? ;P1 point
-
It is important that you use a properly utf-8 encoded csv file so that PW understands. The characters you named should be no problem.1 point
-
Take a look at this: https://processwire.com/talk/topic/8697-module-jumplinks/1 point
-
Only being able to access the homepage directly is most of the time a issue with the .htaccess. Try to comment out the RewriteBase statements in this file. Use "/" if processwire is in the root of your domain and "/subdirName/" if its in a subdirectory. A more detailed explanation can be found here: http://processwire.com/docs/tutorials/troubleshooting-guide/page31 point
-
I've found a very good one on debugging from adrian... <?php //color code /* Debug script for better output on vars and arrays in the browser js console * Thanks goes to https://processwire.com/talk/user/985-adrian/ * Usage: * debug('test'); * debug($variable); * debug($array); */ function debug ($data) { echo "<script>\r\n//<![CDATA[\r\nif(!console){var console={log:function(){}}}"; $output = explode("\n", print_r($data, true)); foreach ($output as $line) { if (trim($line)) { $line = addslashes($line); echo "console.log(\"{$line}\");"; } } echo "\r\n//]]>\r\n</script>"; } best regards mr-fan1 point
-
I'm personally really not that interested in the development front of php. As long as I have to even switch servers of clients that the minimum requirements for PW are met I can't possibly benefit from anything mentioned there. I'm happy if I have php >= 5.4.1 point
-
Thanks for the positive feedback! Some updates in 0.2.0: Attach roles on the fly while user creation: $ wireshell create-user foo --roles=superuser,editor Create templates and attach existing fields on the fly with $ wireshell create-template contact --fields=body,sidebar , prevent template file creation with --nofile Command aliases now available: c-u, c-t, c-r, s Now planning field creation.1 point
-
1 point
-
Not really such a big deal, but.. this made me smile. Perhaps Ryan could implement couple of vulnerabilities somewhere, so that we can get some CVEs of our own?1 point
-
Hotlinking Cloudfront solution: s3 has bucket policy that you can instruct to only allow images get commands from certain domains and or IP's. But cloudfront does not have this, so this only prtects from direct linking to your s3 files. You can apply some level of defensive tactics to limit hotlinking to your cloudfront distributions. Here's what I figured out: 1 - On cloudfront create a second distribution that you connect to the same bucket that you are already using, wait for it to fully deploy, then: 2 - Check if ithe files can be served from the new cloudfront distribution, then in PW amazons3/loudfront module, change domain name of cloudfront distribution to new distribution, check if all works and disable the old distribution, it can be deleted it you like (I would if I know it is being used for hotlinking). This does not stop hotlinking right away, but allows you to stop images from being served from your cloudfront distribution as soon as you switch. The hotlinking sites will now no longer have images showing up and will have to go to your site and get the new locations. At least it is an easy defense technique to protect against paying for traffic for images not served via your site. Not fool proof, but it slows things down and makes it harder for leaches... BTW, it is wise to apply a cache-control http header to the s3 bucket and get the distribution to use this, so your images are served with cache control headers, saves you from unnecessary traffic costs on your s3 account. Would be nice to see this module working together with the minimize solution module. That would really make things easy!1 point
-
A few things have changed regarding amazon s3 and cloudfront, I have made a checklist that takes you step by step through setting it all up, works like a charm, posting here in case I forget the steps myself for next site... 1 - Set up a bucket for this site on amazon s3 2 - make sure it is on us standard 3 - go to Account => security credentials => get started with IAM users 4 - create new user 5 - download user security credentials 6 - select user and go to Inline Policy 7 - Create User Policy 8 - { "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1425901261000", "Effect": "Allow", "Action": [ "s3:DeleteObject", "s3:GetObject", "s3:PutObject", "s3:PutObjectAcl" ], "Resource": [ "arn:aws:s3:::name-of-bucket/*" ] } ] } 9 - go to PW admin and install the amazons3cloudfront module 10 - enter the AWS acces key and secret key for the user you have created 11 - enter the name of the bucket you have created 12 - test the module to see if images are uploaded to the bucket 13 - go to a page in PW and drag & drop an image 14 - refresh the page on the amazon s3 console and you will see the image there in the file and page folder 15 - go to amazon aws console and go to cloudfront 16 - Create Distribution 17 - Web distribution => Get Started 18 - Origin Domain Name => from dropdown choose the bucket you want 19 - Restrict Bucket Access - NO 20 - Create Distribution 21 - Allow the distributiion time to deploy and once status is deployed, it can be used 22 - copy domain name of distribution for entry in PW Admin of module That's it, test and enjoy!1 point
-
1 point
-
To do that use my super awesome AutoDetect Language module! Does that automagically for you!Sorry no link, writing from my iPad.1 point
-
Thanks, great tips. I usually stop further optimizing when only "above the fold" issues left according to PageSpeed. Imo it doesn't worth the trouble. Recently I discovered http://fontello.com/ which allows subsetting icon fonts (plus picking icons from different fonts). This can be handy if you need only a few icons instead of the whole set, saving many kilobytes.1 point
-
Wow, thanks! Lots of good ideas! This forum is out of this world, I tell you. I replaced $pdostmt = wire('database')->prepare(' SELECT DISTINCT field_'.$dbtable.'.data as value, field_title.data as label, COUNT(*) as count FROM field_'.$dbtable.' LEFT JOIN field_title ON (field_title.pages_id = field_'.$dbtable.'.data) GROUP BY field_'.$dbtable.'.data '); $pdostmt->execute(); while ($row = $pdostmt->fetch(PDO::FETCH_ASSOC)) $filter_options[$criterion][] = array( 'name' => $row['name'], 'label' => $row['label'], 'count' => $row['count'] ); with $values = wire('pages')->find('parent=/search/'.$criterion); foreach ($values as $value) $filter_options[$criterion][] = array( 'name' => $value->name, 'label' => $value->title, 'count' => wire('pages')->count('parent=1020,'.$criterion.'='.$value), ); where $criterion is from a 4 fields array, and 1020 is the video clips container id. I like that the synthax is much cleaner and I can further glue selectors to the initial selector, But it works slower, as in 0.6 seconds slower with 4 fields and 20k video clips. It was surely expected and I think that the delay will increase linearly along with the video clips count. So I'll stay with the SQL version, unless there's possible to further optimize the API way. Thank you.1 point
-
Just today tested the module on a pw 2.5.22 site and apart form the figuring out how to set stuff up with s3 bucket, policy and cloudfront distribution, all worked like a charm Thanks lots zyON!1 point
-
You know what? It doesn't matter. We all been there and even seasoned programmers sometimes tap into it. Our mind is ignoring things, otherwise we would go crazy1 point
-
There's nothing special to it, it just works. But It may should be with trailing slash my-domain.com/quote/?pack_id=xxx where /quote/ is a real page.1 point
-
Judging from this experience, if you have to enter and emit this massive amount of data for the various types of real-estate objects (the client wanted to here, it might or might not be necessary), you'll probably want to use the new ProFields: Table module. I don't use it here, and it's been a pain in the butt to create fields and code the templates for that. Another option would be to implement the details for any given object simply as a textarea, but since this client is not very experienced in editing content, it did not seem like a viable option. As for moving the heading below the image, I think that while it may technically be possible, it doesn't make much sense. It's probably not really a stable solution, either – the headings could still have a different number of lines below the image, which would ruin the layout as well. Yes, the form is a simple PHP form. See https://processwire.com/talk/topic/6516-%E2%80%9Cpre-set%E2%80%9D-a-form-field-using-session/ for the implementation of “pre-setting” the form field.1 point
-
Thanks, that helped. Your a great duck1 point
-
The index.php file goes into where ever you've put you main website directory, so if my website directory is called "mywebsite" and it's in the "public_html" directory of the server you would put the index.php file: public_html/ mywebsite/ index.php //here is where you would put it Are you using shared hosting or do you have root access? I guess I should ask: are you using Apache or IIS? BTW, I like the duck... birds of a feather, code together1 point
-
the.nature the real secret of category is the.world made of category. the world made.of page catpage in.catpage if you.know catpage.that world is made of you.make of it whatever you wish.1 point
-
If you need one-time toggles, individual checkboxes are a fine way to go. But for multiple related items like categories, the Page reference field is the way to go. You can create a structure of pages representing any amount of flat or nested categories. If you use nested categories, choose the "Page List Select Multiple" as your input type, and set the root level of your categories structure as the "Parent".1 point
-
Hi All, I am interested in integrating IDX(Internet Data Exchange) for the Real Estate Multiple Listing Service into PW for realtor websites. Wordpress has such premium($$$) templates available but (having been a realtor years ago and more recently a realtors administrative assistant) I would like to offer such a set of templates built on a better framework-PW(!) which the realtors can easily upload, update, etc...self-manage. I just finished a website using processwire based off the included template to learn PW better and I love it! My desire is to offer sets of templates for real estate agent clients requiring websites with the IDX. My limited knowledge of code restrict my ability to do this on my own. So I want to know if anyone has an idea if; 1- Could this be best achieved by a module? 2- How much is entailed for such a project? Any/all suggestions from the PW community will be most helpful... Cheers, Grant1 point
-
Just a little update. I discovered a company here in Vancouver that has really integrated/meshed together the template/IDX concept into monthly packages specifically for realtors. Check it out at www.realtyninja.com. Crunchbase did an article on them here http://www.crunchbase.com/company/realtyninja Cheers for now, Grant1 point
-
Hiya Pete, Think we're definitely on the same wavelength, I'm trying to sort out my own "standard" site profile so I can turnaround cheap sites, which at this moment in my new career is all I'm really likely to get. I think most of the fun in using PW is coding things yourself but definitely something more complicated like an estate agency website. If it's well made, I'd definitely pay for it if it gave me a head start in creating a project. The price you mentioned sounds very reasonable. The good thing about this is that it would be built in PW and therefore if I had to tinker with it, I ought to understand a little about what's going on! Think a lot of the community will say that what they don't want is it becoming saturated with hundreds of inferior profiles. The ones that I'd be very interested in are for things like events, bookings, shop, estate agency/ car website.1 point
-
I like this topic I had a similar grumble recently where I swore never to use Wordpress again and it was for slightly different reasons, but the end result was that it took me 2 minutes to install a certain module but then literally 2 days to work out what was conflicting and then make horrendously different stylesheets work together. I've done a lot f websites in that price range mentioned earlier. If it's a simple brochure-style site with homepage, services, gallery, testimonials and contact page then it's easy enough to build in PW to that budget and in that timescale. Once you've built a gallery and testimonials system (both just a bunch of sub-pages, so the work is displaying them in the template file so they look pretty) you've then got code to use elsewhere with minimal tweaks. The problem does come with larger requirements. I would be hard-pressed to get all the fields and search functionality of an estate agent (real estate) website set up so quickly so that could well come down to building it te first time and creating a profile afterwards for future sites but I would certainly need to take more time over it and charge the client more. It would definitely be worth it though! As mentioned in another thread the only problem I have then if it's something relatively complicated like that is that I'd be inclined to keep the code for myself or at least charge a small fee for the profile as otherwise you run into a slight problem of anyone with basic knowledge can easily install a full-blown estate agent website and you can end up with those relatively tech-savvy clients just playing companies off against each other for the cheapest implementation - a game I don't want to play. I'm probably just thinking the worst because I have a slight headache and that makes me grumpy - there certainly aren't thousands of people in the UK yet that know about ProcessWire so we'd hardly be stepping on each others toes, plus when I start thinking about this I think about that free Shop module and it makes me feel bad Putting my business hat back on, if I built an amazing site profile for estate agents and sold it for £20 (random figure), would people buy it? I think as ProcessWire has evolved there are the beginnings of a profitable ecosystem for module/profile authors where something is complex enough to warrant a fee that is reasonable and web developers don mind paying for to save many hours of work, but as with all these things it falls down the minute someone develops a similar module/profile and gives it away for free Sorry, I went off on a wild tangent there...1 point
-
Well I've just watched the video here: http://spotonconnect.com/wordpress-idx/ I'm interested in doing something myself for the UK and the INEA would seem to be my point of contact (they're suggesting the above service). The only thing I'm not sure about Grant is where the data comes from? Surely it#s querying some central web service, but since my plans are at the pre-planning stage () I don't know how it all works - but I'm keen to find out!1 point
-
rather then namen "nofile_*" u.cann also do $this alsos $tamplons = ''; foreach($templates as $t) { if(!$t->filenameExists()) $tamplons .= $tamplons ? "|$t" : $t; } foreach($page->children("template!=$tamplons") as $babby) { // $babby.not tamplon } cd ..1 point
-
You can always reset your password just by pasting this temporarily into any one of your templates, and then viewing a page that uses the template: $u = $users->get('admin'); // or whatever your username is $u->of(false); $u->pass = 'your-new-password'; $u->save();1 point