-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
Yeah, that's what I meant They look so similar.
-
Any ideas regarding the LanguageTabs issue? I've the same one, but only with the version which is online. On my local dev server everything is working. PW-Version is 2.5.3
-
I create a page from the basic-page template in the backend. Than I change to the settings tab, choose another template. After hitting save only the headerbar of the reno theme gets rendered and this error is below. If I deinstall the module I get the page rendered which asks for the database schema change. PW-Version: 2.5.3
-
I get this error if I try to change a template of a site after creation. If I disable AdminCustomFiles it works just fine. The files I use are just some css and a console.log(), so nothing which should bug the site.
-
ColorThief depends only on javasript. So you could easily use this in the frontend, for the backend you would need to build a module to make it usable in the administration.
-
javascript call to login from another server
LostKobrakai replied to Manol's topic in API & Templates
I don't know much about angular. But most api's send some sort of token with the GET or POST data, which autorizes the http-request to the backend your calling. In your case this is your module. If the right token is send you can return all the things you want it to. It could even login itself. -
@soma I added the read_by field to the conversations as well, so I can query by conversation not read as well as message not read. I also tried your idea with the or group, but it does not work. The pages as neither sorted by read / unread nor by time. // Conversationes the user is part of $selector = "template=conversation, users=$user, sort=-time"; if($input->whitelist("conversation-search")){ $q = $input->whitelist("conversation-search"); $selector .= ", (title|messages.text_singular*=$q), (users.firstname|users.lastname=$q)"; } $unread = $pages->find($selector.", read_by!=$user"); $conversations = $pages->find("(id=$unread), (".$selector.", read_by=$user), limit=10");
-
That's where I had it from. I knew the selector stuff wouldn't help me with the issue of the topic, you stated this as well, so lazy me never visited them before today.
-
I've never seen something about an @ in a selector. Are there any docs about it? Edit: Found it https://processwire.com/talk/topic/3768-processwire-dev-branch/page-9#entry58722
-
I think you're talking about repeaters. This fieldtype is in the core of processwire but by default it's disabled. You can enable it in the modules section. You can find further documentation here: http://processwire.com/api/fieldtypes/repeaters/.
-
Shouldn't something like this work? messages is a PageTable field, which includes all the children aka messages. The first one should get all conversations without the ones where all messages were read by the user. The second one should get all the conversations which don't have a message, which the user not read. $unread = $pages->find("…, users=$user, limit=10, !messages.read_by=$user"); $read = $pages->find("…, users=$user, limit=10, !messages.read_by!=$user");
-
It's not about articles. I have conversations with all the messages as children. The messages all do have a pagefield, which stores the people who have already "read" this message. In this bit I load all the conversations a user is part of and sort the conversations, which do have unread messages, first. I don't know if there would be a better way to sort the conversations this way. The only one I can imagine right know is by using two different selectors.
-
Just a quick observation: The font also doesn't render very well in this small sizes, at least for me (newest Chrome on Mac). This makes reading quite exhausting. I'll attach a screenshot.
-
I just changed the way I stitched the two PageArray's back together to this for now. $conversations = $notRead->append($conversations);
-
Thanks Soma, will do so on github. Just wasn't sure if it's a bug.
-
I think the first two can be done as a module quite easily. But a question regarding No. 4: Shouldn't one avoid to have duplicated templates? At least it sounds like you want 20 templates with the same fields.
-
I notices the wrong getTotal() value, while working with a limit. I removed it, so I can use count to check that there's indeed not a single page more in the pagearray than there should be. It was just a matter of finding out where the error was. Nobody an idea why this kind of sorting does change the total number?
-
It there a reason to no use a pagefield? If not I would consider using it. It gives you really clean api calls and you get easy scalability on top.
-
I try to build a pagination, so I know about this. But I only reorder the pages and suddenly I get another total number, which seems weird. I just removed the limit to test that there are not more entries.
-
If your areas field is a page field this should work whereas if it's a textfield with a string you need to use another operator like %= or *= .
-
I'm currently rebuilding a pagination to a custom one. Now I have an issue with $list->getTotal(). If I ommit the limit selector I count 16 entries, but getTotal() return me 17. After testing it, it seems my manual sorting is playing tricks. $conversations = $page->children($selector); var_dump(count($conversations), $conversations->getTotal()); $notRead = new PageArray(); foreach($conversations as $conversation){ //Check children (messages) for read status if(count($conversation->children("read_by!=$user"))){ $notRead->prepend($conversation); $conversations->remove($conversation); } } var_dump(count($conversations), $conversations->getTotal(), count($notRead), $notRead->getTotal()); $conversations->prepend($notRead); var_dump(count($conversations), $conversations->getTotal()); This outputs: 13, 13 11, 11, 2, 2 13, 14 Has anyone else noticesed something similar? To me it seems, like theres something wrong with the calculation.
-
I'll just add why your code does not work, as you'd expected it: If you echo a variable in php it's first forced to be converted to a string type, because objects can't be echo'd. A page-object defaults to convert to the page id. In your $pages->get($something) call theres no conversion happening like before, that's why there's nothing found. The method $pages->get() either expectes a id in form of an integer or a selector in form of a string, the page object is neither of both. echo $pages->get($supplier)->supp_check_in; // nothing happens, because there's an object provided echo $pages->get(1234)->supp_check_in; // it works, because there's an integer provided echo $pages->get((int)$supplier)->supp_check_in; // works, too, because the object is first converted to an integer
-
I see some misconceptions in your explanations lisandi. You're telling us about all those great themes from themeforest. Nobody prevents you from using those. If you want a wrapper for all those wordpress functions used in the templates – build one, release it as module – but that's not the job of the cms to do this. Want to have a Drupal theme, no problem. There are even lots of pure html/css themes out there to buy, which can easily be used. The only difference is, you need to have a little basic knowledge about programming. For someone building a custom website, this is a minimum requirement. But there's a reason, why there aren't themes there for ProcessWire already. It's because you build your structure and content like you need it to be. There's no way of saying: articles/sites do (need to) have a wysiwyg-field and a headline and some meta information, like wordpress does it. Without knowing the content of a page it's difficult to design/code themes, but you can still use themes if you're happy with what they offer. That's a great flexibility which comes at the cost, that you need to know to code the templatefiles in ProcessWire, which is quite easy compared to other cms's. I don't understand your reasoning, why ProcessWire would generete more jobs if people could use it more easily on their own. People don't hire a wordpress dev, because they can do his work on their own. It's because a buddy told them it's great, or they saw one of those webdesign articles. If someone doesn't know how to code, the usability of the backend matters. Means how easy can the person maintain the site, after it's build. That's no problem for ProcessWire. I would say it's far easier, because the interface is clean and consistent, while wordpress for example is most of the times cluttered with lots of different UI's from all those plugins. You mentioned, you would like to see a different categorisation in the backend. Just sort it that way. These are all just pages which can be moved around. You can add your own, too, if you need them. You say, there need's to be a list of modules. The problem is, if something is listed people will use it, no matter if they know how it works / what it exactly does. Most of the modules which are at a state, where they are supposed to be used by others are (or at least should be) in the official list here on the site. This comes with the benefit, that Ryan looks over those modules and they are less likely to break stuff drastically. These modules are all hosted on Github so everybody else is free to take a look. I can understand that that you think some modules aren't exactly enduser friendly. But most of the people here setup pages for their clients and nothing more needs to be done with the module. It just does it's job. Also I wouldn't mind a module which eases the ecommerce stuff, but that needs time or money to build.
-
RT @maxvoltar: "Had I asked you to be in the picture, the picture would have been a lie." https://t.co/kj70D4jMV8
-
Thought it would be an error you "randomly" get on some sites, not immediately.