ngrmm
Members-
Posts
476 -
Joined
-
Last visited
-
Days Won
3
Everything posted by ngrmm
-
is there a way to setup a a redirect for all files and children-directories of a directory example: /old-dir/ /old-dir/child-a/ /old-dir/child-b/ /old-dir/child-b/test.jpg they all should be redirected to /new/ can this be achieved by just one rule? something like /old-dir/* > /new/
-
thanks everyone. i changed them manually, wasnt that much. but link abstraction is a nice feature!
-
it's like <img src="/test/site/assets/files/1060/image.jpg"> and should be <img src="/site/assets/files/1060/image.jpg">
-
i moved the whole site from a sub-dir into the root dir domain.tld/test/ -> domain.tld/ but now all inline images in ckeditor-fields have the old-urls (dmain.tld/test/….jpg) is there a way or a module to fix that?
-
i manage to get it this way. but i think there should be a better way echo "<div class='items'>"; $odd = array(); $even = array(); echo "<div class='odd'>"; foreach ($allPages as $k => $v) { if ($k % 2 == 0) { $even[] = $v; echo "<div>$v</div>"; } } echo "</div>"; echo "<div class='even'>"; foreach ($allPages as $k => $v) { if ($k % 2 !== 0) { $even[] = $v; echo "<div>$v</div>"; } } echo "</div>";
-
i have an array of pages $allPages how can i divide them in two groups of odd and even? right now i have them in one line. but i want to have them in two groups. $allPages = $xPage->children; $counter = ""; foreach ( $allPages as $item ) { $counter +=1; if($counter == 1) { echo "<div class='columns-wrapper odd'>$item</div>"; } elseif($counter == 2) { $counter = 0; echo "<div class='columns-wrapper even'>$item</div>"; } } is there a easy way in processwire to get these two arrays? $allPages_odd $allPages_even
-
i have pages with children. the children pages have date-fields i there a way to sort these pages in the pagetree by the children-fields can ListerPro do that?
-
your file is a png. maybe somewhere in the process, the image is saved as jpeg and this causes an error.
-
get all unique values from a page-field in all pages …
ngrmm replied to ngrmm's topic in API & Templates
this works $uniques = new \ProcessWire\PageArray(); foreach($p as $item) { $uniques->import($item->category); } -
$p are all the pages all $p have a page-reference-field $cat first i exclude all the pages in $p which has no value for $category (multi-field) $p = $pages->find("template='xy', category!=''"); now i want to get an array of all values stored in the $category-Field of these pages.
-
hmm … module didn't work (pw 3) but when i use the detection library and it works // Include and instantiate the class. require_once 'Mobile_Detect.php'; $detect = new Mobile_Detect; // Any mobile device (phones or tablets). if ( $detect->isMobile() ) { }
-
@SamC my option-titles are words and not numbers. i don't know if that will work.
-
the missing '}' was a incomplete copy/paste however i found another solution which works fine: $n = $article->view; $thumbs = $article->images->find("limit=$n");
-
i'm using an option-field ($page->number) and slice() fot outputting different number of thumbs in each article echo $n works fine, it outputs 1 or 2 or 3 … but when i use slice(0, $n), i'm getting the first item. did i forgot something? $articles = $pages->find("template=project, sort=-date "); foreach ($articles as $article) { $n = $article->number; //option-field 1 or 2 or 3 or 4 … $thumbs = $article->images->slice(0, $n); foreach($thumbs as $thumb) { echo "<img src='$thumb->url' >"; }
-
yes similiar. your site has events at some days. i need the opposite of that. if there is no reservation you can choose the date. that would be perfect for the contact-form! the next thing i need, is just an overview of a complete year. it hasnt to be interactive, no links at all. just a plain overview showing which days are reserved and which free. my question ist how to output a complete year and how to combine the exsiting reservated days with the output.
- 3 replies
-
- reservation
- booking
-
(and 1 more)
Tagged with:
-
the user can fill a form with two dates. when submitted, data will be saved as a page (unpublished) with these two date-fields. then admin can publish the page. is there a way just to output an overview of a year (screenshot) with all days having classes like free or reserved?
- 3 replies
-
- reservation
- booking
-
(and 1 more)
Tagged with:
-
still having problems. newly added events won't show up in frontend. i guess this has something to do with cache/tables. i have to delete it manually, is there a way the module would do that automatically?
-
hi @Can i installed the module. it's working at the back-end but doesn's show up on front-end. do i have to embed it manually in templates? PW 2.8.35
-
ah changed line:29 in FacebookEvents.module to: const FB_PAGEEVENTS_URL = '%sv%s/%s/events/?fields=%s&access_token=%s&since=%s&until=%s&limit=50';
-
it works now, but it seems that there is limit. facebook API only returns 25 events. i found this solution: https://stackoverflow.com/questions/4752967/facebook-api-only-returns-25-events-max but this is too advanced for me. i don't now how and where to set the limit to 50 or more.
-
it suddenly works now, i think the 24h were over since the last update. i'll have look at the tables next time. thx
-
me again, everything worked fine. at first the cache was set to now. then i changed that to daily and moved the website to another directory. since then module doesn't get newly added events. it seems the old data is stored somewhere an no updates are possible. i created a new app and tried it different APP-ID and had no luck. i still get data output when the APP-ID, APP-SECRET and Facebook-Name-Fields are empty !? and i don't use any other cache-modules am i doing something wrong?
-
that was it! thx, great module! there should be a „buy-me-a-beer“-button (flattr, paypal, …)!
-
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?