Jump to content

bernhard

Members
  • Posts

    5,861
  • Joined

  • Last visited

  • Days Won

    275

Everything posted by bernhard

  1. for reference: TagReplacer can do it https://processwire.com/talk/topic/11208-inputfieldtagreplacer/
  2. is it possible to use the value of this field for field dependency selectors? that would be really great but i didn't get it to work... i created a field "testruntime" i set visibility for field "headline2" but the field does not show up... any help for this? thanks for the great module - it was on my wishlist https://processwire.com/talk/topic/10555-using-pw-variables-in-descriptions-and-notes/ edit: i was on the wrong track with this one... field dependencies work on the client side with JS and won't take care of the field value when the field is hidden
  3. changing this $new_it = $_GET['it']; // we store it to later append it back to that $new_it = $this->it; // we store it to later append it back solved the problem. the undefined index warning only appears on "root" pages when no further urlsegments are defined. $this->it is set on line 45: $this->it = (isset($_GET['it'])) ? ltrim($_GET['it'], '/') : ''; @soma: any news on a new version? i think you mentioned it somewhere?!
  4. What it does: you can easily define replacement-tags in your fields (also descriptions) like this: [demo] => '<span class="demo">some demo markup</span>', [demo2] => '<span class="demo">some other demo markup</span>', [demo3] => '<span class="demo">one more demo markup with a <a href="#" class="pw-modal">modal link</a>!</span>', Screenshot: Why? today i had to (to be more precise: i wanted to) have a link in one of my field-descriptions that opened a modal to a list of icons... basically i just wanted to add a "pw-modal" class to the link what is not possible through markdown [link](http://example.com) i ended up with the following little module: // removed - please see the code on github its also on github: https://github.com/BernhardBaumrock/ProcessWireModules/blob/master/InputfieldTagReplacer.module i know but didn't use RuntimeMarkup because i wanted the link in the description not in a separate field! Questions: would it be possible to get the currently edited $page somehow? the $page object i get now is the admin page with the according process. it would be nice to be able to do things like $page->parent or the like... would there be another method to hook into that would be more efficient or better in any other way? how can i debug the $event object? i tried var_dump($event); die(); but that showed nothing var_dump($event->return); die(); shows the form/field markup would there have been an easier way to achieve this?
  5. Another option would be to create a textformatter module (it's really simple) and have it replace your tags with the field values. Would be quite the same as Hanna code... Hanna code would maybe be more the click click way of it
  6. nobody said it can't be used for the whole template hmm... nice. you could also handle everything in your template and outsource your markup to a different file: yourtemplatefile.php <?php $config->session->myvar = 'test1'; // set session variable manually for testing $cache = $modules->get("MarkupCache"); $cache_key = 'page_'.$page->id.'_myvar_'.$config->session->myvar; if (!$output = $cache->get($cache_key)){ $output = wireRenderFile('_markup.php'); $cache->save($output); } echo $output; _markup.php <html> [...] <?= $page->title ?><br> <br> <?= $config->session->myvar ?> [...] </html> so all your templates that are using "yourtemplatefile.php" will have cached output based on your session key. don't know how this compares to templatecache regarding performance but would be interesting to know
  7. hi mav_medved, welcome to the forum! sounds like markupcache is the right thing for you: https://processwire.com/talk/topic/7-new-markupcache-module/ http://modules.processwire.com/modules/markup-cache/ you could just create a cache-file bound to your session variable $cache = $modules->get("MarkupCache"); if(!$data = $cache->get($your_session_var)) { $data = [...] // your code $cache->save($data); } echo $data; don't know if or what procache has to offer in this case... hope that helps
  8. my hint about google search was more a general one i agree with you that it should be kept up to date but i also know how well it is documented coming from joomla/seblod (that was a pain ). and of course you will always find a helping hand in the forum. maybe not the answer you wanted to hear but i think your point is known one and i think i've already read about plans to overhaul the docs/site structure of processwire. don't think it has priority though and i don't think it should have as the level we have is really good even if it's not perfect...
  9. thank you all for your suggestions! i know there are lots of iframes coming from facebook & addthis... as the budget was really low i wanted to keep things really as simple as possible (for me). i have those scripts on other websites without any problems though
  10. today i got the following warning when visiting one of my processwire sites: i'm talking about the following site: http://www.scweissenkirchen.at any ideas why this warning could have appeared? i don't find anything suspicious in the code... does anyone else use 360 security (http://www.chip.de/downloads/360-Total-Security_69511987.html) and get this warning? thanks for your help!
  11. hi nixsofar and welcome to the forum you are right, $pages->add is not listed in the api docs: https://processwire.com/api/variables/pages/ for now i think it is always the best to look directly into the code if you want to be 100% sure not to miss anything. it's all well commented and both the docs and the cheatsheet are not always complete imho... back to your question: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Pages.php#L600 and of course searching processwire via google can often be helpful: https://processwire.com/talk/topic/6196-easy-search-on-pw-forums-with-google/?p=60632 happy coding
  12. Servus James and welcome to pw! 1) I think what you are talking about is called delayed output. There is a tutorial here: https://processwire.com/docs/tutorials/how-to-structure-your-template-files/page4 And a helpful thread here: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ 2-4) sorry on mobile but don't really get your questions. Did you already do the hello world tutorial from the docs? Also have a look at the site profiles and as how Ryan does it Have fun with processwire und liebe grüße aus Wien PS: I think one thread per question is easier to understand and answer
  13. hm... you are right. having an empty writeable site-upload folder could work?! there would have to be only ONE folder because you could also only upload ONE site-profile at a time. the installer would only have to take the uploaded zip, copy its content into /site-upload and update the select-field with the description + thumbnail from the uploaded file. don't know how hard that would be in the installer.php and if one can easily add a standard pw file upload field at this place?
  14. hi tuningspoon, sorry can't test it because i was only working on this intranet project for the last week and had more important issues to deal with. it's ok to create pages under globals, link them and afterwards move them to their right location. the pagefield will keep the right reference. thanks anyhow for your help i just wanted to mention this usecase maybe to keep it in mind for further updates. but i also think that this is a quite special one.
  15. hm. sounds like a valid point. but couldn't a chmod solve that in the next step easily? thanks for your two cents, horst
  16. bernhard

    Jump-Inc

    Only on mobile... Love it! Great design and well organised. Welcome and happy processwiring
  17. i just had to install a site-profile and i thought it would be handy if there was a field to upload the site-profile.zip during installaton. would make things easier than explaining how to upload things to the server and then extract it to the right place etc... of course just a little improvement but may be helpful for newbies. what do you think?
  18. wouldn't that be a great usecase for your bidirectional page field gist, martijn (geerts)? https://processwire.com/talk/topic/9675-page-field-bidirectional/
  19. hi pwnewbie and also welcome to the forum theres lots of useful information regarding the delayed output in this thread: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ maybe my illustration of the intermediate profile (using delayed output) is also helpful: https://processwire.com/talk/topic/9690-sub-templates/?p=93247 i hope you enjoy processwire as i do
  20. http://www.microsoft.com/october2015event/de-at/live-event
  21. i had to do some code cleanup and therefore ended up doing it all by hand... boring but the best solution in this case
  22. Hi tom moe and welcome to the world of processwire You have to set your A records of all domains to the server IP of the server that is running the multisite installation of processwire (server a in your case) A redirect won't work! Good luck
  23. Hi, Today I had an issue with this module: I use it to create kind of library. All stored under "globals". There I can categorize things further like /globals/html and /globals/JavaScript... parent of selectable pages is set to "globals" and therefore this is used as parent for newly created pages. So every new page is stored under globals but it would be better to be able to choose the exact parent further down the tree under "globals" Clear what I mean? don't know how that could be solved
  24. Thank you teppo that helps I will try your suggestion of executing a separate script and come back when it worked. Sanitization is no issue as it is a one time migration done by me, thanks for the hint nevertheless
×
×
  • Create New...