-
Posts
848 -
Joined
-
Last visited
-
Days Won
4
Posts posted by mr-fan
-
-
Oh no problem with delays - we have no contract it's all sparetime and fun and times are not always funny...
My condolence for you and your family.
Yes your are right the module development is a little lack of examples but some of the existing modules (from ryan and others) give very good insights on most of the things...For me i'm not a developper but i was able to create 2-3 little modules and/or adapt others...
May we could team up on this if you have some further time and motivation later this year.
Don't hesitate to write me a PM on this topic - nevertheless i like your concept of pagebased comments and would be proud to help even if i not the real PW dev you may wish/need to team up
Best regards and wishes mr-fan
- 2
-
I haven't tested the new matrix field for now.
PTE renders the selected templates/blocks for the editor. So the dev could create a simple visual blockeditor with drag and drop the blocks and prerender them like it looks on frontend or in a other way that fits in the backend like teammembers, slideimages and so on.
Some things to mention:
- Care for the used templates to render in SEO things - access the single parts are possible if you don't handle this (for example you have all PTE elements under a hidden parent the elements are accessable on frontend, too)
- The CSS for prerendering is sometimes a little tricky since it could be that it crashes with the admin styles (only some special classes and maybe fontsizes and so on)
you could use .renderedLayout Class on such elements in your special CSS file for PTE.
I'm running PTE for pretty much every repeating element that is more complex like contentblocks, sliderimages with text and settings, teammembers, grouping documents and so on...all things that elements in summary are under a rage from 10 to maximum 40. If i need more elements like events or something i'll stick to pages.
best regards mr-fan
- 4
-
Some more examples for content blocks:
https://processwire.com/talk/topic/10394-content-block-builder-in-processwire/#entry98527
arjen beat me....but my linked post is with descriptions
best regards mr-fan
example from a pagetableextended version for the admin UI and with templates as partials that rendered on the frontend side.
- 4
-
the front-end of my Market Tool .
Market Tool??
-
Pseudocode from my Phone...
If page->template = widget
Perfom a 404 error
Have a search with Google on the forum About 404 errors and hiding Pages in Frontend...
Regards mr-fan
- 1
-
Error messages - steps - output....something more than it don't work would be helpfull.
I always use CKE with custom format and style elements - i use custom css for look and feel and custom js for the setup of the items ...
regards mr-fan
-
straight on: https://processwire.com/talk/topic/9691-social-login/
(but actually not active supported from the dev - see last post there)
regards mr-fan
- 1
-
It's my nature i like all that works with any kind of pages....basicly i love pages ...
I would be glad to test it!
- 2
-
Pleas use the <> Code Button in your Forumeditor since i get ophthalmic cancer while reading...
regarding the user image thing you could take a read there:
https://processwire.com/talk/topic/10662-display-user-image-error-on-frontpage/
and there
https://processwire.com/talk/topic/9779-userimage-and-resize-doesnt-work-on-frontend-with-api/
regards mr-fan
- 1
-
Imagefield for gravatar image to capture:
https://de.gravatar.com/site/implement/images/php/
great project! Thumbs up
regards mr-fan
- 1
-
Hola qué tal
You could simple run this textformatter on the textarea that replacw html strings like & and < and > and " get replaced with HTML-safe equivalents.
You have smilysupport and much more options to go...
https://processwire.com/talk/topic/1542-module-bbcode-text-formatter/
Best regards mr-fan
- 1
-
You habe read my first sentence? And looked at the small module¿
-
Batch upload images on folders....a basic script is there...i used on a installation it works...not fancy but it works.
https://github.com/mr-fan/AutoImagePages
for me i used the term "album" for your "folder" type of page....
Pro tipp: just wait for 'Media Manager' ...could save us a few brain cells, huge folders and a couple of monkeys at the zoo will be the merrier...
...best regards mr-fan
-
@gmclelland
URL segments are teh way to go like Macruras example shows you have complete control to add routing to the existing event page.
best general information about URL segments for me is here:
https://processwire.com/docs/tutorials/how-to-use-url-segments/
URL segments are really great - i use them very often, too.
regards mr-fan
-
Hi Kiwi Chris welcome to the forums,
it's a kind of good that you didn't find this post,
https://processwire.com/talk/topic/59-module-want-form-builder/page-6#entry72394
where a honeypot and a emty question field is implemented, so you had to take your first post now and be a part of the community.
A OS project lives from comparing and exchanging so every question and every answer is helpful for you and others...
I hope this helps you out and your tiredness is gone away.
Have fun with PW - regards mr-fan
-
Hi tom.
bad news are here: (files&images are not supported)
https://processwire.com/talk/topic/9841-field-dependency-on-image-field/#entry94527
but the good news are there: (go a little indirection)
https://processwire.com/talk/topic/9841-field-dependency-on-image-field/#entry94530
hope this helps regads mr-fan
- 4
-
My setup:
->every event is a page
->events are listed only in a overview page
->i change the name of the event pages ot something like my-great-event-title-2016-02-04-id.ics that the page template itself works as a ics file
I've this in my event.php:
<?php //set correct content-type-header header('Content-type: text/calendar; charset=utf-8'); header('Content-Disposition: inline; filename='.$page->name.''); //get the data for the ical file $homepage = $pages->get('/'); $event_desc = stripslashes(strip_tags($page->event_text)); // get the startdate $dtstart_date = $page->getUnformatted("event_start_date"); $dtstart_time = $page->event_start_time; $tsstart = strtotime($dtstart_time); // get the enddate $dtend_date = $page->getUnformatted("event_end_date"); $dtend_time = $page->event_end_time; $tsend = strtotime($dtend_time); //set the repetition_type to the recur option value $event_repetition_type = $page->event_recur; //set the output for rrule in ical file $rrule = ''; switch ($event_repetition_type) { case '2': $rrule = 'RRULE:FREQ=WEEKLY;COUNT=5;'; break; case "3": $rrule = 'RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=5;;'; break; case '4': $rrule = 'RRULE:FREQ=WEEKLY;INTERVAL=3;COUNT=5;;'; break; case '5': $rrule = 'RRULE:FREQ=MONTHLY;COUNT=5;;'; break; case '6': $rrule = 'RRULE:FREQ=YEARLY;COUNT=5;'; break; default: $rrule = ''; } //build the .ics data $ical_data = 'BEGIN:VCALENDAR'; $ical_data .= "\r\n"; $ical_data .= 'VERSION:2.0'; $ical_data .= 'PRODID:-//'.$homepage->title.'//NONSGML ProcessWire//DE'; $ical_data .= "\r\n"; $ical_data .= 'CALSCALE:GREGORIAN'; $ical_data .= "\r\n"; $ical_data .= 'METHOD:PUBLISH'; $ical_data .= "\r\n"; $ical_data .= 'BEGIN:VEVENT'; $ical_data .= "\r\n"; $ical_data .= 'SUMMARY:'.$page->title; $ical_data .= "\r\n"; $ical_data .= 'UID:' . md5(uniqid(mt_rand(), true)) . '@'.$config->httpHost; $ical_data .= "\r\n"; $ical_data .= 'CLASS:PUBLIC'; $ical_data .= "\r\n"; $ical_data .= 'STATUS:CONFIRMED'; $ical_data .= "\r\n"; if ($rrule) { $ical_data .= $rrule; $ical_data .= "\r\n"; } $ical_data .= 'DTSTART:'.date('Ymd', $dtstart_date).'T'.date("His", $tsend); $ical_data .= "\r\n"; $ical_data .= 'DTEND:'.date('Ymd', $dtend_date).'T'.date("His", $tsstart); $ical_data .= "\r\n"; $ical_data .= 'DTSTAMP:'.date('Ymd').'T'.date('His'); $ical_data .= "\r\n"; $ical_data .= 'CATEGORIES:Landwirtschaft,Maschinenring'; $ical_data .= "\r\n"; $ical_data .= 'LOCATION:'.$page->location; $ical_data .= "\r\n"; $ical_data .= 'URL:'.$page->httpUrl; $ical_data .= "\r\n"; $ical_data .= 'END:VEVENT'; $ical_data .= "\r\n"; $ical_data .= 'END:VCALENDAR'; //output echo $ical_data;
...not the smartest code - could be refactored and opitmized - but it is working for an "save to outlook" link...
additional i've a "save in your google calendar" link that works with the google calendar API:
//output Ical Outlook link echo '<a href="'.$e->url.'"><span class="fa fa-windows" aria-hidden="true"></span> Outlook iCal Link</a><br>'; //output Google Cal link echo '<a target="_blank" href="https://www.google.com/calendar/event?action=TEMPLATE&text=' .$e->title. '&dates=' .date('Ymd', $e_start).'T'.date("His", $tsstart).'/'.date('Ymd', $e_end).'T'.date("His", $tsend). '&location=' .$e->event_location->title. '&details=' .$e_text_decode. '&trp=true"><span class="fa fa-google" aria-hidden="true"></span> Google Calendar Link</a>';
maybe not the best but useful examples...
best regards mr-fan
- 7
-
-
http://php.net/manual/en/function.strtoupper.php
Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted.
- 3
-
In a former CMS there was a very practical "private" state - this means that this kind of pages/content could only be accessable if a user was logged in - but they where in the menu/lists - and you can combine both states hidden + private...
-
What works even great is a simple SQL dump and the use of the CSV Import module:
https://processwire.com/talk/topic/383-module-import-pages-from-csv-file/
- 2
-
I can confirm the same setup is very easy to count clicks + views...i need that for a project. Working good so far.
Only difference is that i simple count clicks and views in a integer field without additional information - so it is "data economical" and i've no problem with saved IP's and so on...
For manging the banner i use a PageTableExtended Field:
I've a general settings about the amounth of ad slots on that page - and a flag option on every single page where a user can set ads to off for a single page.
/** * Adsystem show Ads in several templates * * @var $limit (Int) set the limit of displayed ads ->look at anzeige_anzahl /settings/werbeanzeigen/ * @var $headline (string)set the headline of the ad list */ function renderAdsystem($headline = 'Anzeigenpartner') { //get all ad pages on basic setting - unpublished pages are not listed.... $limit = wire('pages')->get('1056')->anzeige_anzahl; //build add output $anzeigen = wire('pages')->find("template=part_ad, limit={$limit}, sort=random"); //render ads and collect them in $all_ads $all_ads = '<h4 class="subtitle">'.$headline.'<h4>'; foreach ($anzeigen as $anzeige) { $anzeige->of(false); $anzeige->anzeige_views += 1; $anzeige->save(array("quiet" => true, "uncacheAll" => false)); $anzeige->of(true); //get the right imagesize $anzeige_bild = $anzeige->anzeige_bild->size(260,120); //build ad link $all_ads .= '<a href="'.$anzeige->url.'" alt="'.$anzeige->title.'"><img class="anzeigen" src="'.$anzeige_bild->url.'" alt="'.$anzeige->title.'"></a>'; } //check if adds are off if ($limit == 0) { $out = ''; } else { $out = $all_ads; } return $out; }
All is a page - so the adlink is a page for shure - and for pages we can count clicks == pageviews + redirect and views for every rendering that pageitem somewhere.
Just as an addition to the great example from BitPoet!
Thanks for that - so i'm tranquilised to find a way that a professional find, too - so it couldn't be that wrong
Best regards mr-fan
- 6
-
Ok i tried some different setting, but without luck for the function - but i studied the ProcessPageSearch and found:
// non superuser doesn't get any admin pages in their results $s .= ", has_parent!=$adminRootPage";
And now come one of PW greatest things - without fear i switched the parent (for the contentblock root) from my settings page to admin page...with kinda a 300 pages there....switched parent -> all works, editors don't get any single PageTable Pages -> all good!
Best regards mr-fan
- 2
-
Great - thank you very much!
The query and if statements are never a real problem since i like to try out how it works and dig into - but sometimes i don't find the right hook or methode that i have to jump on (ProcessPageSearch::executeFor).
Thank you for the hint - i will provide a complete snippet if it works.
(Just some little offtopic - i place this kind of hooks until now in my admin.php - i don't get the whole difference between ready.php and admin.php...it's not really documentated where i should run/setup different little hooks/tasks better)
- 1
what template permission should I set for non-content pages ?
in General Support
Posted
URL segements are great you could create a own little routing with the different segements to your scripts (login, logout, register...)
But if you go the template way with a Adminbranch for example /app/ and subpages like /app/login/ you could take a look at this module from adrian:
https://processwire.com/talk/topic/11499-admin-restrict-branch/
regards mr-fan