-
Posts
4,296 -
Joined
-
Last visited
-
Days Won
79
Everything posted by diogo
-
Sorry Soma, I'm not following. Can you give an example? There is a process being executed, but the ProcessField is not there, obviously. I thought of giving instructions to add the ProcessField to templates instead of changing the admin.php file, but because that field is hidden it would make the process more difficult. You think it makes more sense to go that way instead?
-
I just updated the module on Github. I think it's very neat now edit: see first post
-
How to transfer Processwire from local installation to online?
diogo replied to ashrai's topic in Getting Started
Those are the only ones. You will also need write permissions on the modules folder if you use Soma's modules manager. -
Firebug Lite makes sense if you are used to Firefug, but to be fair, now all main browsers have very powerful developer tools. A little of topic, I was very impressed with the new docs of Chrome Developer tools about Javascript debugging https://developers.google.com/chrome-developer-tools/docs/javascript-debugging.
-
Great to know that you are having fun with the module
-
@dragan, welcome to the forum! Yes, there is a special field for this task. Have a look here http://processwire.com/videos/page-fieldtype/
-
Hosting Question: Nearlyfreespeech.net users?
diogo replied to daniel-not-dan's topic in General Support
I'm going to answer from what I remember, so It's possible that I will say something wrong again. But this host is peculiar because they accept any (legal) kind of website, and are heavily attacked by hackers/haters. Because it's a shared host, and knowing that lots's of websites will be under attack, they close all the doors, and that's why they have safe_mode as one of the main components of their environment. To give the possibility to turn off safe_mode for some users, they created the "flex" environment (as opposed to the "fast" environment), that takes other security measures that apparently have great impact on performance. You can see the difference between both here http://php53.nfshost.com/ -
Checking if page shares a parent and has same name
diogo replied to onjegolders's topic in General Support
Anyway, if you would decide to do that check, you could do it like this: if ($pages->get("parent.name=$input->post->date, name=$input->post->name")->id) // set error to 1 edit: Ryan has some important additions to this on a post bellow -
I also feel that repeaters are not the best way to go for you. Reapeaters are for information that will be needed more than once, In your case would be more than one per company. I'm guessing that you used the repeater fields to organize the information in blocks. If this is right, that would be better done with with fieldset or fieldsetTab. The first one groups visually the fields in the template, and the second, separates them in tabs (in the backend, this is not the answer to your question about tabs in the frontend). To use them, create a new fieldsetOpen field for each of the groups you have there (Applicant Details, Primary Contact, etc...), and it will automatically create also a "fieldName_END" field for each. In your template organize the fields between the opening and closing field of each group, and you will have a nicely organized edit page. Same applied for fieldsetTab, except that it creates a tab for each group instead of only grouping them visually under a name. To create the tabs --this will depend a lot on what js plugin you will use, if you will use one. I will take the jQueryUi tabs as an example--, you will need to organize the content inside the tabs divs: <div id="tabs"> <ul> <li><a href="#tabs-1">Applicant Details</a></li> <li><a href="#tabs-2">Primary Contact</a></li> <li><a href="#tabs-3">Secondary Contact</a></li> </ul> <div id="tabs-1"> --here goes content-- </div> <div id="tabs-2"> --here goes content-- </div> <div id="tabs-3"> --here goes content-- </div> </div> The frontend will ignore the groups that you created in the backend, so you will have to organize everything manually: <div id="tabs"> <ul> <li><a href="#tabs-1">tab name</a></li> <li><a href="#tabs-2">tab name</a></li> <li><a href="#tabs-3">tab name</a></li> </ul> <div id="tabs-1"> <p><?=$page->organisation_name?></p> <p><?=$page->sector?></p> </div> <div id="tabs-2"> <p><?=$page->primary_first_name?></p> <p><?=$page->primary_last_name?></p> <p><?=$page->primary_email?></p> <p><?=$page->primary_phone?></p> </div> <div id="tabs-3"> <p><?=$page->secondary_first_name?></p> <p><?=$page->secondary_last_name?></p> <p><?=$page->secondary_email?></p> <p><?=$page->secondary_phone?></p> </div> </div> edit: I changed the field names of the contact to primary_something, and secondary_something, because they are different info, and they need different names on the same page.
-
echo $event->title' '; // <-- here's the problem echo $event->title . ' '; // <-- maybe this was the intention?
-
Check if ($page->name - - - - ? ) is within a range of page names
diogo replied to pwired's topic in General Support
@teppo, better for sure. Forgot that one -
Check if ($page->name - - - - ? ) is within a range of page names
diogo replied to pwired's topic in General Support
There are some ways of doing this. I like this one: if ($pages->find("name=slideshow18|slideshow18|slideshow38|slideshow88")->has($page)) -
One way would be to link to that new url. I'm assuming that you don't want that, and want to change it dinamically with js, but in that case I don't understand why you need that "part" query string, since you could simply highlight the new variant without making a server call... or maybe you need some info from the server to get the info of that variant, but for that you could call that variant page alone. But I may be far from understanding what you want to do.
-
How to set up a multilanguage site using a single page tree
diogo replied to choppingblock's topic in Tutorials
I think it's great that you wrote the tutorial. It shows how easy it is to create a multilanguage site with PW. Maybe you could update the original post with Ryan's suggestions. -
Congratulations for all the family
-
That line is there for a very good reason, you don't want people accessing your template files directly like you just did. don't remove it. The best way to do what you want is to create a template with that contactengine.php file, and then a page with that template (lat's say you name it "contactengine"). Then you can do this: <form method="post" action="<?php echo $pages->get("/contactengine/")->url;?>">
-
The only API call you need is the reference to the field. In that case Ryan is using $story->body, because of the context, but in general you would use $page->body. A piece of advice for learning PHP. Everytime you copy snippets of text, go to the PHP manual and check for all the methods used http://php.net/manual/en/index.php
-
Wait. Why are you using fopen()? This is for opening files on the server. Or I'm very far from understanding what you want, or something is very wrong here I think this is what you're after http://processwire.com/talk/topic/22-how-to-build-a-news-page/?p=51 Edit: I'm predicting a little problem with Ryan's code that I linked to if you use it with a tinyMce field, because it doesn't take in account the html tags that the formatter will add to it. So, you will have an opening <p> but most likely, you won't have the closing </p>. I guess this is quite safe to assume, so you could echo the summary like this: echo $summary . "</p>";
-
Concerning SEO, I find the google webmasters youtube channel very interesting https://www.youtube.com/user/GoogleWebmasterHelp. There is one particular video that has a lot to do with this subject
-
I think the second version is cleaner because it doesn't need the children. But you would have to ask Ryan if the dev version is stable for production As for the first version, this is really new, I didn't test it a lot, and I probably won't keep the module with this format in the future. but if it's working well for you I don't think there will be a problem to use it in a live site. The core task of the module is actually very simple: public function ___execute() { return $this->page->child->render(); }
-
If no one links to the articles, google won't care about them at all. Focus on quality, not on quantity.
-
I didn't know this, but in CKEditor you can also paste the image. Just tried it, and worked
-
In CKEditor just add he Image button without removing the PWImage button.
-
In TinyMce the normal image behavior is being replaced by the PWImage plugin. It's not difficult to unload the it in the plugin itself, but because it's in the core, I wouldn't advise you to do that. In the CKEditor module it's very easy to do this without touching the module, if you don't mind switching to it, here is how you do it: Go to the field settings, choose CKEditor as the inputfield type, and in the INPUT tab, and inside "CKEditor Settings" go to "CKEditor toolbar" and replace "PWImage" for simply "Image", then go to "remove plugins" and remove "Image" from the list. -- Edit: If you still prefer to use tinyMce, go to the file /wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.js, and remove 'pwimage' from the InputfieldTinyMCEPlugins array in line 96. Beware that this file will be replaced in any upgrade.