Hey Lizard, nice to see you still about too
FYI all:
I am now back from my vacation and gearing up to head out on a business trip to Athens. I have finished the first beta of what will now be 2.5 and it is being tested while I find time to do some code clean up. To whet your whistle and give you an idea as to why I have gone from version 2 to 2.5 in a couple weeks time... here is a smackle of what is included in the next version:
New in 2.5:
- Ability to prevent non authorised usergroups from viewing media (see limitations below)
- Full usergroup permissions support (edit user group to adjust edit/view permissions per zone)
- Template driven system which uses templates now instead of 1 master replacement (see note on conditionals below)
- New zone: Signatures!
- Different sizes and templates for each supported zone (posts, blogs, groups, visitor messages and signatures). That means that AME's in signatures can have no container table around the media and be small, but those in posts can have special ones with larger size videos
- A couple new hooks. This is to support an AME add on for profiles I prototyped.
- Notification system (similar to vB's that check for configuration errors, duplicates and other items that could cause unexpected behaviour)
- definition keys for easier updating of definitions. This will also allow you to use conditionals in the templates if maybe you wanted media logos or a different look to the videos.
- File caching system which radically reduces processing. This saves the definition query and array building. Ideal if you have a LOT of definitions.
- And more that I cant think of off the top of my head!
Limitations with usergroup viewing permissions
The new system uses javascript to attempt to 'hide' the embedded media and 'show' a default URL. If the user doesn't have javascript enabled or places an embedded video in their post via the quick reply box, it will appear to them until they refresh the page. Of course, if the person doesn't have permission to view, I doubt they would have permission to embed anyway!
Another limitation with permissions will be that if someone with permission to post URLs edits someones who doesnt... well.. . it will appear!
Note on template conditionals
vBulletin caches the contents of posts after it has been parsed to save processing time. This means that if you put a condition into one of AMEs templates that will somehow alter the contents based on who is viewing it... you will get unexpected results. Say for example, in AMEs template you used the following conditional:
<if condition="$bbuserinfo['userid']==1">Hi Bob!</if>
If someone other than userid #1 created the post (and hence the cache), it won't appear, even when user #1 views it! Obviously the opposite is also true.
The only way to get around this is to turn off vBulletins post cache, but I wouldn't recommend it!
Changes to definitions
Stop using width and height tags in your object and embed tags. Instead, use $ameinfo[height] and $ameinfo[width] respectively. This is so that users can specify the dimensions in their settings and use the same definition in different areas of the site. Although pre 2.5 definitions will work, It will look pants if you can't tweak the size for a signature!
Start putting the ameid tag in your exported items. This is a unique identifier similar to vB's productid that can contain only alphanumeric characters and an underscore (basically any combination of letters, numbers and the _ character. No spaces permitted). This tag will help prevent duplicate imports and also give the template the option of knowing what type of media it is.
nJoy