UBB.Dev
Posted By: Gizmo Custom Tag - MySpace - 05/17/2008 1:58 AM
The UBB by default comes with a MySpace tag to parse videos only from "vids.myspace.com", if you're having trouble posting videos from "myspacetv.com" then you'll want to add the following Custom Tag (since there is already a [video:myspace] tag in the custom tags menu, we won't even be showing this in the menu)

Custom Tag:
Code
video:myspace

Description:
Code
MySpace Video

User Prompt:
Code
MySpace URL; eg: http://myspacetv.com/index.cfm?fuseaction=vids.individual&videoid=xxxxxx

Matching Regex:
Code
http://myspacetv.com/index.cfm\?fuseaction=vids.individual&VideoID=(.+?)

Resulting Markup:
Code
<embed src="http://lads.myspace.com/videos/vplayer.swf" flashvars="m=\\1&v=2&type=video" type="application/x-shockwave-flash" width="425" height="350"></embed>

Posted By: blaaskaak Re: Custom Tag - MySpace - 05/17/2008 9:46 AM
If you are not showing it in the usermenu, why bother creating a User Prompt?
Posted By: Gizmo Re: Custom Tag - MySpace - 05/17/2008 9:59 AM
consistency wink...
Posted By: badfrog Re: Custom Tag - MySpace - 05/17/2008 3:26 PM
ok, where do I put this custom tag? i don't see a custom tagas menu listed in the control panel...
am I looking for a template????
Posted By: jgeoff Re: Custom Tag - MySpace - 05/17/2008 10:24 PM
Originally Posted by badfrog
ok, where do I put this custom tag?


Control Panel » Content Rebuilder » Custom Tag Editor
Posted By: badfrog Re: Custom Tag - MySpace - 05/18/2008 1:49 AM
ok, found it, added it, still only showing the UBB code...

[video:myspace]http://myspacetv.com/index.cfm?fuseaction=vids.individual&videoid=34033760[/video]
Posted By: Gizmo Re: Custom Tag - MySpace - 05/18/2008 3:32 AM
Try changing:
Code
http://myspacetv.com/index.cfm\?fuseaction=vids.individual&VideoID=(.+?)

To:
Code
http://myspacetv.com/index.cfm\?fuseaction=vids.individual&videoID=(.+?)
Posted By: badfrog Re: Custom Tag - MySpace - 05/18/2008 4:38 PM
unfortunately, didnt' seem to change anything.... frown
Posted By: blaaskaak Re: Custom Tag - MySpace - 05/18/2008 5:58 PM
Let's make things simpler smile

Why do we care about a correct url. We are only interested in the last parameter right? No matter what domain is entered.

Code
.*VideoID=(.+?)

Seems like a good enough regex for me.

The tag already defines which video service is being used, no need to double check the url.

You would only need to involve the full url if you would make a general [video] tag and the actual video service would be determined from the url entered.
Posted By: Ian_W Re: Custom Tag - MySpace - 05/18/2008 7:25 PM
Which is how Gizmo originally had it I think.
Posted By: blaaskaak Re: Custom Tag - MySpace - 05/19/2008 4:21 PM
Originally Posted by Gizmo
The UBB by default comes with ...


Another great thing, it also comes default with an option to both export and import tags. No need for users to type in stuff smile

I've attached my version of the MySpace tag. Accepts both an url and just a code. Regex inspired by SD's youtube regex posted on ubbcentral.

Attached File
myspace.txt  (11 downloads)
Posted By: sirdude Re: Custom Tag - MySpace - 05/19/2008 5:20 PM
yes, mr Yarp™ has the correct idea. i believe it's the better and in long run easier way to approach it.

for people who aren't too regex savvy, i'd recommend regexbuddy.. after playin with it for a bit, the world of regexes gets a lot more clear.

Then you can keep using it, or after awhile you kinda don't need it anymore. smile
© UBB.Developers