David A McInnis
  • Member for 7 years, 6 months
  • Last seen more than a month ago
Why are my template filenames showing up in Google Analytics
Accepted answer
3 votes

From my testing it appears that this is an issue with Google's universal analytics. Based off of Clive's recommendation, my solution what to change ga('send', 'page view'); to ga('send', '...

View answer
Assign category through a plugin
Accepted answer
2 votes

Okay, I think I figured it out. 1st, I added the getContent() I changed $entry->showName[] = 22; to $entry->getContent()->showName = 22; I think the problem is that the category ...

View answer
Is it possible to change the time increments in the Date/Time field?
2 votes

I needed a 10 minute increment. From the CP side, you can just ignore the dropdown and type in the minutes to override. From frontend forms this is not an issue because you can do whoever you want ...

View answer
Save user profile fields through plugin
2 votes

Fred got me pointed down a path. Not sure why this works, perhaps someone can explain it to me. This is what I ended up doing. $initialCredits = 100; $user = craft()->users->getUserById(craft()-...

View answer
Guest Entries plugin with Paypal integration?
2 votes

Hope that its not too late. I would not use paypal. Use stripe instead. You can then redirect the user to the Charge plugin by Squarebit.co.uk after the entry has posted. Once payment is made, change ...

View answer
Use NGINX to proxy a Craft CMS site hosted on apache into an existing site
Accepted answer
1 votes

I discovered the issue. The issue was a conflict in the craft. I had the wrong URL in Settings > Sites: [This site has its own base URL] should be clicked and the correct URL should be provided. ...

View answer
assets.beforeSaveEntry to upload file to secondary location in addition to Amazon S3
Accepted answer
1 votes

So this works. Now that I have the understanding of how things fire I can clean this up. I am open to better solutions. craft()->on('entries.onSaveEntry', function(Event $event) { ...

View answer
Is there a way to send offsite backups of the whole site to Amazon S3?
1 votes

Try this. Install this on your server http://s3tools.org/s3cmd Then create a bash script to mysqldump your database place the mysqldump in your directory path. I place mine in /var/www/site/...

View answer
Setting up Route for Category-based RSS Feeds
1 votes

Okay, I think that I have figured it out. Posting here for posterity. Based on the requirement above, I put these in my routes.php file. 'shows\/(?P<parentSlug>[a-zA-Z0-9\-\.]+)\/(?P<...

View answer
Using Date to Filter Entries
1 votes

Jameal put me on the right track here. What I actually needed was to select entries where lastAssigned date was more than 3 days old. I accomplished this by. {% set entries = craft.entries({ ...

View answer
How to search for a specific field using getCriteria()?
1 votes

Try something like this. Remember to check the status. $criteria = craft()->elements->getCriteria(ElementType::Entry); $criteria->slug = $slug; $criteria->status = NULL;

View answer
Is there a way to send offsite backups of the whole site to Amazon S3?
1 votes

I personally have a cron set up to rsync my site to another server that is my standby server. If something happens it is ready to be swapped in. Using Amazon Mysql is great, they do all of the backups ...

View answer
What's the difference between ElementCriteriaModel and DbCommand?
1 votes

I assume that one advantage would be that as Craft gets updated, the ElementCriteriaModel is updated whereas you may need to change any DBCommand queries you have created.

View answer
Retrieve Author Email based on Entry Id
Accepted answer
1 votes

I think I found my solution. To recap, I have a front-end form where a user that is not the author is permitted to make changes to an existing entry. I was creating a new Entry model instead of ...

View answer
How to set up CloudFront for a Craft site
0 votes

We are using the twig filter like this. | replace({'http://s3-us-west-2.amazonaws.com/cranberrynm':'http://d15jwbqszojdqk.cloudfront.net'}) }}

View answer
onBeforeRender event? Is there an event or hook I can use with my plugin?
0 votes

Based off the recommendations I am going to use the onLoadPlugins event. I can limit its execution of business logic based on the URL construct. At least until I get a better solution. This should ...

View answer
Is there a way to force Assets to redo transforms?
0 votes

You have probably figured this out by now. But I go into my images folder and remove the sub-directories that Craft sets up for each transform. For example if you have a transform set up as ...

View answer