-
Posts
6,259 -
Joined
-
Last visited
-
Days Won
312
Everything posted by bernhard
-
Buying modules now, just need your kind answer for this...
bernhard replied to Socrate Taiser's topic in Modules/Plugins
i bet ryan will refund you 100% if you are not happy welcome socrates - i also ask you to keep your postings free from such hard to read formatting. looks like we found willyc's little brother -
should not be a problem... somehow like this: $tag = $pages->get("/tags/fish/"); $poststotag = $pages->find("body*=" . $tag->title); foreach($poststotag as $post) { $post->of(false); $post->tags->add($tag); // tags is the name of your pagefield $post->save(); } no working code and surely full of mistakes but i think the principle should work maybe you have to check if the post is already tagged...
-
thank you raymond, so it looks like there is no javascript/ajax magic built in like it is for example in the comments fieldtype. that would be awesome - although i have no need for either your current version or with ajax voting
-
looks very nice! like albert asked on the module page i would also be curious if this module is only thought to be used in the backend?
-
don't think you need a module for that. just edit your 404 page and paste the iframe of notfound.org (but didn't find infos on their website) https://processwire.com/talk/topic/3843-how-to-define-the-404-page/ https://processwire.com/talk/topic/10124-how-to-override-404-for-unpublished-pages/
-
-
i thought about this but didn't want to recommend it i still don't get what's wrong with changing this $items = $pages->find("template=update-location, pt_map!='', sort=title"); to that $items = $page->maptable; your selector gets all pages with template "update-location" where pt_map is not blank, so no wonder that it shows all locations from every page in your website! edit: of course "maptable" has to be changed to the name of your pagetable field
-
yes, in your example "url" would be a FIELD in your pagetable. for example: template "map" field: title field: maptable (type pagetable with items having template "maptableitems") template "maptableitems" field: title field: map (type mapmarker) field: markerurl (type text or url) then just use this settings: $map = $modules->get('MarkupGoogleMap'); $content = $map->render($page->maptable, 'map', array('markerLinkField' => 'markerurl')); ...and the marker would have no link (blank) or the link that you specify in your "markerurl" field. try it manually first. you then could set "markerurl" dynamically via hook or a seperate plugin. i think lostkobrakai made something that could fit here... please google or wait for his advice
-
hi peter, the documentation of mapmarker states: markerLinkField Page field to use for the marker link, or blank to not link (type: string; default: url). so you could define any URL in an extra URL or TEXT field in your pagetable item. you could also set this field to hidden and populate it via hook to ##parent## and then replace all occurrences of ##parent## with any url like this: i tried it with a single TEXT-field called "markerlink" and put in ##parent## manually and the marker was linked correctly to the current page parent ($page->parent->url) $map = $modules->get('MarkupGoogleMap'); $content = str_replace("##parent##", $page->parent->url, $map->render($page->maptable, 'map', array('markerLinkField' => 'markerlink'))); edit: seems you updated your post i think there are also modules that populate the value of a given field to specific values? you could also use such tools to populate the "markerlink" field automatically and you then would only have to define this field to be used via mapmarker as link: $options = array('markerLinkField' => 'your_field_with_the_url_you_want');
-
permanent archive of relational data? permalinks?
bernhard replied to bernhard's topic in General Support
hi tpr, thanks for thinking about my problem at first i also thought about saving only the html but now i think i will go lostkobrakais approach of cloning all players and then re-referencing all the page fields. that way all style updates will also affect historical data and that's good for my project it's a site for a sports club and it wants to "archive" teams and players from previous seasons being accessible via the normal website menu. unfortunately i can't start on this because there are huge other parts to develop first... -
you can also access all pagetable items like this. seems cleaner to me (pagetable-field name "maptable" and map-field name inside the pagetable is "map"). $map = $modules->get('MarkupGoogleMap'); echo $map->render($page->maptable, 'map');
-
yep, that's what i love pagetables for
-
-
permanent archive of relational data? permalinks?
bernhard replied to bernhard's topic in General Support
hi kathep, glad you found the page clone module it's not sufficient for me because it does not permanently archive referenced pages from pagefields. so if you have any pagefields be aware of that! you know what i'm talking about? ps: unfortunately i didn't find the time to do more work on this yet. i have to do other things first, but i'll definitely implement this feature then. -
you could put it into a pagetable. would that work for you?
-
thanks for clarifying
-
congratulations for your first real module - mine is still waiting one thing to this line: https://github.com/mr-fan/MarkupBrowserUpdate/blob/master/MarkupBrowserUpdate.module#L132 https://processwire.com/talk/topic/10106-api-problems-with-implementing-search/
-
hi martijn, it's definitely related to the crop-field. at least in my setup! when i remove the field everything works as expected. when i put it back into the template, the bug appears again. note that it appears only when the field is already populated with images! on first upload it seems to work well. nothing in the console!
-
hey apeisa, i found a bug when using your module with the new 2.6 version (left how it looks like with 2.5.3 which is ok) this makes it impossible to switch between grid/list view making it also impossible to delete images, so that's a serious thing you can use my test-installation from here: http://stuff.zwergo.net/cropbug.zip user admin pw admin! database is in /site/assets/backups/database/test-2.6.1.sql DB name is test page "test" has template "test" with the bug on it. your help would be greatly appreciated
-
thanks tpr, but that doesn't help me a lot... why am i seeing this list of fields under the "basics" tab and not the standard interface for adding/deleting fields?
-
hi, today i found this screen that was totally new for me after importing a template via import/export tool: is this because of this part in the export json: "childTemplates":["catalog"], ? never read about "fieldgroups" concept. any links for me to read? i don't know how i did that - i only did the import ^^ so how would i create such a template manually? thank you
-
never tried, but looks interesting after a short research (win/mac/linux): https://prepros.io/
-
me once again Notice: Undefined index: it in /var/www/html/site/modules/Multisite.module on line 68 https://github.com/somatonic/Multisite/blob/master/Multisite.module#L68 i got this error today when i switched debug mode "on". PW 2.6.2 what is the "it" get parameter or what does it stand for?
-
if you are new i would suggest to keep everything as simple as possible: so start with a single image-field and a SINGLE image to get familiar with it. note that "images" and "image" in the code above assumes that your field's name is set to those values. what errors do you get?
-
<a href="#"> <img src="<?php echo $col->images; ?>" /> </a> should be something like <a href="#"> <img src="<?php echo $col->image->url; ?>" /> </a> attention: you can set up image fields to have ONE ore MULTIPLE images in it. if you set the max number to ONE, then the example above will work. if you set it to multiple files, you would need something like this: foreach($col->images as $img) { echo '<a href="#"> <img src="' . $img->url . '" /> </a>'; } welcome to processwire and the forum happy processwiring!