Jump to content

tooth-paste

Members
  • Posts

    134
  • Joined

  • Last visited

Everything posted by tooth-paste

  1. After updating and move my site to a new server, my tree, modules and other admin pages are empty. Debug is on but doesn't show any errors. The site is working fine. *After reinstall new version the system worked again.
  2. I would like a logout button on the front-end. I found this thread, but can not get it to work. This is my button: <a href="/admin/login/logout">Uitloggen</a> /site/ready.php wire()->addHookBefore("ProcessLogin::executeLogout", null, "setRedirect"); function setRedirect(HookEvent $event) { $event->object->setLogoutURL(wire('pages')->get('/')->httpUrl); } In the admin I can not find a page on '/admin/login/logout'.
  3. I found this but these are there own profile. And the fields can not be found in these settings. These are the fields I want to get rid off.
  4. I created a user who can add members. Is it possible to hide the field 'Admin field', 'Images' and 'Biography' on a profile page in the admin?
  5. Hi, How can I combine these two scripts to add pagination and show 10 items max? $items = $page->portal_bestanden; foreach ($items as $item) { $name = str_replace("_", " ", $item->name); echo '<div class="row" style="padding:7px 0 5px 0"> <div class="col-md-6"> <a href="'. $item->url .'">'. $name .'</a><br /> </div> <div class="col-md-2"> '. $item->filesizeStr .'<br /> </div> <div class="col-md-4"> '. $item->description .'<br /> </div> </div> <div class="row"> <div class="col-md-12 lijn"> <div class="lijn"></div> </div> </div>'; } and $pagination = $items->renderPager(array( 'nextItemLabel' => "Volgende", 'previousItemLabel' => "Vorige" )); echo $pagination;
  6. Hi, I want to show 'All documents' from different pages. My tree is like this: -Documents --Docs A (template=portal-files, field=portal_bestanden) --Docs B (template=portal-files, field=portal_bestanden) --Docs C (template=portal-files, field=portal_bestanden) On every page (Docs A for instance), different files are uploaded This is my code. The output are only the files from the first page. $items = $pages->get("template=portal-files")->portal_bestanden; foreach ($items as $item) { $name = str_replace("_", " ", $item->name); echo '<div class="row" style="padding:7px 0 5px 0"> <div class="col-md-6"> <a href="'. $item->url .'">'. $name .'</a><br /> </div> <div class="col-md-2"> '. $item->filesizeStr .'<br /> </div> <div class="col-md-4"> '. $item->description .'<br /> </div> </div> <div class="row"> <div class="col-md-12 lijn"> <div class="lijn"></div> </div> </div>'; }
  7. Help, I'am lost here! Goal: show all movies from different children. Tree: -Movies --Comedy (this page contains field with movies ) --SciFi (this page contains field with movies ) --Thiller (this page contains field with movies ) $items = $pages->get("/portal/movies/")->children; foreach ($items as $item) { $name = str_replace("_", " ", $item->name); echo '<div class="row" style="padding:7px 0 5px 0"> <div class="col-md-6"> <a href="'. $item->url .'">'. $name .'</a><br /> </div> <div class="col-md-2"> '. $item->filesizeStr .'<br /> </div> <div class="col-md-4"> '. $item->description .'<br /> </div> </div> <div class="row"> <div class="col-md-12 lijn"> <div class="lijn"></div> </div> </div>'; }
  8. Do you mean like this? It does not work. $files = $pages->get("/portal/")->portal_file; $name = str_replace("_", "", $file->name); foreach ($files as $file) { echo '<div class="row"> <div class="col-md-12"> <a href="'. $file->url .'">'. $name .'</a><br /> </div> </div>'; }
  9. I'am using the file field type. To output the name I use $file->name. The problem is when I upload a file with a no breaking space, an underscore is added. Name of the file.pdf Becomes Name_of_the_file.pdf How can I remove the underscore?
  10. I'am having two issues on which I could use some tips. I'am creating a Portal with pages only accessible by specific users. 1. Best practice for making a simple login page that, after login, redirects to hidden pages. 2. Supersimple way, for my client, to add new members.
  11. The problem for not showing the menu was in the "Title" field.
  12. Problem: When I'am logged in the main menu on my front end is visible. When I'am logged out my main menu is hidden. On all the templates manage view is normal except for home. When I try to change the template "home" on my page home, I get the following message: Can’t save page 1: /: Selected homepage template cannot be used because it does not define access. When I go to the "home" template en to tab "Acces" the Manage view is on "Yes". When I try to change it to "No", I get the following message: Template 'home' is used by the homepage and thus must manage access
  13. Great website, good job. I was wondering where on the site you are using the field "PagefieldPairs"?
  14. Thanks for the tip! I changed my code.
  15. @BFD Calender: It works after I left out the "(" and ")". Thx!
  16. The output I get is an ID instead of a selected item. My page reference is located in my tree like this: Momenten (page reference) -Maandag -Dinsdag -Woensdag etc. This is my code. The field "dag" is the page reference but outputs ID's: $items = $page->children("sort=datum"); foreach ($items as $item) { echo ' <div class="col-md-12"> <audio controls preload="none"> <source src="' . $item->mp3->url .'" type="audio/mpeg"> <p>Audio is niet hoorbaar, HTML5 audio wordt door uw browser waarschijnlijk niet ondersteund.</p> </audio> </div> <div class="col-md-12"> <p><b>'. $item->predikant .'</b> op <b/>'. $item->datum .'</b> ('. $item->dag .')</p> </div>'; }
  17. Thank you for the module. I'am trying to get it to work. Could you please check these settings? In Header: <?php foreach($config->styles as $style) echo "<link rel='stylesheet' type='text/css' href='{$style}' />\n"; ?> Before closing body tag: <?php foreach($config->scripts as $script) echo "<script type='text/javascript' src='{$script}'></script>\n"; ?> I created a _init.php located in 'templates' <?php include_once("./_func.php"); // include our shared functions $sm2 = $modules->get('TextformatterSoundmanager'); In my config.php I added $config->prependTemplateFile = '_init.php'; Files field added to template mp3 In my template file I added: <?php $options = [ 'type' => 'bar-ui', 'skin' => 'gradient-fat', //'tag' => 'audio1', // tag is not needed when using the API //'bar-ui' => 'playlist-open' //all of the classes to apply to the bar ui. ]; foreach($page->audio as $track) { $content .= $sm2->player($track, $options); } ?>
×
×
  • Create New...