-
Posts
818 -
Joined
-
Last visited
-
Days Won
6
Everything posted by benbyf
-
try really quickly to start writing a folder select fieldtype module to be used with the DropboxAPI module. However, I didnt get very far as the fieldtype inputfield module structure is super confusing to me, is there any documentation about creting a simple field type - and yes I've looked at the mapmaker module, i bascially want a list saying you need XYZ functions to make it appear (as I tried implementing from info in Fieldtype.php and wouldnt show up as an option when creating a new field). Any help would be grateful.
-
-
Thanks @incognito.ms thats the one
-
Sorry this has been on hiatus as i've had lots of work on and had to build a shop from the ground up in order to sell it :/
- 19 replies
-
- conversation
- messaging
-
(and 1 more)
Tagged with:
-
HI! I think I saw a little while ago a image field module that added loads of features including adding more fields to a specific image in a image field, I can't find it googling anyone point me in the right direction?
-
Just in case its useful for anyone, this is my function for creating a folder list with public links to files: <?php namespace ProcessWire; use Kunnu\Dropbox\Dropbox; use Kunnu\Dropbox\DropboxApp; use Kunnu\Dropbox\DropboxFile; $drop = $modules->get('DropboxAPI'); //Configure Dropbox Application $app = new DropboxApp($drop->app_key, $drop->app_secret, $drop->authorization_code); //Configure Dropbox service $dropbox = new Dropbox($app); // get folder from user $folder_path = ""; $folder_path = $user->folder; // get items from dropbox folder $listFolderContents = $dropbox->listFolder($folder_path); //root folder is the folder you nominated in the Dropbox App config. Refer doco $items = $listFolderContents->getItems(); function listItems($items, $dropbox, $depth = 0){ $out = "<ul class='depth-{$depth}'>"; foreach ($items as $item){ // get file name $name = $item->getName(); // getPathLower $path = $item->getpathLower(); $thumbPath = "no thumb"; $thumbHasExt = strpos($path, '.'); // file if($thumbHasExt && $path){ $file = $dropbox->getTemporaryLink($path); $link = $file->getLink(); $ext = substr($path, $thumbHasExt+1); // fontawesome file name icons $icon = "fa-file-o"; switch ($ext) { case 'png': case 'jpg': case 'gif': case 'psd': case 'tiff': $icon = 'fa-file-image-o'; break; case 'pdf': $icon = 'fa-file-pdf-o'; break; case 'mp3': case 'wav': $icon = 'fa-file-audio-o'; break; case 'mov': case 'mp4': case 'm4a': $icon = 'fa-file-video-o'; break; case 'doc': case 'docx': $icon = 'fa-file-word-o'; break; case 'xls': case 'xlsx': $icon = 'fa-file-excel-o'; break; case 'ppt': case 'pptx': $icon = 'fa-file-powerpoint-o'; break; case 'zip': case 'rar': $icon = 'fa-file-archive-o'; break; } $out .= "<li><span class='{$icon} fa'></span><a title='click to download' href='{$link}'>{$name} {$ext}</a></li>"; // folder }else{ ++$depth; $out .= "<li><span class='fa-folder-open-o fa'></span>{$name}"; $listSubFolderContents = $dropbox->listFolder($path); $items = $listSubFolderContents->getItems(); // get list of files in subfolder $out .= listItems($items, $dropbox, $depth); $out .= "</li>"; } } $out .= "</ul>"; return $out; } // get depth 0 folder items $out = listItems($items, $dropbox, $depth);
-
WORKED!!!!! WHHHHOOOOPPPP. Thank you! Obvioulsy a bit of a n00b still for "proper" dev stuff. any good articles about composer best practises? Thanks
-
Good point, not needed to use composer with Processwire yet, so didnt reach for it this time. I'm guess thats the problem then? Also no mention in teh installation notes either but might because i dont know what to look for maybe? Am i right in saying using composer also makes a module incompatible with the PW admin module installer?
-
yep, updated. But like i mentioned there is simply no file called autoload in the repo... let allow a folder called vendor
-
soooo confused about this module, how did you get it to work?! e.g. /vendor/ and autoload.php folder/files don't exist in the repo.
-
Hi sorry not big PHP dev (mainly front end) and none of the module makes sense to me (lots of namespaces). getting errors like this: Class 'Kunnu\Dropbox\DropboxApp' not found in /srv/users/serverpilot/apps/fabricacapital/public/site/templates/dropbox.php:8 on the public pages implementing either of teh code demos above. Any help would be ace! Also I mamanged to get a app code directly in the dropbox developer portal, so no need for the token generating step above.
-
-
love both default and reno themes (as they get the job done without over engineering), however find it actually quite difficult to get to the Page Tree on the Reno theme, which is bascially the gate way to edit pages...
-
PW Admin doesn't really function without javascript, and my question would be, should we care? I think, however, either way it might be nice to add a "<span>Javascript doesn't seem to be available, therefore you may not be able to access the full functionality of the admin</span>" somewhere maybe?
-
Payment base class + PaymentStripe + PaymentPaypal
benbyf replied to apeisa's topic in Module/Plugin Development
OK soooooooo, may have fixed it. Doing everything over Ajax and somehow it was working originally using the basic implemtation in the docs. However I finally got to the bottom of it and it wasn't keeping take of the price after returning from Stripe to finalise. So I added a flip flop variable for the price so if it's not there it grabs it from the session. $amount = $itemPage->price; // save price for later if($amount == 0){ $amount = $session->get('price'); }else{ $session->set('price',$amount); } $payment->addProduct($title, $amount, 1); -
Experiences with building (payed) membership Sites?
benbyf replied to Chris's topic in Getting Started
I acheived a subscription service on this site http://betaville.co.uk/ using the PaymentStripe module as payment and my subscribers module with some tweaks. Although note that I'm in the process of creating a new members module set that will supersed the subscribers module. -
Payment base class + PaymentStripe + PaymentPaypal
benbyf replied to apeisa's topic in Module/Plugin Development
Now getting Exception: Invalid positive integer. -
Amazing, I'll check this out. My question would be through would it still allow one user logged in using two fingerprints (e.g. logged in on my phone and laptop)? Sounds promising.
-
Is there a way to restrict logins for users so that one user can't be loggedin in two places at the same time? e.g. auto logout user after inactivity (of say 15 minutes..?), or logout action and disallow login if user still "logged in" somewhere?
-
Let me know if you still need someone for the work hello@benbyford.com
-
I run all private projects on Bitbucket and open source on GitHub. Never had a problem with either for small and medium sized web projects mainly.
-
Always liked this and sums up how we should be thinking. Make things better people :) https://t.co/7le0meiC48
-
Do we really need a new PW.com theme? Think the new admin theme update will be a great help and a dedicated store for modules will help if we can make that happen. Think the current PW is fine for now, with other lower lying fruit.
-
RT @Lady_Ada_King: re CSS, Just cause something is easy to get started with does not mean it is simple or easy to master. Same applies to l…
-
I tend to do this sort of thing where I attach all the user based fields to the current user i.e. $user->fieldname instead fo creating a new page each time, then simply create a profile template shows those fields. which is fine if you have to be logged in, in your case you could enable page url partials in the profile tamplte and look for the partial (your user name input) to get the same effect.