Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/08/2017 in all areas

  1. Note: this functionality is now built into AdminOnSteroids. I wanted to hide the Tree dropdown menu for some roles, so I made this simple module. https://github.com/Toutouwai/RestrictTreeDropdown RestrictTreeDropdown Allows the Tree dropdown menu to be hidden for selected roles. Usage Install the RestrictTreeDropdown module. In the module config select one or more roles to hide the Tree dropdown menu from.
    5 points
  2. Hey! My pull request with an integration for PW for the Toggl Chrome button was just accepted, yay! https://github.com/toggl/toggl-button/pull/788 For those who don't know, Toggl is a really great time tracker, and they have a handy Chrome extension that integrates with web apps by adding Toggl buttons to tasks and projects. Generally, these integrations are with task manager apps and CRMs, but I thought I could develop an integration for the PW admin. Although I did it mostly for the fun of it, I think this can be useful in some cases, and definitely it's great to see PW featured on their extension and github page!. They also seem to be quite picky with these integrations, so I'm glad they accepted the pull request. Here are some images to give you a taste of it
    3 points
  3. @PWaddict, if you want to hide just the Tree menu I made a module for that: AdminOnSteroids adds some classes to the body element that can help with this: https://github.com/rolandtoth/AdminOnSteroids/wiki#extra-classes-added-to-body-tag So you can prefix your CSS rule with body.role-nonsuperuser
    2 points
  4. Some more avanced users will certainly help you. I've never used it. I've just installed it once (perhaps?) to try/test it. Just for information: And you perhaps have to give the good permission(s) for guest in the Access tab of the relevant template used by posts (and perhaps also of the template of their parent page). And/or give a permission(s) related to the blog for the guest role (in the guest role page). Sorry I'm not able to help more. NB: in the new Regular profile (module) there is also an example of a blog instance.
    2 points
  5. Okay, this is sorted out. It was the "access" issue with the "blog-post" template. I removed "view and edit" access restriction and it works. Thanks for your help @christophe
    1 point
  6. I pushed a revision 1.0.2 of the module with extended capability and more delimited from core functions (still using them if possible).
    1 point
  7. Many thanks @Robin S. I was coming at this from a different direction, and it hadn't occurred to me that link abstraction was what I was trying to achieve, but certainly it is!
    1 point
  8. You can use API to import files into your Pagefile fields. Here's the relevant bit from docs <?php // Adding new file(s) $page->files->add('/path/to/file.pdf'); $page->files->add('http://domain.com/photo.png'); $page->save('files'); I had a similar problem as yours where images uploads would get stuck. After I upgraded from v2.7 to v3.0, it went away. Also check your max POST request size limits on for PHP and your server. Inside php.ini you should see max_post_size setting, try increasing it. Check your permissions to /site/assets/ directory. Here are the recommended settings # Change the permission of ALL directories (recursively) # Replace site/assets with the name of the starting directory you want to change, and replace 755 with the permission you want to use. find site/assets -type d -exec chmod 755 {} \; # Change the permission of ALL files (recursively) # Replace site/assets/ with the name of the directory where files are located, and replace 644 with the permission you want to use. find site/assets/ -type f -exec chmod 644 {} \;
    1 point
  9. // save user default language $savedLanguage = wire("user")->language; $emailLangauge = wire("languages")->get("german"); wire("user")->language = $emailLangauge; $mail = $yourpage->render(); // restore the original language setting wire("user")->language = $savedLanguage; Not tested
    1 point
  10. It seems very simple solution, i.e. pointing multiple domain to same directory where all sites will have same templates and managing their database settings in config file. I think keeping assets folder different is a good idea if we ever want to export assets related to specific site. I will give it a try soon. Thank you @abdus and all for help and guidance.
    1 point
  11. I think most people do, but you don't have to. You can do this using includes. For instance, you could have a template file "master.php", and set this file as the "Alternate template filename" for all your templates. Then in the master file you use some logic to include the file that contains the code for each template. For instance, you could create some subfolders to divide up these included files and then tag templates (on the Advanced tab of Edit Template) with a single tag according to which subfolder their file is in. Your logic in master.php then could be something like this: $path = $page->template->name . '.php'; if($page->template->tags) $path = $page->template->tags . '/' . $path; include($path);
    1 point
  12. Regarding the Page Tree bookmarks, I found this comment in ProcessPageList.module: // support bookmarks only if already in use as bookmarks for ProcessPageList to be phased out Plus several other comments in the file to the same effect. Maybe this was announced and I missed it.
    1 point
  13. Thanks a lot for the changes, it works without a problem now Also, is it possible for you to add some hookable functions to the module so that we can add custom queries and mutations? Inside Schema::build(), query and mutation fields are defined, maybe split build() method into ___getMutations and ___getQueries, then we can modify $event->returns inside hooks to add our own fields? Something like this maybe: <?php // maybe build parameters in // /ProcessGraphQL/ProcessGraphQL.module public function ___getQueries() { // build an assc. array of FieldInterface objects return [...]; } public function ___getMutations() { // build an assc. array of FieldInterface objects return [...]; } public function executeGraphQL() { // instantiating Processor and setting the schema $schema = new Schema($this->___getQueries(), $this->___getMutations()); $processor = new Processor($schema); // ... } then inside Schema.php you would just use the provided fields. <?php class Schema extends AbstractSchema { private $queries = []; private $mutations = []; public function __construct($queries, $mutations) { // populate fields, perform checks etc } public function build(SchemaConfig $config) { $moduleConfig = Utils::moduleconfig(); $query = $config->getQuery(); $mutation = $config->getMutation(); // add other query fields $query->addFields($this->queries); $mutation->addFields($this->mutations); } } It's a proof of concept, needs better separation of concerns etc, but it should work, why wouldn't it.
    1 point
  14. This sounds to me like it's a permissions/access issue - so not so much about which browser but about the fact that you were probably logged in as superuser when you were first viewing the website, but you're a 'guest' when viewing in those other circumstances. Have you done anything out-of-the-ordinary around access, e.g. removed guest view permission for a template or a field? It looks like you have a single page frontend where you pull sections of content from child pages. Did you maybe do something to try and prevent direct access to those child pages? Just trying to work out why guest access would be limited somehow.
    1 point
  15. I think you are right and @microcipcip who created ProcessVue Profile said it well: I also was initially pulled of by the (relatively) dated design of front and backend (there are worse offenders, typo3, I look at you) but I'm SOOOOO glad I've found PW. Only get started with my first project and it just was AWESOME. wow after wow moment. Lets get the word out there.
    1 point
  16. Thanks @abdus, that works for the Page Edit bookmarks. But the Page Tree bookmarks are still MIA, maybe because the "Tree" menu item has recently been repurposed for the tree dropdown menus?
    1 point
  17. Hi @noelboss, welcome to the forums! You should have installed the necessary fields and module instead, and their install process will take care of everything. As the documentation says:
    1 point
  18. I know this is a little late and it shouldn't happen when using the built-in front-end editing, but when I use frontend forms that need some core js, like AsmSelect fields, since PW 3, I now need to do this to define "ProcessWire" in js. <script type="text/javascript"> <?php $jsConfig = $config->js(); ?> var ProcessWire = {config: <?php echo json_encode($jsConfig); ?>}; </script>
    1 point
×
×
  • Create New...