Leaderboard
Popular Content
Showing content with the highest reputation on 11/10/2012 in all areas
-
2 points
-
Every time I think about making it AJAX I forget the more complex inputfields - totally understand it when you take into account the other types. Thanks for the explanation ryan!2 points
-
As per this thread, I've been working on a module this afternoon which automatically posts a tweet on Twitter when a page is saved. Important Settings You must have a Twitter account You need to sign up for a dev account, as you will need a consumer key, consumer secret, oAuth Token and oAuthTokenSecret from Twitter When creating your "application" on Twitter, please ensure you set it to read/write and not just read, else it won't be able to post! You can enter a prefix for your url, such as "Check out our latest blog post:" You will need to select "categories" whose children this module will apply to. Eg. if you have two root pages called News and Gallery and you want to post a tweet about any new pages created directly under those sections, then select them from the Allowed Parent Pages dropdown (if nothing is selected in this field, the module simply doesn't do anything ). There ar two Allowed Parent Pages lists as of v1.1.0 - the second one is for tweets with a photo upload to Twitter and will attempt to upload the first image from the "images" field for the current page (if the field exists and there is at least one image uploaded). Optional I thought that whilst I was at it I might as well add bit.ly support, so you will need your bit.ly username and a bit.ly API key to have your URLs automatically shortened, else it will post normal URLs in your tweet I've also put a decent amount of error checking in there so it should warn you if there's anything missing. You don't have to worry about double-tweets. The class I used to connect to Twitter will prevent this, although when you save the page it will still tell you that your tweet was posted successfully. To delete any tweets you've created whilst testing, or tweets you don't want for whatever reason, log in to Twitter to delete them. Credits As from 1.1.0, the class used is from Matt Harris who is on the Twitter dev team (@themattharris) - his full library is on GitHub and contains a lot of good examples for interacting with Twitter in other ways. I switched modules as Matt's class allows for the picture upload functionality. I'm leaving in the bit below about Tijs' class as he has a lot of other good classes and without his Twitter class I wouldn't have actually been able to start work on this modue at all. Aside from the usual thanks to those module authors whose code I've inspected to build this (mostly ryan I think this time - I worked out the ASMSelect from the InputfieldPage module), none of this would be possible at all without Tijs Verkoyen's Twitter and bit.ly classes which are bundled with this module. Check out all of his awesome classes here: http://classes.verkoyen.eu/ EDIT: I've attached the modile as a zip file to this post since Github is being a git and won't let me push my commit for some reason. SocialTwitterUpdate.zip1 point
-
Anyone else attempted to use ChromePhp for debugging with ProcessWire? It doesn't seem to work - doesn't output errors or anything, just doesn't seem to do anything at all...1 point
-
Hi, I'm trying to build my own install file to be able to start every new PW install with a fixed number of fields, So far I've dumped my previous PW database into a .SQL file and included it in the install.sql, during the install it nicely imports all my database settings into my newly installed database but I do have a problem with the admin user, when I try to login I get a any ideas how I can fix this or copy a database into a new install profile?1 point
-
I’ve been working on a simple admin theme. I originally just wanted to add a simple dashboard area on the home page to display some quick links to key actions and documentation for clients, but I ended up doing a whole theme. The main focus of the theme is for the client / editor role, so it’s not been optimised for the developer usage yet. There are a few enhancements which are aimed at clients (opening previews in a new window, showing tree actions on hover). I have also tried to optimise it for mobile layout. You can see a preview on this video It’s using the Bootstrap framework and Open Sans font. The main issues I currently have are a conflict with the Bootstrap framework scripts and the older version of Jquery that ships with the PW admin. If I upgrade to Jquery 1.8.2 a lot of PW admin functionality breaks (sorting, ask select, modals). If I stick with the currently shipped version of jQuery 1.6, the bootstrap scripts do not work (drop downs, message alerts, mobile navigation). The other big issue, is I made a few simple hacks to some core js files (/wire/modules/Process/ProcessPageList/ProcessPageList.js, and /wire/modules/Jquery/JqueryWireTabs/JqueryWireTabs.js) - this was mainly to insert extra css classes here and there or to show if the tree has children. Is there a better way to do this? Other issues I am thinking about Is there a way to modify the “add new page” workflow? So when the user adds a new page, I’d like to change the default “You are adding a page using the …” message. Maybe this could be an additionally template field called “instructions” or “”details” ? It could be a used as a kind of “templates documentation”, which could be used to document the project for other devs and designers and for the clients / editors. How can you modify the login screen without overriding this file (/wire/modules/Process/ProcessLogin/ProcessLogin.module)? Also not to sure if having two save buttons is good for usability - maybe I will just have one in the header and make it fixed as you scroll.1 point
-
http://www.fmmhindusociety.com/ This one is the first website I have created with ProcessWire for non-profit organization. As I have mentioned in my one of the post that this website is hosted under windows platform which has IIS7 as web server. Thanks for checking out.1 point
-
Actually, I think I'm going to have to withdraw that statement. In ProcessWire, every page is a folder - there is really only one type of node. I guess the underlying problem or cause of confusion, is that the URI protocol, as such, distinguishes folders from files, and ProcessWire does not. This is one of the things I like about ProcessWire, so I'm not trying to argue against it, but it really does result in rather ambiguous URLs that are not interpreted the way a URI is normally interpreted. Case in point, consider the URI "foo/bar/": The way a URI is normally interpreted, this means: give me the default document under the "foo/bar" folder. The way ProcessWire interprets it, this means: give me the "bar" document under the "foo" folder. Now consider the URI "foo/bar": (without the trailing slash) The way a URI is normally interpreted, this means: give me the "bar" document under the "foo" folder. In this case, ProcessWire is consistent with normaly URI interpretation. One way to look at this, is to say that documents in ProcessWire do not have names. That is, the URI always indicates a folder-name, and it just so happens that ProcessWire always has a single, nameless, default document associated with every folder. From that point of view, eliminating the trailing slash is actually wrong - and the problems you have with relative URLs are just a result of the folder/document ambiguity that results from doing so...1 point
-
Can't wait for the final result of this effort... It makes ProcessWire a viable option for many more clients. Thanks for all the hard work and refactoring Rob!1 point
-
If you would let us know what exactly your doing codewise with you categories and locations it would help finding what's going on. I have tested a little more and I have 800 pages and when going to a page that's on position 800 it has to parse all page 800 to that point, but when prefix id's is enabled it does a good job. Execution times a slightly higher, as it is without the module enabled. And I'm talking about ~0.1 seconds. But it all depends how many heavy code you are performing. SInce I'm not sure in your case if it's the finding pages or generating urls that causing the slowdown, I'm curious to know exactly what your doing in your templates. Not really a solution since I don't know yet what's causing the problem. But with id's enabled it's a lot better optimized as if I would use a index table to get pages quicker. Again I can image it's something different, as I have no problems in my testcase.1 point
-
I have also stumbled on $pageArray->count many times.. it would be nice little tweak to make it same as count(). Like parent and parent() etc.1 point
-
Duh, it was turned off! ... it's hard to see on the icon in the client that it's even possible to turn it on/off ... man, I'm having a slow day1 point
-
I don't see any reason to add more settings that are totally irrelevant or purely aesthetic for 99% of projects. Urls with trailing slashes look nicer (imo) and work nicer (like Ryan explained). Overthinking and overconfiguring each possible option is certain way to bloat. Page that isn't allowed to have sub-pages might be allowed to have sub-pages later on. Also the family tab settings are only for admin usage - children are possible through API. So I wouldn't tie any code breaking functionality on that setting and assumption.1 point
-
Works fine here. Where nclude it and where? BTW looks like a nice tool, thanks for posting.1 point
-
Boy, do I feel dumb now I'm not even sure how I managed to conclude that the indices were IDs... The real problem in my case was that $pages->count returns null, while $pages->count() returns the actual number of items. (unrelated, but that seems to throw me off more often than not...)1 point
-
Take out the "Inputfield" part, and it describes what the field is. For instance "Form" is a <form> and "Text" is an <input type="text"> You want to use the InputfieldSelect included with ProcessWire: $select = $modules->get('InputfieldSelect'); $select->name = 'my-select-field'; $select->addOption('A', 'Option A'); $select->addOption('B', 'Option B'); $select->addOption('C', 'Option C'); $select->value = 'B'; // if you want to set a predefined value $form->add($select);1 point
-
Not possible, at least not in a way that would be compatible with all fieldtypes. Not all fieldtypes are ajax compatible. Take TinyMCE for instance, which would need a totally different approach to being dynamically instantiated on a page like that, if it's even possible. I wouldn't want to place this burden on Inputfield module developers. It would always be a question of "is this Inputfield repeater compatible?". For instance, any Inputfield that initializes with it's own $(document).ready() wouldn't be compatible. The whole idea of "ready pages" are a compromise to provide a way around this.1 point
-
Looking great! Love what you are doing with this. The dev branch (targeted as the upcoming v2.3) currently has jQuery 1.8.3 and the latest jQuery UI, so this issue will resolve itself shortly. If you'd like to switch to it on your dev server, I could definitely use help testing. If you can tell me more specifically what you need changed, I can update the core to support it, or can suggest an alternative. I'm not totally sure I understand the request. You mentioned workflow, but sounds like you are mainly interested in just changing some text? Either way, I'm sure I can make it hookable if it's not already. For really major changes, another option is you can always add another Page Add process of your own (under a different name) and update the 'process' variable of /processwire/page/add/ to point to your process rather than the default one. Several things are hookable here, and if we don't have what you need now, I'm happy to modify it to make it more hookable. Tell me more specifically what you are trying to do here and I should be able to find a way. Technically there's only 1 save button in the markup. The second one is created by the javascript in /wire/templates-admin/scripts/main.js. As a result, this is admin-theme specific, and getting rid of it would just mean deleting some JS out of your /site/templates-admin/scripts/main.js1 point
-
You've got me confused here. PageArrays are numerically indexed, starting from 0. Try this: foreach($pages->find("id>0, limit=20, sort=random") as $index => $item) { echo "$index: $item<br />"; }1 point
-
Thanks Lance! For people that want to donate, one good way might be to maintain a PPC campaign promoting ProcessWire, or to advertise on a site like cmscritic.com or others. In the past, we've also done PW feature-sponsorships, where a company can sponsor some or all of the cost of developing a new feature or module for ProcessWire (see Avoine). Ultimately, if there are donations I think it would be great to have them go directly towards growing ProcessWire's user base or capabilities.1 point
-
For me the biggest problem with no trailing slash is that the relative linking strategy isn't logical in a tree structure. No trailing slash is fine for bucket-based, non-hierarchal systems, but is problematic in a tree structure. Compare these relative linking strategies. When there is no trailing slash, you are always in the context of the parent rather than the current page: No trailing slash: <a href="./">Link to parent</a> <a href="this-page-name/child-page-name">Link to child</a> With trailing slash: <a href="../">Link to parent</a> <a href="child-page-name/">Link to child</a>1 point
-
Not at present, but I do plan to add a 'website' field in 2.3, which is coming very soon.1 point
-
you.try this <?php foreach ($blocks as $index => $block): ?> <?= $block->set('pagamos', $page)->render(); ?> <?php endforeach; ?> menu-black tamplate: <ul class="menu-block-links"> <?php foreach ($page->pages as $item): ?> <li<?= $page->pagamos->id === $item->id ? ' class="active"' : '' ?>><a href="<?= $item->url ?>"><?= $item->title ?></a></li> <?php endforeach; ?> </ul>1 point
-
Also what would help is to see your setup. Are those pages locations and categories in one folder which is hidden? How much is the slowdown and how do you recognize it? What version of PW? I have a hard time believing that ~300 pages already is noticable. Though It maybe has to do with the render() method in the proxy gateway template which seem to cause the page getting rendered 2 times. Still not sure about many parts of the module, that's why it is stil considered experimental and I wouldn't recommend using it in larger and serious projects and be somewhat cautious about it's drawbacks. The module also hooks into the tinymce text fields to parse and replace urls which obviously gets in conflict with the Page Link Abstractor module by ryan which also does parse the same urls. There's just some edge cases where there can happen things you might not aware yet. Though PW is enough flexible and powerful to easily switch to another approach, but could hurt the projects urls and seo. At the end, only if people are using and testing it, it can be improved.1 point
-
I think it is totally appropriate to have some conventions and not configuration for everything. Trailing slashes are - in my opinion - a good convention.1 point
-
Thanks to Soma and to Michael Murphy for sorting this out!! I've tested the pagination with the module and works!1 point
-
1 point
-
Just as Soma mentioned, use the FieldSet field type to create your columns, and then set their width so they float next to each other. In my case I made 3 FieldSet columns. (column_1, column_2, column_3) — although I only used 2 columns in the screenshot above. I didn't want to change how the admin looked anywhere other than within these columns, so the only thing I changed about the default theme was a few lines of CSS that are specific to these columns. You can grab the CSS here1 point
-
You just create fieldsets and use width column option. The trick then is to hide the fieldset label via css. Ive done it myself with teflon theme and will soon update it with same approach and also made the field labels white to remove cluttr.1 point
-
Hey Antti, Not a theme (yet) - just a few CSS tweaks I made. Nico has seen it and keeps encouraging me to make a theme out of it.1 point
-
1 point
-
Do you get paid for the sites that you would with PW? When you come to the forums to get help, do you limit your questions purely to development work that you are doing for free? I originally developed PW to help us all create better sites in less time, and with more fun. I'm hoping that PW is helping others to be more competitive in all ways, including financially. But recognize that PW did not come into existence on its own. Years worth of time and money has gone into making ProcessWire happen. If you are using ProcessWire to develop sites you get paid for, then you are profiting from ProcessWire. And that's fine with me, no ROI is expected or wanted--I've never asked anyone for anything. But it is disheartening to hear a user make a statement with the implications yours makes. Form Builder is not about making a profit. I don't expect that I will ever make enough on it to offset the actual time investment on it. My hope is that eventually it will be something where the community and myself have split the cost to create. If I wanted a profit, I would go make a Form Builder for WordPress or Drupal where the user base is large enough for that potential to exist. Form Builder is a tool that wouldn't exist if I had to fully self fund it. It's also an experiment to determine if I can reduce my client workload and substitute some of it with ProcessWire-related development that benefits all of us. But I can't substitute something that supports my family with something that doesn't. Form Builder is here to benefit you, not me. If you build sites for a living (or even a hobby) it's going to pay for itself the first time you use it. If you previously spent half a day building a form, now you can spend minutes and get a better, more secure and capable result that can do all sorts of things with the results it collects. Also want to note that Form Builder is something completely different from the original subject of this thread and I don't view them as similar products at all. Likewise, Form Builder is completely different from something like Zend Form or others like it. One does not preclude the use of the other and we should all keep more than one tool in our forms toolbox. I fully support Clinton's project and any others that benefit forms in ProcessWire. Forms are one of the most diverse and important aspects of web development. I feel very confident about the value of Form Builder in your toolbox, so have made it 100% refundable if you find it isn't for you (this type of return policy is pretty rare with digital products).1 point
-
You knew it but you did it anyway... there are many occasions when it is good to shake things up, but I honestly think you didn't choose the proper place, time or words. Ryan already said on the forum that he plans to dedicate more of his time to PW, and that he just has to compensate the loss of money that it would mean for him and his family. He is not forced to discuss this kind of things with us, but he does, and even asks for the others opinions. Code is as good for selling as any other product or service, and I would say, a very honest choice for taking some profit of such a great work as PW is. And hopefully he does. Maybe this discussion will also interest you http://processwire.c...-in-the-future/1 point