Leaderboard
Popular Content
Showing content with the highest reputation on 05/03/2013 in all areas
-
Good idea I also have need for it, and fun to make module so there you go (not exactly easy): A first version of ImageMinSize Adds a min dimension setting (under Input tab) to image fields. If requirements doesn't meet it throws error and deletes images. To have it meet exact dimension, you can simply set min and max dimensions to same values. Edit: The module has now its home http://processwire.com/talk/topic/4091-imageminsize/9 points
-
Create custom admin pages easily without having to build a Process Module especially for that. ☞ This module makes it easy to create simple admin pages but you can also create them in much more powerfull way without the need of a module. Have a look at this post written by Bernhard Baumrock to know how it's done https://processwire.com/blog/posts/building-custom-admin-pages-with-process-modules/ ------- I just updated the module, I kind of merged the two versions and now it works with both stable and dev versions of PW. Only difference is that with the stable version you still need to create the child pages and with dev version that is not needed. The instructions are on Github. Enjoy ---- Download or clone from Github https://github.com/ocorreiododiogo/pw-admin-custom-pages Module page is here http://modules.processwire.com/modules/process-admin-custom-pages/6 points
-
Hi all, I just switched to processwire from MODx and I am really impressed of how clean, fast and intuitive this system is. My first project with processwire happens to be a multi language site, and I am really happy that it can be done with a single page tree. However, I had to dig the forums a lot to find all information i needed to get everything working, so I thought I share my newly gained knowledge... The order of the steps is important, especially if you are working on IIS (which can inflict database damage if you add languages before you change the field types!) 1. Install the Language support modules: - Languages Support - Languages Support - Fields - Languages Support - Page Names 2. Change any existing Fields of types Textfield/Textarea/PageTitle to TextLanguage/TextareaLanguage/PageTitleLanguage You now will have an input field for each language you add. 3. Set up your languages under Setup->Languages (define a name and title for each language. For each new language, you will have to add a title to all the other languages in that new language) 4. Edit your homepage, set it to hidden and unpublished. UPDATE: don't set the homepage to unpublished, the first-child-redirect won't work! (I realized just now, because if you are logged in as admin, it does work) For each language, you have to define a unique name (e.g. "de" and "en") 5. Edit your "home" template to redirect to its first child: <?php $session->redirect($page->children->first()->url); UPDATE: this is not essential... as ryan pointed out, it might even be better not to do it (for SEO-optimization) 6. If you have something like $children->prepend($homepage); in the menu part of your head.inc, remove it (you don't want the home page to show up in your menu) UPDATE: if you left out the redirect option, you'll want to leave this out as well. 7. To switch languages, add this snippet to your head.inc: <ul> <?php $user_lang = $user->language; foreach($languages as $language) { $user->language = $language; if($language->name != $user_lang->name) { echo '<li><a href="'.$page->url.'">'.$language->title.'</a></li> '; } } $user->language = $user_lang; ?> </ul> Each language except the currently active one will be displayed in a list (of course, this can also be done with a select field). UPDATE: Ryan pointed me to a better solution for the langugae switch: http://processwire.c...s-urls/?p=33537 8. Done. Now your page urls should look something like path/to/root/en/my-page, or path/to/root/de/meine-seite It took me less than a day to set up processwire, install my html template and configure the site to be multi-language... this is so great, considering the pain multilanguage sites usually cause with all the other CMSs... Keep it up! UPDATE: I was a bit quick to post a tutorial just after one day working with PW... should have made some more research beforehand. Just got a little too excited there... I'm still impressed by the system and plan on digging deeper into it.3 points
-
Just found another really interesting lightbox. Magnific Popup is a free responsive jQuery lightbox plugin that is focused on performance and providing best experience for user with any device. It's build for speed and seems highly customizable through css (and not javascript like most).3 points
-
I've run into a similar issue on one of my sites that has a lot of accounts to manage. I'm hoping to improve the core modules (ProcessPageType and/or ProcessUser) in this regard whenever there is bandwidth to pursue it.2 points
-
It's not a db thing, hence your direct query is working, it somewhere hidden in the page finder I guess If you do a $title = "Sabine MeyerAcademy Of St Martin-In-The-FieldsKenneth Sillito"; $p = $pages->get("title=$title"); foreach($db->getQueryLog() as $l) echo $l . "<hr>"; You'll see the queries PW does on the request: ... SELECT pages.id,pages.parent_id,pages.templates_id FROM `pages` JOIN field_title AS field_title ON field_title.pages_id=pages.id AND (((field_title.data='Sabine MeyerAcademy Of St Martin-In-The-FieldsKenn' ) )) ... Or install my ChromePhp Logger module and see it in the js console2 points
-
By default, the "Forgot Password" module is not turned on in v2.1. My thought was that lack of such a function is technically more secure (on any site or CMS). Why? Because having such a function active means your password is only as secure as your email (*though see note at end of this message). So I thought we'd start things out as secure as possible and let people adjust it according to their own need. But I'm rethinking that decision, and may change it to be 'on' by default. If you don't already have that "Forgot Password" module installed, it is relatively easy to reset your password with the API. Lets say that you lost the password for your account named 'admin' and you wanted to reset it. Paste this code into any one of your templates (like /site/templates/home.php in the default profile, for example): <?php $admin = $users->get('admin'); $admin->setOutputFormatting(false); $admin->pass = 'yo12345'; // put in your new password $admin->save(); …or if it's easier for you to copy/paste everything on one line, here's the same thing as above on one line: <?php $users->get("admin")->setOutputFormatting(false)->set('pass', 'yo12345')->save(); Replace "yo12345" with the new password you want and save the template. Then view a page using that template (like the homepage, in our example). The password for that account has now been reset, and now you are ready to login. Don't forgot to now remove that snippet of code from the template! Otherwise your password will get reset every time the page is viewed. Once logged in, here's how to install the Forgot Password capability: 1. Click to the "Modules" tab. 2. Scroll down to the "Process" modules. 3. Click "Install" for the "Forgot Password" module. That's all there is to it. You will now see a "Forgot Password" link on your login page. *ProcessWire's "Forgot Password" function is actually a little more secure than what you see in most other CMSs. Not only do you have to have the confidential link in the email, but the link expires in a matter of minutes, and PW will only accept password changes from the browser session that initiated the request. So an attacker would have to initiate the password change request and have access to your email at the same time, making it a lot harder for a man-in-the-middle snooping on your email.1 point
-
1 point
-
Did you transfer the .htaccess ? I like to transfer all files within a zip & then unpack it on the server. If you're on mac, use the terminal for zipping. ( sudo zip -r zipfile.zip directory ) This way the read/write stays intact and no single file missed issues.1 point
-
@diogo - this is working great.... in 20 minutes i made a product listing page for a client that displays a sortable, filterable table of all of their products, so they can find things without using the page tree... -marc1 point
-
Works like a charm with plain HTML input or WYSIWYG! Though, It would be a killer if the plugin could detect Markdown link syntax as well! I could try to extend the plugin by myself, but surely Ryan has got better black magic Regex knowledge … Here is [a question of love](/faq/misc/what-is-love) and you can convert it to an ID.1 point
-
@Eltom: you're essentially describing a new minimum size setting here, which as far as I know doesn't yet exist but would admittedly be quite nice at times. So yes, @horst is right in that you'd currently have to create a new module to implement this. You could also submit this as a feature request to Wishlist & Roadmap section here on the forum.. though posting here may already be enough to catch Ryan's attention Taking a look at the source of InputfieldImage.module, there's a ___fileAdded() method (three underscores means that it's hookable) that could be used by a module. This method actually handles resizing image if it's larger than given max size, so something like this should work: hooking before InputfieldImage::fileAdded, checking if image size is smaller than minimum size given (settings of this new module or perhaps within field settings, though I'm not sure if there's a proper place to hook and add something like that there by hooking after InputfieldImage::getConfigInputFields and adding new field to returned InputfieldWrapper object.. or it could simply be a hard-coded value) .. and if it is, removing file and outputting error (like @horst already described above.) Sounds relatively simple to do, really. If you're even remotely interested in PW module development, you could give it a try yourself.. and please don't hesitate to ask if you face any problems! Extra tip: HelloWorld.module is great starting point for a module that adds hooks1 point
-
Hi Alan, I have tried it here and it works! Does you try it online or local? Maybe one/some needed folder isn't availbale or not writeable. Any entry in errors.log? Turn on debug?1 point
-
Check out Page References Tab, sounds like you're trying to achieve a very similar effect at least.1 point
-
Thanks for the report diogo! Your good explanation made it really easy to spot the problem. There clearly was a bug with single page Page fields: they were not handled correctly at all. The bug is now fixed and version 1.1.2 of the module has been released.1 point