Adam Kiss
Moderators-
Posts
1,303 -
Joined
-
Days Won
7
Everything posted by Adam Kiss
-
@ragnarkarlsson: with stuff like quotes, you should have no trouble doing this with another template ('client_quote') and one place to keep your children with this template. As I see it, repeatable elements is good for you when you have these big structures (like eshops with 200+ products) with 2-5 variations each – in that way, it can be handy. However, your quotes problem can be simply managed via one page holder+template+quote pages If you want to group the quotes, you can do this via another tree level (so you have 'quotes'->'category'->quote itself tree) or one text field 'group'. Or even page field to link it to other page ('related') All of this is of course true unless you have 20 projects each with two quotes... then it would be nice for you to have this, which is unfortunate.
-
I think that's one of the minor bugs with current (like pre-alpha version) user management )) P.S.: I just realized there is some karma system in place, so you can applaud to my genius... or not.
-
General process for a multi-language website
Adam Kiss replied to HammHetfield's topic in Multi-Language Support
Hi HammField, welcome to the forums. I did exactly what you are thinking about: keeping two structures, one for each language. It may seem like much more work than having one structure with multiple languages, but ultimately, it isn't. If I created larger multilanguage site with PW, I would do it the same (actually, I did it on my portfolio) but with minor addition: use API to create the second (and ultimately, any other) language. Create one side of tree for your main language, with everything in place, then create one 'tools-duplicate' page with special template, where you'll just cross-examine your 'finished language' branch and duplicate it into root – so you don't have to create it manually. Possible addition to this is to have different templates for each language's pages. I did this with my portfolio items: since I'm lazy to add the very same pictures to pages in both languages, my secondary language just takes images from primary language pages. However, when creating your way of tackling this, keep in mind, that cross-referencing pages is mostly done in one or two lines, so don't be afraid of it (I believe we had some posters here having really hard time, because they didn't realize this). It's the real power of PW – having any page on the site and/or any of it's fields just two lines away. -
I think you haven't gave yourself (or the test user rather) the logout permission. Located in roles -> 'ProcessLogout' OT: Me, personally, I don't know why it's even there – if user can log in, surely he can log out... Anyway, I suspect this to be a victim of not complete user & roles support yet.
-
Translating administration – language question for all users
Adam Kiss replied to Adam Kiss's topic in Multi-Language Support
...except the fun starts when you need to say 'you saved %i pages' – there kicks in different 'amount forms' Is there any way to bring it down somehow in finnish? OT: in slovak, we call finnish 'fínština'. How cool is that? -
I'm not really sure what might be the cause of the problem – server stuff is like black magic to me anyway – but the reason might be some server screw-up – you know, system [unix] allows you to create directories, but somehow, the server blocks PHP trying to create the directories or something.
-
Translating administration – language question for all users
Adam Kiss replied to Adam Kiss's topic in Multi-Language Support
I don't know – I don't remember giving our clients full access in the past, so I never really tried to use slovak language in my administration. Also, not many open source projects (not even commercial, though) try to use the human language – full sentences with some information for end user. Most of CMS do take the engineer way – you know, saying stuff like 'Page with ID 756 was created on 2011-07-02 12:45' instead of something like 'You just created a new page!' -
Hi all, there has been few requests as I recall for translation of administration. And since I've been always interested for these things, few language differences come to my mind it has to solve in future (just from top of my mind): different words in different contexts – english has just one word in multiple contexts – e.g. page – 'Page was created' and 'user has created a page' are using the same word 'page', some languages don't different language when counting – english has just one page and multiple pages. some languages have more option, e.g. slovak language (my 'mother tongue') has different words for one, then two to four and then for 5 and more pages So, I'm interested about hearing what other differences may come to your mind and also what languages you speak and how are they dealing with these situations. Adam
-
Actually, I smell permissions problem with those directories Something like unzipping on windows machine and transferring this to linux server could be the reason.
-
I believe that 'add another button' isn't always the best solution. On a different note, hwo would you distinguish (as in color? size?) between the two? how would you position them. In this case, those are not easy questions, since it's 50-50 in terms of which do people prefer. You might end up like github with 'comment and close' button leading to closing many questions by novice users.
-
I would solve it with something like this: function menuLevel($menuPage, $maxLevel, $currentLevel = 0, $args=''){ if (!$menuPages->numChildren()) return; $retStr = array(); $retStr[] = '<ul '.($currentLevel===0?$args:'').'>'; foreach($menuPage->children() as $p){ $retStr[] = '<li><a href="'.$p->url.'">'.$p->title.'</a>'; if ($maxLevel > $currentLevel) $retStr[] = menuLevel($p, $maxLevel, ++$currentLevel); $maxLevel = '</li>'; } $retStr[] = '</ul>'; return implode("\n",$retStr); } echo menuLevel($page->find('root'), 2, 0, 'id="navigation"'); But also, I'm weird. untested. written in browser. Edit: Antti, last page in foreach (simplest) $count = count($pagesArray); //this depends: custom pages array or just children of one page? $count = $menuRootPage->numChildren(); $i=0; foreach(...){ if (++$i === $count) ... //last element }
-
Understood! Although, to be fair, I'm not sure if default sort setting is even planned for page tree, Ryan should know better.
-
Well, if you have that much pages (3+ paginated lists), it makes sense to use page search though, doesn't it?
-
Unless you wake up without working internet connection one day! MUHAHAHA 8)
-
With Antti expresing his opinion in favor of returning to editor, that makes two of you already I believe it ends right there actually
-
sorting by admin order after getting pages by template
Adam Kiss replied to chodorowicz's topic in General Support
I'll just say that it doesn't matter what is default sorting, if you DESCRIBE ALL POSSIBLE VALUES AND WHAT IS DEFAULT VALUE P.S.: Using CAPS because it's os damn inportant to inform in docs what programmer can expect -
sorting by admin order after getting pages by template
Adam Kiss replied to chodorowicz's topic in General Support
Hi chodorowicz, welcome to the forums. I agree, 'sort=sort' should be in docs and also there should be info about what sorting is used by default (My personal guess is that it's sorted by internal ID). Also, you can use 'sort=-sort' if you want to reverse the order. -
Installing on Mac Localhost going all sorts of wrong
Adam Kiss replied to MishieMoo's topic in General Support
Hi Michelle, welcome to the forums. As for your problems – as most of CMS, this one too should be installed in root directory of domain. If you use Mac OS X SL apache, you can solve your problems by creating virtual hosts. You can do this either by hand (that does get tedious if you have more than one) or by other programs: Nice guide of setting up VHosts VirtualHostX – Very nice app (paid for 19EUR) to manage your vhosts very easily Now, if you've configured everything correctly (and it isn't very hard , you should be able to visit 'localhost/-michelle/processwire/' under whatever virtual name you gave it (e.g. portfolio.local) I personally set every domain I work on as 'ldomain-name.dev', so if I want to go to original domain, it doesn't pop-up in history as more often visited one -
Sevarf: ... https://github.com/ryancramerdesign/ProcessWire/issues#issue/12
-
If by 'reinstance' you mean calling jQuery twice, then don't worry, because you're calling it just once, only different versions. If by 'reinstance' you mean to keep two different versions of jQuery, then don't worry – you should keep front-end as fast and modern as possible and core&admin as stable as possible, so... just keep two different versions. Or use google CDN version with local admin fallback.
-
Do you mean in administration (modules) or front-end? If it's administration (modules), then wait for Ryan, if it's front-end, then use your own copy of jQuery. Or if it's general question like 'should I use jQuery form validation before or after including jQuery'... well, that one's obvious.
-
Then it's another problem with that JS code. There is a lot (okay, more than one) bugs with that pagelist JS code, so this might me another one
-
Ryan, if it helps you, the bug is located somewhere in the expanding/collapsing JS methods. Most of this happens, when you click really fast, so there is something like setting 'expanded' class (or whatever method you use) after AJAX response – or anything else, there is a little time between clicking and response time, where PW doesn't know you have asked to expand children, so makes another AJAX call, thus having two of them. (I suspect ) Edit: in case it's not obvious, the first 3 children is old HTML code from the moved child (the same three children below)
-
stillmovingdesign: Yes.
-
Hi neotoxic, I second Jimyost at thinking this might not be actually real place for 'new function', but rather reconsidering data model for your templates. If you wish, we may close this up and you may add us some new thread in 'API & templates', so some of us with (maybe) more experience with PW2 might help you adjust what you want to accomplish.