Quantcast
Channel: Bob Ray – Arvixe Blog
Browsing all 115 articles
Browse latest View live

Using explode() to create arrays

Say you have a snippet that needs a simple array and want to send the elements of the array in the snippet tag. The PHP explode() function is custom-made for … Learn More

View Article


Using explode() to Create Associative Arrays

In the previous article, we saw how to use explode() to create a simple array of names. In this one, we'll send an extra bit of information along with each … Learn More

View Article


Important Tips for MODX Extra Developers

As the creator of a MODX extra, you have a responsibility to remove all parts of your package when your package is uninstalled. Some of the things installed by a package … Learn More

View Article

Using implode() to Convert an Array to a String

If you’ve read the last two articles, you know how the explode() function works. The implode() function does just the opposite. It converts an array to a delimiter-separated string. In … Learn More

View Article

Imploding an Associative Array

In the previous article, I said that implode() only works on simple, numeric arrays, but what if you want to do something similar with an associative array of keys and … Learn More

View Article


Final Argument to getOption()

In an earlier article, I wrote about some of the finer points of the $modx->getOption() method. It occurred to me that I could do a better job of explaining how … Learn More

View Article

Taming the MODX Revolution Error Log

This article highlights a new MODX Extra by Sergey Shlokov. Sergey’s extra delivers a neat improvement on the MODX Error Log. It’s called controlErrorLog. Error Log Annoyances It’s always bothered …...

View Article

Set the Unpublish Date of a Resource Automatically

The method used here was inspired by a MODX forum post from Michelle84. The idea is that you might have time-sensitive resources that should be unpublis hed after a certain … Learn More

View Article


Never Use the id Field of the User Profile to Retrieve a MODX User’s Profile

This article is about a very insidious MODX error. It involves using the id field of the user profile to retrieve a user’s profile. It will often work at first, … Learn More

View Article


Redirecting MODX Users on Login II

In the last article, we saw how to redirect users to a common page or to the page they came from after they log in. In this one, we’ll see … Learn More

View Article

Redirecting MODX Users on Login

This is the first in a series of articles about redirecting users when they log in. Often, you have a good idea where a user wants to go when he … Learn More

View Article

Redirect MODX Users on Login III

In the last article, we saw how to redirect users after login based on the time or season. In this one, we’ll see how to do it on the basis … Learn More

View Article

Redirecting MODX Users on Login IV

In the last article, we saw how to redirect users after login based on a user setting. In this one, we’ll see how to do it on the basis of … Learn More

View Article


Redirecting MODX Users on Login V

In the last article, we saw how to redirect users after login based on a user group setting. In this one, we’ll see how to do it on the basis … Learn More

View Article

Redirecting MODX Users on Login VI

In the last article, we saw how to redirect users after login based on user group membership, but without a user group setting or a user setting. In this one, … Learn More

View Article


Redirecting MODX Users on Login VII

As I mentioned in the last article, having to get each user group object just to get its ID is kind of wasteful. In this one, we’ll add the group … Learn More

View Article

Redirecting MODX Users on Login VIII

Most user redirection on login takes place in the front-end, but someday you may want to redirect users when they log in. Say, for example, that you have a user … Learn More

View Article


Tracking MODX Error Message to their Source

Sometimes, when you see an error message reported on the screen or in the error log, you’ll get information about where the message is coming from. In other cases, though, … Learn More

View Article

The MODX White Screen of Death

If a snippet, or sometimes a plugin, contains a fatal PHP error, you may end up looking at the MODX white screen of death. It’s usually a completely blank screen, … Learn More

View Article

MODX User-related Resource Fields I

This is the first in a series of articles about handling the user-related fields of a resource (createdby, publishedby, editedby, deletedby). Each field holds the ID of the user who … Learn More

View Article
Browsing all 115 articles
Browse latest View live