-
Posts
4,320 -
Joined
-
Last visited
-
Days Won
80
Everything posted by diogo
-
Check the name of the admin page in the database just to be sure. The id is 2.
-
From the documentation of the module https://github.com/somatonic/MarkupSimpleNavigation#markupsimplenavigation-116 $options = array( 'parent_class' => 'parent', // overwrite class name for current parent levels 'current_class' => 'current', // overwrite current class 'has_children_class' => 'has_children', // overwrite class name for entries with children Those are the options that let you modify classes, check all the other options also. They are many
-
Pronto, back to my normal avatar and time for bed
-
Ok, this is just for now. I will put the other image back in some minutes
-
Moved some posts that where polluting this one (also my fault ) http://processwire.com/talk/topic/4479-avatar-for-pwired/. Sorry for that Manaus.
-
Ei Apeisa, help me out here, I'm trying to move all these avatar messages to a new thread and don't know how... we completely polluted Manaus thread (it's done now) No, not in Lisbon
-
My parents did You erased your previous comment, but now it's too late edit: now you put your comment back there and erased what you wrote after. Makes my post seem a bit schizophrenic
-
-
Let's just wait that WillyC makes one for you
-
Martijn, you are 3 months late
-
For those working with pagination and several urlSegments. This seems to be pretty bulletproof: $currentUrl = $page->url.$input->urlSegmentsStr."/"; $pagination = $results->renderPager(array('baseUrl' => $currentUrl));
-
Welcome to PW! You need to elaborate your question a bit more so we can help you. Did you read the documentation or any of the tutorials? http://processwire.com/api/ http://processwire.com/api/tutorials/development-getting-started/
-
Hm, doesn't echo anything...
-
Echoing $input->urlSegments returns a useless "Array". Would be nice if it would return "segment1/segment2/segment3/", so we could easily build the current url like this: $page->url.$input->urlSegments. What do you guys think also of having a url property for $input that returns the current url with segments and pagination $input->url? Edit: Anyway, just for reference, this can be done with $_SERVER['REQUEST_URI']. I'm only proposing a PW way
-
Any of those methods is valid. The only thing that you are doing wrong, either for readability or performance, is getting the page lot's of times "$pages->get($taskId)". So, if I would change your first block of code it would look like this: $taskId = (int) $input->post->task[$checked_player]; // extra tip. The (int) makes sure you get an integer $myPage = $pages->get($taskId); // get the page only once if ( $myPage->id ) { // if page exists // Get the task bonuses $task = $myPage->title; $new_XP = $myPage->XP; $new_HP = $myPage->HP; $new_GC = $myPage->GC; // Do the math $player->XP = $player->XP + $new_XP; $player->HP = $player->HP + $new_HP; $player->GC = $player->GC + $new_GC; } Or, and maybe now it makes more sense: $taskId = (int) $input->post->task[$checked_player]; $myPage = $pages->get($taskId); if ( $myPage->id ) { // Get the task bonuses $task = $myPage->title; // <- do you need this here? // Do the math $player->XP = $player->XP + $myPage->XP; $player->HP = $player->HP + $myPage->HP; $player->GC = $player->GC + $myPage->GC; } Edit: I left this in the "getting started" forum because you have some PW specific issues there.
-
On this line you are overriding the array news, by assigning the individual item to it. Change one of those variables to something different. Don't forget to change all occurrences of it.
-
Bumping this thread since there are many new people since the last post.
-
Another one for our German translators http://wowa-webdesign.de/allgemein/gastartikel-processwire/
-
Hm, I guess the horizontal scrollbar appears because of the borders from the input fields. There is one way of correcting the box-model that I actually enjoy using, especially for working with percentages http://www.paulirish.com/2012/box-sizing-border-box-ftw/ /* apply a natural box layout model to all elements */ *, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } That small snippet in the top of main.css would fix the problem, and allow to use overflow:auto
-
Or overflow:auto