InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


Suggestion: Increase IFCode Replace... Expand / Collapse
Author
Message
Posted 13/05/2005 17:39:17
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Customers
Last Login: 15/11/2005 12:15:17
Posts: 65, Visits: 82
Although an easy custom work around, I would suggest increasing the maximum size of the IFCode "Replace Pattern" field from nvarchar(300) to nvarchar(4000). This will allow for greater flexibility with IFCode custom HTML inserts in posts.



Why would you want to do something like this? Examine the example below. This would allow your users to use IFCode to post a flash video player embedded within their post.

IFCode

Friendly Name: Video

Tag Example:
[video url="http://yourserver.com/yourvideo.flv"]Your Caption[/video]

Actual code to insert:
[video url=""][/video]

Search Pattern:

\[video url="([^>]*?)"\](.*)\[\/video\]

Replace Pattern:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="300" id="PlayVideo" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="PlayVideo.swf?url=$1" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="PlayVideo.swf?url=$1" quality="high" bgcolor="#000000" width="400" height="300" name="PlayVideo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object><br><b><i><font class="">$2</font></i></b>

What the other forum users will see, is an external Flash object that will stream a multimedia file based on the url that was entered on the post, along with a caption below the Flash. (The design of the Flash object is obviously outside of the scope of this post.) Now, obviously the Replace Pattern is much larger than 300 characters, so by limiting this field you have lost the ability to include the functionality that an example like this provides.



Custom Workaround:

1. Update the database field [InstantForum_IFCode].[ReplacePattern] to nvarchar(4000)
2. Update the stored procedure [if_sp_InsertUpdateIFCode] variable "@strReplacePattern" type to nvarchar(4000)





Kind regards,

Tye Odle
IT Consultant
Assist Technology, Inc.

Post #6621
Posted 24/05/2005 05:16:09


IF.NET 4.2 Coming Soon

IF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming Soon

Group: Administrators
Last Login: 2 days ago @ 11:53:33
Posts: 1,959, Visits: 3,027
Many thanks Tye, Great suggestion. This will be available within RC3 due towards this weekend.


Kindest Regards,

Ryan Healey
Director / Developer

Explore our products...
http://demos.instantasp.co.uk/

Post #6835
« Prev Topic | Next Topic »

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 10:04pm

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.109. 10 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.