Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/17/2014 in all areas

  1. I've been lurking for a while, and decided to sign up now as I have finished my first site with ProcessWire (loving it by the way, can't touch WordPress anymore ). It's a very small one page site, but we have some plans to make it bigger. Any feedback is greatly appreciated. http://avesnetsec.com
    8 points
  2. Adminer is great, you can even paste the entire content of the file into a pw template and have it in the admin. This way it's protected with two passwords
    6 points
  3. Welcome to yhe forum Guru! I'm on mobile, so I won't be very detailed. The code seems fine to me. You will develop some preferences when coding more and after seeing some more examples, but in general it looks ok. One thing I noticed is that you used this form in more than one place: echo "{$page->body}"; this could (should) be replaced by: echo $page->body; since the quotes are needed only to work with strings and not variables, and the curly brackets are needed only to use variables inside the quotes. You can use both though, if you like doing and undoing things -- Concerning the tags question: because multiple pages fields return a pageArray, you will have to iterate them to reach the individual pages. This can be done with a foreach() foreach($tags as $tag) { echo $tag->title; } //quite chalenging to code on my small android -- by the way, you will realize that it is easier to learn php than to learn how to fornat code on the forum editor
    5 points
  4. Here's a video of a module we're working on that I thought you guys might like. The module, Lister, provides a different type of Page List than the tree that you usually interact with in ProcessWire. It gives you a table of pages with customizable columns, filters and actions. Rather than try to explain what it does, I figured I'd show you. This module also uses a new (soon to be released) Inputfield invented by Apeisa, developed by me, and sponsored by Avoine, called InputfieldSelector – it's what you see on the configuration screen as well as the Filters tab. I recommend bumping up the size/quality to 720p so that you can properly see everything. The video has no sound... I tried to do one with narration, but that didn't work out.
    4 points
  5. Smarter people than me would have some git hook worked out. As I don't really use git (because I work alone [sniff]) although I am trying to learn the thing. I upload the db manually via phpmyadmin and my site files via ftp. If it's just me I can't see the point of uploading to a git repo then paying for a service to deploy it. If I was working with others on coding a site git would be the go for sure.
    4 points
  6. Thanks for the tip regarding the echo command. I've now changed my code accordingly. Your code also worked, although I'm sure I tried it earlier today, so I'm confused as to why it didn't work back then Thanks anyway. It was indeed. The black screen with the red flashing text. Thanks, I will have a look at your links and start learning.
    4 points
  7. I'm far from a guru (but pete probably is ) but glad to be of help sometimes. I'm sure you are more than capable of googling PDO, but i wanted to mention there are some good intro/tutorials around like this one http://code.tutsplus.com/tutorials/php-database-access-are-you-doing-it-correctly--net-25338 It's really not hard once you get the concept.
    4 points
  8. Well I can give you the parser for free: Just put the "wp-import" folder in the same directory as "site" and "wire" and add the name of your xml file in the folders "index.php". --- And if you still prefer a real module you can support development via (for example) PayPal mail@nico.is --- Edit: Forgot to add the attachment wp-import.zip
    3 points
  9. Wouldn't go as far as guru, SiNNuT The tutsplus link is great, better than anything I found. I thought it was a bit poor that PHP.net didn't have more examples in their docs, but this will do nicely as it explains the differences clearly with good examples. I'm actually marking the answer with the link in as "best answer" purely because I think people would get the most benefit out of that page.
    3 points
  10. I've seen plenty of those deploy services, but I too work alone. I can't justify the cost of them, unless I end up having a dozen or so repos belonging to different sites. If you're still using phpmyadmin, check out http://www.adminer.org/ It's a single file replacement. Works great.
    3 points
  11. seems pretty ok. I suggest reading http://www.phptherightway.com/ and using alternative syntax instead of echoing html http://processwire.com/talk/topic/3785-alternative-syntax-for-control-structures-a-tip-for-newbies/?hl=%2Balternative+%2Bsyntax
    3 points
  12. Are you sure $page_id is being passed as expected? Perhaps echo $page_id to verify.
    2 points
  13. can be that you will have trouble with it. If so do this: http://processwire.com/talk/topic/3752-pagination-and-urlsegments/?p=43920
    2 points
  14. I am not the best friend of tags which are translated later in html, that is one reason I stay with processwire. Do you remember? {{contao::*}} <TYPO3></TYPO3> <jdoc:include joomla! /> Thats why I don't like hannacode or something similar. Except with images I would like to have option to give customers simple tags to put images in a textfield. Diogos Module seemed to be a good and simple way to put an image in a textarea in PW-Surrounding. Thanks I customized it for my use and want to share it. It works in PW 2.4. Didn't tested it with other Versions. Syntax includes an image-tag in the Textfield by using [[fieldname(optional),number(optional),class(optional)]] if using this module Names of Imagefields shouldn't start with a number If a class (CSS) is added Fieldname and/or Number and/or leading Comma is mandatory Comma is mandatory from two Parameters and up Look at the Examples for easy understanding. Examples [[]] matches the first or only one picture in the first or only one image-field if exists [[images]] matches the first or only one picture in the named image-field [[4]] matches the fourth picture in the first or only one image-field [[3,left]] matches the third picture in the first or only one image-field and adds the class left [[,right]] matches the first or only one picture in the first or only one image-field and adds the class left [[images,3,top]] matches the third picture in the image-field named 'images' and adds the class top I replaced the single curled brackets with double square brackets to keep brackets usable. In contrast to Diogos Module here it's not possible to set more than one image within one tag. (never needed a list of images in a textarea) Adding an optional class was important for me. I am thinking about integration of resizing. FEEL FREE TO USE IT! EDIT: 06/09/15 updated configurable version go here
    2 points
  15. There are multiple ways to handle XML in PHP, but for simplest tasks (reading) I prefer SimpleXML. After that it's all about iterating posts in XML and creating matching pages for them via API. Hope this helps a bit. PS. I did notice that you posted this on jobs board, but still wanted to point out that the XML part is really nothing to be worried about. If you're familiar with handling ProcessWire content via API, this should be a piece of cake, unless post data from WP is very complex
    2 points
  16. @suntrop - yes you can make your own forms and then use FB to process them; for example this page: http://www.jonathandawe.com/contact/ is using formbuilder, but no jqueryUI, it's just markup with the form action to FB.
    2 points
  17. I am enjoying House of Cards - As good as the original series, and that takes some doing.
    2 points
  18. You and Apeisa are incredible. Thanks to Avoine for again sponsoring ProcessWire development.
    2 points
  19. Just wanted to share what I recently used to create forms in modules and in frontend using the API and Inputfield modules PW provides and uses on its own. I think many newcomers or also advanced user aren't aware what is already possible in templates with some simple and flexible code. Learning this can greatly help in any aspect when you develop with PW. It's not as easy and powerful as FormBuilder but a great example of what can be archieved within PW. Really? Tell me more The output markup generated with something like echo $form->render(); will be a like the one you get with FormBuilder or admin forms in backend. It's what PW is made of. Now since 2.2.5~ somewhere, the "required" option is possible for all fields (previous not) and that makes it easier a lot for validation and also it renders inline errors already nicely (due to Ryan FormBuilder yah!). For example the Password inputfield already provides two field to confirm the password and will validate it. De- and encryption method also exists. Or you can also use columns width setting for a field, which was added not so long ago. Some fields like Asm MultiSelect would require to also include their css and js to work but haven't tried. Also file uploads isn't there, but maybe at some point there will be more options. It would be still possible to code your own uploader when the form is submitted. Validation? If you understand a little more how PW works with forms and inputfields you can simply add you own validation, do hooks and lots of magic with very easy code to read and maintain. You can also use the processInput($input->post) method of a form that PW uses itself to validate a form. So getting to see if there was any errors is simply checking for $form->getErrors();. Also the $form->processInput($input->post) will prevent CSRF attacks and the form will append a hidden field automaticly. It's also worth noting that processInput() will work also with an array (key=>value) of data it doesn't have to be the one from $input->post. Styling? It works well if you take your own CSS or just pick the inputfields.css from the templates-admin folder as a start. Also the CSS file from the wire/modules/InputfieldRadios module can be helpful to add. And that's it. It's not very hard to get it display nicely. Here an code example of a simple form. <?php $out = ''; // create a new form field (also field wrapper) $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name",'subscribe-form'); // create a text input $field = $modules->get("InputfieldText"); $field->label = "Name"; $field->attr('id+name','name'); $field->required = 1; $form->append($field); // append the field to the form // create email field $field = $modules->get("InputfieldEmail"); $field->label = "E-Mail"; $field->attr('id+name','email'); $field->required = 1; $form->append($field); // append the field // you get the idea $field = $modules->get("InputfieldPassword"); $field->label = "Passwort"; $field->attr("id+name","pass"); $field->required = 1; $form->append($field); // oh a submit button! $submit = $modules->get("InputfieldSubmit"); $submit->attr("value","Subscribe"); $submit->attr("id+name","submit"); $form->append($submit); // form was submitted so we process the form if($input->post->submit) { // user submitted the form, process it and check for errors $form->processInput($input->post); // here is a good point for extra/custom validation and manipulate fields $email = $form->get("email"); if($email && (strpos($email->value,'@hotmail') !== FALSE)){ // attach an error to the field // and it will get displayed along the field $email->error("Sorry we don't accept hotmail addresses for now."); } if($form->getErrors()) { // the form is processed and populated // but contains errors $out .= $form->render(); } else { // do with the form what you like, create and save it as page // or send emails. to get the values you can use // $email = $form->get("email")->value; // $name = $form->get("name")->value; // $pass = $form->get("pass")->value; // // to sanitize input // $name = $sanitizer->text($input->post->name); // $email = $sanitizer->email($form->get("email")->value); $out .= "<p>Thanks! Your submission was successful."; } } else { // render out form without processing $out .= $form->render(); } include("./head.inc"); echo $out; include("./foot.inc"); Here the code snippet as gist github: https://gist.github.com/4027908 Maybe there's something I'm not aware of yet, so if there something to still care about just let me know. Maybe some example of hooks could be appended here too. Thanks Edit March 2017: This code still works in PW2.8 and PW3.
    1 point
  20. I have been concentrating so much on working out the best (for me) way of structuring sites using ProcessWire, creating snippets for myself, understanding how it works together, that I have yet to look at how to create a custom, front end system for adding pages, basic management and so on. What I am thinking about is creating a simple system, perhaps with a blog, where you can create/edit/publish/unpublish a particular set of articles via the front end in custom forms without having to worry about page structure and so on. So, this would entail: Front end login/logout/account management Front end page list with edit/delete/publish buttons Front end Create New.... Er ... maybe a couple of other things. The thing is, I really don't know where to start! How do I protect my front end forms/templates so that only a logged in user can see them? How do I create a management area? How do I edit an existing page in a front end customised form? What I need is just some very simple pointers of what I should search for, which elements of the API I should be looking at and so on. This is just for my own learning, so I don't want to use the form builder - I need to understand this properly for my own education. Thanks Joss
    1 point
  21. Hi Freestone, welcome to processwire You sure can, just need to learn the pw basics and the pw api: http://processwire.com/api/ The api of pw is very powerfull. You already have website experience with drupal so no problem at all to learn these things. PW is build around an amazing concept that everything is "a page" associated with fields and templates, which makes it very easy to make fast and scalable websites. Here is a post about moving from drupal to processwire: http://processwire.com/talk/topic/1015-switching-from-drupal-to-processwire/page__view__findpost__p__8988 And here are some modules that I know of: http://modules.processwire.com/modules/form-builder/ http://modules.processwire.com/modules/blog-profile/ http://modules.processwire.com/modules/shopping-cart/ More about pw here: http://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/ And a lot of experienced pw people on this forum that can help you out.
    1 point
  22. Okay so I was being silly, I was passing the wrong page id Problemo solved, thank you guys, you people are awesome!
    1 point
  23. Vineet, You are getting the page correctly, try adding title to the end. echo wire('pages')->get("id={$page_id}")->title; ...and perhaps what onjegolders mentioned as well. I think omitted title should still output the page ID.
    1 point
  24. Just set to a variable and test if it got any markup... $pager = $a->renderPager(...); if($pager) $out .= "...";
    1 point
  25. Cant quite think how to do this, but since this is based on a count, if you check to see whether your count is above or equal to the value when pagination kicks in, then if it is, display the pagination. What I am not sure about is what happens on page two....
    1 point
  26. This post from Soma, might be a great place to start: http://processwire.com/talk/topic/3634-down-uploads-on-a-per-user-policy/
    1 point
  27. $languages does not return languages in the order as they're in the tree. But you could get language yourself since language is a page with template "language"... and add a sort=sort. $allLangs = $pages->find("template=language, include=all, sort=sort");
    1 point
  28. http://www.wifi.dnwx.info/ => Could not locate remote server http://wifi.dnwx.info/ => You don't have permission to access / on this server. dns resolves ip 103.6.196.220 which is not your website but cpanel. You should check that first.
    1 point
  29. Welcome. Wasn't 'Guru Meditation' the old Amiga's blue screen of death?
    1 point
  30. uuh, 20:14 time for crime scene and soup. See you later!
    1 point
  31. I'm in for Spaghetti the western kind.
    1 point
  32. I'm running out of time but quickly wanted to mention: $config->pagefileSecure = true; in your /site/config.php file (see the comments in the file and search google for more info). You might also want to look at the wireSendFile() function in /wire/core/Functions.php, if you'd like to protect the file in another manner.
    1 point
  33. It can. Our sites directory is a good example of this, as it does pretty much everything you describe with FormBuilder. However, we review the submissions before approving them to be published on the site, and I always recommend this even if FormBuilder will let you publish directly. For instance, I've had a few submissions that were spam (though not obvious at first). Anything that gives users access to publish something on your site needs some eyes on it, unless you are dealing with a limited group of trusted users. But FormBuilder will let you do either.
    1 point
  34. You've found one of the times where a custom table would be best The connection is already done actually if you're using the same database as your ProcessWire install (may as well) - this way you can use the existing $database connection. SiNNuT's example above should probably be $mydatabase to differentiateas that bit of code is for connecting to another database entirely. PDO is basically a database abstraction layer (think my terminology is right there). The underlying database is still mySQL, but PDO means that the same queries could be used for many different types of database backend (Microsoft SQL server etc). There's an example from StackOverflow here that I'll borrow from and amend to do a basic query using ProcessWire's $database: http://stackoverflow.com/questions/767026/how-can-i-properly-use-a-pdo-object-for-a-select-query $query = $database->prepare("SELECT * from your_table where field_name = :name"); $query->execute(array(':name' => $name)); while ($row = $query->fetchAll()) { // Do something with your rows } The reason for preparing the select query with the :name placeholder (in this example) is that your variable (or string) for :name gets properly escaped to prevent SQL injection. It's a little more verbose, but it does the job nicely. I'm pretty sire you could just have done "WHERE field_name = $name" but the above is safer if you're not sure what someone might pass to that query. For your counting requirements you might be able to do adapt the following query from this forum topic: http://processwire.com/talk/topic/3515-processwire-24-compatibility-for-modules/ ): $query = $db->prepare("SELECT COUNT(*) FROM my_fake_table WHERE name=:name"); $query->execute(array(":name" => $name)); $count = $query->fetchColumn(); The queries are a bit different to regular mySQL, but there are a lot of PDO query examples out there - a quick Google search for PDO SELECT DISTINCT should get you started.
    1 point
  35. Is $page->image a single image (max files = 1?). If so, access $page->image is an object of type Pageimage, which has no remove() or delete() or deleteAll() methods. Those are instead methods of the WireArray that contains the file(s)/image(s). You could access that a couple of different ways. One way would be to get the "unformatted" value, which for files, always returns the containing WireArray: $page->getUnformatted('image')->delete($page->image); Another way would be to access the 'pagefiles' property of the image, which also refers to the containing WireArray. $page->image->pagefiles->delete($page->image); I mention the above examples for explanation, but PLEASE IGNORE THE ABOVE. Any time you are performing manipulations to a page, you should have the page's output formatting turned OFF. So there really isn't any situation in which you would use the above API examples... because it would mean you are modifying a page that is in an output-ready state, rather than a change-ready state. That's why ProcessWire throws an exception if you try to save a page with output formatting state active. The second point I want to make is that simply calling a delete() is queuing a deletion, not executing it. You still need to $page->save() or $page->save('image') before the deletion is committed. Given all this, I think this is what you want: $page->of(false); // turn off output formatting $page->image->delete($page->image); // you can use this line... $page->image->deleteAll(); // ...or this line (choose one) $page->save('image'); // or use $page->save(); if also saving other changes
    1 point
  36. The change to PDO was motivated more by the support of named parameters. Though bringing more abstraction to the DB layer also seemed like a good move for the long term, even without current plans to support other DBs. While PDO does abstract some of the considerations with supporting other databases, ProcessWire's queries are designed for MySQL, and are optimized for MySQL behavior. There's a lot of influence from the book: High Performance MySQL. Supporting another DB platform like PostgreSQL would probably not be such a straightforward thing. Though the truth is I don't know for sure, as I've not worked enough with PostgreSQL to know how similar or different the queries we use would be. But if you are looking at implementing some new fieldtypes, it would be best to look for how you might implement them with MySQL, since support for other DBs like PostgreSQL is not currently in the short term plan.
    1 point
  37. I think that usernames as MD5 hashes are going to be difficult to look at on the admin side, and kind of defeats the purpose of the name field being a readable, unqiue identifier. I would create a separate field to handle your md5 hash and add that to your user template. Lets say you created a text field called user_hash and added it to your user template. You could have it automatically updated every time a user is added or saved just by putting some hook code in your /site/templates/admin.php file $pages->addHook('saveReady', function($event) { $page = $event->arguments(0); if($page->template == 'user') { $page->user_hash = md5($page->name . time()); } });
    1 point
  38. http://bit.ly/Nk0NsS
    1 point
  39. Using SQL I can select rows using "DISTINCT", for example if I have 100000 rows with different IP addresses, I can count all the distinct IP addresses in a table (or field) with a single SQL query in a split second. To my understanding to do this using the api and selectors I would need to foreach through every single page, which is mighty memory intensive and slow. Correct? Yes. 'distinct' and 'group by' like functionality can't really be done very efficiently using the API. So if, like it seems in this case, we're talking about lots of rows/pages/fields you probably want to use an SQL query instead of the API. A google search like "site:processwire.com/talk sql distinct group by" will give you some interesting threads on the subject like, http://processwire.com/talk/topic/2047-group-by/?hl=unique#entry19148 and http://processwire.com/talk/topic/2038-distinct-selector-in-processwire/ If so, I still have a need for direct sql queries, even if using pages rather than custom tables. I've searched for examples of how to do these and gather the $database var is used, but there don't seem to be any clear examples of connect, insert, select etc using PDO.Can someone point the way if such exist? Do I need to "connect" or is a connection already available, is this what $database represents? Yes, $database gives/creates a PDO instance from ProcessWire $config API variable, like this (from wire/core/WireDatabasePDO.php): $database = new WireDatabasePDO($dsn, $username, $password, $driver_options); So the connection part is easy, $database is always available. From there on you can just use a 'select distinct' query and PDO (such as the example Diogo mentioned). Just as well for inserts, deletes etc. I don't think this i specific to PW, it's just SQL/PDO Of course when you use PW pages you could easily use the PW API to handle all the stuff it is really good at, and just use some direct SQL queries where you need it. When using pages make sure the fields you connect to say a 'logentry' template are unique to that template. This is because a field table only contains a pages_id reference and it's data, and it would need a more complex query if the table contained data belonging to other templates. Then there also is the option to create you own fieldtype/inputfield, let say FieldtypeLogentry. This way you can have one field hold as many columns of data you need and it would be only one database table. I haven't yet created a fieldtype/inputfield myself but i've heard say that it's not that hard. Anyway, lots of options, just choose the best according to your needs and data(base)structure. If a custom table works best for you, go for it.
    1 point
  40. @ adrian THANK you very much!! This two articles are great... and with this sentence and your code example echo $page->Departure_AUI ? "<div>Aui: {$page->Departure_AUI}</div>" : "";made it "click" in my head and again I learned something important, now I have to do only the "cheatsheet" and finally understand it myself, this would certainly dissolve another big knot in my head ... but one step after the other
    1 point
  41. Dreams come true ! Big thanks to Antti, Avoine and you Ryan.
    1 point
  42. Ok, here it is: Modules Directory: http://modules.processwire.com/modules/process404-search/ Github: https://github.com/adrianbj/Process404Search Includes a small tweak to also convert dashes and underscores to "+" which should improve search results.
    1 point
  43. Ok, here is something I'm not exactly proud of, but I really don't have anymore time right now, so I thought I'd post anyway in case it inspires someone else to come up with something better. This is the key line that shows you how things are working: echo $this->pages->get($this->searchPage)->render(array('q' => $term)); This way, there is no redirect, so the http headers still return a 404 status code, so I think this solves the SEO issue. There is a new config option that lets you choose your search page, so that should take care of the issue kongondo brought up. With this new version,you need to add this line to the top of your search.php file if(isset($options['q'])) $input->get->q = $options['q']; Or this if you want the title on the search page replaced: if(isset($options['q'])){ $input->get->q = $options['q']; $page->title = $pages->get(27)->title; //27 is the ID of the 404 page that comes with PW } Anyone have any brighter ideas? PS Due to the use of render($options), you need PW 2.4 or a recent 2.3 dev version.
    1 point
  44. Quick 'n' dirty guide if you want a single page tree with the same content in different languages. The URLs will then look like example.com/en/my-article or example.com/de/mein-artikel 1:) Download and install ProcessWire 2:) Install the modules you find under the "Language" Tab. 3:) Go To Setup->Languages and add new languages. Please note, that the default one is also the default language of your site* 4:) For every field type text or textArea change the Type to TextAreaLanguage or TextLanguage. (e.G. body with TextArea becomes body with textAreaLanguage). You fields should now have multiple tabs for each language, if you edit a page. 5:) Go to the root page (/) and look under "Settings" Setup an URL for every language, e.g. en,de,ru,... . Looks like this: http://take.ms/34Tq5 6:) Create pages and fill in the content. You can build a front end language switch as described in Ryans API Language page. ProcessWire will take care of changing URLS (e.g. /en/example to /de/beispiel) and you can access the current language via $user->language; *It's possible later to define another language as the default language.
    1 point
  45. Thanks Ryan That sounds sensible. I've expressed my love for ProcessPageSearch in these forums before... but seriously there is tonnes of potential to utilise the output in various ways, including datatables, charts, reports etc. I will get the csv output module I've created into a usable state ASAP.
    1 point
  46. Just want to mention that the module in question is filed under the proof-of-concept category, which means: Maybe there is some question as to whether we should even have this category, especially as the modules directory grows. I would also like to have dedicated modules managers (people) to ensure the quality and ongoing compatibility of modules in the directory. The current scale is beyond my own ability to keep up with on my own, but a team of us could do it. Soma, you would be my first choice, especially given the number of modules you've created–especially the highly-relevant Modules Manager. The current ratings system in there is meant to be a bit of a crowd-sourced solution, where the best modules also have the most "recommendations". But having a bigger QA team would be far preferable as a primary solution.
    1 point
  47. I quickly looked at the repo and no it's far from good or standard or how it should be or can be. There's just a site folder with modules folder inside that contains a Fieldtype module that is a separate module from another guy. I'm not sure why this module is in the directory and it also isn't installable by ModulesManager for example. I'm sorry as I mind sound patethic, but I always said that we should have clear guidlines how modules repos should be built and that there must be some quality assurance for modules posted to the official directory. This doesn't happen and makes me a little sad. (just a quick glance $pass = $this->sanitizer->text($this->input->post->pass); Just wrong to sanitize passwords...) /rant
    1 point
  48. @Macrura, Sorry to hijack your thread . I am also trying to further understand how I can use the API to access repeaters (and hopefully assist fellow newbies ). So, I will post the following code for the gurus to comment on please, thanks! $r = $pages->find("template=basic-page, slides.count>0");// find pages with at least 1 slides (repeater) foreach ($r as $p) { $v = $p->slides; foreach ($v as $b) { if ($b->disable_slide==0) {//checkbox "disable_slide" not checked echo "<p>$b->title</p>"; } } } This works for me. The first selector find will grab all pages that have at least 1 "slides" (which is the name of the repeater). The pages found have multiple instances of the repeater "slides" - meaning arrays within arrays, hence, nested foreachs which I traverse...For each result, I check that the checkbox "disable_slide" is not checked and only output those repeaters.. @Others Dear gurus...is there a shorter way (other than nesting the first selector find inside the first foreach) or more efficient way of achieving the same thing or this will do? Thanks. Edited for clarity (See Soma's post below about "selector" . Also see his more efficient code)
    1 point
  49. Little detail. Instead of $p->setOutputFormatting(false); you can also use $p->of(false);
    1 point
  50. Hi Ovi, when looking at your code and your statement of what you can do in PHP, I think you just should start here. And yes, you also should use the "Hello World Module" as a skeleton too. For example, if you want to do something that isn't implemented in PW core, you can [write | implement] your somehow into templates, or you can create a module. As it should not be a big problem for you to write your working code, you may find it not an easy task to get the right Hook. (for me it is exactly that)And at the beginning you can do it like we all do (we, who are not belong to the pro's, - we, who are not be able to cite the core code when waken up in middle of the night, - we, who we need to learn and have fun with it): we drop a post here and describe what we want to do and then get perfect answers on what Hook would be best to use for it! --- Basically a module hooks into PW somewhere and somehow. You just need to kow where to hook in and when, (before or after). And you need to know how to access objects & values and how to return your result. That's all covered in the new great API-Documentation of Hooks! Read it and just go on
    1 point
×
×
  • Create New...