Jump to content

Manaus

Members
  • Posts

    217
  • Joined

  • Last visited

Everything posted by Manaus

  1. I tweaked the function like this: protected function ___initTwig(Twig_Environment $twig) { $loader = new Twig_Loader_Filesystem($this->getTemplatesPath()); // unless 'loader' unknown error $this->twig = new Twig_Environment($loader, array( 'debug' => true, )); } But I get a unknown "dump" function. I see there is also a initEngine function having 'debug' => $this->wire('config')->debug, So if debug is set to true, it should work... Thanks
  2. Hi @Gazley, yes -- or I think so --: I have added these lines on top of the calling php page: $twig = new Twig_Environment($loader, array( 'debug' => true, )); $twig->addExtension(new Twig_Extension_Debug()); But still {{ dump(var) }} is not recognized...
  3. Hello, how do I enable the {{ dump(var) }} function in this module? Also if I do a var_dump from the calling page, the output is not displayed. Thank you very much
  4. Thanks guys, I spotted also that some native objects are passed with native values only, e.g. {{ user.summerVacationHotelAddress }} will not work.
  5. Ok I got it, I gotta put values within the $view object. It would be fun to have all values passed automatically yet. Too prone to chaos?
  6. Thanks jmartsch, I'm using Template Engine Fatory, with 2.7. I think the problem resides in passing values to the twig templates. If I do $login = $pages->get('/login/'); And then in the twig template: <p>{{ login.url }}</p> I don't see any value. How do I pass values? Thanks!
  7. Hello, I'm trying out a template engine conversion of a website. In a foo.twig page I'm calling a isValidUser function, which I required in a foo.php template page. But the engine returns the function in unknown. How do I include functions in a twig template? Thanks!
  8. RT @49SD: Oh my god whoever made thing thank you! https://t.co/XalO15FOPn

  9. RT @puleddu: One way to make a friend happy, is to use golden ratio. https://t.co/dFzMfmmorU

  10. Is there a way to translate the prompt to action generated by this code? Thanks!
  11. Basically you have to create download pages under /downloads/, which is created by the plugin, for each file serving. You create them via the admin, or via API. Each /downloads/download/ page allows a file field and creates a unique hash, that you put, when invoking the file download, after the /downloads/hash/ url segment. Like for example /downloads/hash/18297192837oiu etc. Each download page allows for 5 file download, but you can customize the number. You can also customize the expiring time in the plugin settings. Be sure to tweak the plugin code as I mentioned in the post above, at least for me it solved a recurring bug.
  12. Hello, since include is sort of copy'n'pasting code in the calling file, I might have variables value overwriting. Is it possible to have variables valid for the included file alone? Something like $this->title etc? Thanks!
  13. RT @x0rz: #JPEG #TheDefinitiveGuide https://t.co/s4Xp9eAfJw

  14. RT @DannyDutch: If you face swap Mulder & Scully they look like a great Synth Pop band. https://t.co/Sai6CsC8Am

  15. Hello, I've seen a new kind of syntax, using curly brackets as {page.field}, available in the new branch of Processwire. But I can't really find the page reference/blog post about it. Any suggestion on where to find it? Thanks!
  16. Hello, I need to change $user's data on form submission, this is the code: // prepare for saving $user->of(false); // save the data $user->nome = $nome; $user->cognome = $cognome; $user->azienda = $azienda; [...] $user->save(); $user->of(true); But I get an error: Call $page->setOutputFormatting(false) before getting/setting values that will be modified and saved. Can't get the source of the error. Thanks for any suggestion
  17. Solved using $path = $this->config->paths->files . $page->id . '/'; instead of $path = $this->config->paths->root . $this->config->urls->files . $page->id . '/'; Ok. Now how do I code the links to files? ... Using /downloads/{$thepage->dg_downloadhash}/ returns me a 404... Thanks!
  18. Getting closer.. At line 198 of DownloadGuard.module I added this line: $this->message("{$path}.htaccess"); So I get in the messages this awkward line: /Users/utente/Sites/mysupermegawebsite//mysupermegawebsite/site/assets/files/1079/.htaccess Path is $path = $this->config->paths->root . $this->config->urls->files . $page->id . '/'; But I don't know the proper way to edit it... Thanks!
  19. Hello, mine neither works locally, I get a Could not create .htaccess for myfile_xlsx.zip at the needed location. I gave 777 to /assets/ but don't know where the .htaccess file needs to be placed. Config: Pw 2.7.2 Php 5.4.10 Apache 2.2.3 Thanks!
  20. Can't say why, but the downloaded module has weird owner and group, probably the admin, can't say. Wrote to the provider, whose services I am starting to understand less...
  21. The salt is the same on both local and remote (I upped the whole bunch)...
  22. Ah! Thats it! Well forgery is gone, but I cannot login via usual credentials. Should I change pass uploading some temp code? Setting debug to true I see the error resides in session_start(), No such file or directory (2) in /var/www/[...]/web/site/modules/AutoFbPost/AutoFbPost.module Failed to write session data.
  23. Thanks BigPoet, put the string in the config, but nope, still alarmed for forgery... I also deleted an recreated /logs /sessions and /cache, to no avail...
  24. Hi, I downloaded a module (in this case AutoFbPost). After finishing the download I've been logged out, and when I try to log in I get a 'This request was aborted because it appears to be forged.' I cannot find the module within /site/modules/, where is it? Thanks!
×
×
  • Create New...