-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
Simple responsive documentation admin theme
diogo replied to Michael Murphy's topic in Themes and Profiles
looks great! -
CKeditor has a version for jquery that doesn't seem hard to implement. I did a very quick adaptation to the pw tinyMCE module, and got it working. Lot's of work ahead is still missing of course... the new skin look pretty nice http://ckeditor.com/...ckeditor_4_skin
-
Luis means that you could be on the right, so you have some support on your back and maybe he is right...
-
The white space thing can be solved like this .PageList .PageListItemOpen > ul.PageListActions, .PageListItem:hover > ul.PageListActions, /* <-- add this line! */ .PageListSelectHeader .PageListActions { display: inline !important; } .PageListItem{ display: inline !important; } .PageListItem:after { content:"\A"; white-space:pre; } not pretty but it works. edit: .PageListItem can go up of course, kept it separate for illustration purposes
-
look further, there are even nicer edit: and your site already looks better!
-
Using previous PW installation as template for the next one
diogo replied to recyclerobot's topic in General Support
look here http://processwire.com/talk/topic/1563-this-request-was-aborted-because-it-appears-to-be-forged/ Did you consider using the profile exporter module for this?- 9 replies
-
- install
- processwire
-
(and 1 more)
Tagged with:
-
I'm having some trouble with the repetition of the background texture, specially on the footer. There are some great patterns in this site http://subtlepatterns.com/, maybe you would consider changing it?
-
You can do this: $page->contact = preg_replace('/(\S+@\S+\.\S+)/i', "<a href='mailto:$1'>$1</a>", $page->contact);
-
Much more clever, both of you I didn't think of getting the parent name and started exploding everything... That's the problem of doing only small sites... pf Who is who?
-
I think it's a good idea, but somehow it's a bit confusing... try this: /** * When an item is open, this style ensures that the PageListActions become visible * */ .PageListItem:hover > ul.PageListActions{ display: inline !important; opacity: 0.4; } .PageList .PageListItemOpen > ul.PageListActions, .PageListSelectHeader .PageListActions { display: inline !important; opacity: 1; }
-
Not that clean, but here is your page $seg = explode("/",$repeater->url); $myPage = $pages->get(substr($seg[count($seg)-3],-4));
-
Antii, you have the page id on the URL of the repeater /pw/processwire/repeaters/for-field-98/for-page-1001/1352371370-8354-1/
-
I can add to your list portfolio site (something like http://www.secretarycms.com/)
- 8 replies
-
- best practices
- production environment
-
(and 1 more)
Tagged with:
-
I'm also scratching my head to understand the purpose of this. If all you want is to create an empty array of the same type, you can do this: $new = $page->image->makeNew();
-
Replace the content of your classTextile.php by the code from this link https://raw.github.c...lassTextile.php In PW that class is inside /site/modules/TextformatterTextile/
-
I didn't have any link, but I tried one and it's working as expected. Also email links.
-
I tested it in a local copy of this website http://www.max-cafe-bar.de/essen/, and everything seems to be working fine. All the menu tables in http://www.max-cafe-bar.de/essen/ and http://www.max-cafe-bar.de/trinken/ are built in textile.
-
Trying to implement a frontend batch deleting process for editor
diogo replied to onjegolders's topic in General Support
Ryan is right, you build the html list with the name but that information will be exposed to the user before the post submission. Therefore it can be changed, and should be considered user input. -
Already Impressed, but a Bit of Trouble...
diogo replied to MatthewSchenker's topic in Getting Started
Hi and welcome! First thing would be checking if you have mod_rewrite enabled, but if you didn't get that error during the install, it must be. Second thing would be changing the Apache directive AllowOverride from None to All http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride. The file where you have to do this depends on the operative system. -
Trying to implement a frontend batch deleting process for editor
diogo replied to onjegolders's topic in General Support
good morning You can confirm that only the checked students will be deleted by printing the array. print_r($input->post->delete); you have to adapt the code to your situation, I may have misinterpreted something. Looking at the code now, I notice that we are using $pages->get("template=students")->children(); to build the list, but $users->get($s)->delete(); to delete the page. This inconsistency came already from your code. If you want to delete users, you have to build the list by iterating through them, as I interpreted, you can do this foreach($users as $student); but it will include all users, including the superuser and guest. You will have to find some way of leaving out all users that are not students. By having a checkbox on the users template, for instance, and then calling foreach($users->find("is_student=1") as $student); -
Trying to implement a frontend batch deleting process for editor
diogo replied to onjegolders's topic in General Support
have a good night sleep and look at my code again tomorrow -
Trying to implement a frontend batch deleting process for editor
diogo replied to onjegolders's topic in General Support
First, there is something confusing me on your code. If the variable $students is defined only after submission, how can you use it for building the form? Is it working?? You are also using the variable $student above the place where you defined it. Still, I will try to help from what I understood... For multiple check boxes you can use this form: <input type="checkbox" name="group[]" value="um"> <input type="checkbox" name="group[]" value="dois"> where group will be an array holding the values "um" and "dois" So, using your code: <li> <?php echo $student->name; ?> <input type="checkbox" name="delete[]" value="<?php echo $student->name; ?>"> </li> and after submission: if($input->post->submit) { foreach ($input->post->delete as $s) { $users->get($s)->delete(); echo $s->name . " has been deleted!"; } } Putting it all together and making some improvements: if($input->post->submit) { foreach ($input->post->delete as $s) { if($users->get($s)){ $users->get($s)->delete(); echo $s->name . " has been deleted!"; }else{ echo "Ididn't find" . $s->name; } } } ?> <form action="" method="post"> <ul> <?php foreach ($pages->get("template=students")->children() as $student) { ?> <li> <?php echo $student->name; ?> <input type="checkbox" name="delete[]" value="<?php echo $student->name; ?>"> </li> <?php } ?> <input type="submit" value="Delete selected users" name="submit"> </ul> </form> written on the browser and not tested! -
de nada
-
It's certainly possible, you just have to create a page in the root for each of those, and the article as children of them home -articles (template articles) --article 1 (template article) --article 2 (template article) --article 3 (template article) --... -music (template music) --song 1 (template song) --song 2 (template song) --song 3 (template song) --... -video (template videos) --video 1 (template video) --video 2 (template video) --video 3 (template video) --... -... Then, in each template do this, adapting with the relevant info for each one foreach($page->children as $c){ echo $c->title; } for the feeds you can use the RSS Feed Generator module http://modules.proce...les/markup-rss/ and use it like this: create a page for each feed with it's own template, then do for each one $rss = $modules->get("MarkupRSS"); $rss->title = "Articles"; $rss->description = "All the articles"; $items = $pages->find("/articles/")->children; $rss->render($items); Do the same for the others. Read the module instructions for some configuration options.
-
It's also good to make sure that the input is a number $student_page->subject = $pages->get((int)$subject_id);