Can
Members-
Posts
350 -
Joined
-
Last visited
Everything posted by Can
-
Am I right that there's currently no way for closing multiple notifications with the new SystemNotifications module?
-
Alternative to creating pages for temporary data storage
Can replied to Vineet Sawant's topic in Getting Started
I implemented the SystemNotifications module on my front end, but only on the user account settings page for now to test things out..At the moment it seems to work quiet nice $notices = $user->notifications; then for example $avatarErrorMsg = $notices->error("Your error message"); $avatarErrorMsg->expires = 30; // or however you like, doesn't even need to self expire $notices->save(); // while writing this I'm not exactly sure if necessary foreach($notices as $n) { if($n->is("warning")) $messageClass = 'warning'; if($n->is("error")) $messageClass = 'error'; if($n->is("message")) $messageClass = 'success'; $content .= "<div class='alert alert-$messageClass closable'>$n->title <i class='fa fa-close'></i></div>"; } -
That's amazing! Thought about something like that couple of month ago but couldn't get my head around it.. Just to clarify, is it compatible with Wordpress? So I could mention a Wordpress blog and they could parse it and vice versa?
-
Events Fieldtype & Inputfield (How to make a table Fieldtype/Inputfield)
Can replied to ryan's topic in Modules/Plugins
And I think it depends on the complexity of your events or whatever you're building ;-) I extended the Events Fieldtype for one project to have some extra fields and colors. -
Right, haha, that's why I waited with posting this question. Just forgot about additional thought I head...anyway after trying text formatter which didn't made the trick I narrowed it down to a custom character limiting function in my template. After trying around I got it working by changing substr() to mb_substr() =) Thanks Adam!
-
Hey folks, just got an "Unable to encode array data for cache.." error from WireCache. Had an ´ (acute accent) in a page title, after changing to ' (single quote) everything worked again. I have to say, that the acute accent didn't looked good anyway, got this weird black thing^^ The only thing I tried so far, was changing line 318 of WireCache.php to $data = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); couldn't recognize any difference.. So am I better off changing those (don't know if there are more..) or what else can I do?
-
Hola amigos I just stumbled over exactly this issue, with tags not properly sorted, or better to say all sorted by default (english) language and not the one I'm currently on. Tried to disable and enable language url again and again, even created a new tag, to see if it somehow works with newer pages, but no difference. I'm on 2.6.9 and 2.6.1 both with the same issue.. :/ Am I forgetting anything? No matter how I sort them, by sort=name selector or $a->sort() method..
-
I love custom stuff, too So I'm having little custom analytics, or extended page views.. however, every public page gets automatically a statistics page created, because I thought, that when I'm saving something in the backend it could interfere with statistics being automatically saved by api. Would it work when the statistic fields life in a custom tab which is set to "open in modal" ? And even on the seperate statistics page, what happens when too many people are viewing the same page? I save the statistic fields individually by $page->save("pageviews") for example.
-
I'm currently quite confused. I set up a Page field (checkbox as inputfield) called "props" (properties) and I'm using it for additional page properties like for my little messaging system "read" for example. So the selectable pages are under /admin/custom-settings/page-properties/. First none of them were working. After comparing different page fields in backend and then with this little snippet $props = $fields->get("props"); $FieldtypePage = $modules->get('FieldtypePage'); var_dump($FieldtypePage->getSelectorInfo($props)); Then I realized that the props field for some reason only has count as subfield listed. Checking admin field settings again led me to the point that I haven't specified a template for selectable pages. After doing so it's still not working as expected. So what I'm actually trying to do is for example finding all unread pages so where props not includes "read" $unreadMsgs = $pages->find("template=message, recipient=$user, props.name!=read")->count(); which is still not working The only thing working now is props.title!=Read which is fine in this case. But I'm wondering why "props.name!=read" is not working or as you mentioned "props!=read" ? What am I missing here? EDIT: forgot to mention that it's working for other fields. I'm using author.name=$urlSegment for example..
-
Just to let you know, I noticed that the # Variations link, which Ryan introduced a short while ago is missing with CroppableImage module. I mean the link which show up in the images field list view after the name and size of the image. When clicked it shows all available variations. Or is there a reason for the link not to be present? Cheers
-
Hey Reed, actually I never finished this, so at the moment I'm tweeting manually and then copy the tweet id's for the retweet button. But I'm thinking about automating this thing again, and I learned a lot in the meantime, so maybe I get this working soon. Maybe I'm using the new hook files or a custom module. Ah, to answer your question, I used a custom module and withing the module folder is /includes/codebird.php and /includes/cacert.pm which is needed, too. I'll let you know if I get this working, when I got time
-
Hey guys Just had the need for letter grouped tags with jumplinks and got this snippet in the end // output jumplinks $out .= "<div><ul>"; foreach($tags as $t) { $letter = strtoupper(substr($t->name, 0, 1)); if($letter != strtoupper(substr($t->prev($results)->name, 0, 1))) $out .= "<li><a href='#letter_$letter'>$letter</a></li>"; } $out .= "</ul></div>"; // output tags grouped by first letter foreach($tags as $t) { $firstLetter = strtoupper(substr($t->title, 0, 1)); if($firstLetter != strtoupper(substr($t->prev($results)->name, 0, 1))) $out .= "<div><h4 id='letter_$firstLetter'>$firstLetter</h4><ul>"; $out .= "<li><a href='{$t->url}'>{$t->title}</a></li>"; if(substr($t->name, 0, 1) != substr($t->next($results)->name, 0, 1)) $out .= "</ul></div>"; } Just wanted to share, maybe it helps someone or someone got some improvement ideas EDIT: I just uploaded it to the live site, cause I really like examples myself http://www.happygaia.com/tags/ (I always wanted to showcase our page properly, maybe next time ) The jumplinks could be a little more fancy and the anchor jumping could be nicer too, the letter heading itself is hidden by the sticky menu, but I'm a little lazy right now.. EDIT: After a while I changed this to another approach. Now I'm creating an an associative array first, index is the first letter and values are all page id's, feels more solid. And now it's easier to extend it, like counting all entries for letter A and so on..
-
solved How can I keep second level menu item active on third level subpage?
Can replied to ljones's topic in General Support
nice one gebeer, thanks for sharing! didn't made it for me properly because then the homepage menu would be active too. But it pointed me in the right direction so I'm successfully using this now $item->child("id=$page->id") === $page $item would be $child in the above examples -
images inserted by editor to open in lightbox - best coding?
Can replied to Joe's topic in General Support
I know it's quite old but I think it's nice for later readers. Since PW 2.5.14 it's possible to have multiple copies of the same module. For example just copy the desired core module, in this case ProcessPageEditImageSelect, to /site/modules/ and choose in /example.com/processwire/module/ which to use. More details in the blog post Processwire core updates 2.5.14 -
Maybe it could be by choice in the field settings?
-
inserting images from other pages should be improved
Can replied to adrianmak's topic in Wishlist & Roadmap
Just put a thought on this here https://processwire.com/talk/topic/9986-image-field-ui-and-general-tidy-up/?p=96097 -
Nice thread and nice design ideas Peter! I would like to add a thought of mine to this. At least for me it would be awesome to have the cke image modal more like the link modal. In the link modal you can just choose "child page" that would be awesome for the image modal too. I have often images from child pages I wanna use.. And maybe a searchfield to find pages similar to link modal Edit: another one: when I remember right (can check later) there are 3 different positionspositions/designs for the current progress. I think: "Loading.." in the image modals title "Saving" in a green button And one more I don't exaczly know maybe it was the replaced save button? This is a little confusing, I'm always expecting it at the wrong place thinking nothing happened until I find the right one ^^ Good night
-
If I got you right you want to check all checkboxes via API? What do you mean with "only page id where the field is used"? You could have a selector like foreach($pages->find("field_to_check=") as $p) { $p->of(false); $p->field_to_check = 1; $p->save("field_to_check"); } Maybe it was field_to_check=0 for unchecked checkboxes?! Or am I getting you wrong?
-
I think it would be the easiest from what I understand you are going to do. And imho it's the most convenient and scalable way. By the way, PageTable are in fact individual pages to. But you could go with them as they show more information on the parent page, and you could make them save the table "rows" as child pages, too
-
Hola, hope it's alright to add my problem to this thread? So, I just realised couple of days ago that I'm not able anymore to change my own user roles. They just won't get saved and I'm not getting any information. Debug mode is on. It just says "Saved Page: /access/users/admin/" and that's it. I'm editing via /access/users/edit/?id=41 and after saving it adds &s=1 to the url so everything seems to be fine. All other fields work as expected, and the roles field is working for all other users, too. (I tried 3 or 4 others) Same problem on localhost and live site. I'm running 2.6 stable. I noticed this after the last update fo the first time but I don't know if it is related, probably it came up before. What else can I provide? I haven't synced those to installs for a long time now, and I would say it worked within that period (but I could be wrong) so probably it's related to one of the last updates? Hope you guys have some hints for me Saludos
-
Good that I wrote my stuff! Thanks for remembering me on that, just updated to 5.6, luckily everything still worked or at least seems to work..
-
Have 2 PW installs on the same machine, only different domains/folders One I upgraded from 2.5.29 (or so) so from dev to 2.6 shortly after it was launched Everything worked great, ah this one I updated using SystemUpdate module The second one I just updated from 2.4.0 to 2.6 and got the T_PAAMAYIM_NEKUDOTAYIM error (front- & backend) cleared everything, only switching PHP from 5.2 to 5.3 did it The first one runs perfectly fine on PHP 5.2 Just wanted to share this experience One question, is there any downside having PHP 5.3 but as cgi instead of 5.2 as apache module? Saludos
-
Not a big deal but when I click on my user name in the lower left corner in backend it opens /processwire/profile/ but stays blank Kay, just noticed that the console throws the following error TypeError: $(...).magnificPopup is not a function after disabling avatar field (FieldtypeCroppableImage) in ProcessProfile settings it's working again SOLVED: So after resaving ProcessProfile.module it worked again
-
Oh I could've edited my first post instead of a new one :/ Thanks for mentioning this Macrura. I know it can be more secure because more people can improve the code, but I really like to go my own way where possible.
-
Thanks for remembering me on this! Just forgot to do this