Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/13/2013 in all areas

  1. Here a little helper module that does it optimized using direct SQL. https://gist.github.com/somatonic/5568201 If you install module you can do: $helper = $modules->get("RandomImages"); // load module somewhere before // getRandomImages(count, field, parent) $image = $helper->getRandomImages(1,"images", 1001); echo "<img src='{$image->size(150,0)->url}'>"; Or to get more than 1 $helper = $modules->get("RandomImages"); // load module somewhere before // getRandomImages(count, field, parent) $images = $helper->getRandomImages(2,"images", 1001); foreach ($images as $key => $image) { echo "<img src='{$image->size(150,0)->url}'>"; }
    3 points
  2. Welcome to the forum mcgarriers. You can do it like this: $parent = $pages->get(1001); // here I'm using the images array of the first child of 1001 to create a new empty array of the same kind (look on the cheatsheet for this method) $a = $parent->child->images->makeNew(); // iterate through all the pages and import their images to the created array foreach ($parent->children as $c) { $a->import($c->images); } // our array holds all the images that we want, Now you can get a random image $randomImage = $a->getRandom(); Edit: I've just seen Wanze's answer. The difference is that he is getting a random page, and then a random image. Like this, an image that is alone in a page has more chances of being shown than images in more crowded pages. While with my method they all have the same chances.
    3 points
  3. I just pushed a new module to Github. I really liked Soma's idea (and execution!) to learn new frontend stuff while building useful modules to PW. While Soma is learning Knockout, I actually find AngularJS more interesting. So here is my first "AngularJS-powered" module: FieldtypePoll. This is simple polling fieldtype for (not so serious) votings like: Q: How is the weather today? a) Fine b) Rainy c) I don't know, been coding all day This should be all usable already, so if you are adventurous and want to help me debug, this is how to get started: 1. Grab the code -> https://github.com/a...a/FieldtypePoll (actual fieldtype and inputfield) -> https://github.com/apeisa/AngularJS (AngularJS and AngularUI for PW) 2. Install the FieldtypePoll module 3. Create new field, choose "Poll" as a new fieldtype 4. Add field to a template 5. Edit your template file, output the field: echo $page->whatEverNameYouGaveInStep3 6. Add some css: .PollApe .percentage { background: black; font-size: 10px; min-width: 5px; border-radius: 4px; padding: 4px 8px; text-align: right; color: white; margin-bottom: 0.6em; } .PollApe .PollApeTotalVotes { border-top: 1px solid #ccc; }
    2 points
  4. The fix would be easy to add this before line #62 if(!$this->input->get('id')) return;
    2 points
  5. Perfect!!! Thank you very much for your help & patience throughout. I'm off to develop some more now Thanks, Wanze - I was a being a bit daft. The field name was 'image1' - all sorted now - thank you!!!!
    2 points
  6. This is as simple as: $field = $modules->get("InputfieldSelect"); $field->attr("name", "myselect"); $field->addOption("myoption1", "My Option 1"); $field->addOption("myoption2", "My Option 2");
    2 points
  7. ProcessDateArchiver ProcessWire Date Archiver Process Automatically archives pages based on a Datetime field (e.g. /news/2013/01/03/some-news-item/). Behavior - When you add a page with a specified template, the module will automatically create year/month/day archives for it. - When you change the date in a specified Datetime field, the page is automatically moved to the correct year/month/day archive. - When moving or trashing a page, the module will automatically clean up empty year, month and day archives. How to create an archiving rule 1. Go to the Setup -> Date Archiver screen in the ProcessWire admin. 2. Click on Add New Archiving Rule. 3. Specify the template that should be archived (typically the news-item template). 4. Specify the Datetime field that should be used to determine the date to archive by. 5. Specify the template that should be used for creating year archives. 6. Optionally specify the template that should be used for creating month archives. 7. Optionally specify the template that should be used for creating day archives. 8. Click Add Rule. Tips and tricks - Configure the archive templates that will contain other archives to sort its children by name. - Configure the archive template that will contain the news items to sort its children by the specified Datetime field. - You will improve usability if you dont allow the user to create date archives manually. How to Install 1. Install the module by placing ProcessDateArchiver.module in /site/modules/. 2. Check for new modules on the Modules screen in the ProcessWire admin. 3. Click Install for the Date Archiver Process. Module download: https://github.com/u...hive/master.zip Module project: https://github.com/u...ssDateArchiver/
    1 point
  8. Send photos from your mobile phone to ProcessWire, from anywhere, on-the-fly. ProcessWire maintains a chronological gallery that you can simply email photos to. Works with any e-mail capable device, whether mobile phone, tablet or desktop. Written by Horst Nogajski and Ryan Cramer Output inspired by the work of Philipp Reiner. Discussion leading to this module can be found here. Uses email libraries by Manuel Lemos Requires ProcessWire 2.2.13 or newer Here is example output from this module. Download from GitHub or Download ZIP file How to Install Setup a new email address at your provider. This address should be dedicated to the purpose of this module. Make the address private and cryptic enough so as not to be obvious or discoverable by others. Place the files included with this module in /site/modules/EmailImage/ In your admin, go to Modules > Check for new modules. Click Install for the EmailImage module. Complete all the settings it asks for, per the email you setup in step 1. Check the box to test your connection, and save. How to Use Email an image to the address you configured. You can include multiple images if you like. After waiting a minute or two, view the URL /email-images/ in your site. This is a page that was installed for you to display images. Repeat and enjoy. How to Customize While this module has everything working out-of-the-box, it is meant to be customized to your needs. For example: You may want to move or rename the /email-images/ page somewhere else. The EmailImage module keeps track of this page ID, so it is perfectly fine to remove or rename it if you want to. Take a look at the /site/templates/email-images.php template file. You may wish to replace it entirely with your own code, or you might build upon what's there, or use it as-is. But chances are you'll at least want to swap in your own header/footer to fit within your site's design. Take a look at /site/modules/EmailImage/EmailImageRender.php. That file contains an example function used to render an image gallery. This is the one called upon by the template file you just looked at. You might copy and paste this function somewhere else into your own site, and modify it to suite your own markup needs. Just remember to name it something different! Please post links to what you create in this thread. How to Uninstall You can uninstall this module in the same way as any other module, by checking the box to "uninstall" from the module settings screen. But please note the following warning: When you uninstall, your system is returned to the state that it was in before this module was installed. Meaning, the EmailImage pages and images will be deleted. So please backup your images somewhere else if you want to lose them during uninstall. After uninstalling, you can safely remove this dir: /site/modules/EmailImage/, and you can remove the template file: /site/templates/email-images.php.
    1 point
  9. 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
  10. Page References Tab This little module adds a new tab, References, to the page editor. There it lists pages referencing the page that is being edited (title, path, field). There are also links to view or edit the listed pages (if they're viewable/editable). Only fields of type FieldtypePage are considered to be references and system fields are not listed at all (roles, permissions). It's nothing much, but as the subject has turned up a couple of times in the forums, I decided to give it a try. So watch out what you're asking! Screenshot Links Modules directory: http://modules.processwire.com/modules/page-references-tab/ GitHub: https://github.com/niklaka/PageReferencesTab
    1 point
  11. Hi all! I have created this new module that improve the current search engine on PW: https://github.com/USSliberty/Processwire-site-indexer (Beta version) The main idea is to create an hidden field that store keywords (separated by space). The keywords are generated automatically from all text fields in the page, plus PDFs and DOCs files. So if you create new text fields you can forget to add they on Search Page Module. The only thing to do after install, is to change the list of fields in Search Page (see attachment). In fact you need to search only in "indexer" field. NOTE 1: At this time the module index only when you save the page. In the next week maybe i will add the complete-site re-index. NOTE 2: The files are indexed with 2 Unix packages (poppler-utils & wv). I have tried without success with pure PHP classes, but if know a class that works fine i can add it into module. ADB
    1 point
  12. Few days ago I've posted sneak preview of new admin template (it didn't have name then), so I've managed to squeeze some time to finish it and here it is... Ergo Admin Template DOWNLOAD https://github.com/nvidoni/ergo USAGE 1. Create folder named "templates-admin" under /site/ folder 2. Copy all files (including folders) into newly created folder 3. ProcessWire will load the new admin template automatically EXTRA If you would like to use custom TinyMCE theme created for this template, follow this steps: 1. Download TinyMCE Ergo theme from https://github.com/n...ni/ergo-tinymce 2. Copy "ergo" folder to /wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.4.7/themes/advanced/skins/ folder 3. Open /site/templates-admin/default.php and change in line 86 "default" to "ergo" If you find any errors please post them here so I can commit them accordingly. EDIT 1. Changes have been made according to diogo's and Soma's posts.
    1 point
  13. Hi folks I thought I'd post up a quick, basic tutorial of how to get started with Github and not have to learn any of the command line code. It's still recommended that you learn the basic commands, but this is aimed to help Git newbies like me get their modules on Github with the minimum effort possible. Check out the PDF below and have fun GitHub for Windows.pdf
    1 point
  14. This case study relates to the topic here: http://processwire.c...ndpost__p__8988 about creating an archive of 'stories' about how PW has helped in relevant real life scenarios. Website: http://www.ray-dale.com RayDale Multimedia Ray Dale is a multimedia designer. His portfolio website was 2 years old as of March 2012 and in need of a refresh. He found that the content management for his website was more time consuming than he wanted and the website was generally slow in performance and complex to update. Ray needed: A website that could showcase his latest work with separate portfolio content types The ability to show lots of images and videos in each section Complex interlinking between each portfolio item - where each item would belong to a number of simultaneous categories To be able to publish a number of pages under various sections on the website To have a condensed navigation structure - not over-facing the user with navigation A blogging space that was easy to update To gain complete control over the HTML, CSS & JS markup and therefore the design of the website The ability to take more control over the admin experience - without using a host of plugins - so that the CMS could be used for clients to make their lives easier Speedy performance - even if a shared hosting platform were used Good site security The previous solutions Ray was previously using Drupal as a content management system. Drupal is a great system, it’s incredibly flexible, it can be made faster and using template overrides, almost complete control can be taken of the HTML and CSS output. However, the process to achieve any of this is time consuming and clunky from a web designer / front end developer perspective. Drupal was also going to require a number of plugins to be installed to achieve a lot of the required functionality. Ray tested migrating his website over to WordPress. WordPress is another fantastic blogging system with light CMS functionalities. WordPress is generally easier to use than Drupal and a lot of control over the HTML & CSS markup can be delivered - in a much easier manner than Drupal. However, WordPress is still light on CMS features in the admin system. This means that it is difficult without either using a lot of plugins or custom php development (using the WordPress API) to have custom content types and fields. The decision to use ProcessWire Having searched around for an alternative to Drupal and WordPress - revisiting other CMSs that Ray had also previously used - Ray eventually landed on ProcessWire having read about it on a forum. Right from watching the initial video produced by Ryan Cramer (the creator of ProcessWire) Ray was intrigued by the possibilities that ProcessWire seemed to offer - effectively solving all of the issues currently faced. To summarise ProcessWire offered: Custom content types in the admin Custom field types in the admin Good control over media uploads A simple to use admin system A neat and simple API for custom frontend / backend development A customisable admin experience The ability to have a custom admin url Complete control over HTML markup Good security with flood control A powerful and flexible templating system (that was also simple) Ray was extremely impressed by the features that ProcessWire offered, however, many CMSs look great until you actually start using them - where the unnecessary complexities, weak architecture and terrible, bloated functionality often start to appear. The functionality seemed so promising that a gamble was taken to build the Ray Dale Multimedia website - with very little time now available - to ProcessWire and test how it performed. Building the website Having built the original Ray Dale Multimedia website in Drupal, then converted to WordPress before deciding to gamble on ProcessWire - Ray now had very little time left to build his portfolio website. As a testament to the ease and speed of using ProcessWire - he was able (with a little help from articles in the forum) to rebuild the Ray Dale Multimedia website in two days of effective full time development. This included all of the content creation and learning the new system - with the inevitable (but surprisingly smooth) learning curve. Enabling complete control over output ProcessWire allowed Ray to write HTML and CSS without any of the interference you get from other CMS systems. So, Ray was able to use the following frameworks of his choosing: HTML5 boilerplate jQuery Modernizr Masonry A customised version of the 960 fluid grid system PrettyPhoto for lightbox images Less - to create minified CSS Though it must be said that literally anything can be used as ProcessWire makes no assumptions on the frontend - even on the Javascript framework. Quick and easy API One really pleasant surprise was the jQuery influenced API that ProcessWire offered. For example you can use php queries such as: $pages->find("selector"); $pages->get("selector, path or ID"); to find content in the system - you can even filter your queries by template type, fields attached to that item, etc. You can even use a range of selector operators. The API effectively works as a super powered and infinitely more flexible alternative to the WordPress loop. Cross referencing pages easily Complex cross-linking between portfolio items was needed so that capabilities, technologies and services could be linked to each item. It was easy to create a taxonomy system that worked the exact way required once the fundamental concept of how pages work in ProcessWire was understood. Building navigation that works Unlike a lot of CMSs that work effectively as ‘bucket systems’ - meaning that content is separate from any kind of structure or hierarchy by default in the system - whereas everything in ProcessWire is a page and arranged hierarchically. Whilst this may seem strange and restrictive to some used to the aforementioned ‘bucket systems’ - it works incredibly well and enables you to build navigational structures that are easy to plot a current location in. It is also something easy enough to break away from if you want a more ‘bucket’ type system. For example, in Drupal and WordPress it can be very difficult to highlight the navigation on a website if you are using custom content types. Try using custom post types in WordPress and keeping your navigation tracking which page the user has landed on - it’s extremely difficult without a fair bit of custom development (this is true as of the time of writing - WordPress 3.3.1). Because ProcessWire uses a structure and hierarchy by default - this structure makes building navigation that can track the current page very simple. Easy / flexible admin system The admin system in ProcessWire was easy and fluid to use, logical and stable. The admin system can also be overridden with templates (there are already some great community contributed templates). Modules used Whilst ProcessWire has a number of contributed modules from a thriving and helpful community - absolutely no additional modules were needed. All functionality on the website was achieved from a vanilla version of ProcessWire. Performance Another area of importance was the performance of ProcessWire. Again, Ray found this aspect to be well covered with built in caching capabilities that were thoughtfully included ‘out of the box’. The caching was simple to enable on templates and fields. The memory footprint of the Ray Dale Multimedia website was a third of that of Drupal on the same website without using addon caching plugins. Challenges The only real challenge faced was understanding that ‘pages are everything’ in ProcessWire. You build categories, taxonomy, articles, blog systems with the ‘page’ (and any fields it contains) being the basic building block for all of this. ‘Pages’ in ProcessWire can be attached to templates and injected with fields to enable the creation of literally anything conceivable. However, understanding this concept takes a little work for people used to other CMSs such as Drupal, WordPress and Joomla. However, in context - and compared to other systems - this learning curve is still fairly easy. There are so many other time savers that this learning curve becomes negligible. The other area that Ray had to understand about ProcessWire was that there aren’t any template system paradigms that exist in Drupal and WordPress. Other systems have parent and child templating systems with default parent templates that can be leveraged, however, because ProcessWire makes no assumptions on how you are going to build a project (being a true framework) you currently need to create your own template files. This is made easy by good documentation on the ProcessWire website and a decent set of ‘starter’ template files that come as part of the default install. Conclusion ProcessWire was an absolute dream to work with. Ray found it to be very stable, well thought out and hugely flexible. So much so in fact, that Ray has decided to standardise on using ProcessWire for upcoming web design projects. The flexibility and simplicity of the admin system, combined with power in frontend development that ProcessWire provides is something that Ray found to be liberating and more importantly ‘best in its class’.
    1 point
  15. Thanks @arjen & @adrian for the report. And thanks @soma for giving the right solution . It definitely was a bug in this very module. I've updated the module to check id has been given as a GET parameter before using it to get the page being edited. This seems to solve the problem you guys were facing, just like soma said. New version is in GitHub and version number has been updated in the modules directory as well. @arjen: Soma was right also regarding that bitwise-and (naturally ). That line, and two similar ones elsewhere, checks if the template has the system flag set. Property 'flags' of a template is a bit field where there's possibly more than one flag (bit) set at a time. So it wouldn't be correct for example just to see if the flags value equals to the value of system flag, but it has to be done using a bitwise operator. Sidenote: actually in this very case there's only the system override flag that could co-exist with the system flag, but still that's the correct way of checking if a flag has been set .
    1 point
  16. Ah sorry missed the change temple part... now it's more obvious a bug
    1 point
  17. After saving the page with template "custom_user" - new user will be created with name==page name. I don't test it. And I wonder what I'm doing at all in the conversation of people with 700+ posts =)) ... public function createTheUser($event) { if($this->page->template == 'custom_user'){ $newusername = $this->page->name; $newuser = $users->add($newusername); $newuser->pass = 'some password'; $newuser->save(); } } ...
    1 point
  18. Nothing wrong there, this is bitwise operator http://www.php.net/manual/en/language.operators.bitwise.php Ther error says $this->editedPage is not an object... so maybe even the line before fails for you for unknown reasons $this->editedPage = wire('pages')->get((int)$this->input->get('id')); can you try replace #62 with echo wire('pages')->get((int)$this->input->get('id')); exit; And refresh page and see what output?
    1 point
  19. I just installed this module and got exactly the same errors.
    1 point
  20. You could try using the ImageSizer class of PW. $im = new ImageSizer($config->paths->root . "myimages/IMG_09.jpg"); $im->resize(100,0);
    1 point
  21. like this: $randomImage->page (edit: gets the page itself, not the id, for the id use $randomImage->page->id) http://processwire.com/api/cheatsheet/#files Yep, it's really a mather of choosing what is most important in this case. If there will be an proximate number of images in each page, going with Wanze's method makes sense. If there will be pages with 1 image and others with 20, my method guarantees that the choice will be really random at the cost of being slower.
    1 point
  22. The forum shows an ajax overlay when someone else posts while you're writing..
    1 point
  23. Are your sure that the field is named 'images'? Also if you have set 'Maximum files allowed' to 1, then the code needs little modification: // With max files set to '1' $img = $pages->get('parent=1010, images.count>0, sort=random')->images; // Check if we have an image if ($img->id) { echo "<img src='{$img->url}' alt='{$img->description}'>"; } else { echo "No page with image found..."; }
    1 point
  24. This is because your field must be called something different from "images"
    1 point
  25. You're overwriting the $user variable here: $user = $sanitizer->username($input->post->username); Use a different name, e.g. $u Btw happens to me too sometimes with $page or $pages
    1 point
  26. Hi Michael. Welcome to PW! The following should work. Doing this in a hurry. There are other ways to do this...this is just one of them // grab and output a random image from the child page with ID 123 $image = $pages->get(123)->images->getRandom(); if($image) echo "<img src='$image->url'>"; See this page for more details on images... OK, am late in my reply Edit: Plus just seen you want images from any child pages; apologies. Will leave this response here though
    1 point
  27. Hi michael, Something like this should work (assuming your image field is called 'images'): $img = $pages->get('parent=1010, images.count>0, sort=random')->images->getRandom(); echo "<img src='{$img->url}' alt='{$img->description}'>";
    1 point
  28. When switching templates (it doesn't matter which or of the page reference tab has been enabled) on pages I'm getting errors: Notice: Trying to get property of non-object in /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module on line 65 Notice: Trying to get property of non-object in /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module on line 71 Warning: Cannot modify header information - headers already sent by (output started at /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module:65) in /home/x/x/x/wire/core/Session.php on line 358 Warning: Cannot modify header information - headers already sent by (output started at /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module:65) in /home/x/x/x/wire/core/Session.php on line 359 Warning: Cannot modify header information - headers already sent by (output started at /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module:65) in /home/x/x/x/wire/core/Session.php on line 360 Any pointers why this error might occur? It does save the chosen template on the page. I'm running 2.3.0.
    1 point
  29. Been having fun with this! Here's the output..A frontend demo of Horst's Local Audio Module...It's been fun playing with PW selectors and variables. First, I'd like to thank all the forum folks who've helped answer my API questions - Teppo, Soma, Diogo, Nik, etc....you know, the usual suspects.... Thanks to AnotherAndrew for this post. It led me to the nice jQuery plugin, Filtrify. Horst, big thanks for the module.! It's been a massive learning process for me besides having fun (and at times frustration ! ) along the way. There were times I went round in circles only to realise I was making simple things difficult; this is PW, the solutions are usually simple! Most of the theme is based on Filtrify's demo so all credits to Luis Almeida. Of course I won't be releasing his theme; this is just a demo (unless of course there are no restrictions). I think what I enjoyed most was the logic behind PW and how I could apply that to the demo [being a newbie and all!]. More than getting a solution I like the reasoning that comes before a solution, the journey to an end if you like. The power and sheer genius of PageReference fields and chaining selectors really clicked for me while working on this. Tools used: PW (duh!) This module (duh!x2) jTable (as I wait to learn DataTable) - for tabular track list Filtrify to create album catalogue Audio.js to play the embedded audio When this is done, @Horst, we probably want to do a tutorial/write-up about your project and how I did the frontend? Cheers
    1 point
  30. MarcC, thanks a lot for the link to SQL Buddy! I already knew about Adminer and used it sometimes, but SQL Buddy looks much more appealing and is very quick and easy to use, too. I think both of them would make a really nice backend module.
    1 point
  31. I have new version coming that introduces ability to create new pages. I would be extremely happy to get some feedback about the methods and arguments I am planning. Currently it works like this: $fredi->newPage("templatename", "title|summary|body"); or $fredi->newPage("templatename", "title|summary|body", $parentPage); That would open new modal with title, summary and body fields. By default it creates new pages under the current page, but you can define alternative parent page there also. I have also created ability to set fieldWidths, just add =XX to fieldname and it gives the width. Those can be used both in edit and new page modals. Like this: $fredi->render("title|author=50|summary=50") I want to take this further: defining required fields and also for new pages prevalues and possible hidden fields. This means that simple string based fields definition doesn't fly that far, or it needs some super nice syntax. Ideas?
    1 point
  32. Hi there, very interesting discussion with good arguments going on here. I think while all the possible solutions pointed out already will work, what this kind of content editing really needs to be user-friendly is be a nice editor. I imagine something like the usual WYSIWYG editors that has an added area with predefined drag-and-drop content blocks. You can then drag each one at a place in your existing content where it's content (and look) is editable. Probably this is done most easily with a grid-based approach. The hard part of this would be building the editor then, integrating it into Processwire should be quite easy. I would be really glad if this kind of thing exists, because it might come in handy at some point, i.e. for custom marketing landing pages.
    1 point
  33. Ok, so now you must generate new password for users because in your DB table field_pass (data,salt) is hashed with blowfish and blowfish is disabled with that little hack from my previous post. Its little tricky because you cant login to that system. I made new pass for admin user on my localhost where i was logged. I changed Password.php to disable blowfish, in administration backend set new pass and alter DB table field_pass(data,salt) for admin user on broken server.
    1 point
  34. FYI, this is still happening - made good progress on capturing and repeating changes to Templates today. I expect this will take a while though, as this is not quick and simple by any means - this is still a spare time project, and I have very little time at the moment...
    1 point
  35. You could achieve pretty interesting results by taking this idea a bit further: Define areas on front-end where new elements (widgets, nodes, blocks, whatever) can be dropped and create new page fields for each of them, set up a collection of pre-defined blocks (templates, including proper template files for this purpose) you want users to be able to drop in, create a clean way to add new pages / edit existing ones via front-end (edit/add button, something like Fredi), store newly created pages somewhere and attach them to page field on current page automatically. Preferably you would also let the client re-arrange these blocks by dragging on the front-end side, to make it all function properly. Perhaps even drag blocks from one area / column (page field) to another? That's all very much doable, though I would imagine that it could take quite some time to work all the details out (such as where to store those pages to keep things smooth and stuff like that.) I'm definitely not advocating anything like this, based on similar reasons others have stated above (such as the fact that pages created this way usually end up unbelievably messy in the long run and no longer serve any real purpose, other than perhaps making some content editor very proud of herself) -- just saying that ProcessWire can be used for it if it's what makes you happy. If you're into it, why don't you give it a try yourself? See where it takes you and ask if you need any advice Been there, seen both of those happen more than I'd like to remember. For a very long time I believed this to be "the best way" (partly because it worked for us and made our clients very happy), but after listening and seeing all those problems it caused for our clients at the same time, I've come to one conclusion: this model is in reality one of the worst enemies of properly structured, usable and logical web content. It requires serious mental fortitude to keep things in order when you've got all the tools you could ever ask for right within your grasp. This is true especially in the long run.. and especially when there are multitude of editors to deal with. Ever been asked to re-organize a ten year old site for a client, one that's seen hordes of editors, various shifts in content strategy etc.? Not a trivial task and each and every page having a very different structure doesn't really help. It's rare for there to be someone who could keep it all under control either -- that kind of thing is too often limited to huge organizations only and even then resources tend to be scarce. From my point of view the most obvious (even if still only partial) solution for this is a clearly defined structure that editors must stick with, even if it doesn't please them at all times -- which is exactly what ProcessWire provides tools for. Clients may not "get it" at first, but that's why we as designers, developers and professionals should explain and teach them why this is a good thing. I rest my case.
    1 point
  36. Why do "the clients/editors would like to combine them as they wish"? In my experience this is mostly a type of "I need to control" things. There are some exceptions but usually this doesn't benefit the reality (or goal) of a page. Offcourse, regular content like bodytext or images need to be controlled, but in my opinion every type of page has a goal. A designer (UI, UX or visual) determines (offcourse in cooperation with the client) what that goal is. Most of those goals I can be held accountable for since I'm designing or proposing a design to a client. When you give an editor options to create pages as they wish I've seen two scenarios happen: 1. They hardly ever use it (The client is not to blame since they are focussed on other things like running their business) 2. They overuse it (The client is not to blame since they want it "all" and we need to decide what is really important - the goal) It's both a maintance (from client perspective) and a user (the visitor of the site) issue. I always try to make this as clear as I can. That said I realize some content blocks can come in handy but I hardly ever see a proper use of using content blocks/widgets (like WordPress). As always you should test this in reallife scenarios/use cases, but from my experience I've learned that this is hardly ever really needed. I think you should talk about using content dynamically — where ProcessWire is really awesome.
    1 point
  37. Although I know and sort of understand the wish of clients to be able to do so, from a designer's/developer's point of view, these “free form” content types are not necessarily a good choice. (Disclaimer: This might be a very subjective point of view, and yes, I admit to being kind of a control freak.) I don't know what kinds of clients you guys have, but a lot of my projects are websites for people who don't really know much about building web sites. Those clients can actually benefit from a “rigid” approach because it does not only limit their possibilities, it also limits their margin for error, bad layout choices and basically anything which makes designers pull out their hair, as arrogant as that may sound. Then again, as long as this is implemented as a module or an option, keeping the flexibility we all love about PW, this probably is a “why not?” feature. (Just my 2 cents.)
    1 point
  38. Maybe like this? $ts = $page->getUnformatted("datefield");
    1 point
  39. Oh, and few things I would like to add: Voting only for logged in users and once per user Vote multiple options Create more than one poll per page (or at least archive old ones) Better "have you voted yet" -checking. Not sure which would be best way to go and not looking for anything bulletproof here Using some csrf-token to avoid super easy "hacking".
    1 point
  40. I've been quite busy last few months (and still am), but I managed to squeeze new admin theme called Futura Remixed (successor to my Futura theme). So let's get started: complete rewrite of the theme complete new graphics, includin PageList tree icons etc. full multi-language support (except "You are logged in as", "Latest updates" and "Newest added" title (could be done by implementing those in language packs I suppose) complete new TinyMCE theme with Fugue icons (that was pain in the ass) integrated CodeMagic TinyMCE plugin that uses CodeMirror to highlight the code and HTML beautifier to beautify the code (unlike plain TinyMCE HTML editor) AdminBar theme How to install: Unpack FuturaRemixed.zip to your /site/ directory Replace /wire/modules/Inputfield/InputfieldTinyMCE directory with InputfieldTinyMCE directory contained in the attached InputfieldTinyMCE.zip file Extract AdminBar.zip to your /site/modules/AdminBar directory (if you use it) I've tested the theme thourougly but errors may still show up. So if you find them, please let me know, so I can fix them. When I get time, I'll update this theme with colors from original Futura theme so you could choose between them. Let's look at the screenshots: Enjoy the theme as much I've enjoyed making it. AdminBar.zip FuturaRemixed.zip InputfieldTinyMCE.zip
    1 point
  41. This Tarzan was thinking that clone should be in API, not just a tool.
    1 point
×
×
  • Create New...