Jump to content

isellsoap

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by isellsoap

  1. I have a similar issue like theFisher86 (at least I think I do). Putting the name of an image field in the "List of fields to display in the admin Page List" works fine. But my scenario is as follows: I have a page selection field and selected a page which has an image field. Is it possible to show the image of that selected page in the admin Page List? Using "page_select_field.image" just renders the image path in the admin Page List. :-(
  2. Does the following recipe help? Change homepage’s default language
  3. I’m using ryan’s RSS Feed Module and using the body field as Default Feed Item Description Field in the configuration. I have blog posts with images, and the image URLs are relative. The W3C Feed Validation Service suggests, that it would be better to always include absolute URLs. Long story short, how can I transform relative URLs from a textarea field into absolute ones?
  4. ProcessWire is *the* best tool to build multi-language websites. Period.
  5. It is. Sort of. https://processwire.com/talk/topic/8298-list-your-5-must-have-modules/?p=81262
  6. I would do it like it is written in the .htaccess file of the PW dev branch (line 104). I use this method on production sites, too, and it works smoothly.
  7. After reading Include & Bootstrap on the ProcessWire website I coded a simple shell script for outputting page informations. Here is the GitHub repository with further informations and usage instructions. Long story short, you can do things like pw get "/" which outputs this: or pw find "template=basic-page,parent=/about/,sort=-id,limit=4" id template rootParent which outputs this: I don’t know if it is in any way useful, but I think it’s a fun way to output PW content and to quickly get to page informations in a rather nerdy fashion.
  8. Today I discovered the module FieldtypeSelector and at first sight I didn’t know how to make use of a field of this type inside a template, respectively if there are good and smart use cases for it (I’m sure there are). Do you know of any? (Interestingly enough I could not find a single blog or forum topic/post discussing this module in the context of template development.) I would be also interested in some (pseudo-)code examples to get a better idea of how I could integrate this field type in my template workflow. Thanks a lot in advance.
  9. I think this Stack Overflow question + the answers is exactly what you need. In general, file versioning is definitely the way to go. It depends how your build process is though. Personally I use gulp with the gulp-rev package. There’s a pretty neat integration guide in the GitHub repo.
  10. Like it a lot, especially the configuration options in the GUI. But to be honest, I think I’d use a pretty robust solution like enquire.js if I’d want media query handling via JavaScript.
  11. For me this works like expected, going to /category/ works. Unfortunately I can also access the category page by typing /categories/category/. Why doesn't /categories/category/ redirect to /category/?
  12. @adrian: Thanks for the hint. I opened a thread in the FormBuilder support area.
  13. Select dropdown values inside of fieldsets don’t get saved to the entries database. Can anyone reproduce this bug?
  14. The issue raised by Raul still exists in PW 2.4.1. Any news about a possible fix to this?
  15. If I do that I get an "Call to a member function bla1() on a non-object" error. If I call the functionFromIncludedFile function (the one in the module) with "$this->" at the beginning, I get an "Method MyAwesomeModule::functionFromIncludedFile does not exist or is not callable in this context" error.
  16. I do financial calculations of companies. Every included file (respectively the function in the included file) represents such a company. So the functions in the module are more general functions which are being used by the companies, and the company function itself (from the included file) does highly specific calculations (because every company is different). To sum it up: I don’t have to split the class into multiple files, but it does help with the overview when you don’t have to scroll through one massive file (think of 1,000 or 10,000 companies). Edit: Eventually I want to do all the calculation stuff on the UI level of the backend. So I’d add pages for a company which represents additions, substractions and other predefined mathematical functions of certain fields. The module would iterate through those pages and then put everything together. That would a) be the perfect solution for me (also the most dynamic and elegant one, of course) and b) solve my above mentioned problem, which simply wouldn’t exist anymore …
  17. The title of this thread isn’t very precise (or correct), sorry for that. Also: possibly this is the wrong section of the forum. I think this is a more general PHP programming question, that’s why I put it here. I have a module that triggers a function after a page is saved in the backend. That function includes a file from a folder in the same directory. After the include I want to trigger a function from the included file. So the basic setup is this: <?php class MyAwesomeModule extends WireData implements Module { … public function init() { $this->pages->addHookAfter( "save", $this, "myFunction" ); } public function myFunction( $event ) { … include "inc/file.inc"; functionFromIncludedFile(…); } … public function bla1(…) { … } } The file.inc file uses functions, that are declared in the module file, like so: <?php function functionFromIncludedFile() { … $var = $this->bla1(…); … } After saving a file I get "Using $this when not in object context" error. I know why the error occurs, but I don’t know how to solve my problem. Obviously, changing $var = $this->bla1(…); to $var = bla1(…); generates a "Call to undefined function bla1()" error. I guess this is easily solvable, thanks for any help.
  18. Super cool ideas, thanks a lot! Point #3 sounds really good. The more I learn about ProcessWire and use it, the more I love it.
  19. Thanks for the comments. @ryan: like I wrote in the first post, the generic names are necessary because of scalability reasons in the long run. The fields represent single entries of companies’ quarterly results. Because of the heterogenity of those results (every company has slightly different naming conventions for their financial stuff), it wouldn’t be very wise to create 30 to 50 fields per company (that would result in 30,000 to 50,000 fields for 1,000 companies). Instead, I have 50 generic field names for 1,000 companies. I think also that it is definitely a bit difficult to navigate through template files (in my case the fields are used in a module) and check, which field represents what for a single company, but I think it’s far better than having thousands and thousand of fields in total.
  20. See screenshot for a better understanding of my question: I have lots of generic field names per template (the generic naming is for scalability/simplicity reasons and necessary), so it would be nice to have the field label show up besides the field name for better overview. Is this possible? The status quo is ok-ish, but the field label showing up would be neat, faster and save me some clicks.
  21. Hey arjen, thanks a lot! Jep, I consider doing a detailed case study.
  22. Just today I relaunched http://barefigur.es/ It’s now powered by ProcessWire. A bit of history: I launched Bare Figures in January 2012. Originally it’s a site for visualizing Apple’s quarterly results. Charts are being rendered by Highcharts JS. In the first few months after the original release I did all manually (actually also creating the JSON file by hand). After that I used a bare-bones SQL database for inputting the data and a PHP script generated the JSON file to feed Highcharts. Now Bare Figures is powered by ProcessWire (and it feels just absolutely right, I love it). I created a module that generates the JSON files and now the site is, of course, also scalable, which means I can add more companies to the site (the first one besides Apple is Google). I plan to add many more in the future. What do you think?
  23. I think it would be nice to add an option (e.g. a simple checkbox) to the settings page of the repeater FieldType for adding a new item from the top, not from the bottom (and consequently also reverse the order of the items). So instead of repeater item #1 repeater item #2 repeater item #3 repeater item #4 (here appears a new item) + Add Item it would look like this + Add Item (here appears a new item) repeater item #4 repeater item #3 repeater item #2 repeater item #1 Especially useful when having lots of repeater items. Does that sound reasonable to you? Is it already intended to add the option? Thanks.
×
×
  • Create New...