-
Posts
4,314 -
Joined
-
Last visited
-
Days Won
80
Everything posted by diogo
-
Looks good chris! Only thing that bothers me is the "go to the top" arrow. It's too present, and you don't really need it because you don't have any long page. Besides, in some screen sizes it covers other elements. I would remove it
-
and for those who use chrome https://chrome.google.com/webstore/detail/php-ninja-manual/clbhjjdhmgeibgdccjfoliooccomjcab?hl=en
-
It depends a lot of what your needs are. If you think that the content will be all translated, go for the core approach http://processwire.com/api/multi-language-support/multi-language-fields/ since soon it will have support for different urls. If your site will be very simple, and you need to have different tree content in each language, go for tree approach, since it gives you more flexibility. Edit: I'm not recommending Soma's http://modules.processwire.com/modules/language-localized-url/ because soon there will be a more natural way to do more or less the same in the core.
-
A MODX refugee: questions on features of ProcessWire
diogo replied to Peter Falkenberg Brown's topic in Getting Started
Just in case this isn't obvious, pwired means that jQuery is used in the admin. PW doesn't enforce any library on the frontend, and you're free to use whatever you want. -
Field naming, namespacing, and how we can prevent excess of fields
diogo replied to Rob's topic in API & Templates
If the repeater serves this purpose, I don't think we should be put away by it's name. The only reason I think this should be a new fieldType is because the repeater carries two unnecessary things for this purpose: the serialization numbers, and the extra visual grouping. Of course those could also be removed in case the max would be 1, but with the extra work, why not just have a different kind of field? -
You could do something very simple, even if it only pulls your twitter and some marked posts from the forum
-
Create Pages (with File-Upload Field) via API
diogo replied to MatthewSchenker's topic in API & Templates
Good eye Wanze!- 84 replies
-
- 1
-
-
- forms
- image upload
-
(and 1 more)
Tagged with:
-
Turned Google Analytics Module into Piwik Analytics Module
diogo replied to Luis's topic in Module/Plugin Development
Looking good Luis. But I have to confess that the unity dash always irritates me a bit -
confused - is PW more complicated than I need?
diogo replied to fredthered83's topic in Getting Started
Hello Fred, welcome to the forum. ProcessWire is as simple or as complicated as you want it to be, and I doubt that there is any other CMS that allows for extreme simplicity as PW does. When you enter the admin for the first time you are logged in as superuser, and that's why you see the setup and modules links. To give you an idea of how the admin would be for your client follow these steps: Go to Access->Roles and create a new role named "editor". Check the boxes "View pages", "Edit pages" and "Delete pages". Press "Publish". Go to Access->Users and create a new user. Give the user a password, and under "Roles" check the boxes "guest" and "editor". Press "save". Now logout and login with the new user credentials (tip: use incognito mode from your browser, so you don't have to logout). You will notice that the admin is completely stripped of any advanced actions. As for the projects, the Processwire way of doing this is by creating a new page for each project. Have a look at these tutorials to get a feeling of how it works: http://wiki.processwire.com/index.php/Small_Project_Walkthrough http://wiki.processwire.com/index.php/Basic_Website_Tutorial -
Git gurus - pull from core, push to private repo?
diogo replied to patzer's topic in Getting Started
You could make /site the root of you bibucket repo -
I knew I had answered to this before! It wasn't easy but I found it http://processwire.com/talk/topic/1916-another-categories-question/
-
Field naming, namespacing, and how we can prevent excess of fields
diogo replied to Rob's topic in API & Templates
Rob, this idea is not very different of your previous one of imposing a limit to just one repeater. So, I can imagine that this kind of field would work exactly like a repeater works behind the scenes (creating a repeater page under "admin" and adding the repeater pages to it) but without the need of grouping the fields inside a "field#1" label or the "+add item" button. Edit: Just like with repeaters, this wouldn't be more than a single page field type on steroids -
It's because you have $page_sent->save(); also outside the if. Yes, if you will use fields from this page later in the code sequence. If not, you don't need to.
-
How do you create the $page_sent variable? Did you confirm that it really holds the current page?
-
Hi lucky, For OR use the pipe | symbol. So, if you want pages that have one of three templates, do this: $location_cat = $pages->find('template=location_category|spot_category|another_category'); This is documented here http://processwire.com/api/selectors/. A great read
- 5 replies
-
- 2
-
-
- templates
- navigation
-
(and 1 more)
Tagged with:
-
Gebäude alles klar gedanken versunken! Tschüüüss
-
I think your best choice is the Page fieldType holding the users that have visited the page. Add onePage fieldType to the templates of the pages you need to monitor and choose the Users page as parent of selectable pages. Then use the API to start populating it. if(!$page->counter->has($user)) { $page->of(false); $page->counter = $user; $page->save(); } and to get your view count: count($page->counter)
-
Field naming, namespacing, and how we can prevent excess of fields
diogo replied to Rob's topic in API & Templates
Yeah!! At least until Ryan jumps in and kick our asses with his arguments -
Field naming, namespacing, and how we can prevent excess of fields
diogo replied to Rob's topic in API & Templates
I'm not sure if I like it, but you get a like for a great brainstorming line -
Field naming, namespacing, and how we can prevent excess of fields
diogo replied to Rob's topic in API & Templates
I thought of this many times also, and also think that in some situations a field could be used more than once in a template. But I accept the argument that the database is prepared to have only one per template and that it doesn't justify doing a big change to it only because of this. Namespacing would be overcomplicating in my opinion. Anyway, I'm with Rob here, and glad that there is this discussion again -
How about this? $array = array(); foreach($page->repeater as $r){ $array[] = <<<EOT <div> <h2>{$r->headline}</h2> <p>{$r->body}</p> </div> EOT; } foreach($page->images as $i){ $array[] = "<img src='{$i->url}'/>"; } shuffle($array); foreach($array as $a){ echo $a; } edit: the forum editor seems not to approve the heredoc sintax, and because I don't want any conflicts with it, here is the alternative way $array = array(); foreach($page->repeater as $r){ $array[] = "<div><h2>{$r->headline}</h2><p>{$r->body}</p></div>"; } foreach($page->images as $i){ $array[] = "<img src='{$i->url}'/>"; } shuffle($array); foreach($array as $a){ echo $a; }
-
Can you give a concrete example of what you are trying to achieve? What order do you want to get by mixing the arrays?
-
Ryan, this is one of those answers that should be visible outside the scope of a forum thread. I went to check how you personal blog is going, and it turns out the last post is from July 2011. How is this possible if from then on you wrote a lot of invaluable information and opinion texts on the forum??
-
Pete, you should correct echo "<h2>$artist->title</h2>"; to echo "<h2>$album>title</h2>"; Other than this, I don't have anything to add to Pete's excellent answer