-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
I'm building a image heavy site on Digital Ocean with a default Server Pilot configuration. Although the site is still not published, the team from the client is uploading content for at least 4 months and everything seems to be fine. You can for instance create a new VPS on Servint and let Server Pilot do the configuration, if all seems well, you just have to compare both configurations. Edit: strike that, Servint doesn't serve unmanaged VPSs. Maybe you can do it on Digital Ocean or Linode in that case.
-
Short answer because on mobile. Look on the docs for url segments
-
I think the main difference of PW to those two is the flexibility that the tree offers in terms of creating your own relations between pages, and how powerful the API is in returning them from any point. this: $pages->find("template=skyscraper, year<1950, floors>=10, sort=-year, sort=-floors"); and this: $items = $pages->find("template=product, stock>0, (featured_from<=today, featured_to>=today), (highlighted=1)"); and this: $items = $pages->find("template=product, company=[locations>5, locations.title%=Finland]");
-
Wow!!! Wordpress, Drupal and ProcessWire?? http://hackwithkali.net/how-to-be-a-professional-hacker-complete-guide/ Should we be worried?
-
You don't need regex. You can test simply by converting the string to uppercase and then compare it with the original string: if (strtoupper($str) === $str) EDIT: Or in Js if (string.toUpperCase() === string)
-
Open the console and see if you get some errors.
-
Hi @karnage, welcome to the forums! I don't have time to be specific now, but wanted to point you to this module from Adrian http://modules.processwire.com/modules/admin-restrict-branch/ I think it does what you want.
-
Of course, completely forgot! Obrigado Sérgio! I actually prefer to return false for this: $(".MarkupPagerNav a").on('click', function() { $("#container").load( $(this).attr("href") + " #content" ); return false; }); Besides being slightly simpler, it also prevents propagation. Not that it matters that much in this case, but it makes sense to me to use preventDefault() only in the specific cases when i want to keep the propagation working and stopPropagation() in the opposite case. Anyway, good catch! The code wouldn't work without it.
-
That would have to be done with Ajax. If you're using jQuery try something like this: $(".MarkupPagerNav a").on("click", function() { $("#container").load( $(this).attr("href") + " #content" ); }); Where the markup would be something like: <div id="container"> <div id="content"> <!--list and pagination go here--> </div> </div> I'm including the pagination on the loaded content, so you don't have to update its state manually with JS. But you can leave it out of the container and update the active link to the one you just pressed in that moment also.
-
What do you mean?
-
Will the database structure of PW 3 change until release?
diogo replied to steveooo's topic in General Support
I think @LostKabrakai doesn't mind- 8 replies
-
- 1
-
- processwire
- upgrade
-
(and 1 more)
Tagged with:
-
Will the database structure of PW 3 change until release?
diogo replied to steveooo's topic in General Support
I guess your problem with the sentence in the readme is the word should. Ryan was already explicit in saying that he believes that the devns branch is safe for new projects, even the download button in the site states that: "The newest 3.x dev version, great for testing, new projects or development." Honestly, if these aren't enough for you, maybe you should play safe and stick to the stable branch.- 8 replies
-
- 1
-
- processwire
- upgrade
-
(and 1 more)
Tagged with:
-
Like everything that you share on the web, people will always be able to download it if they really want to. There are for instance sites that download any soundcloud file for you. I think the easiest way is to use the <audio> element, and if you want to make it less easy to download, just remove the element from view and use the API to create custom commands, or use a plugin that will do that for you (ex: http://kolber.github.io/audiojs/). This will at least force them to go to the source code to know where to get the file. It really depends on the people that you will give access to, so make sure you chose them well. You can always degrade the files, either by cropping them or by reducing the sound quality, to make them less valuable and still show the music, but this might annoy the people you are trying to impress. I would tend to just be very picky with whom I would invite to listen, and be very clear about the conditions by writing it on that page. I believe that showing trust will give your client better reviews.
-
Try hostpoint.ch. i have two different clients there and I'm happy with them. The control panel is maybe the best I've worked in and can be set to english. What I like the most, is that I can have a free account from where I manage my clients accounts. They don't need to give their credentials, they simply have to create their accounts and give access to mine. There's also a free 30 days free trial period that is handy to quickly start the project without involving any payment from the client. You can also use them to try it yourself.
-
Yes, you understand correctly. The reason for this is that ProcessWire was developed to make fine tuned websites, and it doesn't have any control over the markup (with exception to modules), so it all depends on the php code that was written. For a simple example: If you have a field called "phone", and another called "fax", in this order on the backend, you would probably have something like this on the template file: <p id="phone"><?=$page->phone?></p> <p id="fax"><?=$page->fax?></p> As you can see, in that case you only have php in between the <p> tags, and the fields are being called by their names, so changing their order on the admin won't make any difference. In the same way that deleting a field won't remove the surrounding <p> tags, and will probably throw an error since the system is explicitly looking for a field that isn't there. Because of this, PW offers you tools to give this flexibility to editors, like "repeater" fields, or the pro "multiplier" and "table" fields that would allow you to change the order in the admin page, but would have a very different code in the template file: <?php foreach($page->contacts as $contact){ echo "<p id='{$contact->name}'>{$contact->value}</p>" } Of course, all this would have to be accounted for while building the site. My advice is: try to get access to the PHP files, and you will most probably understand easily how to change what you want.
-
Processwire is great and all, but not magic it won't guess what you want to do with the fields, so you have to tell it with code. You'll have to know at least some html and learn the API in order to do structural changes to your website or, in alternative, hire a developer.
-
How to make a simple visitor counter for your page in PW
diogo replied to EyeDentify's topic in General Support
Yes. it will count each page only once per session. So, if the user refreshes the page or use the back button, it will count only once. -
How to make a simple visitor counter for your page in PW
diogo replied to EyeDentify's topic in General Support
@EyeDentify, @Videokid is trying to make sure that there is only one count per visit (Your version counts pages refreshes, for instance), but I think his version also falls short because it prevents the following pages on the same session to be counted For @Videokid idea to work, you would have to check a combination of session and page, and not only the session. I don't have time to come up with it now, sorry for that, EDIT: Oh, the solution already accounts for that ($key = "visit_counter".$page->id;). I have to look better at the code before talking -
Great! You might want to move that function to a file that is called by all the others, so you have it available averywhere, like _func.php or even the head file if you prefer.
-
In a hurry, so, quick answer. Assuming that you want to limit this to echo a summary on the site (as opposed to limit the editing to only one paragraph), a quick google search returned this http://www.webdevdoor.com/php/php-get-first-paragraph-function
-
Retrofitting a running Processwire Website to Multi-Language
diogo replied to Neo's topic in General Support
If you have most of the content in the templates, and not harcoded in the template files, it's not that difficult. Roughly, this is what you should do. Install the language modules that are present at the core and convert the text and textarea fields to the correspondent multilanguage fieldtypes. Create the new languages, and edit the homepage urls to reflect this change (in the settings tab). If all goes well, in the template files you'll just need to create the language switcher. If you have some hardcoded content on the PHP you can either create fields to accomodate it and distribute by the templates where it makes sense, or you can create a dedicated page for them, or you can even take advantage of internationalisation by using the function __(), like this: echo __("Something"). This will allow you to translate it in the admin, on the languages pages. For all this, go through the language docs https://processwire.com/api/multi-language-support/ -
I'm liking Visual Studio Code a lot. It's not a IDE, though, just a code editor like Sublime or Atom.
-
There isn't any tool for importing Joomla articles to PW, but there is a tool for importing Wordpress articles to PW. Maybe you can export to WP and then to PW. I'm sure there are tools for migrating from Joomla to WP, right? https://github.com/NicoKnoll/MigratorWordpress