Leaderboard
Popular Content
Showing content with the highest reputation on 03/04/2015 in all areas
-
Back to this one Not a pw recipe, sorry for that. This is only css and I thought it might be useful for this discussion. .drink { display: inline; } .drink:nth-last-child(n+3):after { content: ", "; } .drink:nth-last-child(2):after { content: " & "; } http://codepen.io/diogo-ed/pen/OPwOJb5 points
-
This has apparently been disabled because the circular reference lead to problems: https://github.com/ryancramerdesign/ProcessWire/issues/663 One possible solution for you would be to default to $page if no page is selected. Seems intuitive enough for the user, unless you need “no selection” to actually mean “no selection”. Another thing you could do would be to add a “proxy” page somewhere, called “<This Page>”, and check if that was selected, then use $page.3 points
-
There are a lot of new features in TableSorter, but mostly I'm just hoping to be able to reset sorting for admin tables. http://mottie.github.io/tablesorter/docs/example-method-sortreset.html2 points
-
"Custom Script" - does that mean your code is not in a PW template or module file? Have you bootstrapped in PW so you can access its API? https://processwire.com/api/include/2 points
-
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 crazy2 points
-
I hope this kind of nasty and unmaintainable JS hacking when dealing with customization of behavior in admin (e.g. via modules) will not be necessary in the future. Proper standardization for PW JS stuff, like marginally discussed on this issue.2 points
-
Chances are high that if you find a more real bug, that broke something, it's often on Ryan's prio list and usually a matter of hours or 1 day to fix it. If it's something more complicated it can take longer but then it may was even in master undiscovered since some time. Also as other have mentioned dev is pretty darn stable, just make sure to report a bug if found. It's fun It's going on so fast, now 2.5.3 feels like an old hat. Go with the flow. http://processwire.com/blog/2 points
-
what.i use this is good it does.work top {not buttock}, of htaccess u will.put it . enjoy <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/octet-stream "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" </IfModule> <IfModule mod_headers.c> <FilesMatch "\\.(ico|jpe?g|png|gif|swf|woff)$"> Header set Cache-Control "max-age=31536000, public" </FilesMatch> <FilesMatch "\\.(css)$"> Header set Cache-Control "max-age=2692000, public" </FilesMatch> <FilesMatch "\\.(js)$"> Header set Cache-Control "max-age=2692000, private" </FilesMatch> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary: Accept-Encoding </FilesMatch> Header unset ETag Header append Cache-Control "public" </IfModule> <IfModule mod_deflate.c> AddOutputFilter DEFLATE js css AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule>2 points
-
1 point
-
u message cumes frm.sessions dir. but i delete /site/assets/sessions/ and ,it remake.it no error mabe u /site/assets no writtable ? i testted w/vershion 2.5.21 for.my grndmoms nudist marchingband.site mabe u need.upgrade ?1 point
-
<spam> Maybe the new addition Change Page Template in Fieldtype Select File could help you out. What it does is render the selected template instead of the normal template file. So it's possible to have no template file for the page template, thus not viewable, but after selecting a file and page save, the page is viewable with the selected one. </spam>1 point
-
I just ran into this issue, and it was not a permissions problem. This was a site I have checked into source-control (Git) and the problem was, some folders are exempt from source control, namely "cache", "logs" and "sessions" in the "assets" folder. Apparently, PW will silently fail when these folders don't exist and can't be written to. Shouldn't it should throw an exemption on failure to write to any of these folders? The error message given currently is misleading more than helpful.1 point
-
if you need the view links in the page list to open in new window (which i do on almost every project), got this from here: https://processwire.com/talk/topic/1769-view-in-admin-template/?p=74946 $(document).ajaxComplete(function(){ addtargetblank(); }); function addtargetblank(){ $('li.PageListActionView a').each(function(){ if($(this).attr('target') == undefined){ $(this).attr('target','_blank'); } }); if($('#_ProcessPageEditView').attr('target') == undefined){ $('#_ProcessPageEditView').attr('target','_blank'); } } add to ProcessPageList[something].js1 point
-
:\ I'm sorry. Thank you. I had looked at that many times and failed to see it yet it is so obvious now. I had specifically looked at my usage vs. the line that was there and just couldn't see the difference. Repeatedly. I don't have a good explanation. I owe you a beer. And I owe you a better question next time too. Thank you for pointing out what should have been obvious to me.1 point
-
I remember that I had some trouble with the latest version of adminer. But because I was in a hurry, I just used an older version and didn't think about it anymore. Maybe I'll try again later just to check.1 point
-
1 point
-
How is your setup? Looks like there's maybe this issue with newline in the config textarea for domain If you change $this->subdomainsArray = explode("\r\n", strtolower($this->subdomains)); To $this->subdomainsArray = explode("\n", strtolower($this->subdomains)); Does it work? This is the code that should do a redirect when a real url containing the domain is found. https://github.com/somatonic/Multisite/blob/master/Multisite.module#L120 But even then even if the redirect isn't working the page should still show fine. Nothing there in the module that would do a 404. The 404 seems to be an issue that the domain isn't found. But that wouldn't come from updating PW after all.1 point
-
To sum up, with Processwire : "More you use it, more you love it" !1 point
-
Firstly $form->get() does only search by field name, while you supplied the id of the button. Also this id will be used for the "save" and "publish" button, so to differentiate use this names: "submit_save" "submit_publish". Secondly the value of the submit field is not necessary for the form submition, otherwise it would not be translateable. Only the name attr has to stay the same.1 point
-
Well the obvious would be that it's minlength and not minLength.1 point
-
Nope. That's just what the rules wrapped with FilesMatch-checks do. If you take a closer look, you'll spot that some rules are defined without any FilesMatch rules: <IfModule mod_headers.c> ... Header unset ETag Header append Cache-Control "public" </IfModule> Of course you can specify whatever value you want to for these headers. What @LostKobrakai mentioned above is possible too, but I mostly prefer to use that for headers that depend on very specific page settings, need to contain some page-specific details, etc.1 point
-
I thought I'd start a thread where we could post links to kickstarters that we find interesting and that might be of interest to others. To kick things off I thought I'd post a link to the kickstarter for the Thunderbirds co-operative board game. For those of you outside of the UK who may not have heard of Thunderbirds before, it was a 1965 Sci-Fi show using puppets as actors that became very popular - I certainly remember it from my childhood. The kickstarter itself has a lot of backing already and is well into its stretch goals, but if anyone is interested in the show and the possibility of playing the game, then check it out and back it if you like it. Thunderbirds are go! Ok, what about kickstarters that interest you?1 point
-
If you're at all interested in photography (or the adverse affects of war) the Legacy of War by Giles Duley: https://www.kickstarter.com/projects/242077426/legacy-of-war1 point
-
Spaces in passwords take up empty space. That consumes more energy on yor minotor. FREE poasswords now.1 point
-
Thanks for your feedback Jürgen! I've tested myself and didn't find any bugs, so i merged into master. Meaning that v. 1.1.2 is now official As described two posts above, this version adds support for multilanguage PDF files. Please make sure that your PDF files are still generated correctly before you update on a live site! Cheers1 point
-
http://stackoverflow.com/questions/9416508/php-untar-gz-without-exec1 point
-
I think it would be a great idea for us to set up a showcase site directed not towards end users but to developers' clients more specifically, as so many people on here have encountered, it can be difficult trying to explain the benefits on a case-by-case basis. It would be much more efficient to simply refer people someplace, or since plenty won't even do that due diligence, have a live and ready source on the web to visit with the client and show them in real time so they can ask any questions as they come up rather than put it off... (Of course anyone who wanted to like myself could do it themselves too. It's just time-consuming to do by oneself.) I like PossibleWith.PW I registered it and would happily donate it to the cause. So PW.pw can draw more "enterprise" or large-scale sites selected in/from processwire.com, give performance and other comparisons between different CMSs, maybe have a blog... if anyone wants to contribute, the Big Things Blog. We could just post inspirational and informative quotes from the forums and stuff... that are convincing and appealing to non-developers... Because it's like Pete said (on page 1, and then more I'm sure, as this convo has been spinning around) that we can't just have a flashy website to appeal to businesses and start like a whole operation catered to them... and like someone else said, most sites we build tend to be for businesses anyway (they're the ones buying)... but, of course, the ones buying usually like to be in control, and given that, despite not really having the expertise to make a well-informed major technical decision for themselves such as the CMS/framework to be used, will want to do so anyway. ProcessWire.com is aimed towards developers, as the CMS is, as it should be, because it's their business. When a developer comes to the site, he or she should be the one the info is targeted to because not having heard about it before, they're the only ones who will be able to make sense of the benefits. But that's why clients haven't heard about it, and why maybe we should put something together, somewhat separate, that's meant for them, that developers can refer their clients to rather than trying to convince each one individually every time…1 point
-
Welcome to processwire. Let's face it, without offense, but wordpress has been quite a few times in the news, and recently is, about it's plugins being exploited and has millions of hacked wordpress sites. That must give you something to think about. Secondly with processwire you don't have to learn your way around a new system that: "let you" make websites. With processwire you are going to make websites directly from the core. That means that all the experience you already have learned in the past with html, css, php, etc. you can start using directly with processwire and make a website in any way you would like to see it. 2k visitors, 6K pages daily won't be any problem because Processwire has been made scalable from the ground up. About templates that is where Processwire really shines because you can literally make your own templates both in the backend (admin) and in the frontend. About markdown editor, here are some good reads: https://processwire.com/talk/topic/4213-markdown/ http://modules.processwire.com/categories/textformatter/ http://wiki.processwire.com/index.php/Text_Formatters Open this page: https://processwire.com/api/multi-language-support/multi-language-urls/ and read the part where it says: Changing the rich text editor About upgrading processwire in the future: https://processwire.com/talk/topic/52-how-do-i-upgrade-processwire-to-the-latest-version/ About making your right choice, no fanboy talk here but from my own (and others) experience if you compare processwire with the "popular" big 3 out there, processwire is going to save you a lot of time and headache. Isn't that what we all seek over "popularity" ? In processwire a lot of practical functionality is already included, no need for those to plugin afterwards e.g. you will have multi-language out of the box. Don't forget browsing the processwire api and the modules: https://processwire.com/api/ https://processwire.com/api/fieldtypes/images/ https://processwire.com/api/variables/templates/ https://processwire.com/api/variables/fields/ http://modules.processwire.com/1 point
-
I don't think that was the point rajo was trying to make. We should try to write correct english the same as we try to write correct code.1 point
-
Oh Perfect it works fine now , here is code & module 1. use the latest version of PW 2. create a folder name "RemoveDeleteTab" in your site/modules/RemoveDeleteTab 3. create a module file "RemoveDeleteTab.module" in site/modules/RemoveDeleteTab 4. bellow is code for module and it will work perfect, enjoy <?php class RemoveDeleteTab extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'RemoveDeleteTab', 'version' => 1, 'summary' => 'Remove Delete Tabs for Some Users & Some Templates', 'singular' => true, 'autoload' => true, 'icon' => 'smile-o', ); } public function init() { // Remove Settings Tab in Global settings for non super admins $this->addHookAfter('ProcessPageEdit::buildForm', $this, "afterRemoveDeleteTab"); } public function afterRemoveDeleteTab(HookEvent $event){ // check what role the user has, if superuser do nothing if($this->user->isSuperuser()) return; $page = $event->object->getPage(); /// products is a template name , you can use your own template name here if($page->template->name === "products"){ $form = $event->return; //remove settings tab $fieldset = $form->find("id=ProcessPageEditSettings")->first(); $form->remove($fieldset); $event->object->removeTab("ProcessPageEditSettings"); //remove delete tab $fieldset = $form->find("id=ProcessPageEditDelete")->first(); $form->remove($fieldset); $event->object->removeTab("ProcessPageEditDelete"); $event->return = $form; } } } now Install the Module and it will work. thanks to @LostKobrakai and @Martijn Geerts1 point
-
hi had the same issue with a customer atm. he WANTS this function so badly and does not want to use the middle mouse button or ctrl or the rightclick. so i got a workaround for it. i made a custom backend for them (which you probably need in some way) so i added following code at the bottom of the default.php of the admin theme (which i copied and then edited by my needs) $(document).ajaxComplete(function(){ addtargetblank(); }); function addtargetblank(){ $('li.PageListActionView a').each(function(){ if($(this).attr('target') == undefined){ $(this).attr('target','_blank'); } }); if($('#_ProcessPageEditView').attr('target') == undefined){ $('#_ProcessPageEditView').attr('target','_blank'); }} since PW does use jquery you can "hook" onto the ajaxComplete part (which is the part where you load all the page lists and kinda everything in PW). then you call my super awesome addtargetblank function which writes to all pagelistactionviews and the (in edit mode) viewtab an target blank if its not defined. hope that helped p.S.: please keep in mind this is a very trashy workaround which is not recommended, but it works.1 point
-
I think there is just a fundamental difference between what you are looking for in a CMS, and what ProcessWire is. That's not a bad thing. Some people think cucumbers taste better pickled. I currently work with ProcessWire in a University environment (300-500 active users, depending on the number of faculty during a semester). ProcessWire has not only been up to the task, but has far exceeded everyone's expectations. Both from a design/development standpoint, as well as UX for the site editors. One install powers a fairly complex public site (launching in the next few weeks), a faculty/staff intranet, a travel authorization and payment system, a news and events management system that handles around 500 events a semester with dozens of editors, an automated user management system that queries LDAP to determine user access and roles (runs via cron 3 times a day), Faculty syllabus manager (800+ documents a semester, maintained by hundreds of different users). Integration with MailChimp, some basic integration with BaseCamp, user generated forms (powered by FormBuilder), custom user dashboards, etc…, etc… Do you need to know how to code to use ProcessWire at this level? Absolutely. At least a little. In my opinion, that's a good thing. It means you can respond quickly to development needs. It means you can build solutions to suit, and not rely on pre-packed solutions that may not meet all project requirements. It means that you aren't constantly dealing with security patches, upgrade, etc… From a frontend development standpoint it means you aren't trying to work with markup that is bad/dated or has 17 classes on each element. I've been able to accomplish things fairly easily with ProcessWire that I bashed my head against for ages with other CMSs. Are all the typical "enterprise" checkmarks present in ProcessWire? No, but that isn't what ProcessWire is — and I hope it's not something it ever tries to become. At least not in the traditional sense. Depending on your needs and skillset; other CMSs may be better suited. ProcessWire might be a pickle—when what you really want is a cucumber.1 point
-
@renobird: which fileformat(s) do you test? png, gif, jpeg or variing? For PNG and GIF the quality setting has no effect, only for JPEG it should.1 point
-
JSON Installer is a module that allows you to define installer scripts in JSON. The module has proven its use when either setting up a big website for a client (it's easier to type all pages in a JSON-file than to create them all with the click-heavy ProcessWire admin) or doing repeated tasks. At We Work We Play we always do the same kind of setup (create a configuration page, add SEO & sharing fields, an 'Under Construction'-toggle) so this module automates this for us. Huge timesaver. How to install: Download from: https://github.com/weworkweplay/ProcessJSONInstaller Place the file ProcessJSONInstaller.module in your /site/modules/ directory. In ProcessWire admin, click to 'Modules' and 'Check for new modules'. Click 'install' next to the 'JSON Installer' module (under heading 'Process'). Following that, you'll see a new menu option for this module on your Admin > Setup menu.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
-
Hey all, I've converted the ProcessWire 2.3 rules to Nginx. Hope this will help some people Greetings, Niek server { listen 80; listen 443 ssl; root /var/www/example.com/public_html; server_name example.com www.example.com; ssl_certificate /etc/pki/tls/certs/example.com.crt; ssl_certificate_key /etc/pki/tls/private/example.com.key; client_max_body_size 50m; access_log /var/www/example.com/_logs/access.log; error_log /var/www/example.com/_logs/error.log; # ----------------------------------------------------------------------------------------------- # Set default directory index files # ----------------------------------------------------------------------------------------------- index index.php index.html index.htm; # ----------------------------------------------------------------------------------------------- # Optional: Redirect users to the 'www.' version of the site (uncomment to enable). # For example: http://processwire.com/ would be redirected to http://www.processwire.com/ # ----------------------------------------------------------------------------------------------- if ($host !~* ^www\.) { rewrite ^(.*)$ $scheme://www.$host$1 permanent; } # ----------------------------------------------------------------------------------------------- # Access Restrictions: Protect ProcessWire system files # ----------------------------------------------------------------------------------------------- # Block access to ProcessWire system files location ~ \.(inc|info|module|sh|sql)$ { deny all; } # Block access to any file or directory that begins with a period location ~ /\. { deny all; } # Block access to protected assets directories location ~ ^/(site|site-[^/]+)/assets/(cache|logs|backups|sessions|config|install|tmp)($|/.*$) { deny all; } # Block acceess to the /site/install/ directory location ~ ^/(site|site-[^/]+)/install($|/.*$) { deny all; } # Block dirs in /site/assets/ dirs that start with a hyphen location ~ ^/(site|site-[^/]+)/assets.*/-.+/.* { deny all; } # Block access to /wire/config.php, /site/config.php, /site/config-dev.php, and /wire/index.config.php location ~ ^/(wire|site|site-[^/]+)/(config|index\.config|config-dev)\.php$ { deny all; } # Block access to any PHP-based files in /templates-admin/ location ~ ^/(wire|site|site-[^/]+)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP or markup files in /site/templates/ location ~ ^/(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP files in /site/assets/ location ~ ^/(site|site-[^/]+)/assets($|/|/.*\.php)$ { deny all; } # Block access to any PHP files in core or core module directories location ~ ^/wire/(core|modules)/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any PHP files in /site/modules/ location ~ ^/(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any software identifying txt files location ~ ^/(COPYRIGHT|INSTALL|README|htaccess)\.(txt|md)$ { deny all; } # Block all http access to the default/uninstalled site-default directory location ~ ^/site-default/ { deny all; } # ----------------------------------------------------------------------------------------------- # If the request is for a static file, then set expires header and disable logging. # Give control to ProcessWire if the requested file or directory is non-existing. # ----------------------------------------------------------------------------------------------- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|eot|woff|ttf)$ { expires 24h; log_not_found off; access_log off; try_files $uri $uri/ /index.php?it=$uri&$args; } # ----------------------------------------------------------------------------------------------- # This location processes all other requests. If the request is for a file or directory that # physically exists on the server, then load the file. Else give control to ProcessWire. # ----------------------------------------------------------------------------------------------- location / { try_files $uri $uri/ /index.php?it=$uri&$args; } # ----------------------------------------------------------------------------------------------- # Pass .php requests to fastcgi socket # ----------------------------------------------------------------------------------------------- location ~ \.php$ { # Check if the requested PHP file actually exists for security try_files $uri =404; # Fix for server variables that behave differently under nginx/php-fpm than typically expected fastcgi_split_path_info ^(.+\.php)(/.+)$; # Set environment variables include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # Pass request to php-fpm fastcgi socket fastcgi_pass unix:/var/run/example.com_fpm.sock; } }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
-
Ah yes, that's what I needed! It turns out $image->width() and $image->height() are actually rendering functions, so I was able to just do this: $mainimage = $page->image; if($mainimage->width >= $mainimage->height) { echo '<img src="' . $page->image->width(768)->url . '" alt="' . $page->title . '" id="displayimg" />'; } else { echo '<img src="' . $page->image->height(575)->url . '" alt="' . $page->title . '" id="displayimg" />'; };1 point
-
You would have to write some logic to check the width and height using $image->width() and $image->height() to see which side you want to scale it down on, but then I think it's just a case of using $image->size() and only putting in the width or height For exams I think I you had an image that was landscape and you wanted to scale to a width of 400px you should be able to do $image->size(400,0) and to scale by height only switch the numbers around. This is all off the top of my head but I'm pretty sure that setting 0 as one of the dimensions just let's PW work out that other dimension for you. Was that what you were after?1 point