Jump to content

Macrura

PW-Moderators
  • Posts

    2,776
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. @Martijn, cool, i sent you my version with the changes, maybe you'll see a better way of doing some things than i did! the only thing that was bugging me about how i did it was that i had to have the 2 classes (both fa and fa-icon-name) in the config fields in the backend; perhaps there is a cleaner way of having the module code include the default class and only have the icon class in the module config screen fields; Also i put my css in the php/css file and not in the module - i changed the css so that the icons (color, size) match the new 2.4 theme icons. (to sum up for anyone else wondering why this module is useful in the 2.4 version, it allows you to specify icons for any page using the ID, otherwise all pages using a certain template would have the same icon; also it simplifies specifying icons for a lot of pages and templates at once and then using the css/php file in the templates directory you can change specific icons css.)
  2. @Martijn, this module is great! i just tweaked it to work with the new version of Fontawesome; i can send you the changes or make some gists?; just some small changes here and there to get it working with the fa- class as well as using the fa class by itself to get the icons to render; also since fa is included in the admin, no @import is necessary... while this module might seem redundant with the core fontawesome icon capabilities, there are some situations where this module is more flexible, like with having an icon on any page (based on iD) without specifying at the template level... also, this module is much easier for me to be able to setup a whole lot of icons at once instead of opening all the templates to make changes.. and the custom CSS file in the templates folder makes it really easy to color code or otherwise add specific styling to selected icons; i guess if people still want this module to support IE7, there should be a different version for this, which doesn't include the fonts, and just gives you the control screen for specifying the page ids, templates and font classes..
  3. could this possibly be an error on line 157 (note - already posted an issue on github)? @ @param array $options
  4. Macrura

    A matter of ethics

    Just because that person didn't say design the site, doesn't mean they can't put their credit on the site, and that doing so is not ethical – there are a lot of other of web people out there like 'web producers' not designers; Using a template is sort of like them outsourcing the design part of the job. Sometimes being able to find the right CMS and template for a client, and then making it work (modifying) a certain way for that person's needs and budget is a perfectly respectable skill. Not all clients can afford the additional cost that a totally custom designed site demands. What would make it unethical is if the terms of purchasing the template specified that credit needed to be given to the template designer but none was. Usually those themeforest templates don't require that you maintain the credit to the design company, but it's nice to do it anyway. I've worked on sites that needed to be custom designed from the ground up, because the reputation of the company, their unique business logic, and visual branding required it, and no pre-made template would have worked; These clients come in with an expectation of the true cost of having a totally unique site; Other clients are perfectly happy to use a generic template, or themeforest template, and don't care at all that the site will always have that more generic look. I think the big issue with digitex's ex-client regards if said client fancy's themselves a web designer and yet does not possess a deep interest/understanding of HTML, CSS, JS, PHP, as well as have experience with linux, web hosts, security, apache and other emerging topics of relevance to the industry; Without those skills said individual will be useless when it comes to customizing the template, configuring backups, security, caching, asset minification and other things we all take for granted on this forum. I had a very similar experience with a large company that i was trying to pitch their corporate site to be done in Processwire; they eventually went the cheap route, used WP and a template. I recently looked at the site and it's not good, and very slow; no gzip, no asset min, no caching; plus a totally generic and not-slick look, which is sad because this is a really big company who's site should look much more pro.
  5. @NikNak, i think all of the things you are mentioning are definitely doable in PW; For subscriptions, you might want to take a look at Foxycart, it's an ecommerce system by has quite advanced subscription features, in addition to being a full-fledged cart solution; i've integrated into 2 PW sites so far and working on a 3rd. i think also the mandrill thing would be easy as far as sending out email from processwire (using the new wireMail for smtp) but as far as sending out automated emails like announcements, newsletters, you might need to consider a solution like Sendy it's like having your own mail delivery service and uses Amazon SES
  6. Macrura

    SharesPost

    @r2d2 - very nice - i like the multicolored main nav - the design is really pro! here are some considerations: 1.) no favicon, i use this http://realfavicongenerator.net/ 2.) Activate server side compression (gzip)? 3.) combine minify assets? AIOM is very good 4.) put more js at bottom?
  7. yes, that's the plan, i'm going to try and figure out the module dependency thing for that.. going to be interesting...
  8. yeah, the NEW process hello (which is kind of different than the old process hello) is what you were talking about, the new one creates the admin page etc.. now i just need to refactor the code on my admin pages, which are mostly special tables of pages using jquery datatables, showing various fields, sometimes calculations, related pages, alerts about images being too small, and edit buttons...
  9. @apeisa, thanks - working on it now.. gonna be tricky though to refactor all of my code, i have a lot of admin pages that are using simple templates with mixed html/php.. really wish there was a better/simpler way to just have the Admin Custom Pages module work with the new admin theme module, without having to modify the index.php ... yeah - sorry about misspelling your handle!
  10. i have also had to do this in order to make my custom admin pages work... wish there was a better way though.. @Soma - can you explain more, or perhaps post an easy way to make a custom admin page? I use diogo's module on a few sites but now i have to change the index.php, as above, i couldn't figure out how to change the ACP to use the admin template module.
  11. it would be very easy to add a hook and do this; i've seen sample code here on the forum. you would hook into the page saveReady public function init() { $this->pages->addHookAfter('saveReady', $this, 'autoIncrememt'); } public function autoIncrement(HookEvent $event) { $page = $event->arguments[0]; if($page->template != 'someTemplate') return; // some logic here to count the existing pages of this template and then add 1 and set the value of your auto increment field to that value, if it is empty. }
  12. this is also interesting: https://www.yootheme.com/component/blog/2013/08/13/how-big-is-uikit
  13. hey - thanks everyone for taking a look; a lot of fun processwire stuff going on under the hood with this one; - every object (news, release, event..) has a page select for the works list which is a database in an unpublished part of the tree; then when outputting the works list it checks for references and links to those; the 2 column works list is output using selectors for the century (work_year>1999) and the category.. - the fractals page uses tags on the audio and image files to find matches and associate the audio file onto the image; - other use tags to define galleries, teaser images; - maps plugin used for event locations and then build URL to google maps from the map marker module vars; @David - your AIOM saved the day as far as dealing with all of the jquery/css files from the multitude of jquery addons..!
  14. Just deployed a new PW site for a contemporary classical composer: http://www.jonathandawe.com/ AIOM Formbuilder ProCache Redirects MapMarker ImportPagesCSV MarkupSimpleNavigation Hanna Code Version Control Audio plugins used: Soundmanager2, 360 player with visualizer Fancy Music Player And thanks to the combination of AIOM, Procache and Cloudflare, the site seems to be very fast, gets a yslow of 96-98; Homepage Here is the sm2 circle player example with vis, overlaid on a relevant image: [goodbye joomla....!]
  15. i use this, which was posted by willyc somewhere, just pulled it from my code snippets: what.i use this is good it does.work top {not buttock}, of htaccess u will.put it . enjoy <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/octet-stream "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" </IfModule> <IfModule mod_headers.c> <FilesMatch "\\.(ico|jpe?g|png|gif|swf|woff)$"> Header set Cache-Control "max-age=31536000, public" </FilesMatch> <FilesMatch "\\.(css)$"> Header set Cache-Control "max-age=2692000, public" </FilesMatch> <FilesMatch "\\.(js)$"> Header set Cache-Control "max-age=2692000, private" </FilesMatch> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary: Accept-Encoding </FilesMatch> Header unset ETag Header append Cache-Control "public" </IfModule> <IfModule mod_deflate.c> AddOutputFilter DEFLATE js css AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule>
  16. @Joss, i have a similar question... need to start a new project and want to use a framework; Strongly considering foundation; have used Skeleton and Bootstrap a lot; I played around with uikit at bit but haven't formed a strong opinion yet, but it does look nice, and that's the people from yootheme whom you might be familiar with from their template clubs for joomla and wordpress;
  17. i do this sort of thing now a lot, thanks to Ryan's CMS Critic Case Study; this is almost the same as WillyC's code at the above link /** * This hook modifies the default behavior of the Page::path function (and thereby Page::url) * * The primary purpose is to redefine blog posts to be accessed at a URL off the root level * rather than under /posts/ (where they actually live). * */ wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'post') { // ensure that pages with template 'post' live off the root rather than '/posts/' $event->replace = true; $event->return = "/$page->name/"; } });
  18. @MarcC - wordpress with ACF gives a little % of processwire feel; custom fields and api to get the data; on the rare instance i use WP, i'm always using ACF..
  19. @landitus, in my case i'm generating the page name initially because that will be overwritten when the person changes the fields on the page; in this case it's more of a database entry and not a page on the site. to change the page name and title on save (from a combination of fields) i use a module that was also demonstrated by Pete called 'buildUrl' i think and then i expanded it a lot
  20. I think the issue here is that the Admin Custom Page module is not aware of the new admin theme being in a module, so your custom admin pages still retain the non-module theme. We'll have to take a look at the code and see if there's a way to make some adjustments to how the module loads the theme.
  21. right - thanks - i'll look at how you did the save alert module, should be able to figure it out; also i wonder if there is a place where could be stored a collection of utility modules for devs; basically they wouldn't do anything out of the box but provide infrastructures for building stuff - so you would have to edit the code for your use, rename etc.. examples would be modules that auto-build URLs for certain templates, add js or css to admin screens, auto-add new pages without having to name them first; these are some things i'm using on a current site, and that i've seen a lot of posts related to; but there's really not centralized place where they are available... i guess they could be in modules directory as proof of concept or building blocks, with a disclaimer that they don't work without modification and shouldn't be installed on a live site..
  22. thanks Soma & Adrian - adrian - your way works, but currently with Soma's way i get internal server error; i must be putting in the wrong place... sorry for my lack of skill!
  23. i'm trying to make a simple module to add various scripts to the page editor in the admin, for different templates. class customAdminScripts extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Custom Admin Scripts', 'version' => 100, 'summary' => 'A module to inject custom javascripts.', 'href' => 'http://www.processwire.com', 'singular' => true, 'autoload' => true, //'autoload' => "template=camp", ); } public function init() { $this->addHookAfter('ProcessPageEdit::execute', $this, 'addAdminScripts'); } public function addAdminScripts(){ //if($page->template != 'camp') return; $this->config->scripts->add($this->config->urls->customAdminScripts . "customAdmin.js"); } } how would i set this up so that i could add specific scripts to certain templates - right now i can only get it to work how it is now, loading on all templates
  24. thanks Soma! i was working on an export function sort of like this yesterday - this will help a lot!
  25. no i mean i don't have any old versions around on my hard drive; when upgrading sites i rename the wire directory to _wire and then put in the replacement, just in case i have to revert
×
×
  • Create New...