Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/05/2012 in all areas

  1. I've been suggesting to have a better click through functionality a while ago (http://processwire.c...-functionality/) Now seems a proper time to bring this up again, so my suggestion is to have a direct link to the default properties of a fieldtype in the modal window of the context-based settings.
    2 points
  2. I was thinking it would be good if it was something people could contribute to fairly easily. I'm sure that a lot of ProcessWire users here have accomplished a lot of really cool things inside of their templates using the API, and if there were a central place that they could then submit those for the benefit of others, that would save people having to re-invent the wheel or ask on the forums. Which leaves more time for Ryan and others to work on the core and various modules Some kind of basic gatekeeping/moderation would probably be necessary to ensure a minimum quality standard for the scripts.
    2 points
  3. (Added by Soma) Note that this module is deprecated. The newer and more maintained version is found here: https://github.com/somatonic/Multisite/ You can get the current dev version here https://github.com/somatonic/Multisite/tree/dev (Original Post) Just pushed simple multisite module to github: https://github.com/a...ultisite.module What this module does? It allows you to run multiple sites with different domains run from single install, using same database. While you can easily do "subsites" like www.domain.com/campaign/, this allows you to turn that into www.campaign.com. This is nice stuff, when you have multiple simple sites, that all belong to same organisation and same people maintain. How to use it? Just create page with name like www.campaigndomain.com under your homepage, then edit this module through modules menu and add same domain there. If your domain resolves to same place where your main domain, it should just work. Please notice that if you have editing rights, it allows you to browse the site from www.olddomain.com/www.campaigndomain.com/, but users with no editing rights are redirected to www.campaigndomain.com (this is because session cookie is otherwise lost). Any problems? Not any real problems, at least yet known. Of course think twice when deciding should the site have own install instead of this. There are few benefits, like getting data from other sites, one admin view for all sites etc... but it can easily get out of the hands: number of templates, fields etc.. It is harder to maintain for sure. Isn't there multisite support in core? Yes, kind of. It is very different from this. It allows you to run multiple pw-installations with shared core files (/wire/ folder). This is totally different: this is single pw-installation which has multiple sites running from different domains. This is basically just a wrapper with one config field for this little snippet Ryan posted here: http://processwire.c...ndpost__p__5578 (so most of the credit goes to Mr. Cramer here). What it also does is that it manipulates $page->path / url properties to have right subdomain value.
    1 point
  4. This is my first post so, Hello everyone. Ryan, I want to congratulate a great CMS. I attach my translation for the Polish language. The translation is fairly complete, but it requires some adjustments. Hidden deeper setting are not yet translated. And also the Polish translation for TinyMCE. TinyMCE will not work without it. https://github.com/PawelGIX/ProcessWire-Language-Pack-Polish--pl-PL- EDIT: I added a link to github. ProcessWire-Language-Polish.zip tinymce_language_Polish.zip
    1 point
  5. I found (after 2-3 Projects using PW) that it's a good technique to use templates in a way I think hasn't been thought of yet really by some. (Although the CMS we use at work for year, works this way.) I'm sure I'm maybe wrong and someone else is already doing something similar. But I wanted to share this for everybody, just to show alternative way of using the brillant system that PW is. Delegate Template approach I tend to do a setup like this: - I create a main.php with the main html markup, no includes. So the whole html structure is there. - I then create page templates in PW without a file associated. I just name them let's say: basic-page, blog-entry, news-entry... but there's no basic-page.php actually. - Then after creating the template I make it use the "main" as alternative under "Advanced" settings tab. So it's using the main.php as the template file. - This allows to use all templates having the same php master template "main.php" - Then I create a folder and call it something like "/site/templates/view/", in which I create the inc files for the different template types. So there would be a basic-page.inc, blog-entry.inc ... - Then in the main.php template file I use following code to delegate what .inc should be included depending on the name of the template the page requested has. Using the TemplateFile functions you can use the render method, and assign variables to give to the inc explicitly, or you could also use just regular php include() technic. <?php /* * template views depending on template name * using TemplateFile method of PW */ // delegate render view template file // all page templates use "main.php" as alternative template file if( $page->template ) { $t = new TemplateFile($config->paths->templates . "view/{$page->template}.inc"); //$t->set("arr1", $somevar); echo $t->render(); } <?php /* * template views depending on template name * using regular php include */ if( $page->template ) { include($config->paths->templates . "view/{$page->template}.inc"); } I chosen this approach mainly because I hate splitting up the "main" template with head.inc and foot.inc etc. although I was also using this quite a lot, I like the delegate approach better. Having only one main.php which contains the complete html structure makes it easier for me to see/control whats going on. Hope this will be useful to someone. Cheers
    1 point
  6. Not sure if this has already been suggested, but for the less php literate among us it would be great to have some sort of repository of php scripts on the PW website for formatting template data, i.e. the php snippets for outputting different kinds of menus, breadcrumbs, bloglists, etc. Similar to a database or list of modules, but specifically for the templating side of things, where you don't require a full-on module. Right now you have to scour the forums (or write your own code) if you're looking to do something beyond the basics that are included in the default templates.
    1 point
  7. For the end of the year, I've made a new admin template called Futura. UPDATE 1: Moved position for logged in user to breadcrumbs area on the right / Ryan Fixed logo being cut off ("s") / Ryan Fixed Page List (blank row appeared when moving pages) / Ryan UPDATE 2: Replaced current code execution timer with PW integrated / Ryan Removed "Sidebar headline" and replaced it with search in similar color fashion / Ryan, Apeisa Added "Newest added" in the sidebar below "Latest updates" UPDATE 3: Replaced seach with finalized colors I've overlooked some things in the UI and made according corrections UPDATE 4: I apologize, I've attached the wrong css file in the final build that was attached (1.0.4), please download it again. UPDATE 5: Replaced old screenshots with new ones I've removed previous version from file downloads repository, consider the one attached in this post as final. If I spot some mistakes along the way, I'll correct them and update this post. Here are the screenshots: For full user experience, download cirkuit.zip (it's TinyMCE theme) and put it into this directory: /wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.3.9.2/themes/advanced/skins/ then open InputfieldTinyMCE.js located in /wire/modules/Inputfield/InputfieldTinyMCE/ directory and replace skin: "o2k7" with skin: "cirkuit". Tell me what you think and if you find any bugs in the template, please let me know... Greets to all on the forum and I wish you a Happy New Year 2012.! cirkuit.zip futura-admin-template-1.0.4.zip
    1 point
  8. LMBO! I agree tho . I'm feeling pretty stupid... i set aside 2 hours this afternoon to finally poke around... 5 minutes later, i'm not sure what to do, cuz I already understand what I thought would take me - well, ... the 2 hours lol. Bill
    1 point
  9. What is "$child->link_intern_url"? if it's a page from a page reference it should reuturn the page object. so you should be able to do: $url = $child->link_intern_url->url;
    1 point
  10. The GitHub repo was just renamed from P21 to ProcessWire. For those that are pulling from this repo, you'll need to update your remote origin. To do that, type this at the command prompt in your PW installation: git remote set-url origin git://github.com/ryancramerdesign/ProcessWire …or this (apparently required for older versions of Git): git remote rm origin git remote add origin git://github.com/ryancramerdesign/ProcessWire If you are using a graphical client for Git, then I'm sure it's just a matter of clicking to a 'remote origin' setting and replacing the P21 URL with: git://github.com/ryancramerdesign/ProcessWire Thanks to Robert Zelník for the instructions on how to do this.
    1 point
  11. I think it would be great and make sense to have repositories of scripts and modules that are approved by the PW members to ensure they're quality modules. With launching the new PW website we're working on it will come.
    1 point
  12. I've made this site a couple weeks ago using ProcessWire. Once again, it proved as a right choice for my projects... You can check it out at: http://www.croatiabirding.hr P.S. I recently bought a book about PHP OOP programming so I could better understand the PW core and the modules themselves, maybe I'll come with my own plugin finally soon ...
    1 point
  13. Got it done. Some folks wanted WordPress on this site. But I'm glad it will be ProcessWire! Will keep you guys posted on the project. I am confident everyone here will be pleased after we complete the site. Thank you all for your input!
    1 point
  14. If it's something you want to commit to the DB, you'll want to make sure that the parent doesn't already have a sortfield specified. If it does, then it's going to sort by that field in the tree automatically, and you'd have to account for that. But you would have had to specifically set a sortfield for that to be the case. By default, pages have a sortfield of 'sort', which just means it will sort by the 'sort' property of the child pages (an integer). That's what you want. In your case, you want to grab the first page and change its 'sort' property to be one less than it currently is, and then take the page you want to insert and give it the 'sort' value that the first page had: <?php // get the parent page you'll be working with $parent = $pages->get('/some/parent/page/with/children/'); // get the first child of $parent $first = $parent->child(); // create a new page that you want to insert (or grab some existing page) $new = new Page(); $new->template = $templates->get('some-template'); $new->parent = $parent; // set its 'sort' property and save it $new->sort = $first->sort; $new->save(); // now save $first with it's sort being 1 less $first->sort--; $first->save(); That should insert the new page as being the second child of the $parent. I also like using date/time fields for sorting, even if you don't need the date/time for anything else.
    1 point
×
×
  • Create New...