PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2007-02-22 03:54:36

mannungo
Member
From: Santiago, Chile
Registered: 2007-02-17
Posts: 17
Website

Javascript Triggers 0.2

Code:

##
##
##        Mod title:  Javascript Triggers
##
##      Mod version:  0.2 - Experimental
##   Works on PunBB:  1.2.4
##     Release date:  2007-02-21
##           Author:  Manuel Ortega (manuel@ortega.cl)
##
##      Description:  Add javascript triggers
##
##   Affected files:  headers.php (add one line)
##                    js/javascript_triggers.js (upload one new file)
##
##       Affects DB:  Nop
##
##            Notes:
##
##  Without any special bbcode, Javascript Triggers transform the page in the
##  client-side, making:
##  1. Videos: Transform links to Youtube, Google Video, etc into <objects>
##  2. Favicons: Try to load the favicon for all links to external pages
##  3. Syntax: add a basic syntax highlight to the [code ][/code ] bbcode
##  4. Detach: add a link for open [code ][/code ] in a new window
##  5. Resizer: <textarea>'s adjust to the content
##
##       Notes2: sorry for my english :)
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download here

Offline

 

#2 2007-02-22 18:21:12

mannungo
Member
From: Santiago, Chile
Registered: 2007-02-17
Posts: 17
Website

Re: Javascript Triggers 0.2

Despite the little attention of this mod :p , i put a demo of the mod in  http://adi.ing.uchile.cl/~mortega/punbb_124/

And the link of project is http://www.punres.net/desc.php?pid=353

Last edited by mannungo (2007-02-22 18:21:25)

Offline

 

#3 2007-03-05 14:05:45

FBI
Member
Registered: 2007-02-28
Posts: 17

Re: Javascript Triggers 0.2

Awesome..
Work Perfectly with Opera Browser.
Its cool..

Must have mod, even in Javascripts. But, I like the way to display Google Video and Youtube.
Doesnt like another mod, needs edit manually. Its easy to implementating.

I did before like this http://img390.imageshack.us/img390/2851/bbcodety3.gif


PunBB, Simplicity has been easier than before
Smart is Simple. Fast is Smart. Think Fast, You'll be Smart..

PunBB & SMF Fans

Offline

 

#4 2008-06-03 18:22:55

mi
New member
Registered: 2004-10-17
Posts: 8

Re: Javascript Triggers 0.2

Looks and works great (I have not tried the video thingy yet) !

Any dangers with javascripts "included" like this?
Any other drawbacks?

I have only one little request:

- After the favicon shown, i would like a "space"/non-breaking space, but i can't seem to find out how to add that. Anyone?

- Any chance i can add into "var sites = {" a method to include my own .flv videos on the same server as the forum???
(( I can tell that the js-scripts finds suitable flash-player for client... If the player is on the local server, I should just direct the client in forum to that player...))

Edit2:
To include other stuff in the parser.php - check this:
http://punbb.informer.com/forums/topic/ … ed/page/3/

Last edited by mi (2008-07-15 02:25:49)


Running PunBB 1.2.19 • School-forumFriendly Web-shopMy sailboat-forum • VERY happy with PunBB!

Offline

 

#5 2008-11-06 14:07:00

tosca
New member
Registered: 2008-10-20
Posts: 1

Re: Javascript Triggers 0.2

mi wrote:

- After the favicon shown, i would like a "space"/non-breaking space, but i can't seem to find out how to add that. Anyone?

Hi,

I found the answer to this one : at line 35 of  javascript_triggers.js insert a space just before the quote preceding +a.innerHTML;
Thus, the whole resulting line is :

Code:

            if( url ) a.innerHTML = '<img src="'+url[1]+'/favicon.ico" width="0" height="0" onload="this.width=this.height=16" alt=" " /> '+a.innerHTML;

That looks much better IMO :-)

Offline

 

#6 2008-11-06 14:35:44

mi
New member
Registered: 2004-10-17
Posts: 8

Re: Javascript Triggers 0.2

SUPER! Thanks. Works.


Running PunBB 1.2.19 • School-forumFriendly Web-shopMy sailboat-forum • VERY happy with PunBB!

Offline

 

#7 2013-03-03 07:45:50

ndbj
New member
Registered: 2013-03-03
Posts: 7

Re: Javascript Triggers 0.2

Greetings!
I started to edit my java_triggers.js file in order to transform links from "videos.no.sapo" into <objects>, but without sucess.
Can someone help me on this?

Here's how they're like:
http://videos.sapo.pt/dPosHCTfHSfiomymswzO
http://videos.sapo.pt/6v7zRPwqwa6O6yDW6Ab4

Thanks in advance

Last edited by ndbj (2013-03-03 07:48:52)

Offline

 

#8 2013-03-03 20:42:37

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Javascript Triggers 0.2

Hi, this looks like a cool mod. I've added support for videos from dailymotion.com and videos.sapo.pt, and also fixed support for videos from metacafe.com.

You can download the updated version of the js file here:
javascript_triggers_update_rev1

Offline

 

#9 2013-03-05 19:52:29

ndbj
New member
Registered: 2013-03-03
Posts: 7

Re: Javascript Triggers 0.2

Big thanks.

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.