-
Posts
818 -
Joined
-
Last visited
-
Days Won
6
Everything posted by benbyf
-
I keep getting very strange results every now and then after hard refreshes, but doesnt seem to be any consistancy. think there's some issue with the video poster image not being full width, but not really sure what can be done with this as its an attribute added to the <video> element. very strange
-
Thanks @Mike Rockett Works really well for me now! I changed Position to Fixed so it would stay there on scroll and I kept in my js so that it would resize well on window resize (as before it was not covering the window on resize). here is what I had on the js: var innerW = window.innerWidth; var innerH = window.innerHeight; function adjustVideo(){ var videoW = $('.video-bg').width(); var videoH = $('.video-bg').height(); innerW = window.innerWidth; innerH = window.innerHeight; if(videoW < innerW){ $('.video-bg').width(innerW); $('.video-bg').height('auto'); } if(videoH < innerH){ $('.video-bg').height(innerHeight); $('.video-bg').width('auto'); } } adjustVideo(); window.addEventListener("resize", adjustVideo);
-
Please see previous post
-
think i've got myself into a muddle here but i've got each template as a section in my homepage, when I go to each page they work fine (as they wrap the _main page content after), but on the homepage template I want to get all children and rendren the retun from JUST the template itself i.e. getting all the $content returns. Any way of doing this, not somthing I would normally do, just don't want to basically replicate each template into my homepag template as they may go out of sync. Thanks
-
Sorry guys think the project owners are getting confused over their DNS settings. you should be able to find it here: http://www.fabricacapital.co.uk/ MIKE! yes help please! I'm finding it near impossible to get a good solution to kepping the video always fullwidth using <video>, css, and a little javascript to check window width and set video width to it or wndow height which even is bigger... but still isnt perfect and im not sure why. Most of the design is on http://crookdesign.co.uk/ or the client and I could only compremise so much.
-
New website for Fabrica Captial – Commercial Real Estate Investment http://fabrixcap.com/ (previously at http://www.fabricacapital.com/) Design by http://crookdesign.co.uk/
-
Is there a set of best practise for avoiding n+1 queries in Processwire, or is this something that is negated by the core? e.g. https://secure.phabricator.com/book/phabcontrib/article/n_plus_one/
-
Thought I'd show some work in progress modules. Subscribers https://github.com/benbyford/Subscribers has functions for logging in new users, added with new subscriber role bulk export the subscriber users to comma delineated SubscriberList (submodule) module adds an admin page to view your subscribers and page through them, or export WireMailChimp https://github.com/benbyford/WireMailChimp (though I need to change the name on github) Implements https://github.com/drewm/mailchimp-api adds any user save to a mailchimp list settings for API and List id only adds users that have a checked email_subscribe field to true
- 18 replies
-
- 13
-
-
- users
- subscribers
-
(and 1 more)
Tagged with:
-
how do you pass variables between modules?
benbyf replied to benbyf's topic in Module/Plugin Development
Think i mainly needed a good grounding in HookEvents, and I've now read this (which is ace): https://processwire.com/api/hooks/ I'm using your method above of public functions to access my variables and works well, thanks @horst -
how do you pass variables between modules?
benbyf replied to benbyf's topic in Module/Plugin Development
added modules to github. Module 1 - subscribers module with userSaved function - https://github.com/benbyford/subscribers Module 2 - mailchimp with hook - https://github.com/benbyford/PWmailchimp -
how do you pass variables between modules?
benbyf replied to benbyf's topic in Module/Plugin Development
adding the magic __get() gives me lots of errors in the rest of my code to do with variable becoming null objects.I can no longer use $this->user for example within a function. -
how do you pass variables between modules?
benbyf replied to benbyf's topic in Module/Plugin Development
Think I fundamentally don't really understand how hooks operate. I now hav this in module one: private $userName = ""; public function ___register($input){ $this->userName = $input->post->name; } and module 2: public function init() { $this->addHookAfter('Subscribers::register', $this, 'userSaved'); } public function userSaved($e){ $name = $e->userName; $log = wire('log'); $log->message($name); } but still cant get anything printing out. and its extrememly hard to test this in working as teh hook happens andI have to catch it somewhere but I cant do var_dump etc when it all happens in teh background... -
how do you pass variables between modules?
benbyf replied to benbyf's topic in Module/Plugin Development
cant say I really understand yet, sorry. Will keep trying and see if I can crack it -
how do you pass variables between modules?
benbyf replied to benbyf's topic in Module/Plugin Development
thanks @horst. I'm trying to access both a varible set in the hooked function and the varibles passed to the first function, so will $vars = $event->arguments[0]; work for both? i.e. get $vars and userSaved? -
How would one pass a variable set in one module to another module via a Hook? e.g. module 1. public function ___saveUser($vars){ $userSaved = true } module 2 public function init() { $this->addHookAfter('module1::saveUser', $this, 'userSaved'); } public function userSaved($e){ $userSaved = $e->userSaved; return $userSaved; // true? }
-
Hi, I'm making a new subscribers module, which enables you to register users, and view them as a list of the new role in the admin. Having trouble with installation currently and keep getting Invalid field type in call to Field::setFieldType module: https://github.com/benbyford/subscribers/blob/master/Subscribers.module
-
Think my tutorials are a good starter and start prietty basic. let us know if you think there are anything missing... e.g. if it would be worth making some screencasts etc https://tutsplus.com/authors/ben-byford
-
good damn it, thats the second one I've found of a site ripping off my articles
-
Added ProCache today which has helped alot on my server stats, as the CPU has gone from around 50-60% right down to 20%. however my RAM usage is still up the 80% which isnt great. Analytics are still at around 300-1500 hits a day. Will check out that site @Sérgio for sure.
- 20 replies
-
- 1
-
-
- digitalocean
- overload
-
(and 1 more)
Tagged with:
-
Javascript in Processwire Admin tab
benbyf replied to David Beesley's topic in Module/Plugin Development
you could also simply include your javascript lower in the page without injecting it into the head... but the Jquery option seems solid. -
wow just read this back, and its amazingly badly typed, sorry. Yes mailchimp, I'm looking into it so will post back my implementation when done.
-
found this in the wiremail logs Error in hnsmtp::send : cannot connect to smtp-server!
-
Really sorry but its a clients site not my own personal project. I cant seem to send out through wiremail() so that might be the issue. php mail() works fine.
-
Loving this suite of modules. I was wondering what exactly it does when you click the Optimize button in the Database module - for my own understanding and safety of the data integraty of the site.