• Content count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About danielsl

  • Rank
    Jr. Member
  1. found work around by duplicating table email to url
  2. latest development version tryed adding url_link field (URL) unfortunately experience this error Session: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'expo_ch.field_url_link' doesn't exist trued recover db and add field again, every time same result any ideas how to create url link and add it to a repeater ui Session: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'expo_ch.field_url_link' doesn't exist SQLSTATE[42S02]: Base table or view not found SQLSTATE[42S02]: Base table or view not found
  3. same here development 56, ver created field, added it to repeater, same error 6 minutes ago 2017-03-20 04:04:27 pwadmin /pw/setup/field/save SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'expo_ch.field_url_link' (in /wire/core/Fieldtype.php line 1118) 7 minutes ago 2017-03-20 04:03:23 pwadmin /pw/setup/field/save SQLSTATE[42S02]: Base table or view not found: 1146 Table 'expo_ch.field_url_link' doesn't exist (in /wire/core/Fields.php line 758) 9 minutes ago 2017-03-20 04:01:46 pwadmin /pw/page/edit/?id=1042 SQLSTATE[42S02]: Base table or view not found: 1146 Table 'expo_ch.field_url_link' doesn't exist (in /wire/core/WireDatabasePDO.php line 454)
  4. need some help, I followed the guide except one, adapted to uikit design, i have latest development pw edition , generated google keys, But my mail form doesnt respond , nor show validation errors, doesnt matter if i chose or not google captch or if i just skip the fields tracy debuger doesnt show any errors page just update leaving all filds as they were. is it a problem of local website development or i need to install a kind of mail module? is it possible to debug it somehow? <?php namespace ProcessWire; include('_contact-controller.php') ?> <div pw-append='grid' class='uk-width-1-3@m uk-flex-first@m uk-text-center uk-text-left@m'> <div class="uk-container"> <h3>Contact Form</h3> <?php if($session->flashMessage):?> <div class="alert <?=!$session->sent && (!$v->validate() || !$resp->isSuccess()) ? 'uk-form-danger' : 'uk-form-success'?>" role="alert"> <?php echo $session->flashMessage;?> </div> <?php endif;?> <form id="contact-form" method="post"> <div class="uk-margin uk-inline <?=$v->errors('name') ? 'has-error' : ''?>"> <span class="uk-form-icon" uk-icon="icon: user"></span> <input class="uk-input" placeholder="" name="name" id="name" type="text" value="<?=$sanitizer->text($input->post->name)?>"> </div> <div class="uk-margin uk-inline <?=$v->errors('email') ? 'has-error' : ''?>"> <span class="uk-form-icon" uk-icon="icon: user"></span> <input class="uk-input" placeholder="" name="email" id="email" type="text" value="<?=$sanitizer->text($input->post->email)?>"> </div> <div class="uk-margin uk-inline <?=$v->errors('message') ? 'has-error' : ''?>"> <span class="uk-form-icon" uk-icon="icon: pencil"></span> <textarea class="uk-textarea" placeholder="" name="message" id="message"><?=$sanitizer->text($input->post->message)?></textarea> </div> <div class="form-group"> <!-- Google Recaptcha code START --> <div class="g-recaptcha" data-sitekey="<?=$googleSiteKey?>"></div> <script type="text/javascript" src="https://www.google.com/recaptcha/api.js"> </script> <!-- Google Recaptcha code END --> </div> <button class="uk-button uk-button-default" type="submit">Submit</button> </form> </div> </div> <?php //here we remove the flash-message because it is already shown above the form. $session->remove('flashMessage'); //reset 'sent' variable for future submit $session->sent = false; ?>
  5. you saved my day, work perfectly, now i have language choice dropdown in main menu, closed function ukNavbarNav(PageArray $items, $options = array()) { if(!$items->count) return ''; $defaults = array( 'dropdown' => null, // array of page paths, page IDs, or template names where dropdown is allowed (null=allow all) ); $options = _ukMergeOptions($defaults, $options); $page = $items->wire('page'); $activeItems = $page->parents("id>1")->and($page); $out = "<ul class='uk-navbar-nav'>"; $liActive = "<li class='uk-active'>"; $li = "<li>"; foreach($items as $item) { $out .= $activeItems->has($item) ? $liActive : $li; $out .= "<a href='$item->url'>$item->title</a>"; // determine whether dropdown should be used for this $item $useDropdown = false; if($options['dropdown'] === null) { $useDropdown = $item->hasChildren && $item->id > 1; } else if($item->hasChildren && is_array($options['dropdown'])) { foreach($options['dropdown'] as $s) { if($item->template->name === $s || $page->path === $s || $page->id === $s) { $useDropdown = true; break; } } } if($useDropdown) { $out .= "<div class='uk-navbar-dropdown'>"; $out .= "<ul class='uk-nav uk-navbar-dropdown-nav'>"; foreach($item->children as $child) { $out .= $activeItems->has($child) ? $liActive : $li; $out .= "<a href='$child->url'>$child->title</a></li>"; } $out .= "</ul></div>"; } $out .= "</li>"; } # $out.= '<li> <a hreflang="en" href="/" class="" aria-expanded="false">Language</a> <div class="mod-languages uk-navbar-dropdown "> <!-- dropdown gruprv --> <ul class="languages uk-nav uk-navbar-dropdown-nav" aria-hidden="true" >'; foreach(wire('languages') as $language) { if(!$page->viewable($language)) continue; // is page viewable in this language? if($language->id == wire('user')->language->id) { $out.= "<li class='$hreflang'>"; } else { $out.="<li>"; } $url = $page->localUrl($language); $hreflang = $page->getLanguageValue($language, 'name'); $out.= "<a hreflang='$hreflang' href='$url'>$language->title</a></li>"; } $out.='</ul> </div></li>'; # $out .= "</ul>"; return $out; }
  6. Look . All you describe here has nothing to do with my question. I added multilingual support to blog scheme and it works perfectly showing multilingual menu. But as I asked I need to integrate it into main menu using build in functionality. And I believe there is a really easy way for that. Secondly why should I use menu builder if I can simply fix a template with pure php. All I need is to pass $languages to function uknavbarnav somehow or decide a function in parts. No idea yet. Buy surely there must be a simple answer
  7. 1 trying to add extra pages to default _uikit.php function ukNavBarNav-> fails ...it requires 1 array 2 trying to add dropdown multilingual menu there-> fails it requires pages array and problem n1 3 adding standard php multilingual code (for menu generation) to UkNavBarNav ->fails as variable $languages is empty there SO What is the best way to navigate(menu) in Blog profile and how to add language switcher in a drop down manner?
  8. Thanks for opening my eyes:) I probably mixed code
  9. i decided to extend _uikit.php functionality with extra functions in separate file in case in future updates, in _init.php i included my _uikit_override.php call in _uikit_override.php i have include_once('./_uikit.php'); function ukEventPost(Page $page, $options = array()) { .... its still copy of ukBlogPosts ... but after that i have strange error TypeError Argument 1 passed to ProcessWire\ukEventPost() must be an instance of ProcessWire\Page, instance of ProcessWire\PageArray given, called in C:\WTServer\WWW\pw32\site\templates\home.php on line 34 search► Source file File: ...\WWW\pw32\site\templates\_uikit_override.php:84 74: * - `divider` (bool): Specify true to show a divider between root level items (default=auto). 75: * - `attr` (string): A string of additional tag attributes to add to the `<ul>` (default=''). 76: * - `fields` (array): Any additional fields you want to display for each item. 77: * @return string 78: * 79: */ 80: 81: #include(_uikit.php); 82: include_once('./_uikit.php'); 83: 84: function ukEventPost(Page $page, $options = array()) { 85: 86: $defaults = array( 87: 'summarize' => null, // Display blog post summary rather than full post? (null=auto-detect) 88: 'metaIcon' => 'info', any ideas how to properly include php files and call functions??
  10. Installed latest blog profile with _uikit.php had to setup a second blog on the same installation, faced few problems 1 i needed it without comments so this field was deleted-> crash->non destructive workaround in function ukBlogPost(Page $page, $options = array()) { if($page->comments){//prepend $n = $page->comments->count(); //col 662 }else{$n=0;};//append 2 category page changed, (each blog like setup requires its own category page) can be anything by default 'categories' added option to ukblogpost-> echo ukBlogPosts($posts,['category'=>'expo_tags']); non destractive change $defaults = array( 'summarize' => null, // Display blog post summary rather than full post? (null=auto-detect) 'metaIcon' => 'info', 'moreIcon' => 'arrow-right', 'moreText' => __('Read more'), 'categoryIcon' => 'hashtag', 'bylineText' => __('Posted by %1$s on %2$s'), 'category' => 'categories', <-- new line ); ----------------- $metaIcon = ukIcon($options['metaIcon']); $moreIcon = ukIcon($options['moreIcon']); $categoryIcon = ukIcon($options['categoryIcon']); $cat=$options['category']; <-- new line --------------------- $categories = $page->$cat->each($categoryIcon . <--categories replaced for $cat "<a class='uk-button uk-button-text' href='{url}'>{title}</a> " ); 3 Problem, Is it possible to extend ukblogPosts to display calendar , events, date event table, really need simple solution for php newbie 4 ready.php hooks??? do i need to add new ? for new blog type pages? cant understand how it affects blogpost , so what is the function of default hook in log profile?? 5 _main.php (html menu) needed to add/extend extra page -> manual dirty solution $p=$home->and($home->children); $p=$p->and($pages->get('/service/Expo-list')); #print_r($p); #and($pages->get('/Service/'))) ?> <?=ukNavbarNav($p, [ 'dropdown' => [ 'basic-page', 'categories' ] ])?> doesnt like this solution/ is there a simpler way to combine 3 arrays or just page ids for ukNavBar ->call -------- i realy like new templates functionality, great work
  11. installed that, was my mistake previous time,
  12. Checked it . Works fine. Thanks . Tracy debugger doesn't show up in my install. Latest development 3ver. Or I don't know how to init it
  13. great, thanks a lot , i'll try it tomorrow, i broke my head dumping $page array
  14. i have a page with similar repeater fields of various names, and similar output in a loop so i really don't really want to write endless foreach repeater for rendering but need to aggregate all repeater fields and then pass them via one foreach loop $repeaters=$pages->get("/advert_page/"); foreach($repeaters->fields as $repeator){ if($repeator=="title")continue; echo $repeator->summary; echo $repeator->images->first; } it simply doesnt work, so i have to manually do for each repeater $repeater=$pages->get("/advert_page/"); foreach($repeater->Media as $m) { echo "<img src='{$m->images->first()->size(120, 60)->url}'>"; echo "<p>Year built: {$m->summary} </p>"; } echo '</div><div class="uk-grid uk-grid-width-medium-1-4" data-uk-grid-margin="">"'; foreach($repeater->featured as $m) { echo "<img src='{$m->images->first()->size(120, 60)->url}'>"; echo "<p>Year built: {$m->summary} </p>";