Jump to content

qtguru

Members
  • Posts

    356
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by qtguru

  1. After picking up Symfony, I think i might migrate my PW from Smarty to Twig,
  2. Is it possible to use TracyDebugger to inspect what the count is and if indeed it is an integer and not string
  3. @kongondo Seriously this is an awesome job, I use the blog alot and this looks really clean and 'lit'. Can't wait for the new UiKit however would there be a guide to other devs so their Modules looks clean with the new UI
  4. if you to make things easier, you can create an API sitting infront of the DB so from PW you simply call that API and based on the Data needed the API will fetch it from the relevant Database. However this might mean all call-centers having their own API so each can easily communicate because I doubt it would be easy to connect to their DB remotely directly.
  5. Not really, what the addHookProperty does is to run that code and inject your data from the database into Page::courseData in TLDR it dynamically creates the courseData property in the Page class.
  6. Yep this works. Though once a cache is in place for that DB call there, I can say this seems like the solution and satisfies what OP needs.
  7. Adrian is right if calling external database you can use WireDatabasePDO, it's a wrapper around PDO and additional method,
  8. If I am to get this straight you are looking to have Processwire render a page but the details are not coming the PW Database, it's trying to set data to PW instance during runtime, making it seem like it's serving from a page. Indeed this is quite odd. Am curious why ?
  9. Hi Beate, Congrats on the migration also this is how it goes, First you need to go the your Fields and see the name of the fields that hold the comments, then all you need to do is to $fields->find("comment_field_selector,sort=date,limit=AMOUNT_OF_COMMENT");
  10. This is so awkward, The issue was sorted out but i actually forgot to reply to this forum as i didn't get any notification. thanks
  11. Hi I noticed during development of Modules, if i attempt to use Process::setViewFile it calls the current TemplateFactoryEngine which in my case is the Smarty Engine and attempts to look for a view in the site, I want to create modules with external templates rather than having templates in the code. I want to ask if there's a current way to stop this action. I will research and find out but i won't mind pointers thanks.
  12. I feel silly sorry, it works all it needs is all the dependencies specified
  13. Am resurrecting this topic because I noticed after adding the plugin 'CodeSnippet' it tries to read from the wire folder rather than the site modules, but if there's an update won't the folder be deleted ? http://okeowoaderemi.com/wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.5.5/plugins/widget/plugin.js?t=2015030801.156
  14. Yes it does there's a setting for caching and lifetime, I think it's using Smarty Caching only gives you an interface around it, here is the module http://modules.processwire.com/modules/template-engine-smarty/
  15. This is the main layout where other sub templates will be injected into plain.tpl <div class="header-container" id="header-container"> <!-- Site navigation --> {include '../elements/nav.tpl'} <!-- The title of the site --> </div> <div class="wrapper"> <div class="page-content"> <div class="post"> <header class="post-header"> <h1 class="post-title">{$page->title}</h1> <p class="post-meta">{$page->published|date_format:"%A, %e %B %Y"}</p> </header> <!-- Beginning Twitter sharing Large button --> <a class="twitter-share-button" href="https://twitter.com/share" data-related="twitterdev" data-size="large" data-count="horizontal"> Tweet </a> <!-- End of Twitter sharing button --> <article class="post-content"> {block name="content"}{/block} </article> <hr> Notice the block name "content" assuming a visitor navigates to my about page here is the file for the about view about.tpl {extends '../layout/plain.tpl'} {block name="content"} {$page->body} {/block} See how clean and easy it is
  16. Go with Smarty there's a module for Smarty it's what i use if you are familiar with Twig, ASP Master Pages and all it's similar let me post some codes
  17. I started a tutorial but never got to finish it as Work got more tedious it has enough to get started. hopefully i should finish this off assuming API hasn't changed
  18. Thanks already altered the core code, but i am going to inform the client that disadvantage of not taking emails... really requests like this make me want to quit frontend and do Backend totally.
  19. is there a way to disable email field in the comment form, as in I don't want the email form to be rendered...... Client Specific request , I know it sounds weird
  20. Your roles requirements are very basic so you can go with Processwire as for building a frontend on PW that's very achievable
  21. Not familiar with Laravel that much but I will talk on Yii2, Yii2 has a class responsible for adding Roles and Permissions, the roles are stored in the Database and there's a console tool to aid in creating of Roles, however how it works in Yii2 is that you create roles , create permissions, and you can also create more complex roles system in a way that goes like this Younglinh -> Padawan -> Jedi Knight -> Jedi Master with each higher roles having the existing permissions of the lower role, and when creating a user all you simply do is assign a user to a role, to use it, you simple check the users role and also infer if the user has permission to access that resource. http://www.yiiframework.com/doc-2.0/guide-security-authorization.html#access-control-filter you will see how it's implemented here. However since Processwire works with composer easily, there should be package around this.
  22. This will be my honest opinion Processwire works for this without a problem To be sincere this section I would advise using a framework like Yii2 or Laravel, if you are going to handle concepts like RBAC or Permission and authorization, as am assuming there would different roles and all. I tend to use Processwire for mostly content centric sites or mostly site management, but when it comes to applications with specific logic, I tend to use frameworks like Yii2/Symfony as i would love to have things as flexible as possible. Once again this is my personal opinion.
  23. This looks awesome, well I don't think we should limited to 1 Module, different modules might have things that don't appeal to you, with that being said, This will benefit me because I am behind a Firewall at the office, so it's hard to FTP in my site.
  24. True you do have a point, Composer is just another means
  25. wow why don't you use Composer, it's really a must-use tool esp for resolve dependency in PHP world
×
×
  • Create New...