Jump to content

digitex

Members
  • Posts

    228
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by digitex

  1. Haaaa! I did miss something obvious. Safe bet with me. I was under the impression I could short form that, not sure where I got that idea but it didn't throw an error so..... Thanks Robin. If more file types are added to the list then a switch is absolutely what I'll use.
  2. Afternoon folks. I'm having an issue I can't figure out. I have a file field that supports pdf doc and docx and png for uploads and I have the following code in the template: $dls = $page->downloadable; echo "<ul class=\"dl-list\">"; foreach($dls as $dl) { $fs = $dl->filesize; $tfs = (int)($fs / 1024); if($dl->ext() == "pdf") { $icon = "pdf"; } else if($dl->ext() == "doc" or "docx") { $icon = "word"; } else { $icon = "png"; } echo "<li class=\"{$icon}\"><a href=\"{$dl->url}\" target=\"_blank\">{$dl->description}</a><span> | {$tfs}k</span></li>\n"; } echo "</ul>"; I'm using CSS to give each extension type it's own icon and it recognizes pdf and doc/docx but the png is getting the Word icon rather than the png icon. Am I missing something obvious? Any suggestions appreciated. Thanks.
  3. Hey Adrian, New issue, different project. I set up a tracking system for a client that wanted to keep a record of all downloads of a certain file they offer on their site. Only logged in users can access the file and on download a page is created under user tracking showing the user name, date of dl etc. They also wanted to export that list as a csv so I'm using Batch Child Editor to give them that function and it worked well for a while but now there's 6800 ish pages in user tracking and whenever they attempt to export it throws an error: Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away. They are on shared hosting so resources are limited so I told them that with the csv they have they should delete the older pages but even that fails so I had to use phpMyAdmin. Lister has no problem handling the volume but BCE does so are you aware of a limit to BCE and is there a way around it? ------------ I believe the issue is that the BCE editor is displaying all of the child pages at once and with so many, that's what chokes it. If it's possible to implement some kind of pagination it should fix the problem.
  4. Don't know buddy, I guess you're just that good. 😊
  5. I'm trying to export to csv a list of current member users. There seems to be no way to do this without listerPro. Does Batch Child Editor allow you to export any admin pages? /EDIT I was looking in the wrong spot. I was looking for export function under Access > Users in the drop down on the top bar but when I went to Admin > Access > Users -- Edit in the page tree, I was able to make it work. For anyone looking for that functionality maybe that helps. Thanks Adrian.
  6. I still can't make sense of this. It seems each post in this thread has a piece of the puzzle but I can't put it all together. If you have a front end form for logged in users to edit checkbox selections how do you save it to the page? I've been at this for hours can someone put it all together?
  7. There's nothing in the log which is expected, it didn't throw an error it just doesn't display the drop downs etc. The console shows the error: Uncaught Error: Invalid LatLng object: (NaN, NaN) Not sure that error is related. I've decided to include leaflet the old fashioned way and bypass the module. I've done that many times.
  8. I've got this module installed into pw 3.0.184 and noticed a strange bug. When editing a page in the admin containing the leaflet field the dropdowns in the header for settings, modules, access and the user drop down disappear, as does the Save button. Once I delete the field from the template things return to normal. It seems there's a js conflict somewhere. Just a heads up to @Mats.
  9. I'll put that on my to do list. I don't have a GH account yet so I'll have to set that up first. @adrian done. Thanks for the suggestion. Turns out I did already have GH account, it's just been so long since I logged in I had forgotten.
  10. While we're on the subject of comments ? I have another question. When notifications come in, I have never seen any actions other than "approve now". Many comments are not useful to the public, to say the least, so an admin won't want to approve but to do anything else requires logging in to manually mark as spam or delete. This kind of defeats the purpose of moderating directly from the notification email and if you do nothing the comments remain pending and clog up the system. I found the code in CommentNotifications.php that deals with moderation actions but I'm not certain how to add to it. if($comment->status == Comment::statusPending) { $status = $this->_("Pending Approval"); $actionURL .= "approve"; $actionLabel = $this->_('Approve Now'); } else if($comment->status == Comment::statusApproved) { $status = $this->_("Approved"); $actionURL .= "spam"; $actionLabel = $this->_('Mark as SPAM'); } else if($comment->status == Comment::statusSpam) { $status = sprintf($this->_("SPAM - will be deleted automatically after %d days"), $field->get('deleteSpamDays')); $actionURL .= "approve"; $actionLabel = $this->_('Not SPAM: Approve Now'); } else { $actionURL = ''; $actionLabel = ''; $status = "Unknown"; } Having the option to mark as spam on a pending comment seems like it would be very useful.
  11. I figured it was tracy, I was just marvelling at how much easier it is to read than phpMyAdmin. I found a solution here: This works. It's an odd behaviour for the Approve Now button in the notification email to only work when comments are rendered through the render function. I can work with it though ? Thanks for your help.
  12. Thanks for the hint @adrian. The interface looks very different on my end but I found the settings. Seems my problem is different in more than one way: the schemaVersion is already set to 6. I don't see a message like you described, the approval email simply does nothing when clicking the approve link i.e. pending comments remain pending. I had hoped your issue and mine may have had a similar solution.
  13. Can you narrow things down for me adrian? I'm having the same problem but there's a lot of code to go through and I don't know where to look. Please.
  14. Does fieldType PDF support tags? You can configure tags in the field set up but I get an error when I check for them with $pdf->getTag(). Edit: The field is fine, I made a mistake in how I was retrieving the tags, forgot that in order to get the tags as an array it should be $pdf->tags(true); and so the way I was doing it was the problem.
  15. @Robin S I just installed the latest version and upgraded from 1.9 to 2.1 (this morning). BRILLIANT!!!! Beautifully done. It works perfectly. Thanks again for a very handy module.
  16. No it doesn't. I have other fields that do fill in when field visibility is conditional but not in this case. I don't know why but when the field in question is not displayed, the other field beside it, set to 50%, stays at 50% and the fields in the next row flood in and alter the layout, in a bad way. I'm using this module because I need a custom selector and it's very handy. I got around the problem by giving both fields 100% width so not a big deal.
  17. @Robin S This is a very handy module, thank you. I have a situation that is inconvenient at best but has me wondering. I have 2 fields set side by side on the template with 50% width and a showif condition that means one of the fields only appears occasionally but when it's not visible the layout goes to hell since the first field is set to 50% width. Is it possible to expand this module to include the column width so that if the same selector that determines visibility is met the column width would change from 50% to 100% to fill in the row? If so it would allow for field visibility to change without effecting the rest of the layout. that would be awesome.
  18. @Robin S Thanks for that. I didn't even know those options were there. I agree percentage based should be default.
  19. @adrian Yes I read through that thread, maybe not every post, it's a whopper. I didn't see any post addressing the big incompatibility I mentioned above. I like the look of UiKit better than the default, it's more modern and slick but I used to enjoy being able to set custom widths in unconventional setups e.g.: Model Name (50%) Secondary Name (checkbox 15%) Second Model Name (visible only if checkbox is checked 35%). All widths equal 100% but it doesn't work with UiKit (I tried) which is a bummer but mostly frustrating because I have the ability to set those weird, unconventional widths due to the column width config being a slider that uses 1% increments. If it's not possible to make UiKit work with any custom width combo then the slider should probably not be there encouraging it. A minor gripe.
  20. I'm still experiencing problems with UIKit and column widths. One of the biggest selling features of PW is that it "makes no assumptions on how you choose to work" which is very powerful but now thanks to UIkit it is dictating how templates are laid out. The biggest issue is that there is a column width slider that allows adjustments in increments of 1% which is clearly not supported by UIkit. Maybe it's time to ditch the slider and replace it with a series of radio buttons allowing between 1 to 6 columns so admins don't start making custom adjustments like they used to be able to do.
  21. I'm getting this now. I installed an SSL certificate to log in securely and now I get this error. Only thing is, the site is old, first done in 2013 with PW 2.X so the site config file actually has no $config->httphosts setting. I added it to the config file and it seems to be working.
  22. Thank you. I was just starting to lose it. One particular client insists on using Google Map instead of Open Street Map and I was getting nowhere. Geocoding wasn't working in the backend and the map wasn't showing on the front although there were no errors. Then I saw this post ^ and enabled the geocoding API in the Google Console. This is important information for anyone having trouble.
  23. I didn't even think of that. Thank you.
  24. I'm working on a site that's using a background video on the home page. I've run into a problem though. I created a file field to hold the video and call it in with the following: <video class="video-background" loop no-controls autoplay src="<?php echo $hp->video->url;?>" poster=""></video> This doesn't work and throws this error: HTTP load failed with status 403. BUT when I upload the video to a sub-directory in Templates and use this code: <video class="video-background" loop no-controls autoplay src="<?php echo $config->urls->templates?>css/images/WB5.m4v" poster=""></video> It works. I expect it's an htaccess thing but I can't understand why since any other file works fine why is video different and what do I need to do to get around it?
  25. It happened only on that page in that spot and didn't change when I turned the h4 into an h3. I found nothing in the CSS or any JS that would effect it. It seems the browser(s) were rendering that area as if it was inline. I'll try @OrganizedFellow's suggestion. Stupid gremlins.
×
×
  • Create New...