-
Posts
11,129 -
Joined
-
Last visited
-
Days Won
366
Everything posted by adrian
-
Have a read of the "Do I have to keep track of the page number?" section on this page: http://processwire.com/api/modules/markup-pager-nav/ If you decide to keep track of the page number yourself, you can change the starting position, but if you always set: start=0 then it will start at the first page each time it is called.
-
Or you could try this module: http://modules.processwire.com/modules/process-page-field-select-creator/ You can easily paste in a CSV list using "Option 2. MULTIPLE FIELDS". Not sure if it does exactly what you need, but worth a look. Otherwise, Martijn's approach can be customized to whatever your needs are,
-
Have you seen this post: http://processwire.com/talk/topic/417-extending-image-field/ It describes how you can extend it yourself to handle the extra fields.
-
Just pushed a minor fix to prevent 403 forbidden errors when hitting the github page lists repository when starting the import process. Apparently they were forcing a user-agent header for several months now, but didn't seem to affect this module till recently. Anyway, should be fixed now. Sometime early in the new year I will sort out all the php notices/warnings in this module and add some more features for finer detailed selection of what you want to export/import.
-
Module HelperFieldLinks - field and template edit shortcuts
adrian replied to Soma's topic in Modules/Plugins
Hey Martijn, Thanks for taking the time to help sort this out. I applied your fix and it works for page editing, but there were still notices if editing anything under the Admin page. I have to admit I haven't spent the time to fully understand the module and your fix, but I have added the following to line 97 and it seems to take care of the other notices: if(in_array($data_key, array('required', 'textformatters', 'size', 'maxlength', 'description', 'collapsed', 'required', 'moduleTypes'))) { $array = $data_value; $data_value = ''; if(is_array($array)) foreach ($array as $id) $data_value .= $this->pages->get((int)$id)->name . ', '; $data_value = rtrim($data_value, ', '); } $settings_str .= "<span>$data_key:</span> $data_value<br/>"; Not sure if there are any side effects. -
http://php.net/rmdir should take care of that. And while you are on that page, read through all the "Filesystem Functions" in the left sidebar. Also, if you haven't seen it before, PYDIO is the best php/ajax driven file manager out there and it's free and open source: http://pyd.io/
-
There is this module: http://modules.processwire.com/modules/frontend-user-profile/ There are also these posts: http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/ http://processwire.com/talk/topic/107-custom-login/ http://processwire.com/talk/topic/2937-creating-a-front-end-admin/
-
Doesn't solve all your problems, but this helps a little: http://modules.processwire.com/modules/process-page-delete/ Somewhat related: http://modules.processwire.com/modules/process-page-publish/
-
Just a quick one - I know this could be done with a module, but I think a core setting that either ignores the field visibility setting completely for superusers, or allows selection of an alternate visibility option would be great. Thanks.
-
Manaus - my mistake, it should be last(). Please let us know what happens when you try: $users->get($page->createdUser->name)->image->last()->getThumb('micro');
-
Module HelperFieldLinks - field and template edit shortcuts
adrian replied to Soma's topic in Modules/Plugins
Soma, Yep, just getting the array to string notices. I am on php 5.5.4 although I expect 5.4.x would also give these errors. Sorry in a rush at the airport, so can't debug right now. -
Module HelperFieldLinks - field and template edit shortcuts
adrian replied to Soma's topic in Modules/Plugins
The same error also occurs when editing any admin pages, eg: Pages > Home > Admin > Pages > Search Awesome enhancements though Soma! -
RE: 3 - You need to install the core module - "Page Clone". Simply go to Admin > Modules > Process > Page Clone > install
-
You guys are on fire - nice work Professors Soma and Pete
-
Hi Peter, Are you suggesting you'd like two copies of the file then - one with the original name and one with the new custom name? My initial thought on this is that it will be problematic when you go to delete an image, as one version would be left behind. Of course it would be possible to extend the file fieldtype to store the original filename as well and either do a redirect, or keep record of the second version of the file. If two physical files were stored, it could be linked when deleting so both are deleted. I think at the moment these options are beyond the scope of this module. I think it is doable, but I think there might be some further thinking required to make sure there aren't any other complicating issues. Can you please further explain your usage scenario for wanting to keep the original filename? Maybe that will better help me to figure out the best the approach.
-
InputfieldPage: Not fully configured / currently nonfunctional
adrian replied to Harmster's topic in API & Templates
In a bit of a rush, so not sure if this is definitely right, but saw your question and thought this might help: https://github.com/adrianbj/ProcessPageFieldSelectCreator/blob/master/ProcessPageFieldSelectCreator.module#L377 It seems like you are missing some config options in your page field, possibly the parent_id and/or template_id - these are what you would set on the Input tab when creating a page field through the admin. Hope that helps. -
Thanks for the bug report. I was really only testing on the latest dev version of PW. I have just pushed a new version to github that seems to work fine with 2.3. Please test and let me know how you go with it. I really should do some more tweaks on the css for this module, but am waiting till PW 2.4 and the new default admin theme are released as stable.
-
Not exactly what you are looking for, but you could use this module: http://modules.processwire.com/modules/process-page-field-select-creator/ to create the page field and populate the categories. Might be of some help. You can paste comma separated values when entering the select options (Option 2).
-
$user-hasRole() returns sometimes true, sometimes false?
adrian replied to Eltom's topic in Getting Started
Try this instead: $user = $session->login($username, $pass); if ($user->isLoggedin()) { echo 'logged in'; } That should get the user's details into the user variable straight away. -
Hi Steve and welcome to PW. What you are looking for is the "TinyMCE Advanced Configuration Options" set of options on the Input tab of the field you are trying to set up (eg. body). You'll need to add "table" to the plugins field and then "tablecontrols" in one of the theme_advanced_buttons fields. Let us know how you make out with it.
-
Sorry for the session misinformation - I really wasn't thinking clearly apparently The php.ini setting you are looking for is: session.gc_maxlifetime setting. Definitely worth doing a: https://www.google.com.au/search?q=php+session+vs+cookie because there are lots of interesting difference and similarities between sessions and cookies that apparently can be confusing, although it really is quite simple
-
"This page has no Process assigned." with lastest dev and some modules
adrian replied to maba's topic in General Support
I have had similar issues in the past, but not for a while. I am running 2.3.7 - from a few days ago. Have you also tried manually deleting the row from the modules DB table, or is the uninstall still working properly and taking care of this? Other than that not sure - sorry! -
"This page has no Process assigned." with lastest dev and some modules
adrian replied to maba's topic in General Support
Have you tried deleting all the module related items in the site/assets/cache folder? -
Hi Eltom, I am not really sure why this worked for you before - maybe I am misunderstanding exactly what is happening. Sessions last until the browser is closed or the user leaves the site (ie a redirect back from Paypal). You'll need to use cookies or you could save the data in PW pages. I haven't ever used PayPal, but I assume they return some transaction number along with some identifier that you also sent them initially, which can be used to identify the purchase. Take a look at these links: http://cheatsheet.processwire.com/input/properties-and-methods/input-cookie/ http://davidwalsh.name/php-cookies http://www.thesitewizard.com/php/set-cookies.shtml You can also set and get cookies with javascript/jquery. This is a great little jquery plugin for making this simple as possible: https://github.com/carhartl/jquery-cookie Hope that helps.
-
In case you guys haven't seen it yet: http://ckeditor.com/demo#widgets New content blocks and captioned images etc. Might be a useful addition, although the default box is pretty ugly