Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/06/2014 in all areas

  1. I'd like to put up a bounty for the development of a Markdown editor for PW. Ace has been abandoned and I'm a fan of Markdown over standard wysiwyg editors. I'd like to see something similar to what they have in Ghost (minus the double panes). I'll start the bounty at $250 for anyone who is interested in putting something together that works. This would be a public module for the directory. Any takers?
    6 points
  2. 1) Introduction A great ProcessWire site is useless without visitors. If the site lacks of direct traffic, the webmaster has to rely on search engine users clicking on the right result. The goal is a good position on the result pages of special keywords. Optimizing sites for search engines, mostly Google, is called Search Engine Optimization (SEO). You will find many of techniques, methods and ideas on the internet. The topic is widely discussed and new ways of SEO arrive every day. This tutorial covers the technical aspect for SEO with the ProcessWire CMS and should give you a general overview on the topic. 2) Why ProcessWire fits perfectly to your SEO strategy With ProcessWire, nearly all practices for SEO can be used. It might be one of the best CMS in this field. Let us explain these bold claims. Every SEO aspect is related to the content on your page. It can be some meta tags in the HTML-Head or how you structure your headings. Even microformats are just another way of how markup is presented to the visitor (or the search engine bot). After all, it's the logic on how we generate the HTML that we try to optimize. Where to put the content, how to define a site description or how URLs are made up. Most SEO modules for common CMS like WordPress or Drupal are generating the right markup. ProcessWire is a little bit different. As you might know, there is no pre-defined markup. Every line of front-end HTML code can be written by the programmer. As a result, there is no limit on how we can structure the HTML. You want those new fancy HEAD Attributes? No problem. Grab the first image of a gallery and define it as the meta og:image? Easy job, even if you need a special resolution for Facebook and a smaller one for Twitter. So, what do we have to do? We can't just simply install a one-click "SEO module". We have to define, which fields will represent which HTML attribute or how we wrap the content into microformat schemas. Ask yourself the following questions: Which values(keywords,descriptions,information) do I need for my SEO strategy? Are those values stored per page, for a section of your site or can they be defined for the whole site? Should the user/administrator enter those values or can they be combined/calculated based on other fields? What happens if there is no value defined for a field? How does the fallback look like? Beside that, some good practices for SEO are already implemented by ProcessWire. The URL structure representing the page tree is clean and you can even customize it to fit to your requirements. Unique URLs are standard. With modules like ProCache, MinimizePW or AIOM you can optimize page speed quick. Everything else, expect the server performance is part of the undefined HTML markup. 3) Example on how to integrate meta tags (or anything you like) We want to have some keywords and a (short) description in our HTML Head. So we create two fields, calling them e.g. keywords and description and add them to a template. Create a page with that template and enter some keywords and a description. In your template file output the fields in the HTML head: <meta name="description" content="<? echo $page->description ;?>"/> That's all. We can now extend this to have fallback or choose the fields with a more advanced logic. Nico explains this for example in his blog post. Extra hint: If we want to fallback on the (mandatory) title field of a page, we can use the ->get Method. <meta name="description" content="<? echo $page->get('description|title');?>"/> This will use the title field in case the description field is empty. You could use this to provide the user an option to "override" the SEO logic by manually entering the values. Another example would be the alt-tag for images. To provide an alt-tag for an image, we use the description field of the image field. In this example, we take the first image from the field "images" on the page. <img src="<? echo $page->images->first()->url ;?>" alt="<? echo $page->images->first()->description;?>"/> The description attribute is part of every PageImage field. You could hide it from the backend but it's visible by default. 4) Modules for SEO 4.1) XML Sitemap This module will generate a sitemap.xml that can be crawled and used by search engines. The basic setup just generates a sitemap.xml with every page included. You can finetune the settings if you want. 4.2) Textformater Microformats This module sets microformats for content in TextAreas/WYSIWYG areas. It will wrap basic content into the right schema.org schema. The module page provides further information 4.3) Page path history Moving a page to another URL? With this module you don't have to worry about visitors getting an 404 error. It will try to track changes in the URL of pages and redirect visitors to the new location - as long as there isn't a new page with the URL. 4.4) Multisite Sometimes you want to have some entry-pages for special keywords. If you need a special domainname for those site, you can setup the Multisite module. 5) Further links and tutorials Categorize content and build the right URLs. Might be useful for SEO strategies. Rebuild the URL structure by using URL-segments Another forum entry on the topic of SEO 6) Conclusion Maybe this little tutorials helps starters to get an idea, on how to optimize their page for search engines. This might seem little bit more difficult then just to install a one-click solution. But if you put in an hour to just think about a clean and readable markup with all tags, you will get great results. Any additions or practices are welcome. I will try to answer any questions in this thread and make the tutorial better over time.
    3 points
  3. Welcome to ProcessWire enricob, Spoken language here is english, we prefer it . The active user base of ProcessWire is still small compared to the big 3, but ProcessWire is growing. The average user without web knowledge & no interest of webdevelopment are hard to find here. Thats a good thing IMO. So it has noting todo with coming to late. Others will answer your question.
    2 points
  4. http://processwire.com/docs/tutorials/troubleshooting-guide/page2 (at the bottom)
    2 points
  5. Hi Sparrow, Wow, it seems we are not doing a good job advertising what's already available in ProcessWire .... There's already two Blogging solutions (actually one is just an extension of the other...) 1. Blog Profile: http://mods.pw/2M 2. Blog Module: http://mods.pw/6U They both support commenting (though not threaded comments)....For any specific help please post in their respective forums...
    2 points
  6. @mr-fan look at this template I had a use case to identify a page as an image with GD modifications. So basicly the page is an image
    2 points
  7. Maybe I'm stubborn but I think a description field should be for the description. If you need more meta data attached to an image you could go for: FieldtypeImageExtra and change it to your needs. Or use a repeater for this. Repeater with Image and URL field. Or make for every image a page. Make a page select and select the page with the image. if you're less conservative, take a look at the link provided by Adrian.
    2 points
  8. You need to set outputformatting off before you save: https://processwire.com/talk/topic/490-how-to-reset-your-password-how-to-enable-the-forgot-password-function/
    2 points
  9. Based on my Previous thread: https://processwire.com/talk/topic/7194-templatelist-inside-module-configuration/ here is an automatic child creater if you need on creation of a parent element a bunch of Child Elements. what also works: multiple diffrent childs on same parent caution: sadly what also works: first entry: parent_id = 47 child_id = 13 child_name = something child_numbers = 1 second entry: parent_id = 13 child_id = 47 ... ... this should afaik (not tested) kill your System by having a infinite Loop. because (first entry creates a child which call second entry which would then call first entry and so on). <?php /** * Created by PhpStorm. * User: Kielbasa * Date: 04.08.14 * Time: 10:09 */ class CustomChildCreater extends Process { public static function getModuleInfo() { return array( 'title' => 'CustomChildCreater', 'version' => 100, 'summary' => 'Child creator for Pages with Specific Parent', 'href' => '', 'singular' => true, 'autoload' => true, ); } public function ___execute() { $this->setFuel('processHeadline', 'Child Creater'); $table = $this->modules->get("MarkupAdminDataTable"); $table->setEncodeEntities(false); $table->headerRow(array('Edit','Parent Template', 'Child Template','Name of new Childs (childname+{n})', '{n} - Childs', 'Delete')); $result = $this->db->query("SELECT * FROM {$this->className} ORDER BY parent_template"); while($row = $result->fetch_assoc()) { // output in table rows with edit link and delete checkbox? $table->row(array( 'edit' => 'edit/?id='.$row['id'], $this->templates->get($row['parent_template'])->name , $this->templates->get($row['child_template'])->name, $row['child_name'], $row['child_numbers'], "<input type='checkbox' name='delete[]' value='$row[id]' />" )); } $button = $this->modules->get("InputfieldButton"); $button->type = 'submit'; $button->id = 'submit_delete'; $button->value = 'Remove selected sources'; $table->action(array('Add source' => 'add/')); // Is there clean way to add button to right side? return "<form action='./delete/' method='post'>" .$table->render() . $button->render() . "</form>"; } public function ___executeAdd() { $this->fuel->breadcrumbs->add(new Breadcrumb('../', 'Child Creater')); $this->setFuel('processHeadline', "new Instance"); $form = $this->modules->get("InputfieldForm"); $form->method = 'post'; $form->action = '../save/'; //--Parent Template $field = wire('modules')->get('InputfieldSelect'); $field->attr('name', 'parent_template'); $field->label = __('Parent Template'); foreach(wire('templates') as $template){ $field->addOption($template->id, $template->name); } $form->add($field); //--Child Template $field = wire('modules')->get('InputfieldSelect'); $field->attr('name', 'child_template'); $field->label = __('Child Template'); foreach(wire('templates') as $template){ $field->addOption($template->id, $template->name); } $form->add($field); //--Child Name $field = wire('modules')->get('InputfieldText'); $field->attr('name', 'child_name'); $field->label = __('Child Name'); $form->add($field); //--Children to Create $field = wire('modules')->get('InputfieldInteger'); $field->attr('name', 'child_number'); $field->label = __('Childs to Create'); $form->add($field); $field = $this->modules->get("InputfieldButton"); $field->type = 'submit'; $field->value = 'Create'; $form->add($field); return $form->render(); } public function ___executeSave() { $parent_id = (int) $this->input->post->parent_template; $child_id = (int) $this->input->post->child_template; $child_name = $this->input->post->child_name; $child_numbers = (int) $this->input->post->child_number; //no i am not allowing you to kill your system if($parent_id != $child_id){ $sql = "INSERT INTO {$this->className} SET parent_template = '$parent_id', child_template = '$child_id', child_name = '$child_name', child_numbers = '$child_numbers' ON DUPLICATE KEY UPDATE id = id;"; $this->db->query($sql); $this->message("Save Successful"); $this->session->redirect("../"); } $this->message("Parent and Child should not be the same!"); $this->session->redirect("../"); } public function ___executeEdit(){ if(!isset($_GET['id'])){ $this->session->redirect("../"); } $id = (int) $_GET['id']; $result = $this->db->query("SELECT * FROM {$this->className} WHERE id=$id"); $data = $result->fetch_array(); $form = $this->modules->get("InputfieldForm"); $form->method = 'post'; $form->action = '../update/'; $field = $this->modules->get("InputfieldHidden"); $field->name = 'id'; $field->value = $id; $form->add($field); //--Parent Template $field = wire('modules')->get('InputfieldSelect'); $field->attr('name', 'parent_template'); $field->label = __('Parent Template'); foreach(wire('templates') as $template){ $field->addOption($template->id, $template->name); } $field->value = $data['parent_template']; $form->add($field); //--Child Template $field = wire('modules')->get('InputfieldSelect'); $field->attr('name', 'child_template'); $field->label = __('Child Template'); foreach(wire('templates') as $template){ $field->addOption($template->id, $template->name); } $field->value = $data['child_template']; $form->add($field); //--Child Name $field = wire('modules')->get('InputfieldText'); $field->attr('name', 'child_name'); $field->label = __('Child Name'); $field->value = $data['child_name']; $form->add($field); //--Children to Create $field = wire('modules')->get('InputfieldInteger'); $field->attr('name', 'child_number'); $field->value = $data['child_numbers']; $field->label = __('Childs to Create'); $form->add($field); $field = $this->modules->get("InputfieldButton"); $field->type = 'submit'; $field->value = 'Save'; $form->add($field); return $form->render(); } public function ___executeUpdate(){ $this->fuel->breadcrumbs->add(new Breadcrumb('../', 'Data imports')); $id = $this->input->post->id; $parent_id = (int) $this->input->post->parent_template; $child_id = (int) $this->input->post->child_template; $child_name = $this->input->post->child_name; $child_numbers = (int) $this->input->post->child_number; //no i am not allowing you to kill your system if($parent_id != $child_id){ $this->db->query("UPDATE {$this->className} SET parent_template = '$parent_id', child_template = '$child_id', child_name = '$child_name', child_numbers = '$child_numbers' WHERE id=$id"); $this->message("Update Successful"); $this->session->redirect("../"); } $this->message("Parent and Child should not be the same!"); $this->session->redirect("../"); } public function ___executeDelete() { $count = 0; if(!is_array($this->input->post->delete) || empty($this->input->post->delete)) { $this->message("Nothing to delete"); $this->session->redirect("../"); // back to list } foreach($this->input->post->delete as $id) { $id = (int) $id; $this->db->query("DELETE FROM {$this->className} WHERE id=$id"); $count++; } $this->message("Deleted " . $count . " data sources"); $this->session->redirect("../"); // back to list } public function ___install() { parent::___install(); $p = new Page(); $p->template = $this->templates->get("admin"); $p->parent = $this->pages->get("template=admin, name=setup"); $p->title = 'Child Creater'; $p->name = 'child-creater'; $p->process = $this; $p->save(); $sql = <<< _END CREATE TABLE {$this->className} ( id int unsigned NOT NULL auto_increment, parent_template int unsigned NOT NULL, child_template int unsigned NOT NULL, child_name varchar(255) NOT NULL, child_numbers int unsigned NOT NULL, PRIMARY KEY(id) ) ENGINE = MYISAM; _END; $this->db->query($sql); } public function ___uninstall() { $p = $this->pages->get('template=admin, name=child-creater'); $p->delete(); $this->db->query("DROP TABLE {$this->className}"); } public function init() { parent::init(); // add a hook after the $pages->save, to issue a notice every time a page is saved $this->pages->addHookAfter('added', $this, 'createChildren'); } public function createChildren($event){ $page = $event->arguments[0]; $query = $this->db->query("SELECT * FROM {$this->className};"); //foreach child creater object foreach($query as $cco){ $t = $cco['parent_template']; $ct = $cco['child_template']; $cn = $cco['child_name']; $ci = (int) $cco['child_numbers']; $c = ''; //will be used as new Page if($t == $page->template->id){ if($ci > 0){ for($i=1;$i <= $ci;$i++){ $c = new Page(); $c->template = $ct; $c->parent = $page; // set the parent $c->name = $cn.$i; // give it a name used in the url for the page $c->title = $c->name; $c->gsv_tab_position = $i; $c->save(); } } } } } } Tell me your thoughts
    2 points
  10. Great topic, thanks for this! Finally managed to get my PW running I did make one mistake though, and that was that I forgot to create the htdocs and logs folders, so my apache wouldn't start again after restarting. After using the following code, I found out that the folders were the problem: sudo apachectl configtest Thanks to Martijn I found this out. Thanks again
    2 points
  11. Just a follow-up (sorry for necroing a thread): I have managed to fix everything using this guide: https://processwire.com/talk/topic/5797-setup-a-processwire-environment-on-a-fresh-macos-x-install/ At the time this thread was created, the above guide didn't exist yet. Very happy that I don't have to use MAMP, much more elegant to use the Mac's insides So, finally, I can run Processwire!!!
    2 points
  12. My thoughts are not about the naming and the keywords, but about the presentation and expanding the awareness of Processwire for the professional usage. I know the problem, to explain all the time, why I use this unknown System Processwire... Have you heard about the CMS Garden? (http://www.cms-garden.org/) Its a Collaborative Booth of different CMS. Started on the CeBit, 2013 and visited various IT/Web exhibitions till now. Actually is it a german project, but the concept (volunteers present their open source system to Business owners, Consultants and other professionals) were adopted in more Countrys after the big success in 2013. Especially because of the strong german community it should be possible to realise this and it should be a great opportunity to promote PW.
    2 points
  13. You can use the Blog Manager Module which is based off of the Blog Profile. This allows anyone to add a blog to an existing website.
    2 points
  14. In case anyone is interested in trying out some of the things I was talking about in previous posts here, the latest dev branch has a field import/export function. You'll see it in the lower right corner of Setup > Fields. It enables you to copy and paste any fields across any PW installations. Locally, I also have this working for templates (with fieldgroups), though that part needs a little more work so it's not yet committed. I also have fields, templates and fieldgroups mirroring every change to JSON files, as an option that can be enabled for those that want to version these things with Git and what not. That part also isn't yet committed to dev, but will be soon. However, I figured the copy/paste function probably had the largest use potential. It makes migrating field changes (or creation of new fields) quite a simple task. Next up on the commits will be the same thing for templates (with fieldgroups). (note I didn't take these screenshots together, so they aren't referencing the same fields).
    2 points
  15. Introducing ProcessDiagnostics and it's helper module suite. (Is this ProcessWire's first community-created module suite?) Description This suite adds a page under the setup menu that displays information about your installation. Each section's data is provided by a specialist diagnostic helper module but it is all collected and displayed by ProcessDiagnostics. The ProcessDiagnostics module itself does not encode any knowledge about what makes up a good or bad setting in PW - (that's done by the helper modules) - but it does the following... Gather the diagnosics (thanks to PW's hook system) Display the collected diagnostics Provide helper functions for describing some common things Dispatch actions to diagnostic provider modules (again thanks to PW's hook system) And eventually it will: Allow control of the verbosity of the output Allow the output to be emailed to a sysop Store the results between visits to the page Detect differences between results at set times Send a notification on detection of changes Although I am curating the collection, anyone is welcome to fork the repo, make changes in a topic branch, and submit pull requests. I've already had submissions from horst and Nico. Diagnostic Providers The current diagnostic providers include... DiagnosePhp - Simple diagnostics about the PHP envirnoment on the server DiagnoseModules - An ajax based module version checker by @Nico DiagnoseImagehandler - Lets you know about GD + Imagick capabilities by @horst DiagnoseDatabase - Checks each DB table and lets you know what engine and charset are in use DiagnoseWebserver - Checks the webserver setup DiagnoseFilesystem - Looks at how your directory and files are configured and warns of permission issues (currently incomplete) There is also a bare bones demonstration diagnostic module... DiagnoseExample - minimal example to get module authors started. Translations English & German (thank you @Manfred62!) Help translating this suite to other languages is always welcome. On The Net Check out Nico's blog post about this suite on supercode.co!
    1 point
  16. Hey Folks, I created a module that adds a publish_date field to every page. It basically is an extended version of the code the community came up with in this thread: https://processwire.com/talk/topic/2448-show-date-published-on-a-page It's available on GitHub: https://github.com/kaesetoast/processwire-publish-date Let me know what you think of it
    1 point
  17. I'm not sure but i think your out of luck with a Datetime field. As far as i know this will always require some form of date input, not just a year (which of course isn't a date). Maybe someone who has done more with Datetime fields can verify or prove me wrong. What i would do however is simply make a field of Type = Text. When you have saved the field you can go to the Input tab and use a pattern of your liking. For example if you wanted to only allow years in the range 1900-2100 you could use a pattern like this: ^(19[0-9]{2}|20[0-9]{2}|2100)$ When a customer tries to enter anything that falls out of this range and hits save there even is a nice client side inline error message (in capable browsers) or else there will be server-side validation. Of course, you should make a regex that suits your needs. You will be able to sort pages according to year via such a setup, in the page tree as well as on the front-end using PW selectors. EDIT You can also use the Integer type, where you can optionally set (on the Input tab) the Numeric Input Type to Number (HTML5) and set a Minimum and Maximum Value. This gives a nice input to the customer and with the same nice html5 validations. The Integer type might be preferable, because of the nice input but also database efficiency.
    1 point
  18. There is also this plugin for CKEditor: http://ckeditor.com/addon/mathjax As of yesterday's PW dev version, external CKEditor plugins are supported and very easy to manage: https://github.com/ryancramerdesign/ProcessWire/commit/4b12d2e4f2ceb7eebb52261e723a847e08c8a569
    1 point
  19. $config->ajax is set: $config->ajax SiNNut === faster
    1 point
  20. I believe this is set in /wire/core/ProcessWire.php on line 80 (at least on latest dev branch) /** * Populate ProcessWire's configuration with runtime and optional variables * * $param Config $config * */ protected function config(Config $config) { $this->wire('config', $config, true); ini_set("date.timezone", $config->timezone); ini_set('default_charset','utf-8'); if(!$config->templateExtension) $config->templateExtension = 'php'; if(!$config->httpHost) $config->httpHost = $this->getHttpHost($config); $config->https = (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443); $config->ajax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'); $config->cli = (!isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || ($_SERVER['argc'] > 0 && is_numeric($_SERVER['argc'])))); $config->version = self::versionMajor . "." . self::versionMinor . "." . self::versionRevision; $this->setStatus(self::statusBoot); } Not sure if this would also be the place to add what you are planning, that is a bit beyond me. Using Sublime and i'm guessing most other editors you can very easily do a 'Find in Files...' for 'config->ajax' to see where it is used in the whole codebase. But it is defined in ProcessWire.php
    1 point
  21. Hi to all, I am not really sure if I have to write in english or italian since I have a question for italian developers but I have chosen english so everyone can understand. I am quite new to PW and I think it's really a great tool! I have fought for years with Joomla, Wordpress, and many others cms and I am quite sure this time I am starting to see the light As far as I can, I would like to help in making the project more popular, especially in Italy, where I don't see very much interest yet (sadly, we are always late when it comes to new and interesting technologies). Can I do anything to help with the italian site? I saw that the api translation was in the to todo list, but I cannot find it in the italian site... Maybe I can help with this? Please let me know!
    1 point
  22. Big Thanks to Nico! The "Smooth Scroll JS" was too active and has blocked the Link... PW is still awesome!
    1 point
  23. I believe validation is done based on what type of field you are using. There are other validations done based on whether the field is required or not and a host of other criteria. The fields where you should enter required data will display where the error is. When you are creating a form, you can easily test out what's gonna happen by using the Preview tab under Forms. This should also be filed under the Form Builder section.
    1 point
  24. Thanks Horst. I already found that one and changed the settings. My client is now also more carefull in selecting pictures for upload.
    1 point
  25. I'm sorry I feel very dumb... Just found out! Don't know why I couldn't find it yesterday. I guess I've been inputting my search queries in too difficult Here is what I did: http://processwire.com/api/fieldtypes/images/ - Marinus
    1 point
  26. I am surprised you were able to install ProcessLanguage before LanguageSupport since it is listed as a requirement. ProcessLanguage is normally installed automatically. I did just test installing ProcessLanguage on 2.4.10 and weirdly it doesn't tell me it can't install, but then it doesn't actually do anything either - the confirmation alert pops up, but then nothing happens. I'll make sure Ryan knows about this, but for the moment, your best way to get things going again might be to remove the language modules from the PW modules database table, and potentially also the relevant rows from the pages table - look for anything language related there. Maybe even drop the entire field_language and field_language_files tables. Are you comfortable with PHPMyAdmin or similar for managing DB tables? I am certainly no multi-language expert, so you might get a better solution from someone else. If you do take this approach and the site contains any important data, please do a complete backup first.
    1 point
  27. Could you send me a link to the page (via PM) and I'll try to reconstruct it.
    1 point
  28. huuuh, finnish looks very... strange
    1 point
  29. Tried them already, couldn't get the result i wanted. it is important that they are not able to see the other content
    1 point
  30. This should help: $events = $pages->find("template=sectionItem, parent=1025|1066|1073|1069|1013|1247|1101, sort=startTime, start=10, limit=3"); $events_array = array(); foreach ($events as $event) { $start = "".date(strtotime($event->startTime)).""; $title = $event->title; $events_array[] = array( 'title' => $title, 'date' => $start ); } $events_json = json_encode($events_array, true); echo $events_json; The reason is because before, you are simply json_encoding one PHP array at a time into a native javascript object. This way, you are creating the eventual array of objects - first in PHP, and then asking json_encode to work on the whole collection of items.
    1 point
  31. The word "Enterprise" gets used, abused and misused widely, and it is no help to anyone. To many developers/coders out there, Enterprise means it can scale up happily. But to the business community, Enterprise means it has a support structure in place that is able to relate to the large organisation, that it has a stable, long term support version and so on. I think if you release a business/enterprise version of anything, you must be in a position to speak to non-technical, business decision makers and be able to answer their needs I know from a cousin who is a decision maker in a large public company, that when they go for the Enterprise version of anything, it is not that they expect more bells and whistles than the community version, but they expect to be treated very differently. PW is not currently in the position to do that, unless someone can work out how to clone Ryan for free.
    1 point
  32. This would be a good article for the new docs section!
    1 point
  33. @jeffro: Great that you joined this conversation over here! As far as I can see one of your main concerns is that ProcessWire doesn't offer ready-to-go themes. That's right and I think one of the points why processwire still is in the developer niche. But if you understood the ProcessWire concept (create fields, build a custom template/form and add it to pages) you should realize that it is probably not possible to create switchable themes for ProcessWire. It's like using WordPress with ACF and trying to find a theme for it which works out of the box with every custom ACF field. Our approach was to add a thing called "Site Install Profiles" which is a compilation of the template files, the needed modules and the needed fields and backend configuration. My suggestion was to offer like three default "Site Profiles": Demo Profile The Demo could include a guided tour through the CMS. Or we could build a "tutorial module" which could be in the /site/modules/ folder and would be deleted after the tour. Not sure on this point. Like the name said this would on the one hand a module do demonstrate how you build a template for designers / developers and on the other hand an template for presenting how Processwire works to your clients (with the backend tutorial stuff). Starter Profile I would rename the "default" profile to "starter". It should include all the fields an average user would use (like title, headline, body, images, files, ...) and should be the main profile which is included in your default installation. This one is a ready to go solution. This "starter profile" would be the profile we could design Themes for and stuff like that. So like I said a ready-to-go profile for the average user who don't need customized stuff. This would be the profile for my mother Clean/Air Profile The third profile should be for advanced users who like to set up their own fields and templates. Kind of how Soma's blank profile is. It would be shipped without these amount of templates and demo pages.
    1 point
  34. FieldtypeLikes is a module I've been working on (it's what is used here on the PW sites, as well as on CMSCritic). I've just been trying to find the time to finish it up so that others can use it, and hopefully can here soon. Tyssen I was thinking I could get you to beta test since you've got a more immediate need? Here's a section from the documentation which may answer some of the questions above: Likes Fieldtype for ProcessWire This Fieldtype enables you to have a "like" button that users can click on to like a particular page and have that be remembered. The fieldtype itself stores a single integer representing the number of likes each page has in total. As a result, the field can be used for the purpose of sorting pages, i.e. "most liked pages." FieldtypeLikes also adds a $session->getLikedPages(); that returns a PageArray of pages that the current session has clicked Like on. The liked pages are remembered with a cookie for up to 30 days. This enables you to have a separate page (or perhaps a sidebar on every page) that for example shows the user bookmarks of pages they liked. Before deciding whether this Fieldtype is suitable for your particular application, be sure to read the section on preventing duplicate likes. Preventing duplicate likes FieldtypeLikes is not connected with the user system, and may be used anonymously via any page on your site. The benefit is that anyone visiting can "like" things and generate a list of likes (for their own review), without having to login or create an account. That makes it much more likely that users will participate in liking pages and making use of what this module provides. The drawback to this approach is that it may be difficult to prevent one user from trying to manipulate the quantity of likes, perhaps trying to boost the rank of a page they have some interest in. Beyond cookies (which we use), in order to limit the potential for duplication, FieldtypeLikes connects likes IP addresses and remembers them (server side) for a week. As a result, there is a limit of 1-like, per page, per IP address, per week. While not ideal, this is a necessary compromise in order to have some protection for the data. Note that a very determined person could still use proxy servers or other methods of obtaining unique IP addresses. So we have also implemented some additional methods of protection. But ultimately you should always remember that if someone is determined enough, its impossible to prevent them from finding some way to manipulate the quantities of likes. As a result, do not use likes data for making decisions on hiring/firing, awards, grants or anything to be taken too seriously. That being said, I do feel the solutions we have implemented here are stronger than other anonymous rating systems I have come across, thus far. But always remember that any anonymous voting tool is open to manipulation and the results should always be take in that context, whether from this tool, or any other you've ever used or seen.
    1 point
  35. Great tutorial Martijn, thanks. I also recently reinstalled my mac and I started to go through all this hassle of installing all components manually. Someone on twitter pointed me to homebrew, which I had heard of but had not used until then (http://brew.sh/). It's a packet manager, I am sure most of you mac users have heard of it. It makes installing these components and their dependencies almost headache-free, and they are easily updatable. Still, the configuration can be a pain in the butt, so your tips are very valuable. At the moment I am eyeballing with Vagrant but haven't had the time yet to grasp the whole beast to make it fit my needs.
    1 point
  36. Well said, because soon you won't like it a lot anymore. You will love it
    1 point
  37. Ooookay, now I've actually tried the examples posted above I love the way you guys have suggested to do it. Much quicker, if a little weird at first and more straightforward for lists that might have to be added to in future by non-programmers.
    1 point
  38. "Type" is not reserved word, I tested before I posted (I thought that it is myself too) Thanks for this. I noticed that this is probably possible when I was checking API, but never used it that way - so I didn't dare to post it. Damn you have coded brilliant software Ryan!
    1 point
×
×
  • Create New...