-
Posts
365 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Raymond Geerts
-
What are those black Zorro masks on the avatars?
Raymond Geerts replied to Ivan Gretsky's topic in Pub
Don't tell anyone... but they are trying to take over the world by coding the best CMS and make everybody addicted to it. They already got me hooked on it. Nothing beats the original theme -
@Ryan running PW 2.5 with FieldtypeConcat without any problems. Thanks for fixing it
-
on topic: your way seems fine off topic: maybe sanitize your input before using it $filter = $sanitizer->pageName($input->get->filter, true); $sort = $sanitizer->fieldName($input->get->sort);
-
That worked fine. Everything seems to work fine too in PW 2.4.17
-
It doesnt seems to able to install with the module manager. I filled in the module name "ProcessPageDelete" and pressed "Download and Install". That gives the following warning File could not be downloaded: https://github.com/NicoKnoll/ProcessPageDelete/zipball/master Going to install it manualy instead.
-
On the module page (http://modules.processwire.com/modules/process-page-delete/) it shows its compatible with PW 2.2 and 2.3 Since PW 2.5 is kinda the current version, my question is: Is your module compatible with 2.5?
-
Just installed PW 2.5 (or 2.4.15 as shown in the admin footer). I'm very happy with all the new features. Also nice to see a site-blank profile. Going to give it a try and see what new stuff is under the hood.
-
@WillyC but i want to prevent everybody from loading the data trough an iframe. Only my own script should be able to, atleast for now
- 7 replies
-
- X-Frame-Options
- SAMEORIGIN
-
(and 2 more)
Tagged with:
-
@horst i'm not familiar with any of this. so i'm not sure what that file crossdomain.xml does or doesnt do. It seems to have similar words in the tags so it might be some kind of solution too. Anyway regarding multiple domain names and/or protocols, i stumbled up on the following thing on stackoverflow which seems to work fine, so that might be it. have'nt dont further testing, but lets see if it fails i will post here again http://stackoverflow.com/a/23998863
- 7 replies
-
- X-Frame-Options
- SAMEORIGIN
-
(and 2 more)
Tagged with:
-
I'm not sure how to aply to multiple domains or protocols. Does anybody know how to allow traffic from lets say: http://www.domain.com, and https://www.domain.com at the same time? I tried several methods but they all failed These below do not work Gives a 500 Internal server error Header set Access-Control-Allow-Origin "http://domain.com", "https://domain.com" Gives a CORS browser error, blocking the result to be retrieved Header add Access-Control-Allow-Origin "http://domain.com" Header add Access-Control-Allow-Origin "https://domain.com" Gives also a CORS browser error, blocking the result to be retrieved Header add Access-Control-Allow-Origin "[http|https]://domain.com"
- 7 replies
-
- X-Frame-Options
- SAMEORIGIN
-
(and 2 more)
Tagged with:
-
Not specificly related to PW, but in a way it does. I have setup two processwire installs on different sub-domains. Scenario: 1. Main website - visitors go here http://www.domain.com/ 2. Data API provider - RESTful API spitting out (cached) JSON objects http://data.domain.com/ Website 1 loads data trough AJAX / Angular.js from website 2 Since PW by default has the following line in the .htaccess file it will prevent access from cross domains requests that load in an iframe Header always append X-Frame-Options SAMEORIGIN One solution i found was to put the following line in my template file (or somekind of init.php file) at website 2, allowing website 1 to access header('Access-Control-Allow-Origin: http://www.domain.com'); That worked nice, until i installed the Procache module from Ryan. A logic change, since PHP is completely bypassed it does'nt set the headers anymore. The final solution: I removed the header line from the php file and put it in the .htaccess file just below the SAMEORIGIN line on website 2 Header always append X-Frame-Options SAMEORIGIN Header set Access-Control-Allow-Origin: "http://www.domain.com" Could be helpful to anybody, thats why i posted it here Update: found a nice script allowing any sub-domain of the origin host http://stackoverflow.com/a/19519690
- 7 replies
-
- 5
-
- X-Frame-Options
- SAMEORIGIN
-
(and 2 more)
Tagged with:
-
I dont know skeleton, but taking a quick glimpse at the HTML of the site it looks like its a 16 column grid. But instead of using percentual measurements for the grid width it uses a fixed pixel width. The media queries set a different width for the grid elements (one, two, etc.) So since, on a wide screen looking at the site its a left sidebar of 3 columns width and a content part of 12 columns with an offset of 1 column makes it a total of 16. Thats why the example in the content column has a width of 12 columns. | 3 columns | 1 column offset | -------- 12 columns -------- |
-
@Ryan in PW 2.4.10 (from 2.4.3 atleast) this module stops working and throws an error "Class 'FieldtypeText' not found" on line 20 class FieldtypeConcat extends FieldtypeText Please see: https://github.com/ryancramerdesign/FieldtypeConcat/issues/3 Changing the line to this, fixed the error, but doesnt seems format the output anymore. class FieldtypeConcat extends Fieldtype
-
In our company site i'm using Hanna code all over the place for company phone and fax numbers and e-mail addresses. Its very easy to manage when a value needs to be changed. Change it once in the hanna code and ~voila~ its changed site wide Some examples usages in our site: (translated to english for these examples) [[phone nr="marketing"]] [[fax nr="sales"]] [[email address="subscriptions"]]
-
Can Someone Explan Basic Principles Of Forms?
Raymond Geerts replied to jckhmmr's topic in Getting Started
Hi jckhmmr, Any value that is posted to a page can be fetched with one of the following manners: $input->post->fieldname; $input->post['fieldname']; $input->post('fieldname'); For GET values simply change post to get $input->get->fieldname; See: https://processwire.com/api/variables/input/ Where fieldname is the name of the form input field. So when you have a form <form method="POST" action="<php echo $page->url; ?>"> <input type="text" name="firstname"> <input type="text" name="lastname"> <input type="submit" name="send" value="send"> </form> You can access those fields as follow: $input->post->firstname; $input->post->lastname; A good thing to do always with user input is to sanitize it like this: $firstname = $sanitizer->text($input->post->firstname); $lastname = $sanitizer->text($input->post->lastname); See: https://processwire.com/api/variables/sanitizer/ and welcome to ProcessWire. -
Gamification At Work Or How To Become Reiska #2
Raymond Geerts replied to Ivan Gretsky's topic in Pub
Ok nice, so now i'm one post closer to become a Hero-Member- 13 replies
-
- 1
-
- pw-moderators
- member title
-
(and 1 more)
Tagged with:
-
how to create my own front-end theme?
Raymond Geerts replied to adrianmak's topic in Themes and Profiles
Processwire does not have front-end themes, because for every website the front-end is custom made. https://processwire.com/talk/topic/6653-how-can-i-apply-a-new-theme-to-processwire/ The install.sql contains the default (admin) pages which are needed for the back-end, and some default pages for the front-end (Home, Basic Page, Search, 404) There is a module to export an entire site profile, this will create an sql export that together with the other file from the site folder can be used when installing new sites with that specific site profile. Site Profile Exporter http://modules.processwire.com/modules/process-export-profile/ A good read to get you started https://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/ -
There is a software limitation applied by the sanitizer. For textarea fields this limit is 16384 characters. https://processwire.com/api/variables/sanitizer/ http://cheatsheet.processwire.com/sanitizer/properties-and-methods/sanitizer-textarea-value-options/
-
When its not of any concern that the navigation will be 'static' you could use a field of the type Page which contains a list of the pages you need to list. Create a new field called navigation of the type Page, make sure it can contain multiple pages and select the Homepage as parent. Then attach this field to the Home template. Next thing to do is add all the pages you want to list in the navigation and sort them the way you like. Then in your code you can loop trough them as follow: $navigation = $pages->get('/')->navigation; foreach($navigation as $item) { // your html for the menu }
-
How Can i apply a New Theme to Processwire
Raymond Geerts replied to mosravo's topic in Getting Started
Since ProcessWire and its modules/plugins do not output any HTML by itself, you are completely free in how you wrap the data from the pages. This gives you as developer complete freedom how you present the data. You could use HTML, XML, or even just JSON. This is the reason why there are no themes for the front-end availabe. -
Sounds like the table(s) got corrupted somehow. Are they completely gone? If not you could try to run a repair over the tables. I'm not sure what could be the cause. Perhaps a corrupted sector on the hard drive?
-
Replying on my phone, so keeping it short. First, thanks for helping out. On the user template i tried that before, checking the edit and add boxes for the manager role, only that still gave the error that i cant add pages with the user role template Ok, the version im using is about 2 weeks old, i saw on github many things happend since then so will sync the latest dev version and see it that fixes both issues.
-
We talked about this in the office, just letting know i agree with Martijn. In 9 out of 10 templates (maybe even more in the past projects i'm working on) it doesnt need to be displayed in the shortcut menu.
- 1 reply
-
- 2
-
I have added a new role "manager" with the following permissions: View pages Edit pages Delete pages Move pages (change parent) Lock or unlock a page Administer users (role must also have template edit access) User can update profile/password Still logged in as superuser i added a couple of test users with the roles "guest" and "manager". When i login as one of the test users i can modify existing users (even those with "superuser", this is strange!) But as soon as i want to add a new user by clicking the "Add New" button, fill in a unique name and click "Save". I get the following error message: You don't have access to add pages with template 'user' 1) How can i let users with a certain role add new users without having to give them the "superuser" role. 2) Shouldnt "superuser" role only be available to add to a user account when the user itself has "superuser" rights?