Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. OK, for the truly lazy like me...here's the html version attached. Clicking on Advanced twice seems to add ++ instead of just one? No biggie though...I removed the Google Analytics stuff - you don't need those. You can easily use this in your PW template file of course. All credits to Soma of course Edit: Note (see post by Soma below) - this Cheat Sheet will need to be updated with PW 2.3 additions pw2+cheatsheet1.1.zip
  2. Wrong link Soma...that links to this thread ...we get your point though . Thanks for the tip!
  3. Maybe these will help? http://stackoverflow.com/questions/5801425/enabling-ssl-with-xampp http://stackoverflow.com/questions/2643462/setting-up-ssl-on-a-local-xampp-apache-server http://www.apachefriends.org/f/viewtopic.php?t=31448
  4. Was just thinking about this! It would also solve offline issues (run it locally)
  5. Mindplay, I have read your post 4 times and I still don't see the fundamental differences between what you are suggesting and what the 3 tag parser modules we have (shortcodes, tag parser and hanna) do . A couple of thoughts... I see no difference between your placeholders and the tags/tokens used in the above modules. They are all placeholders in my book . I see no difference between { } and [ ]. The names in the above modules are also arbitrary (at least in the case of shortcodes and hanna). You can even change the "placeholders" you want to use. In the current modules, you make the decision about what type of "macro" you want when creating the "placeholder". The difference between your approach and the current approaches is when the decision is made. In fact, IMHO, if I'd be more confused if sometimes {fish} can mean images and in other cases {birds) and they "don't mean anything at all". I suspect I just don't get what you are suggesting . I agree though, that a GUI would make work easier for some people. I would accept this as a another choice rather than do away with the approach offered by the current modules. One very important difference between the current modules and other CMS is what the modules actually do. I'll give an example from MODX since it is a tag based system I have used before. In MODX, when the system encounters the tag [[*content*]], it replaces that with the "body" content. That is a fundamental difference with above modules. I consider the PW modules nothing more than search and replace tools . Unlike in MODX, where the user doesn't care how MODX works its API juju to replace [[*content*]] with actual text of the "body" content, in the PW modules, the user must still be able to write "PW API" (the PHP the tags will inject). I think this is a good thing and is in line with PW philosophy about the types of users it is targeting. PW is growing and it is attracting many people with different skill sets. Part of this crowd are wanna-be-coders like me . These modules offer choice to people like me. Come to think of it, the modules are also useful to seasoned coders - e.g. ability to inject some code on a page rather than at the template file level. As long as these modules are not part of the core, I am happy. If I want point and click I'll use Joomla. I have to admit initially I was concerned with the different tags used by these modules (including Image Manager). Maybe it is not a big deal? After all, they are not part of the core. Anyway, I probably haven't understood your proposal. However, there is a place (and in the near future, I suspect a very big place) for modules like hanna considering the crowd PW is attracting. My 2 cents Cheers/k
  6. Solved the problem...I hovered on "more" (that's what I see instead of "download") and MM told me what the problem was openssl extension not loaded Sorry for wasting your time!
  7. Soma, I'll post this in MM's thread. I'm experiencing strange behaviour. In version 1.0.7 I see not download button . In older installs, I see the download button. Btw, does MM allow you to switch themes on the fly? This is what this proof of concept allows you to do. It does not install the themes for you.
  8. Aah, no I didn't know that! I have just checked but and I can see the themes but nothing to click to install. I'll check MM's docs. What can't you follow? Btw, the above is just that...a proof of concept + to show the versatility of PW
  9. Here's a proof of concept PW Admin Theme Switcher (video and write-up). It shows how versatile PW is. Since everything in the PW tree is a page, including Admin this was easy to do. I think on the roadmap PW will eventually allow switching between Admin Themes? Anyway, here's how I did it (verbosity below is intentional ). This is not a module but can easily be converted into one. Currently, I don't plan to do so since I suspect it will be overtaken by events (roadmap). Instead, I used the excellent Admin Custom Pages (ACP) module. On load, PW will first check if there is an admin template at /site/templates-admin. If there is none, it will check in /wire/templates-admin/. The file it looks for first is /site/templates-admin/default.php 1. I copied the contents of /wire/templates-admin/ to /site-templates-admin/ 2. I modified the contents of default.php as shown below in order to use it as a controller file $theme = $pages->get(1424)->theme_selector;//id of admin theme switcher page (the child page) include($config->paths->adminTemplates . "{$theme->name}/default.php"); 3. In order to use ACP in PW 2.3, you have to create a parent and child page. The child page will be rendered in the Admin. 4. I created pages under Admin as follows: Admin Theme Switcher Admin Themes (id#1424) Default Teflon Moderna, etc. 5. Admin Theme Switcher has nothing of interest. It just enables me to render its child page in PW Admin. Admin Themes has a single Page Reference Field from which only its children can be selected. This field is called theme_selector. Its reference value is the ID of whatever child page of Admin Themes is selected. 6. Default, Teflon, etc., have various fields to hold data about the themes - author, version, description, screenshot, etc. I populated these as needed. 7. In the above code (#3), 2nd line, I am telling PW where the default.php is. I am appending the name of the selected child page of Admin Themes. Hence, if the current selected page is Minimalist Blue, its PW name, minimalist-blue is included as part of the path. This means I need to create a corresponding folder at that path. 8. I grabbed all my themes in their respective folders including all their files and copied them to /site/templates-admin/. This ensured that there would be no conflict having multiple themes in /site/templates-admin/ folder. I also copied the default PW theme with all its files into a folder called default. I ended up with a structure like this: /site/templates-admin/default/ /site/templates-admin/teflon/ /site/templates-admin/moderna/ /site/templates-admin/appy/ etc. 9. Of course since the themes were now in sub-folders, paths in their respective default.php would be wrong. I needed to change this, e.g. in /sites/templates-admin/teflon/default.php, I changed the paths as follows: $config->styles->append($config->urls->adminTemplates . "teflon/styles/ui.css?v=2"); $config->scripts->append($config->urls->adminTemplates . "teflon/scripts/inputfields.js"); $config->scripts->append($config->urls->adminTemplates . "teflon/scripts/main.js?v=2"); $config->styles->append($config->urls->adminTemplates . "teflon/styles/droppy.css") <?php include($config->paths->adminTemplates . "teflon/topnav.inc"); ?> 10. Now that all is set up, there's two ways to change the current Admin theme: a. The template file of Admin Themes has a foreach that loops through its child pages (the theme pages) and outputs the meta data in a I column Grid. Each item has a radio input field to select the theme. On save, jQuery Ajax sends the single value (ID of selected theme) to a simple processor file. The processor file updates the value of the single Page Reference Field (theme_selector) using PW API. Via JSON, the processor then tells jQuery if update was successful and page is reloaded. b. Alternatively, the theme can be changed by editing the Admin Themes page, selecting a child page (theme) using the single Page Reference Field (theme_selector) and saving. PW will auto-reload the page, applying the new theme. As you can see, there is no rocket science here.....just an amazing CMS
  10. Works fine if you use default Module manager (PW's). You can only install via TextformatterHannaCode actually. Summary says this "Also Installs - ProcessHannaCode". The install button for ProcessHannaCode is greyed out with the message "Requires - TextformatterHannaCode". ProcessHannaCode auto installs. Maybe something with ModulesManager? @Ryan: The TextformatterHannaCode and ProcessHannaCode have the same name - "Hanna Code" in PW module manager. This can be confusing (but not a big deal).
  11. Sweet! Thx for the tip.. Tested it and got something like parent_id=1007, sort=title, limit=12, status<1024 Btw, what is status<1024 ?
  12. To some extent but I think Hanna is easier to use (?). Plus clear separation between PHP, js and text...
  13. Congrats on the relaunch. I know you are still ironing out kinks....here's one more (see attachment). You get this massive white space on the masthead div (height 728px) when you first open an article. If you hit refresh, it reloads to the right size (83px). Edit: see post below...false alarm, move on please, nothing to see here Yes please, would like to hear more about how the WP content was transferred to PW, thanks.
  14. This new module, Hanna, should make people familiar with MODX happy
  15. Wow! Nice one; you've been busy! Yes, there have been two or three questions from MODx'ers in the forums about something like this - the ability to randomly, directly call snippets, chunks and TVs within the body field/area in TinyMCE. Previously they've been pointed to shortcodes and tag parser. Hanna is certainly more powerful and would solve this issue easily. I can't wait to see the creative ways people use this . Thx for the module!
  16. Not sure I follow. You mean using foundation in a site-profile?
  17. You can use PW $page->render() method to pull in the content of Home into the Root page. See cheat sheet and/or search forums for more. You could also just use normal PW variables to output certain fields from "Home" into the Root page. If you use render, you want to make sure the HTML in the Home page is minimal (render will pull in the whole markup so you may end up with duplicate body, head, etc. tags, i.e. Root's and Home's . As for SEO, I don't know what effect this would have, sorry.
  18. Fernando, Welcome to PW. In other words, that $s is a temporary variable created to hold information about all the pages found by this $pages->find("template=skyscraper"). In order to get the most out of PW, I recommend that you first learn some basic PHP. See this thread for suggestions about good PHP learning resources. Cheers
  19. How I understand it.... When user clicks on "Home" he should be redirected to "Root". I suggest to put the redirect in the Template for Home to redirect to Root. This means Home will still have unique "Home" url but redirection will happen. Or else, if you want Home to have Root's address in the menu itself, then you will need to use some if statement.... I hope I understood you
  20. Yes... http://processwire.com/talk/topic/683-page-content-within-another-page/
  21. If it is Multiple Page Reference you will need to do a foreach on it to grab the pages since that returns an array. You can then echo out the fields in those pages...
×
×
  • Create New...