php forum
php mysql forum
php mysql smarty
 
Topic Options
#316983 - 05/16/08 06:58 PM Custom Tag - MySpace
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5095
Loc: Portland, OR, USA
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>


_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#316984 - 05/17/08 02:46 AM Re: Custom Tag - MySpace [Re: Gizmo]
blaaskaak Offline
Member

Registered: 02/25/07
Posts: 283
Loc: The Netherlands
If you are not showing it in the usermenu, why bother creating a User Prompt?
_________________________

Top
#316985 - 05/17/08 02:59 AM Re: Custom Tag - MySpace [Re: blaaskaak]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5095
Loc: Portland, OR, USA
consistency wink...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#316986 - 05/17/08 08:26 AM Re: Custom Tag - MySpace [Re: Gizmo]
badfrog Offline
Lurker

Registered: 03/05/07
Posts: 9
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????


Edited by badfrog (05/17/08 08:29 AM)

Top
#316987 - 05/17/08 03:24 PM Re: Custom Tag - MySpace [Re: badfrog]
jgeoff Offline
Power User

Registered: 04/05/01
Posts: 93
Loc: NJ
Originally Posted By: badfrog
ok, where do I put this custom tag?


Control Panel » Content Rebuilder » Custom Tag Editor
_________________________
GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0

Top
#316989 - 05/17/08 06:49 PM Re: Custom Tag - MySpace [Re: jgeoff]
badfrog Offline
Lurker

Registered: 03/05/07
Posts: 9
ok, found it, added it, still only showing the UBB code...

[video:myspace]http://myspacetv.com/index.cfm?fuseaction=vids.individual&videoid=34033760[/video]

Top
#316992 - 05/17/08 08:32 PM Re: Custom Tag - MySpace [Re: Gizmo]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5095
Loc: Portland, OR, USA
Try changing:
Code:
http://myspacetv.com/index.cfm\?fuseaction=vids.individual&VideoID=(.+?)


To:
Code:
http://myspacetv.com/index.cfm\?fuseaction=vids.individual&videoID=(.+?)
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#316999 - 05/18/08 09:38 AM Re: Custom Tag - MySpace [Re: Gizmo]
badfrog Offline
Lurker

Registered: 03/05/07
Posts: 9
unfortunately, didnt' seem to change anything.... frown

Top
#317001 - 05/18/08 10:58 AM Re: Custom Tag - MySpace [Re: badfrog]
blaaskaak Offline
Member

Registered: 02/25/07
Posts: 283
Loc: The Netherlands
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.
_________________________

Top
#317003 - 05/18/08 12:25 PM Re: Custom Tag - MySpace [Re: blaaskaak]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2570
Loc: England
Which is how Gizmo originally had it I think.
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#317015 - 05/19/08 09:21 AM Re: Custom Tag - MySpace [Re: Gizmo]
blaaskaak Offline
Member

Registered: 02/25/07
Posts: 283
Loc: The Netherlands
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.


Attachments
myspace.txt (9 downloads)

_________________________

Top
#317016 - 05/19/08 10:20 AM Re: Custom Tag - MySpace [Re: blaaskaak]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 429
Loc: SoCal
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
_________________________

Unfair, Unbalanced, Unmedicated.

Top


Moderator:  sirdude 
Top Posters Last 30 Days
AllenAyres 58
Gizmo 25
sirdude 25
Zarzal 17
blaaskaak 10
willing 3
tackaberry 3
Who's Online
0 Registered (), 32 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Auto repair table
by blaaskaak
Yesterday at 06:16 PM
User Authentication Class
by swebs
07/18/08 06:19 PM
[7.3.x] ubb.links
by AllenAyres
07/18/08 05:09 PM
Team UBBDev Rides Again!
by AllenAyres
07/18/08 05:08 PM
ubb.social
by willing
07/17/08 06:29 PM
Multiple Identity Detector
by Detangler
07/16/08 05:59 AM
how do I change textcolor in shoutbox
by sirdude
07/14/08 05:14 PM
New Mods
[7.3+] CustomTag - Photobucket Slideshow
by Gizmo
07/12/08 11:14 AM
[7.3.x] Copy forum permissions
by blaaskaak
07/09/08 02:37 PM
Protect users emails
by Basil Fawlty
06/29/08 08:44 AM
[7.3.x] Scheduled board close for backup
by blaaskaak
06/26/08 04:01 AM
[7.3+] CustomTag - Audo Embedding
by Gizmo
06/24/08 07:52 PM
Newest Members
Stanley, NazzaN, mmem700, Tyler, nunny
13309 Registered Users

 

 

 
fusionbb message board php hacks