Jump to content

titanium

Members
  • Posts

    161
  • Joined

  • Last visited

Everything posted by titanium

  1. You could do that, but that would not make too much sense. The call should work everywhere. I called it in one of the templates which include "head.inc" and "footer.inc". This way, "head.inc" and "footer.inc" can be very generic, that's why I made it. You can integrate some lightbox or something like that to a certain template, but you can use the same head.inc as all the other templates. But again, I didn't spend too much time on this. Maybe there are some bugs, or it could be done better. But for me it works so far. I'm happy if you try it out. A better documentation of the possible calls and more examples could be found on the MODX page. Or you can look into the source code.
  2. Thanks, this is a quick and handy solution. On the long run, it's not as clean as I would like to see it, because the header.inc and footer.inc have "to know" about the scripts needed in certain pages. EDIT 2013-02-01: in the original version of this post I published a module here. Today I discovered that my module has issues when caching is enabled. I will post an update asap.
  3. Is there a neat little function already existing for inserting some JS/CSS-code before the closing tags </head> or </body>? Reason is, I usually work with a header.inc and a footer.inc, but on some pages I have to insert different javascript or CSS to the header or footer. I feel uncomfortable if I have to create several header.inc and footer.inc's for this purpose... MODX (and Wordpress, I think) have some functions to register CSS and JS to the pages, which is quite handy. Maybe there is something similar in Processwire?
  4. Some minor glitch on iPhone 4: the "logout"-button in the upper right corner is sliding between the search-field and the "admin" navigation bar and is not fully visible.
  5. Just a very minor thing: when the trash is empty, it shows the link to empty it, however. I think this link should only be shown when there is something to trash actually.
  6. I would like implement a feature what I would call "flexible content elements", a functionality which TYPO3 has for ages. Basically, it should be possible for my clients to set up longer pages which contain a header, then a paragraph with a picture on the left with some caption and a link to picture as a download, then maybe a picture on the right, then some tables, then again a paragraph and so on... Every element could be used one or more times, and should be ordered by drag and drop. So far, repeater fields can do the job, but they are not ideal when it comes to clarity und user friendliness. I guess it could be better if there is a possibility to set up some tabs on top of these repeated data sets, like it could similarly be done with the field "FieldsetTabOpen". But "FieldsetTabOpen" puts the tabs on top of the whole page, not on top of each of the repeater's data set. I hope I could made it clear what I would like to achieve... Thanks for any hints and suggestions
  7. These results were obtained over an internet connection, the server is a root server (production system) with some more or less moderate load. I used Firebug's network module and did multiple reloads at different times. It's kind of a subjective test, but it was fast to accomplish for me. By the way, I did a very similar test with a MODX system some time ago. The results of the frontend performance test with an empty template were nearly the same, compared to ProcessWire. But that's just a small footprint.
  8. Thank you all so much for your really fast support! What an amazing community this is! Yesterday evening I came up with if($page->status === 8193 || $page->status === 10241) ... as a temporary solution, because I wasn't aware of $page->isTrash Thanks, Soma! At the end, I followed ryan's advice: I'll stick with $page->title, because $page->title is anyway needed when the new pages are created. In my case, that's not problematic, because the four child pages should always have the same names/titles, without any spaces or special characters. The reason why I set up this module is: I have a client who needs a bunch of microsites. Every microsite has the same pages (home, imprint, contact... etc.). Because some of the placeholders are used on one or more of these pages, it's more comfortable for the client just to edit one page (the parent of the four childs). With this plugin, the client has not to take care of creating the child pages himself (in fact, I have set appropriate permissions, therefore he even can't create or edit child pages). Now, he is able to create all of the microsites with just one form - with the help of ProcessWire! Great solution in just two days altogether. I like this system so much, I'm sure it will have a bright future.
  9. Hey u-nikos, you have developed very nice theme! Great work! Maybe it's just me, but I get a javascript error in Firebug, saying: TypeError: $(...).tooltip is not a function using: function(position, feedback) { (line 33 in main.js) It causes to stop js execution, which leads to some tabs disappearing. If I comment out line 18 in main.js, all is well: // this.setupTooltips();
  10. I'm quite new to ProcessWire, but I'm already there where the fun part starts I'm trying to build a module which fires when a page with a certain template is saved. It should create a set of four child pages of this page then. Each of this four pages has a template which has the same name as the page title. It works so far, but there is a problem when this page is deleted afterwards. The error message is: "Duplicate entry 'filialen-3235' for key 'name_parent_id' I suppose that if a page is moved to the trash, it is saved again, therefore the function runs again. Somehow I have to suppress the trigger if the page is moved to trash, but I don't know how. Thanks for any hints! My code looks like this. I'm sure it's pretty inelegant. public function init() { $this->pages->addHookAfter('save', $this, 'createPages'); } public function createPages($event) { $page = $event->arguments[0]; // if template of page does not have id 46, do nothing if($page->template->id !== 46) { return; } // four new pages should be created $titles = array('child1', 'child2', 'child3', 'child4'); foreach($titles as $title) { // if page already exists: break if($page->children('title=' . $title)->count() !== 0) { break; } // else: create new page $newPage = new Page(); $newPage->template = $this->templates->get(strtolower($title)); $newPage->parent = $page; $newPage->title = $title; $newPage->save(); } }
  11. Add me to the list! I would absolutely love to see this module. I did something similar in MODX Revolution. ProcessWire takes approx. 160 ms to load a simple page on my server. In comparison, the same content takes just 22 ms when saved as static html file. You may think "160 ms are not that much!", but when it comes to high traffic, this may become a bottleneck. Loading performance is also critical with regard to Google's page rank. Hope to see a first beta of "SuperCache" soon... Thanks a lot, Ryan!
×
×
  • Create New...