-
Posts
1,355 -
Joined
-
Last visited
-
Days Won
48
Everything posted by flydev
-
What say the doc : also $this is not callable in this context as you're not in an object. In order to get the hook working, you should write the hook in _init.php : function example1(HookEvent $event) { $page = $event->arguments[0]; wire('session')->message("Hello World 2 ! You saved {$page->path}"); } $pages->addHookAfter('Pages::save', null, 'example1'); And in admin.php, add : include("./_init.php"); Now go to in backend, and save a page, the message 'Hello World 2 ! You saved /your/page/' should appear.
-
Fieldtype image array: $key returns string, not number
flydev replied to Stefanowitsch's topic in General Support
Thanks @LostKobrakai , learning everyday! -
Fieldtype image array: $key returns string, not number
flydev replied to Stefanowitsch's topic in General Support
If you really want to build an array with index as Integer, you could do something like that : $array = new WireArray(); foreach ($data->img_gallery as $imageobj) { $array->add($imageobj); } then : foreach ($array as $key => $image) { echo = $key .' => '. $image->url .'<br>'; } Your object now look like this (exemple with 4 pictures in the image fieldtype) : ProcessWire\WireArray data protected => array (4) 0 => ProcessWire\Pageimage 1 => ProcessWire\Pageimage 2 => ProcessWire\Pageimage 3 => ProcessWire\Pageimage I let others answer, it will surely be better. -
Yep I did a test on the défault theme too, i didnt noticed something wrong, weird
-
Welcome Dakrtom ! We would be glad to help you, but I am sorry that (I personnaly) cant understand your posts !
-
I just tested on a fresh 3.0.32 install with Reno theme, I dont have any issue
-
I created a simple image field (wihtout repeater). If you want a real example on howto use a repeater to make a carousel, tell me your repeater's structure and I will give you a working code but looking at your HTML markup, an Image field only like I did should be sufficient to achieve it.
-
Hi, I made a ProcessWire profile powered by Bootstrap 4 with a bootstrap carousel. You can look at the code there : https://github.com/flydev-fr/site-pwbs4/blob/master/templates/_func.php#L213-L250 and adapt it for your need. It should be really easy. Which version of Bootstrap you are using ? (it look like you are on version 3.. confirm ?)
-
You could read this blogpost, meanwhile others developers answer: https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/#file-compiler-updates
-
Layout wonky in Chrome upon migrating to production server
flydev replied to hellomoto's topic in Getting Started
The same behavior described by @Klenkes happen to isotope too and for sure this is your issue. As exemple, isotope in his version 3 is not bundled with imagesLoaded; so we have to link imagesLoaded and initialize it as parent of isotope elements. eg: var $parent = $('#grid-parent'); var $grid = $('#grid'); $parent.imagesLoaded( function() { $grid.isotope(); }); -
delete orphaned files/images from site/assets/files
flydev replied to interrobang's topic in General Support
@hellomoto on dev branch you need to add the namespace. On top of your file, write: <?php namespace ProcessWire; [...] and you will call DirectoryIterator like this : $it = new \DirectoryIterator(...); -
@jploch before calling the function, call the module : <?php $map = $modules->get('MarkupLeafletMap'); echo $map->getLeafletMapHeaderLines(); ?>
-
Thanks @LostKobrakai , sometime I feel dumb
-
Hello guys on a ProcessWire-3.0.30, I can't get to work the InputfieldDatetime / date-picker, someone noticed it ? Is there a date-picker by default ? (it is the first time I use this fieldtype)
-
I just integrated this module in a ProcessWire 3.0.30 project and it works.
-
Try the following : Put ajax.php file in the root directory : - root_dir - wire - site - index.php - ajax.php then bootstrap ProcessWire (write in ajax.php, at the beginning of the file) : include('./index.php'); and in your javascript code, write the correct path : [...] url: "/ajax.php", [...]
- 1 reply
-
- 2
-
Without the namespace, this error is triggered : Session: error setting certificate verify locations: CAfile: [...]\site\assets\cache\FileCompiler\site\modules\PublishToTwitter\TwitterOAuth\Abraham\TwitterOAuth\cacert.pem CApath: none In TwitterOAuth.php line 353: CURLOPT_CAINFO => __DIR__ . DIRECTORY_SEPARATOR . 'cacert.pem',
-
To get the module working out of the box on ProcessWire 3.0.x, just add to PublishToTwitter.module before installing it : namespace ProcessWire; Just tested this morning, it works like a charm
-
Read this @mel47 : https://processwire.com/docs/tutorials/how-to-use-url-segments/ And you can find the wiki url under archive.org : https://web.archive.org/web/20150422040149/http://wiki.processwire.com/index.php/URL_Segments_in_category_tree_example An interesting thread:
-
So /site/ should be renamed to /enjoy/
-
for reference :
-
I am trying to get a simple button working on Safari/601.1 (iPhone 6) without success, someone got it working on mobile device ? <button id='validate' ic-post-to='{$config->urls->httpRoot}contact_form.php' ic-target='#contact-wrapper' ic-indicator='#indicator'>SEND <i id='indicator' class='fa fa-spinner fa-spin' style='display:none'></i></button> edit: by visiting the official examples on their website, it works edit2: Something weird - it works if I hardcode the url of ic-post-to instead of using $config->urls->httpRoot
-
You could try my module MarkupGoogleRecaptcha or implement an honeypot field like in the SimpleContactForm module.