Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. Aah, this now seems to be a slightly different question. What you are asking is about 'structuring' - the HTML...rather than 'styling'...the CSS, or maybe both? ... How comfortable are you with HTML, CSS, PHP? The first two you definitely need to know, the third you need to know the basics. Answers to this will determine how much re-structuring you can do, especially with the 'work-horse' that is the Blog Profile. If it was just about styling, the place to start is to fire up Firebug (if in FF) or Chrome developer to examine the HTML output of the rendered Blog pages, note the names of the CSS ids and classes and the relevant lines in the CSS files where you need to make changes. Then you can change those as you wish (but you might want to do a back-up of the CSS file first). Ideally, you should be working locally first before uploading to the live site. If on the other hand you want to add things and move things around, you will need to dig into the code. Now, the Blog Profile uses some relatively advanced code and has all sorts of includes coming in from different files some of which also include other files, etc...Unless you are comfortable with PHP and ProcessWire API, I am afraid you will struggle. If you are willing to learn PHP (at least the basics) that is great and will serve you beyond ProcessWire if need be ....So, I can point you to look at main.inc and blog.inc (/site/templates/) since that is where the main magic happens, the former mainly for outputting stuff and the latter the engine room serving different things to main.inc, but it would not help you much if you were not comfortable with PHP and PW API. Having said that, I am not in any way trying to discourage you. I am just recommending that you try and get the PW basics first (if you haven't done so already)...and the road ahead will be less bumpy ....
  2. kongondo

    World Cup 2014

    I think the cup will stay in South America....yes, Messi and co will lift the cup!...OK, there, I said it!
  3. kongondo

    World Cup 2014

    Yes, Brazil didn't play well! Wow; that's a lot of people. Interesting game that one (Spain vs Netherlands) but am sorry, I think Spain will win
  4. kongondo

    World Cup 2014

    OK, ladies & gents. If you are interested in or have been 'forced' to watch football (that's soccer for y'all across the pond)....here's a thread where we can all discuss all matters World Cup 2014 in one place. Predictions, Best, Worst moments, Favourites, Anecdotes...bring it on please!
  5. Roger, Am not sure I follow? What do you mean by 'site guide companies'? Then again, am slow, it's hot outside and all I can think of is the world cup starting in a few hours
  6. Hi Roger, Welcome to ProcessWire and the forums Unless you've edited it, your 404 page is the one titled '404 Page Not Found'. Did you also update your /site/config.php/ file as suggested above?
  7. Something like this should work... $t = $templates->get('basic-page');//get the template $f = $t->fieldgroup->getField('summary', true);//get the field in context of this template $f->description = "This should be the description";//value of the field $fields->saveFieldgroupContext($f, $t->fieldgroup);//save new setting in context Edited for clarity... In this example, we are changing the description of the field 'summary' in the context of the template 'basic-page'.
  8. Hi Mosravo, Welcome to PW! That's right. You can use any HTML, whatever, you like with ProcessWire and style it as you wish. The Site Profiles you talk about are sort of something of convenience, ready made for those who wish to use them. And even then, once you've installed them you can bend them left right or centre as you wish. In other words, there are no ProcessWire themes..
  9. As a rule of thumb...anything that is submitted/sent via a form and that will be used to query your database should be sanitized and/or validated whether or not you put it there in the first place; the DOM can be manipulated... I don't know what dynamic sanitizing is....
  10. Thanks for sharing Gayan! It would be good to explicitly state in your install instructions that Site Profiles can only be installed on 'new' sites (newbie alert ). I know it is implicit here 'Please take a copy of the [latest ProcessWire]' but it could be clearer Edited to request clearer instructions...
  11. <off-topic>LoL. Guys please, I'm gonna need a bigger hat soon if this carries on </off-topic>
  12. If you want to use the values sent as.. email value use $sanitizer->email name for a ProcessWire page that you don't care if it has upper case letters use $sanitizer->name. Name is used to build your url so this will be my-Upper-Case-URL name for ProcessWire page that is more friendly $sanitizer->pageName so url will be my-lower-case-url a valid selector string use $sanitizer->selectorValue a valid string for a ProcesWire page $sanitizer->text etc Unless you are a developer (and even then this is rare) you will not need $sanitizer->fieldName or $sanitizer->selectorField. Note, you are not limited to using the above according to my examples. For your own needs, you may want a string to be cleaned to remove dashes, etc. So, you can use $sanitizer->name in that case... If the above still doesn't make sense...I'll eat my hat
  13. I have never worked in a multilingual ProcessWire environment so I hope my answer doesn't seem foolish Output strings are all translatable. See posts above; someone has worked on/produced German translations. There's maybe 1 or two texts not yet made translatable but will do a final check soon... Glad you like the module
  14. I don't know who Kokondo is but you sanitize according to the values you want. There's sanitizing for url friendly names, for texts, for emails, etc.... It's all documented here: http://processwire.com/api/variables/sanitizer/ The only thing you don't sanitize are passwords. BUT...you validate that they only contain characters you have pre-determined...Otherwise, if you sanitize passwords, you might change them and your users may not be able to log in...
  15. It depends on the type of value sent from the drop down. If it is an integer you typecast/sanitize it like so... $cleanValue = (int) $input->post->name_of_select_value_field_sent;//note: name of the dropdown input field! If it is a text you sanitize it first... $cleanValue = $sanitizer->text($input->post->name_of_select_value_field_sent);//this is the name of the input! Then you check if $cleanValue is in your array of clean values... if(in_array($cleanValue, $arrayCleanValues))// blah blah
  16. Nico In this post https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ I attempt to explain various approaches for handling categorisation....Maybe it will help...
  17. Hi Sendxt, Welcome to ProcessWire and the Forums! I am in a bit of a hurry. See solution here..https://processwire.com/talk/topic/6243-images-in-a-repeater-field/ Key thing to remember is that behind the scenes repeaters are also pages and need to be treated as such...hence you may also need to foreach (loop) through them....Normally, this would require nested foreachs...if the images are also an array.. foreach ($page->my_repeater_field as $f) //$f is the repeater....you need to loop through it if you have multiple images inside it... foreach ($f->images as $image)//do stuff....
  18. Yes..it is a very well thought-out system ...If fields were only available for a particular template, then they wouldn't be reusable. That would mean creating, e.g. a textfield for template A and a different textfield for template B, etc....a waste of resources . And yes, you can add any sorts of fields to any template as long as you create those fields first. Fields will not automatically be added to any template unless you specify the field as 'Global'
  19. Thanks for posting. I see nowhere on that whole thread any instruction to put anything in "/wire/modules/". Ryan especially wouldn't say that ....What the post says, in short, is that if you want a menu link to appear somewhere in the main Admin menu, just create a new child page of Admin. It will automatically be listed up there with 'Setup', 'Pages', etc. Of course, that link leads somewhere...e.g. a ProcessModule. In that case, the page will normally be created within your ProcessModule on install and not you doing it manually...
  20. Yes. Everything custom should go to /site/xxxx. This way, on updating ProcessWire, nothing gets overwritten (i.e. /wire/ is overwritten on updating PW). Just curious, what custom module is that that was placed in /wire/modules?
  21. Welcome to ProcessWire Jordan!
  22. Oops, you also need to show the form if nothing has been sent ...so do an || as well...or similar...Ideally, you need to show some error and the form if a wrong password was sent versus when no password was input at all..
  23. Of course, there's always the simple typo maybe? Edit: Duh to self!!! You have to use isset() to first check if a variable has been sent $pass = $input->post->awesome_password; if (isset($pass) && $pass != $page->page_password || !$pass)//....show form etc...
  24. Edit: Deleted... I think some of my explanation above is wrong; it's late, am tired! ...
  25. I had a nice tutorial somewhere about creating virtual hosts...can't find it now. I even did this some time back. It's all about editing your PC's host file (to serve your fake hosts) plus your appache httpd.conf, if I remember correctly...I use XAMMP with a customised start screen
×
×
  • Create New...