-
Posts
4,314 -
Joined
-
Last visited
-
Days Won
80
Everything posted by diogo
-
Page selector getting users with specific role
diogo replied to Whistletoe's topic in Getting Started
Well said, because soon you won't like it a lot anymore. You will love it -
I'm sorry to tell you this, but I don't think you have any option here. PW requires the .htaccess or an equivalent alternative (some people are running PW on nginx) for securing some directories and for rewriting the urls. I guess you could secure the directories one by one in the control panel, but I don't see any alternative for the urls rewriting... I don't know that much about this, maybe you should wait for another answer.
-
3. You can also adapt this method http://processwire.com/talk/topic/3551-small-tip-for-pages-that-will-be-used-with-render/ $path = str_replace ($config->urls->root,'/' , $_SERVER["REQUEST_URI"]); // so it works also when pw is in a subfolder $caller = $pages->get($path)->title; just to give more options
-
hey, now my first answer doesn't make any sense
-
And you activated them on the template also?
-
This module is available on the modules section now http://modules.processwire.com/modules/process-admin-custom-pages/ mods.pw/4Y
-
Maybe you could use the .htaccess to redirect /store_item_detail.cfm to /store-item-detail, or any other page you want. Don't ask me, I don't know how to do it
-
You must be right Wanze, add() doesn't accept a key, only the item, so when you pass a number it assumes the ID, while remove() assumes that it's the key.
-
Yep, remove() also does't work with me. add() works, pop() works, shift() works and push() also works, why doesn't remove()?
-
"URL" Field type bug - doesn't allow dashes in domain
diogo replied to jacknails's topic in General Support
That explains why it worked for me -
"URL" Field type bug - doesn't allow dashes in domain
diogo replied to jacknails's topic in General Support
With me it works on 2.3... How doesn't it allow? You are getting this message? Error found - please check that it is a valid URL -
Did you try using the other array methods? $demo->setOutputFormatting(false); $demo->product_group->remove(1024); $demo->save(); or: $demo->setOutputFormatting(false); $demo->product_group->removeAll(); $demo->product_group->add(1040); $demo->save();
-
I prefer the 4th, but I understand that you have some things that force you to be with Windows. I think running an OS on a virtual box for production is not ideal, depending on your Windows needs, you could also dual boot. Have you considered that? I have http://elementaryos.org/ on my PC and, although it's still in beta, it's super fast and stable (more than Ubuntu and Fedora for sure). Maybe you can try that one Edit: For me it's a great advantage to be running the same system as I have in the server. I installed Elementary some days ago, and Had a Lamp stack running in some minutes, and installed it ad tweaked exactly as I would do in a VPS server.
-
(#$%^) Watch Fast & Roderigo Meat Boat Movie in the Nude @
diogo replied to levies28's topic in General Support
Should we leave this one here today for public shame? -
You have to enable debug mode in the config file to see it.
-
No Portugal?? I have to spend more time on the forums
-
Shouldn't it be simply foreach ($input->post as $key => $value) ?
-
With url segments (http://processwire.com/api/variables/input/ scroll to the middle of the page). Allow them on the authors page template, and on this template's file put something like this: if ($input->urlSegment1) { $username = sanitizer->name($input->urlSegment1); $userpage = $pages->get(name=$username, template=user, include=all); if ($userpage->id) { // echo the user info. these would be custom fields added to the "user" template echo "<h2>{$userpage->first_name} {$userpage->last_name}</h2>"; echo "<p>{$userpage->bio}</p>"; } } You can add any info you want to the users pages by adding fields to the "user" template (on the templates page, under "filters", enable "show system templates?") Edit: Wanze beat me again. He beats everyone lately Edit2: corrected my code to make the check for guest visitors that Wanze refered, except that I'm using $pages instead of $users to get the user page
-
PW Online Installer (download of latest PW install to server)
diogo replied to Soma's topic in Modules/Plugins
So, I guess the modules manager is the must module that should be installed -
You can add a page field to the user template and a role parent. Then you can give them access to their children pages with (all code written in the browser): if ($user->hasRole("parent") && $user->kids->has($page)) { //show the page } else { // redirect to a general page or show 404 } and to the room page like this: if ( $user->hasRole("parent") && count($user->kids->find("parent=$page")) > 0) { // <- tricky hein? here we had to check if any of the kids of this user has this page as parent //show the room page } else { // redirect to a general page or show 404 } To link to the pages from the entry page you can: // show the kids pages and room foreach($user->kids as $p) { echo "<a href={$p->url}>{$p->title}'s page</a>"; echo " and "; echo "<a href={$p->parent->url}>his room</a>"; } Doesn't help that we are talking about real children and real parents while writing PW code
-
Raul, I moved the thread to "General support". When you press return there is a new paragraph created, if you want a simple break press shift+return. The way this is visualized on the front end depends on your css. Edit: maybe you are aware of this and the problem is another. If you're not sure if your field is behaving correctly, use this to compare http://www.tinymce.com/tryit/basic.php
-
Anyone using sshfs to edit files in the server? I'm using to edit files in my server, and it's extremely practical. Is there any inconvenient? ps: the equivalent for mac would be osxfuse and for windows win-sshfs
-
Love it Nico! My favorite is the footer