Jump to content

slkwrm

PW-Moderators
  • Posts

    321
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by slkwrm

  1. Hi, Diegonella. Try to use this module. Put it in your site/modules folder. Your fieldtype for transaction number has to be a textarea. After you've installed the module, select InputfieldTextareaLookup for your transaction number fieldtype on it's Input tab. Now your field will display as a paragraph so user won't change it. Please, let me know if it works as I didn't test it. Cheers! InputfieldTextareaLookup.module
  2. You can find it in the Roles module options. You need a field "What fields should be displayed in the page listing?", it's hard to overlook it. There you can choose your field. For some reason it shows all available fields, not only those you added to your Role template. Not sure it should be this way, got to ask Ryan about it.
  3. Yeah, you right, Soma. I meant already existing code and that it changes very quickly, though I didn't realize that some fields were left blank in German translation intentionaly. Ralph, you can easily add your own translations and even share your additions here
  4. Are you sure you really need to duplicate your content? Maybe there's a better way to solve this task.
  5. Actually this page already exists in modules section http://modules.proce.../language-pack/ But if such questions arise it's clear that something can be improved. Maybe it's time to proclaim more explicitly that PW is multilingual. I found two places where it's mentioned on a homepage, but, honestly I would never think at the first glance that PW supports a dozen languages. Country flags or something noticeable placed on a homepege would be great and a dedicated link to language packs section too. What do you think, guys?
  6. Why not just specify it in your html output: <a target="_blank" href="<?=$page->get('redirect_url|url')?>"><?=$page->title?></a> If you need an option to choose between opening your redirect page in a new tab/window and the same window you could add a new field to your redirect template, let's call it "blank" and the caption "Open in a new window?" with the type of checkbox. And then check against it in your code. So it would look something like this: $blankAttr = $page->blank ? 'target="_blank"' : ''; <a <?=$blankAttr?> href="<?=$page->get('redirect_url|url')?>"><?=$page->title?></a> Edit: also it should be possible to detect whether your url is intenal or external using some tricky regexp and avoid using additional field, but my knowledge of regexps is very limited so can't advise here. Cheers.
  7. Not sure this is what you need, but maybe this post of Soma can help. I didn't use this approach and not sure it makes exactly what you want, but it seems like using it or something similar you could have both category landing pages and service items right under your /leistlungen/ page using urlSegments. You will need a code in your /leistlungen/ page's template that would check if the value of your urlSegment maps to category page (make sure it uses kom_catlanding category template). If so then serve the output for category's landing page. If then urlSegment maps to service item page then serve it. If your service item pages are direct children of /leistlungen/ then, I think, PW should serve them automatically without additional check for it on your part. Wrote it off the top of my head. The wise part of community, please, tell me it's not gibberish
  8. Hi, iensteinsboi and welcome! I remember reading your tutorials while learning basics of MODx. Thank you! They were very helpful. You will be amazed of simplicity of ProcessWire and really friendly community here and hope you will soon become a convert. Yeah, I know you love both Drupal and MODx, but I'm sure you will fall in love with ProcessWire as well
  9. I guess you got this thing because you used AND operator, not &&. AND has less priority then && and combined with = (assign operstor) instead of == (equality comparison operator) it gave you this strange behaviour. I guess you could also do this, granted your $page->show_url takes values only of 1 and 0: if ($page->project_url && $page->show_url) { //do your thing }
  10. Ryan, not so long ago I was searching for a method to typecast array items into integers. Want to share it as it applies here nicely: $selector = 'id='.implode(array_map('intval', $input->post->categorylist),'|'); $pages->find($selector); But I'm sure you knew it already
  11. In terms of efficiency, I remember Ryan mentioned that it's better to use count instead of find when you only need a total number of items. So the the aggregating line above can be improved a little: $categorycount[$category->title] = $pages->count("template=portolio, category=$category"); or use limit: $categorycount[$category->title] = $pages->find("template=portolio, category=$category, limit=2")->getTotal(); But the first is way cooler. Probably, you won't feel any difference, but it's always nice to know your code is optimized and works. Even when they have a gazillion items in their portfolio...
  12. bitmatix, have a look at your Page field's Input tab and two options on it: Custom selector to find selectable pages Custom PHP code to find selectable pages Cheers.
  13. Guys, I've just commited a very first version of the module which compiles less to css. It almost haven't been tested so there's quite a possibility of bugs appearing. And don't expect much, it's very basic Edit: Forgot to mention. it's a wrapper which uses lessphp library, not my creation . A css-file is generated when you access frontend page and only if this css-file doesn't exist or it's older then less-file associated with it. The module also creates cache files in your css folder, but I hope I'll get rid of them in future versions. You can create full and minified versions of your css (it takes 2x more time to create both for now as it's not optimized). I hope it will be helpful (after a lot of improvements) to those who want to have less working "out of the box". Download it on GitHub. Will be happy to get your feedback. Won't be able to be here during the day though. Cheers.
  14. I've never used less, never had such a big project to really benefit from it. Also wanted to mention lessphp (edit: ok,stillmovingdesign already did it). It seems like it can be pretty easily integrated as a module and it's possible to use PW's caching with it to compile to css only when necessary.
  15. Gazley, are you talking about template or template file? Honestly I'm not sure I fully understand your question. PW should load the template you specified in page's settings that in its turn have to have a template file with the same_name_as_your_template.php in /templates folder.
  16. You could also try to echo the status of each of your hidden but presented in navigation pages in the loop to check if they are really unpublished in the database. You could try to do it like this: if ($child->status & Page::statusHidden) { echo "I'm hidden!"; } else { echo "And I'm visible!"; } Hope it helps. Edit: You beat me here, Soma. Next time I will write my reply faster
  17. Wanze, welcome to the forums! Great start! I tried your module on my localhost and it seems to work, though I don't have any statistics here. When I load the Google Analytics page for the first time I get several notices: Notice: Undefined index: ga:returningVisits in D:\webdev\xampp\htdocs\P21\site\modules\ProcessGoogleAnalytics\ProcessGoogleAnalytics.module on line 227 Notice: Undefined index: rows in D:\webdev\xampp\htdocs\P21\site\modules\ProcessGoogleAnalytics\ProcessGoogleAnalytics.module on line 298 Notice: Undefined index: rows in D:\webdev\xampp\htdocs\P21\site\modules\ProcessGoogleAnalytics\ProcessGoogleAnalytics.module on line 299 But they dissapear after I refresh the page, so I guess it has something to do with caching. Also after installation I get this notice untill I've filled all fields and saved: Notice: Undefined index: accountId in D:\webdev\xampp\htdocs\P21\site\modules\ProcessGoogleAnalytics\ProcessGoogleAnalytics.module on line 877 And also for some reason it breaks page encoding (cyrillic symbols don't display properly). Wanted to mention you can specify what modules are required by your module and what modules it installs in the array returned by getModuleInfo(): return array( 'title' => '', 'version' => 001, 'summary' => '', 'requires' => 'MarkupCache', 'installs' => 'MarkupCache', //not sure about this one ); Not sure though whether it should require or instead maybe install MarkupCache, I guess it shoud just require it. See more here. Thank you for your module! I've never dealt with GA before, and I guess now's the time
  18. What about to make an option to show it only after successful login along with other warnings?
  19. Hey, Ceberlin, make sure you have this extension enabled. Found here: Linux systems In order to use these functions you must compile PHP with zip support by using the --with-zip[=DIR] configure option, where [DIR] is the prefix of the » ZZIPlib library install. Windows Windows users need to enable php_zip.dll inside of php.ini in order to use these functions.
  20. Soma, your example doesn't work for me. I guess limit() function doesn't exist, am I right? My question here is: Why is the second selector in my example ignored? I'm sure Ryan can help here
×
×
  • Create New...