Jump to content

artaylor

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by artaylor

  1. Hi Martijn, Excellent module that I have used a number of times! I am using it on a site running version 3.0.11 of PW and it was working fine. I just tried to upgrade the site to 3.0.25 an error (see below). I then noticed that InputFieldSelectFile is not actually PW 3 compatible (LOL). So, 2 questions: 1. Are you planning to make an official PW 3 compatible version? 2. Any idea what might be causing this error until then? If I switch back to 3.0.11 it works fine. I clear the compiler cache every time. Notice: Trying to get property of non-object in/home/anthony/Projects/fetishfantasystudios.com/site/assets/cache/FileCompiler/site/modules/FieldtypeSelectFile/FieldtypeSelectFile.moduleon line 64 Thanks, and keep up the great work! Anthony
  2. @LostKobrakai: That was it. I am a junior PHP developer at best and have not learned the whole namespaces features yet. Thanks for the help!
  3. Newest update after trying @LostKobrakai's suggestions: 1. Used Composer in root of site. AWS is in the vendor folder. 2. 3.0.11 index.php file calls the composer autoloader so I did not add the require 'vendor/autoloader.php' to the config.php file. 3. Tried to create an S3 object in _init.php using the following: $s3 = new Aws\S3\S3Client([ 'version' => 'latest', 'region' => 'us-standard', ]); but get the following error: Class 'ProcessWire\Aws\S3\S3Client' not found The code not sure why it is trying to reference Processwire\Aws... Thanks
  4. @LostKobrakai: Thanks. I will take your suggestions and I will report back on my success or failure.
  5. Hi all, I am trying to use Amazon S3 to store video files for a client. I am having trouble getting the SDK to work. I am sure it is a stupid error on my part but my head is sore from banging it against my desk and I thought I would finally ask for some help. I am running PW 3.0.11 on NGINX. 1. Amazon recommends using Composer to install the SDK. I was not sure where in the path to install the SDK so I put composer in the /site folder and installed the SDK there (putting vendor at the same level as modules), then I put the require and uses statements in _init.php. I always got an error saying it could not load the aws or s3 classes from the library. 2. So, then I tried to use aws.phar. I put that in the /site directory but once again, no matter what I do, it will not load with the following error: require(): Failed opening required '/site/aws.phar' The file is there with proper permissions and the code for loading is: // --- amazon S3 stuff require $config->urls->site . 'aws.phar'; $s3 = new Aws\S3\S3Client([ 'version' => 'latest', 'region' => 'us-standard', ]); So, here are my questions: 1. In general, where is the correct place to put a php library? It is not a PW module so I assume it should not go in the modules folder. 2. Should I use Composer to install the SDK? If so, where do I put the files? Should I add the AWS SDK to the main composer.json file or put it somewhere else? 3. If I don't use Composer, where do I put the aws.phar file so that PW can load it? 4. Should I not put the 'require' in the _init.php file and move it to another file (_func.php)? I am sure there is a massive face-palm in my future when this gets sorted out. Thanks
  6. Hi, This is probably are really obvious issue and I will be doing a face-plant as soon as I see the answer. I want to run an animation on the home page that I only want to run once. A kind of landing page animation. What is the simplest and best way to handle this in PW? The animation is a combination of HTML, CSS and JS. Current thoughts: 1. Create an index.html file and change the .htaccess and nginx files to load that first and then have it load the index.php. The problem with this is that it is out of PW control. 2. Somehow use a session variable as a flag. Can you access a PW->session var. from JS? 3. Create a hook somewhere. I have not delved into the hooking mechanism to know where to start if this is the way. So some pointers would be amazing. 4. Similar to #3, but using site/init.php (or one of the other hook files). Once again, no idea if this is where this would make the most sense. 5. Something completely different that i haven't thought of. Problem? I haven't thought of another solution yet... I would love some suggestions about which way to go so that i don't end up spending days trying all these different ideas out. Thanks in advance.
  7. Thanks for all the help. Got SSH access and CHMOD's the files and it is working now.
  8. @adrian. Thanks again. I thought this was the case, but I did not want to open up the site for security problems by changing file permissions in the wrong place. I will go do this. Thanks for the commands as well. I appreciate you taking the extra time!
  9. It does seem to be file permissions. I changed the file permissions in the /wire/modules/AdminTheme/AdminThemeDefault/styles from 600 to 644 and now I am getting some styling. My question is, can I just CHMOD all the files in all the folders in /wire to 644 or is this going to create a problem?
  10. @adrian: Thanks for the suggestion. I just heard back from the hosting support. It was the "SetEnv HTTP_MOD_REWRITE On" line that needed to be commented out. So that solves issue number one. I still have the unstyled admin problem.
  11. Hi, I have deployed a PW 2.4 site to a shared domain as an addon domain. The URL is http://www.upasana.ca. I have run into the following issues: 1. If I use the .htaccess file that ships with PW 2.4 I get an "Internal Server Error". I have PW 2.3 sites as addons and they are working. If I copy the .htaccess file from PW 2.3 the site appears to work. The main site is a PW 2.3 site so I don't know if there is a conflict between the addon domain having PW 2.4. 2. I am getting an unstyled login and admin system. I think this might be permissions. When I check the permissions for the /wire folders they are 755 and files are 600. I do not know if the files should be 644 but I don't want to mess with the wire folders unless I know what is supposed to be there. Thanks, Anthony
  12. Hi Ryan, 1. No errors in my JS console. 2. No caching on those pages (whatever the PW default is). 3. I am using the Redirect after comment post option. 4. The code that outputs the form (stolen with gratitude from your example): if ($trailer) { $title = $film->title . ' - trailer'; } else { $title = $film->title . ' - full film'; $commentsForm = $page->comments->renderForm(array('requireSecurityField' => 'security_field')); $numComments = $page->comments->count(); if($numComments > 0) $numCommentsStr = sprintf(_n('%d Comment', '%d Comments', $numComments), $numComments); else $numCommentsStr = __('No comments yet'); } BTW, at least the bombardment has stopped filling the email notification so that is a start. Thanks.
  13. I have a contact form getting heavily spammed. I don't want to pay ransom to Akismet so I found this. I implemented everything here except the dual method listed by woop. However, I am not seeing the Success message. The comment is being added to the db. This is the JS code I implemented. The form is hidden in CSS then shown with JS. $(document).ready(function() { var $input = "<input type='hidden' name='security_field' value='1' />"; $("#CommentForm form").append($input); $("#CommentForm").show(); }); Thanks for any help. Anthony
  14. teppo, removing the entry from modules solved the problem. thanks!
  15. @teppo. Thanks for the response. I did that, I also managed to delete the table textformatter_video_embed from the database, but there is still some reference somewhere because if I try to add the module back in, it says it is already installed and then dies with the Table 'cmoran.textformatter_video_embed' doesn't exist. error message.
  16. Hi, I installed the TextFormatterVideoEmbed module (great module, btw) but during a power outage my system got corrupted. I am getting an "Error: Exception: Table 'cmoran.textformatter_video_embed'" in the log. When I go to MySQL database folder I can see the textformatter_video_embed.frm file but no MYD or MYI files. In phpMyAdmin it won't open the table (data does not exist, would be my guess). I removed the module folder from site/modules and now I can at least get into the back-end. However, it shows that it is installed but when I click to go into the details and uninstall it, I get the error Table 'cmoran.textformatter_video_embed' doesn't exist. I tried adding it back but it won't reinstall either. I seem to be stuck. I cannot uninstall it and I cannot reinstall it. What do I need to do to get it completely out of the system so that I can reinstall the module? Thx.
  17. @Ryan (It is Anthony, btw, art are my initials). Here are the files that apply. If you need anything else or need admin access to the site, let me know. Thanks for taking the time to help with this. template-files.zip
  18. @arjen: Thanks for the assist. The setting Output Caching is set to 0 in the templates that call the comments. Is that what you meant or is there somewhere else that you set caching for templates?
  19. @Ryan: Thanks for the assist. Followed your suggestion -- although I changed the line to $commentForm = $page->comments->renderForm(); I am still getting the same result. No comment, no pending comment, no email. The form shows up as expected. The site can be seen at: www.christianmoran.com. There are comments setup for each film (http://christianmoran.com/watch-the-films/ayahuasca-diary/) and in the discussion section (http://christianmoran.com/discuss/welcome-to-my-world/).
  20. @adrian - thanks for the suggestion. I do have the field on the templates. As mentioned, I am getting the form to show, just not any actual comments.
  21. Hi, Trying to get comments to work. I have followed the instructions in the API and the comment form appears but once entered the comments do not show up. Here are the field settings: Comment Moderation: none Notification Email: xxx@gmail.com - no email gets to this address Use Website...: Unchecked Redirect ... : Checked Send Email Notification on Span: Unchecked Use Gravatar: PG Use Askimet: Unchecked Comment field is used in 2 templates and each one has basically the following code: <div class="comments"> <?=$page->comments->render(); ?> <?=$page->comments->renderForm(); ?> </div> <!-- /comments --> As mentioned earlier, the Form shows so it is finding the comments field, but the comments themselves do not show. I am sure this is a newbie oversight on my part. Thanks
  22. @adrian: that would be far too simple. Looking for a more difficult method. Thanks will go give it a try. Solved Thanks @adrian, it worked like a charm!
  23. Hey all, My client wants a scrolling banner but would like to randomize the images on each page and I am having problems. I have an image field with unlimited images in a site-settings page. I try to shuffle the array returned but they are always in the same order. The code I am using is below. Any and all help is appreciated. function shuffleAssoc($list) { if (!is_array($list)){ return $list; } $keys = array_keys($list); shuffle($keys); $random = array(); foreach ($keys as $key) $random[$key] = $list[$key]; return $random; } function bannerShow() { if(count(wire("pages")->get("/site-settings/")->site_banner_images)) { $bannerimages = wire("pages")->get("/site-settings/")->site_banner_images; $out =""; // randomize the images $randimages = shuffleAssoc($bannerimages); foreach ($randimages as $image) { $out .="<img src='$image->url' />/n"; } echo $out; } else { echo "<p>NO BANNER IMAGES FOUND</p>" ; } }
  24. Solved Never mind. I am a total idiot somehow. I swear I looked and looked and looked. Somehow I had reversed the two options and set debug to false and demo to true... Feel like a total putz. Let the razzing begin. I deserve a round of laughter and finger pointing.
×
×
  • Create New...