ngrmm
Members-
Posts
441 -
Joined
-
Last visited
-
Days Won
3
Everything posted by ngrmm
-
ok thx justb3a i'll try that. could you help me with outputing the dates. i'm a php-beginner and can't output the events. your code above is written in twig, is that an engine? anyway i tried it like this: <?php $events = $modules->get('FacebookEvents')->getEvents(); echo "<ul>"; foreach($events as $event) { echo "<li>$event->name</li>"; } echo "</ul>"; ?> but i don't get any ouput from this. maybe i did something wrong while creating the facebook-app. i added the ID and SECRET into the module and the page-name. but the module doesnt add the page-ID automatically! do i have to be the owner of the facebook-page which events i want to get?
-
is there a way to get also the event-venue?
-
installation error – superuser never has logged in
ngrmm replied to ngrmm's topic in Getting Started
at first i got this error and after deleting install.php the above one Error: Class 'InputfieldSelectMultiple' not found (line 7 of /is/htdocs/wp12525122_ZO20H1QFL5/www/xxx.de/tmp/wire/modules/Inputfield/InputfieldAsmSelect/InputfieldAsmSelect.module) This error message was shown because: install.php still exists. Error has been logged. -
after the last step of the installation i got this: Error: Call to a member function execute() on null (line 55 of /is/htdocs/wp12525122_ZO20H1QFL5/www/xxx.de/_tmp/index.php) This error message was shown because: Superuser has never logged in. Error has been logged. i found this thread but the php-version isn't the problem. it's php 5.6 that the error log: [Fri Jan 13 20:46:37 2017] [-:error] [pid 20774] [client xx.xx.xx.xx] [host xxx.de] PHP Fatal error: Call to a member function execute() on null in /is/htdocs/wp12525122_ZO20H1QFL5/www/xxx.de/_tmp/index.php on line 55 any idea?
-
get all unique values from a page field in all pages …
ngrmm replied to ngrmm's topic in API & Templates
works perfect, thanks -
get all unique values from a page field in all pages …
ngrmm replied to ngrmm's topic in API & Templates
that's my solution but where can i sort the array by title? <?php $children = $page->children; $uniques = array(); foreach ($children as $child) { $sizes = $child->size; $s = $sizes; foreach($s as $g) { $uniques[$g->id] = $g->title; } } foreach ($uniques as $id => $title) { echo "<button class='filter' data-filter='.size_$title'>$title</button>"; } ?> -
i have a filter and use buttons for filtering. i want to get all selected values from a page-field (multi) in different pages (same parent). sorted by title (title of the pages) <div class="controls" id="Filters"> <h3>Size</h3> <button class="filter" data-filter=".size_page-title-1">38</button> <button class="filter" data-filter=".size_page-title-2">40</button> <button class="filter" data-filter=".size_page-title-3">42</button> <button class="filter" data-filter=".size_page-title-4">44</button> <button class="filter" data-filter=".size">all</button> </div>
-
thx flydev i was looking for a background-browser-fullscreen. i think that lightGallery does a monitor-fullscreen-mode
-
great! this worked for me. i needed <br> $text = strip_tags($article->body, '<br>');
-
i use a textarea-field with CKEditor. its filled with text which has a link. this field is in two of my templates. the first template is an article and everything is finde. the second is an index-template and textarea is placed inside a link. this causes problems. index-template looks like this <a href=""> … <?php echo $page->textarea; ?> … </a> which results in: <a href=""> <p>Lorem Ipsum <a href"">Test</a></p> </a> is there a way to output this textarea wihtout the <a> links? i don't need the link on my index-template
-
ah great, i didn't know chocolat is able to building sets/thumbsnails THX!
-
thx, it looks good but requires knowledge that i don't have. i need somethink like this: http://archive.nicinabox.com/superslides/ and thumbnail-view at start and fullscreen by click
-
is there any lightbox-script with a fullscreen-mode? or a fullscreen-slider starting with thumbnails?
-
thanks adrian, but this doesn't work with 3- oder 4-level navigations
-
thx ottogal do you know how i could get rid of prepanding the parent through all levels? i just need it on the first level (Home-Button).
-
how do i prepend home (root) to my rekursive menu this is the original code from ryan <?php function treeMenu(Page $page = null, Page $rootPage = null) { if(is_null($page)) $page = wire('page'); if(is_null($rootPage)) $rootPage = wire('pages')->get('/'); $out = "\n<ul>"; $parents = $page->parents; foreach($rootPage->children as $child) { $class = "level-" . count($child->parents); $s = ''; if($child->numChildren && $parents->has($child)) { $class .= " on_parent"; $s = str_replace("\n", "\n\t\t", treeMenu($page, $child)); } else if($child === $page) { $class .= " on_page"; if($page->numChildren) $s = str_replace("\n", "\n\t\t", treeMenu($page, $page)); } $class = " class='$class'"; $out .= "\n\t<li>\n\t\t<a$class href='{$child->url}'>{$child->title}</a>$s\n\t</li>"; } $out .= "\n</ul>"; return $out; } echo treeMenu(); ?>
-
i commented out this line and it works now: imageconvolution($imgBlur, $matrix, 16, 0);
-
i'm getting this error, but only with a certian image. all other uploads work fine. Error: Out of memory (allocated 34865152) (tried to allocate 5062401 bytes) (line 1655 of /homepages/41/d13349310/htdocs/temp/tmp/wire/core/ImageSizer.php) this is my code: <div class="thumbs"> <?php foreach($page->images as $image) { $thumb = $image->size(80, 80); $large = $image->height(700); echo "<a href='$large->url' title='$image->description'><img src='$thumb->url'></a>"; } ?> </div>
-
yes it's a single-page and it returns the id
-
this makes totally sense, but it just doesn't work. // project $class2 = $page->category->has($child->id) ? " class='on2'" : ''; i tried it this way, still no success <ul> <?php $root = $pages->get("1052"); $children = $root->children(); foreach($children as $child) { // for other pages $class = $child === $page ? " class='on'" : ''; // project if($page->template->name == 'project'){ $ci = $child->id; $pc = $page->category; if($pc == $ci) { echo "<li class='on2'><a href='{$child->url}'>{$child->title}</a></li>"; } else { echo "<li ><a href='{$child->url}'>{$child->title}</a></li>"; } } else { echo "<li $class ><a href='{$child->url}'>{$child->title}</a></li>"; } } ?> </ul>
-
for example on the category-x-page, it should produce this: <ul> <li class="on"><a>category x</a><li> <li><a>category y</a><li> <li>…<li> </ul> an it should look like this when i'm on a project-page, which has the category-x chosen in a page-field (select): <ul> <li class="on2">category x<li> <li>category y<li> <li>…<li> </ul>
-
thx but it doesn't work it outputs nothing
-
this is my page-tree –projects –– project A –– project B –– project C –categories –– x –– y every project has a page-field and the options are the children of categories. the categorie are the menu of the site. how ist possible to falg the right <li> on a project-site? this my code and i don't know how select/flag only the <li> of the current page category <ul> <?php $root = $pages->get("1052"); $children = $root->children(); foreach($children as $child) { // for the other sites $class = $child === $page ? " class='on'" : ''; // project $ci = $child->id; $pc = $page->category; $class2 = $ci === $pc ? " class='on2'" : ''; echo "<li $class $class2 ><a href='{$child->url}'>{$child->title}</a></li>"; } ?> </ul>
-
yes, everything at right place.
-
i had to comment them out because of hosteurope i installed PW 2.7.2 and PHP version is 5.6