-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
It works like this: 'example.com' => 'site-example', 'www.example.com' => 'site-example', 'subdomain.of.example.com' => 'site-subexample' 'whatever.com' => 'site-whatever', 'example.pt' => 'site-ptexample', 'anotherexample.com' => 'site-another',
-
It's good practice to leave the php tag unclosed in the end of the file because it's not needed at all, and even a simple space after it can cause errors.
-
Did you try the #1 option fromm this link http://processwire.com/api/modules/multi-site-support/? This is how I have all sites in my server, and it works great. There is only one "wire" folder, so upgrading is just a matter of replacing that one folder.
-
ProcessWire 2.4 compatibility for modules
diogo replied to ryan's topic in Module/Plugin Development
People might think that $db is just a short for $database. Would it make sense if the new variable would be $pdo instead? -
I defined Textadept as my default editor in the system. I wouldn't really try it if I would always have to choose it from the context menu... I like what I see very much. One thing that put me away in the beginning were the themes, but I found out that although there aren't many themes around, it's very easy to create one. So, that's what I did https://github.com/ocorreiododiogo/diogo-dark-theme
-
The find() method returns an array of pages, and you can on only check for children in a individual page. If your goal with this selector is to get only one page, use get() instead. $info = $pages->get("title=previous caption winners")->children; But, if all you want is to check if there are children, the shortest method would be: if ($pages->get("title=previous caption winners")->child->id) It gets the first child and checks for it's id edit: nik was faster
-
It's inspired on the old shop letters in Porto http://www.mdemaria.com/2009/08/17/bazar/
-
eheh, a close friend of mine designed the font on that website
-
There is "change parent" in Batcher. Look again
- 3 replies
-
- admin
- move pages
- (and 5 more)
-
Marty, this should be good for any structure: $all = $pages->find('template=image, sort=parent, sort=sort'); $prev = ($page !== $all->first()) ? $all->getPrev($page)->url : $all->last()->url; $next = ($page !== $all->last()) ? $all->getNext($page)->url : $all->first()->url;
-
Checking if page shares a parent and has same name
diogo replied to onjegolders's topic in General Support
You're right Ryan. I knew that onjegolders knows this, and just wanted to give him the idea of how to do it. But we can't forget that more people can follow these advises... -
+1 sublime text edit: I'm also trying Textadept lately and I'm liking it for now (beware sublime!), It's free open source and cross-platform http://foicica.com/textadept/
-
-
Oh no, what I have I done?!
-
How to transfer Processwire from local installation to online?
diogo replied to ashrai's topic in Getting Started
I could swear I read somewhere cases where this was needed... but ya, there's nothing like that on the config file. -
If($page == $page->parent->last()) $page->parent ->next->child->url Written on mobile. But you get an idea
-
How to transfer Processwire from local installation to online?
diogo replied to ashrai's topic in Getting Started
You might have to change the root on your config file. But that's it. -
ProcessWire 2.4 compatibility for modules
diogo replied to ryan's topic in Module/Plugin Development
Lucas, that was so off topic -
I agree, but in this case I will wait for Ryan to enter this discussion. Although he must have other things to worry about now Another thing that could be done would be change the way that the files are added in the admin templates. Right now we have this: $config->styles->prepend($config->urls->adminTemplates . "styles/main.css?v=2"); $config->styles->append($config->urls->adminTemplates . "styles/inputfields.css"); $config->styles->append($config->urls->adminTemplates . "styles/ui.css?v=2"); $config->scripts->append($config->urls->adminTemplates . "scripts/inputfields.js"); $config->scripts->append($config->urls->adminTemplates . "scripts/main.js?v=2"); But we could invert the order, and have this instead: $config->styles->prepend($config->urls->adminTemplates . "styles/ui.css?v=2"); $config->styles->prepend($config->urls->adminTemplates . "styles/inputfields.css"); $config->styles->prepend($config->urls->adminTemplates . "styles/main.css?v=2"); $config->scripts->prepend($config->urls->adminTemplates . "scripts/main.js?v=2"); $config->scripts->prepend($config->urls->adminTemplates . "scripts/inputfields.js"); // here wold be prepended jQueryUi // and here jQuery Of course like this jQuery and jQueryUi would have to be included only here, and not on a file before, but we would be sure that any script or style added with $config->styles->append() would be the last.
-
I thought of it, but this would imply changing the admin-template in all themes...
-
Problem with language-alternate fields in repeater
diogo replied to Fokke's topic in Multi-Language Support
Welcome to the Forum Fokke. The default language for the user (english) is being called, to echo the finnish version of those fields you will have to, either change the user language before $user->language = $languages->get("french"), or call the finnish fields directly echo $page->fieldname_finnish Did you see this page? http://processwire.com/api/multi-language-support/multi-language-fields/ Sorry, if I'm assuming that you are doing everything wrong with my answer, but we have to start asking for the basic problems -
Unexpected behaviour order of images in slideshow
diogo replied to pwired's topic in General Support
To debug this kind of things the best thing is to look at the markup without javascript to know if the problem is with php or js. Sometimes it's enough to just remove the slideshow class or ID. -
I confess I didn't think of this. I tried append instead of add, and it doesn't work. It makes sense since we are still appending the files before the others are also appended, because execute() comes in the admin.php on the core, and all the other files are appended in the admin template only later. From inside a Process module, I can't reach the head or the footer tags, and I didn't find the solution that you are talking in the forums... Only solution that comes to my mind is to make a new module that would load automatically and hook to page render and allow me to add more script and style tags just after the last script and style tags. But this will require some studying, and won't be today Anyone knows of a better solution?
-
Hm, I could think of a way of fixing that, but I really like that the module does this task in such a simple way, without changing too much on the system. I would also say that in this case is not such a problem to not be able too hook because these pages will be custom made and completely flexible.
-
[SOLVED] Field Data not updating after changes
diogo replied to Vineet Sawant's topic in Getting Started
Before updating the start time, it appeared on the others? Show us the specific code that echoes the start time on each template.