Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Need Help Writing Function

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
leatherlips Posted - 29 October 2009 : 14:56:07
I'm working on a new mod for my forum but am having trouble writing the function in inc_func_common.asp.

I think I'm getting close to making this work but need some help.

I'm basically working on a new [media] tag. What you do is place a url to virtually any video from YouTube, Dailmotion, Vimeo or any site like that and it will open in a lightbox style pop up. It will also open swf files, mp3 files, flv files, images... just about anything.

Here is what I have so far...

I know there is already a Online Video MOD but I would like to write a new one that is able to be more robust.

Anyone willing to help me on this?
15   L A T E S T    R E P L I E S    (Newest First)
thermal_seeker Posted - 13 May 2011 : 17:21:13
I'm not sure what's happening but when a vid is playing in the box the page number disappears and a large brown section appears below the forum footer. Also I notice it will play an .mp4 that is hosted elsewhere but doesnt play the same vid from a folder on site.




Dave
Carefree Posted - 29 August 2010 : 23:44:51
Well they found another bug in it. If a URL has a space (whether depicted as a space or as %20), the character is double-encoded and results as %2520. I cannot find where it's happening.
leatherlips Posted - 27 July 2010 : 21:20:41
Glad I could finally help.
Carefree Posted - 27 July 2010 : 21:10:25
That was it - don't know how I lost that line, thanks.
leatherlips Posted - 27 July 2010 : 19:00:53
I looked a little closer at your media function in your inc_func_common.asp file and I think I found the problem. You are missing the line in red:

strArray2 = split(strArray(counter2), cTag, -1)
strCodeText = trim(strArray2(0))

Also, in the mediaboxAdv-1.1.6.js file, the two places where you enter your URL, I would recommend not using the <% =strForumURL %>. Instead put in the address manually. For some reason the <% =strForumURL %> doesn't always work when it looks for the swf files.
Carefree Posted - 26 July 2010 : 23:40:29
No change. It doesn't keep the URL variable at all. Javascript seem to treat it as a restricted variable - it's a different color than the rest when viewed in UltraEdit.
leatherlips Posted - 26 July 2010 : 17:54:43
It has something to do with how it is reading the URL. When you hover over the Play Media link you should see the original URL of the file to be played in the browsers status bar, i.e. www.youtube.... On your site, the links are showing to be from your site with a broken rel= added to it.

In your mediaboxAdv-1.1.6.js file try adding the forward slash in both URL's:

<% =strForumURL %>/media/player.swf

and

<% =strForumURL %>/media/NonverBlaster.swf
Carefree Posted - 26 July 2010 : 16:48:50
Yes, tested with/without using the strForumURL variable. No change either way.
leatherlips Posted - 26 July 2010 : 16:24:53
Did you add your URL to the two spots in the mediaboxAdv-1.1.6.js file?
Carefree Posted - 26 July 2010 : 16:04:40
I had tested the URL variable (which apparently is using the value of strForumURL) with that line. Removing it does nothing - it's gone now, issue persists.
leatherlips Posted - 26 July 2010 : 12:03:03
In inc_func_common.asp you've made other changes to the code such as:

ReplaceMediaTags = strTempString
	strRMT=strTempString

What happens if you remove all of your changes?
Carefree Posted - 26 July 2010 : 11:34:25
The div tags in "inc_func_common.asp" do not affect results. No changes made to "media.js", it reads as follows:

function EmbedMedia(URL){
   if(URL == null || URL == "illegal"){
      //Nope, we can't.
      document.writeln(" error: illegal use of Media tag! ");
   }else{
      //Add the code to the document.
      document.writeln('<a href=' + URL + ' rel="lightbox[480 380]">Play Media</a>');
   }
}
leatherlips Posted - 26 July 2010 : 11:12:19
I noticed in inc_func_common.asp you changed this:

CodeTags(1,1,2) = "<div><script language=""javascript"">EmbedMedia("""
CodeTags(1,2,2) = """,290,300,false)</script></div><div></div>"

To this:

CodeTags(1,1,2) = "<script language=""javascript"">EmbedMedia("""
CodeTags(1,2,2) = """,290,300,false)</script>"

I'm not sure if that is the problem as all you did was remove the div tags but what happens if you change it back to the original?

Also, did you make any changes to the media.js file?
leatherlips Posted - 26 July 2010 : 06:15:40
I've not done anything with this mod for a while. I checked on my test page and everything is still working: http://www.mangionemagic.com/testforum2/topic.asp?TOPIC_ID=2

Are you sure you installed it correctly? I'll take a look and see why that is happening to you.
Carefree Posted - 26 July 2010 : 05:06:31
Weird crap with media-box mod.

I installed it on another forum and got screwed up URLs (making it not function). It always comes out like this, regardless of the content in the post:

(forumURL)/rel=%22lightbox%5B480


So, I put the media-box mod on a brand-new forum (no other mods) and I get exactly the same URL displayed. Has something stopped working in a remote .js file?

Example can be seen here: http://verybusyserver.com/testsite/

Use login "Tester" and pw: "tester"

I added a link to a source file viewer in the heading.

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07