This module is available on the modules section now
http://modules.proce...n-custom-pages/
Male
Posted by diogo
on Yesterday, 12:31 PM
Posted by diogo
on 22 May 2013 - 05:13 PM
I'll give Journal a shot ... VirtualBox to the rescue!
The name is "Elementary OS", "Journal" is their blog ![]()
Posted by diogo
on 22 May 2013 - 01:50 PM
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.
Posted by diogo
on 22 May 2013 - 07:20 AM
Should we leave this one here today for public shame? ![]()
Posted by diogo
on 21 May 2013 - 06:22 PM
Posted by diogo
on 21 May 2013 - 06:19 AM
With url segments (http://processwire.c...ariables/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
Posted by diogo
on 21 May 2013 - 05:59 AM
You can use ModulesManager to download/install modules already.
So, I guess the modules manager is the must module that should be installed ![]()
Posted by diogo
on 21 May 2013 - 04:34 AM
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 ![]()
Posted by diogo
on 20 May 2013 - 12:42 PM
Love it Nico! My favorite is the footer ![]()
Posted by diogo
on 20 May 2013 - 10:39 AM
I had the same once with woopra, I was seeing the stats of one guy, and he was seeing my stats. We told them, and they corrected.
Posted by diogo
on 19 May 2013 - 09:53 AM
WhyJust because it's cool.
It's very cool ![]()
Edit: working perfectly on my localhost. And it even took care of changing the htaccess file name for me!
Posted by diogo
on 19 May 2013 - 09:34 AM
book ams.i writng also
good for all in.deph and comperhansive.topkicks
for.it begnner and.master pw user
I want a hardcover copy!
Posted by diogo
on 19 May 2013 - 09:31 AM
The editor is very well done, I'm not trying to bring it down or something. Be aware that I'm talking of a very particular scenario here, where I want all the pictures from a page to go into the editor. Usually I would prefer to just use the images on the template directly from the image fields. So, in this particular scenario, it "feels stupid" to put them one by one in the editor, when it was so easy to drop them in the field.
Apeisa, I'm not only talking about the grid on that window. I talking about the editor itself, In this case I want the images to be big on the frontend, but then, I have 10 images 800px wide on the small CKEditor box, and have to put text in between them. In my case, I don't care to see how the image will look like with the text, I just need the reference of them, so a thumbnail would be enough. (again, very particular scenario).
--
EDIT: ok, this last problem was pretty easy to solve. In the CKEditor field I just had to define a custom css with this content:
img{
max-width:200px;
}
Great ![]()
Posted by diogo
on 17 May 2013 - 10:34 AM
I agree and don't agree with this. Concerning the images location, Ryan explained already why the choice of keeping the images in each page, and he made some very valid points. And if you don't think of the wysiwyg fields, this implementation is very practical. On the other side, the implementation in the wysiwyg fields is too minimalistic and could be improved in some ways. I will go a bit off topic to illustrate this last point, hope you don't mind:
Find content