Jump to content

Arcturus

Members
  • Posts

    88
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Arcturus

  1. Thanks for getting back to me. I'm not using AOS, but I can understand why you wouldn't want to maintain a separate project. No problem though, it only took me a few minutes to apply both of my desired changes to your existing plugin. For anyone else who's interested, here are the altered lines (91-96) from plugin.js } else if(use_description && $(this).attr('title').length) { text = $(this).text(); } else { text = $(this).attr('title'); } html = '<a href="' + $(this).data('url') + '" target="_blank">' + text + '</a>' Those 60+ users are coming over to PW from ExpressionEngine, so this will be an entirely new process to them anyway. But much easier for me to teach them now.
  2. I had the same concern as cjx2240. Not the most elegant approach, but since I'm not a JavaScript wizard I directly edited the following files and placed a note in my root development directory to tweak these when updating the CMS. wire\modules\Inputfield\InputfieldCKEditor\ckeditor-4.8.0\plugins\table\dialogs\table.js wire\modules\Inputfield\InputfieldCKEditor\ckeditor-4.8.0\plugins\table\dialogs\table.min.js Tip: Where it says "100%":500:0 change it to "100%":"100%":0 If anyone knows how to achieve this 'non-destructively' from a user's config.js, it would be great to know.
  3. This is great Robin! Is there any way to make the description (if available) the default text for the link rather than the filename? I can handle the alt+ trick, but won't be able to teach that to 60+ users. It would be great if it were an option, same with setting a default target for the generated links (we always have files open in a new tab).
  4. I had the exact same problem as gmclelland with creating a new repeater in PW 3.0.62 for a site that had migrated from 2.x. Unfortunately, temporarily purging all of my existing repeater fields and data from the database so that I could uninstall/reinstall the Repeater fieldtype did not resolve my issue. However, here's what worked for me: Create your repeater field using the normal method and save it to trigger the "You must assign a template to the page..." error. Note the ID number for your new field (mine was 170) Manually create a parent page for the repeater within the page tree (Admin > Repeaters > new) using the Admin template and the URL of for-field-170 (with the 170 being the ID from step 2) and publish it. Note the ID number for your new repeater parent page (mine was 1949) Using phpMyAdmin or equivalent, navigate to your Fields table and find the row for your new field (it's sorted by the same ID, so I looked for 170) and insert "parent_id":1949, (actual ID from step 4) directly after the template referenced in the Data column. When I returned to the admin page for my field after this, the error message was gone, the details tab was present, and I could successfully add fields to my repeater.
  5. No worries Adrian, I'll see if I can circle back to that project and investigate next week.
  6. Just wanted to add another report of non-well formed numeric values occurring with PHP 7 (specifically 7.1.7). Pmichaelis' solution works, but only allowed the caching of a single CSS and JS file for my entire site, while Adrian's (several posts above) works and allows for several of each. That said, AIOM still breaks when a template calls for a file that hasn't been previously generated with either of those solutions and remains so even on a reload when a cached file should be available. To get that original page working, I need to jump to a different page using that template (which renders correctly) and then back to the original page. Edit: ...and by break, I mean it adds a string error message (with some HTML) to the SRC path for each item in your array, so the browser tries to load the CSS or JS file at a URL consisting of multiple error messages followed by the correct path in one epically long string.
  7. I'm having an issue in PW 3.0.62 where the module will only geocode an address when I manually click the checkmark between address and lat/lng off/on when editing the page within the admin. Based on what I've read here, it seems only the client-side geocoder is working? Additional details: I have both Google Maps and Google Places APIs working without issue on the front-end and have added my Maps key to the module's configuration My MapMarker-based field, "map", has a MapMarker: Error geocoding address notification and I can't find any elaboration Neither API has any issues with my address formatting/default address, with an example being 5 Bloor Street, Toronto, ON M4W 3T3 My addresses are mapping properly when I play with the checkbox (status goes from UNKNOWN to OK) I can't trigger the geocoding via the API Any ideas?
  8. Thanks, Robin! I have a slight variant for offline users and am curious as to why an OR operator doesn't seem to work there. // Offline users $offline_users = $pages->find([ 'id!=' => $online_user_ids, 'template' => 'user', 'name!=' => 'guest', // this is fine for my specific use case 'roles=' => 'agent' // returns expected listing // 'roles=' => 'agent|superuser' returns nothing when used ]); I can get around this by assigning the agent role to each superuser (changes nothing really), but I'm not sure that what I was attempting was technically wrong.
  9. I have a nearly identical use scenario where isLoggedin is always returning true, except I'm running PW 3.0.61 and am looking to return two lists. Here's the code: $members = $users->find("roles=superuser||agent"); $active = new PageArray(); $inactive = new PageArray(); foreach ($members as $account){ if ($account->isLoggedin()) { $active->add($account); } else { $inactive->add($account); } } After dozens of searches I found this thread and enabled the Session Handler Database module as suggested, but that had no effect on every user showing up as logged in on my local machine. From what I can tell, that only seems to add a page to the back-end (where I don't need it). Any ideas?
  10. Hi Adrian, I'm having some issues getting the proper output formatting with PW 3.0.61 and the following custom format option: {[phoneAreaCode]-}{[phoneNumber,0,3]-}{[phoneNumber,4,4]} /* Local North America: 111-111-1111 */ The dropdown outputs my example numbers correctly (555-555-5555), both the module and my phone-based field show the correct format chosen, and on the data entry side, I'm getting Area Code and Number fields in the same box which makes sense. However, when I go to output this field on the front end... /* imagine the entered data is 416 7773333 and the desired output is 416-777-3333 */ echo $user->cell_phone; /* returns 7773333 */ echo $user->cell_phone->formattedNumber; /* returns nothing, as does the 'un' variant */ echo $user->cell_phone->area_code.$user->cell_phone->number; /* returns 4167773333 */ I could string manipulate the last into what I need, but that would seem to defeat the purpose of the module. Is this only intended to work with $page based references?
  11. Thanks, Adrian. That got rid of the error message. Unfortunately, it seems that a lot of functionality's been lost and with the gaping documentation gaps this isn't going to work for me.
  12. Hi, I've migrated a Processwire site that was running on PW 2.6.1 with SCF 0.1.1 to a new installation of PW 3.0.42 and after I install SCF 1.0.0 I'm getting the following error which breaks the admin: Error: [] operator not supported for strings (line 131 of ...\site\modules\Processwire-SimpleContactForm\SimpleContactForm.module) Line 131 of that file is -> foreach (self::$additionalFields as $f) $allFieldsExtended[] = $f; When I remove the [] from that line (which I don't suspect for a second is an actual fix, but at least makes the admin functional again) the module shows as installed and all of my previously created fields appear in red on the settings screen under "Select form fields". Is there something I need to do to those old fields? There's mention of upgrade notes on the first page of the thread here but none of the links work.
  13. Thanks guys. I'll take a second look at the news/tweet section and a generator meta tag shouldn't present a problem. Update 12/8/2015: Just returned from vacation. Generator tags are now in place and I can see the design dissonance between the news and tweets. Will tweak as time permits.
  14. I'm happy to share the recent re-launch of the website for the Smart City Alliance, an organization that promotes knowledge sharing and collaboration between Alberta municipalities, academic institutions, technology advocacy groups and business. Their previous website was built (oddly) as a Ruby-based application, and I managed to completely rebuild the site (while enhancing both the design and functionality) within a 2.5 week window while handling other projects. View the site: http://smartcityalliance.ca/ - - - - - - Front-End Fanciness: - Fully responsive design - SRCSet for key images Modules in Action: - AIOM+ (All In One Minify) - Hanna Code - Map Marker (Field Type) - Twitter Feed Markup Leverging Processwire: - Powerful use of pagefields (for the tagging system) - Advanced caching rules for all template types - Easily generated a variety of specific RSS feeds
  15. By now I should just assume that any bizarre issue I run into with ExpressionEngine or Processwire is being caused by ModSecurity (which I doubt anyone runs in their dev environment). I'm sure that module serves an important purpose, but man, is it ever good at creating problems that look like they're scripting errors. I had four different web development toolbars telling me that the issue was with JqueryCore.js, specifically: However, when I scoured the server logs it began to look like ModSecurity was killing the process during a 302 redirect. Disabling that particular rule through the console in cPanel WHM fixed my image upload issues immediately. Note about the OldSchool Workaround I have no explanation for this, but for some reason when I did the OldSchool workaround (essentially replacing the whole if statement with just InitOldSchool(); ), I got a working old school upload as a superuser, but reports from regular users that they were still getting the non-working HTML5 uploader. I had created their accounts days after I made the fix to InputfieldFile.js, so it wouldn't have been a cache issue. Strange, but something you'll want to test for if you go that route.
  16. A variant of the IF statement section from the above example that checks whether a Tweet is a retweet, and displays the appropriate author information. if ($i < $limit){ $text = convert_links($tweet['text']); $timestamp = date('F j g:i a', strtotime($tweet['created_at'])); echo '<li>'; if ($tweet['retweeted']){ $author = $tweet['retweeted_status']['user']['name']; // Other Person $handle = $tweet['retweeted_status']['user']['screen_name']; // @otherPerson $text = substr($text, 3); // Removes 'RT ' from the beginning of the Tweet } else { $author = $tweet['user']['name']; // You $handle = $tweet['user']['screen_name']; // @you } echo $author.' @'.$handle.'<br>'.$text.'<br>'.$timestamp.'</li>'; } Note that the above requires the following change to MarkupTwitterFeed.module (line 138) to work : 'trim_user' => false, // include user details, because user details are useful
  17. Here's a working code example that doesn't use render and implements elabx's function mentioned above: <ul> <?php $i = 0; $limit = 4; $t = $modules->get('MarkupTwitterFeed'); function convert_links($tweet) { $tweet = preg_replace('/((http)+(s)?:\/\/[^<>\s]+)/i', '<a href="$0" target="_blank">$0</a>', $tweet ); $tweet = preg_replace('/[@]+([A-Za-z0-9-_]+)/', '<a href="http://twitter.com/$1" target="_blank">$1</a>', $tweet ); $tweet = preg_replace('/[#]+([A-Za-z0-9-_]+)/', '<a href="http://twitter.com/search?q=%23$1" target="_blank">$0</a>', $tweet ); return $tweet; } foreach ($t as $tweet){ if ($i < $limit){ $text = convert_links($tweet['text']); $timestamp = date('F j g:i a', strtotime($tweet['created_at'])); echo '<li>'.$text.'<br><small>'.$timestamp.'</small></li>'; } $i++; } ?> </ul>
  18. Most of you seem to be in Europe, but for those in North America I highly recommend Knownhost (Dallas) for managed VPS or managed dedicated. Our organization's been with them for close to 15 months now and the specs are good, the pricing's competitive, and the support is phenominal (fast, competent, and never at additional cost).
  19. I've run into the same issue. It isn't present at all on XAMPP with PHP v.5.5.1 and Firefox v.41.0.2, but once I transferred my site to a CentOS v.7 server running PHP v.5.5.30 (same browser) I couldn't upload images anymore until I did the "oldschool" workaround outlined by AlanP. The php.ini setting change had no effect for me.
  20. I've run into an issue where if I trigger an error state (say by leaving the form blank or by skipping a required field) the next submission always redirects to the homepage while generating a "CSRF Token validation failed" message. Everything else is working presently. Any ideas? (PW 2.6.1) I have a couple of small feature suggestions that would be nice: 1) The ability to assign a "From" name for generated emails; 2) The ability to send messages to multiple recipients. Thanks!
  21. I had this exact same issue. I had a page with 90 repeater records (the user went way beyond the specs they originally gave me) with #91 showing up as unpublished. Went to Admin > Repeaters as Ryan suggested and found 4 unpublished records. Deleting those didn't "unfreeze" the page. So I returned and manually deleted the last two populated records and was then able to make a title change to the page. I'm assuming that this some kind of memory-related issue?
  22. Another interesting note about having pagefileSecure enabled is that you must give permissions to user groups not only for templates, but also for any repeater that's used to store attachments. I was about to pull my hair out trying to figure out why only superusers could download anything from pages other groups were (in various tests) enabled to do everything possible to. I still have no idea what happened to the passwords when I enabled the option as mentioned above. Although encrypted, it still looked like everyone had unique passwords in phpMyAdmin when I looked at the field_pass table.
  23. Is there any reason why a change from $config->pagefileSecure = false; to $config->pagefileSecure = true; in /site/config.php would change all existing user passwords, including the admin one, or prevent them from being recognized in Processwire? I'm having to manually reset every single user password so that people can re-access the site which is a massive headache.
×
×
  • Create New...