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

Wizard

Registered: 01/10/00
Posts: 5354
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 & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

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

Registered: 02/25/07
Posts: 329
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 Offline

Wizard

Registered: 01/10/00
Posts: 5354
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 & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

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

Registered: 03/05/07
Posts: 83
Loc: somewhere on the coast of Main...
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: 97
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
Power User

Registered: 03/05/07
Posts: 83
Loc: somewhere on the coast of Main...
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 Offline

Wizard

Registered: 01/10/00
Posts: 5354
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 & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

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

Registered: 03/05/07
Posts: 83
Loc: somewhere on the coast of Main...
unfortunately, didnt' seem to change anything.... frown

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

Registered: 02/25/07
Posts: 329
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 Offline

Veteran

Registered: 02/22/02
Posts: 2575
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
Enthusiast

Registered: 02/25/07
Posts: 329
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 Offline
Enthusiast

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

Top



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks