• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Can I add an execution order to media sites?

rhodes

Active member
#1
I have several media sites.

1:
mydomain.de/content/{$id}

2:
mydomain.de/content/special/{$id}
..
All of them use a callback function like public static function getMyData1($mediaKey, array $site) ..

When I post a string like "mydomain.de/content/special/{$id}" callback 1 is executed because the system recognizes mydomain.de/content.

Now I'm looking for a solution where all posted URLs with "special" in it use callback function 2. My first idea was to add a kind of execution order to media pages. Is his possible? Or is there any other possibility to handle my media pages in example 1 + 2?
 

Mike

XenForo developer
Staff member
#2
There isn't a way to add an execution order. Generally, the sites are assumed to be uniquely indicated by URL.

You could likely handle this as separate sites by using regular expressions to do the matching, combined with assertions. Or using a URL match callback.