271. File Comparison Report

Produced on Mon May 12 13:05:44 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

271.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\orca\js BxHistory.js Wed Oct 17 08:48:16 2007 UTC
2 Dolphin-v.6.1.0\orca\js BxHistory.js Thu Apr 10 09:53:28 2008 UTC

271.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 7 358
Changed 4 51
Inserted 1 62
Removed 2 3

271.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

271.4 Active regular expressions

No regular expressions were active.

271.5 Comparison detail

1   /**   1   /**
2   *                              O rca Intera ctive Foru m Script   2   *                              O rca Intera ctive Foru m Script
3   *                                 --------- ------   3   *                                 --------- ------
4   *     Star ted              : Mo n Mar 23 2 006   4   *     Star ted              : Mo n Mar 23 2 006
5   *     Copy right            : (C ) 2007 Boo nEx Group   5   *     Copy right            : (C ) 2007 Boo nEx Group
6   *     Webs ite              : ht tp://www.b oonex.com   6   *     Webs ite              : ht tp://www.b oonex.com
7   * This fil e is part  of Orca -  Interactiv e Forum Sc ript   7   * This fil e is part  of Orca -  Interactiv e Forum Sc ript
8   * GPL   8   * Creative  Commons A ttribution  3.0 Licen se
9   **/   9   **/
10     10  
11     11  
12   /**   12   /**
13    * Enable  back brows er button  for ajax   13    * Enable  back brows er button  for ajax
14    */   14    */
15     15  
16     16  
17   isIE = 0;   17   isIE = 0;
18   if (docume nt.all &&  !window.op era) isIE  = 1;   18   if (docume nt.all &&  !window.op era) isIE  = 1;
19     19  
20   /**   20   /**
21    * constru ctor   21    * constru ctor
22    */   22    */
23   function B xHistory ( )   23   function B xHistory ( )   
24   {   24   {
25       this._ hash = "";  // curren t hash (af ter #)   25       this._ hash = "";  // curren t hash (af ter #)
26       this._ to = 400;  // timeout  to check  for histor y change   26       this._ to = 400;  // timeout  to check  for histor y change
27       this._ hf = null;  // hidden  iframe   27       this._ hf = null;  // hidden  iframe
28       this._ en = '';   28       this._ en = '';
    29  
    30       this._ rw = {
    31       
    32        'cat' : { // cat egories
    33                'regexp'  : '^group /(.*)\\.ht m$', 
    34                'eval' :  'document .f.selectF orumIndex  (m[1]);',
    35                'pre' :  'group/',
    36                'ext' :  '.htm'
    37                },
    38  
    39        'foru m': { // f orums
    40                'regexp'  : '^forum /(.*)-(\\d +)\\.htm$'
    41                'eval' :  'document .f.selectF orum (m[1] , m[2]);',
    42                'pre' :  'forum/',
    43                'page' :  '-',
    44                'ext' :  '.htm'
    45                },
    46  
    47        'topi c': { // t opics
    48                'regexp'  : '^topic /(.*)\\.ht m$', 
    49                'eval' :  'document .f.selectT opic (m[1] );',
    50                'pre' :  'topic/',
    51                'ext' :  '.htm'
    52                },
    53  
    54        'user ': { // us er
    55                'regexp'  : '^user/ (.*)\\.htm $', 
    56                'eval' :  'document .f.showPro file (m[1] );',
    57                'pre' :  'user/',
    58                'ext' :  '.htm'
    59                },
    60  
    61        'edit _cats': {  // edit ca ts
    62                'regexp'  : '^actio n=goto&edi t_cats=', 
    63                'eval' :  'if (docu ment.orca_ admin) doc ument.orca _admin.edi tCategorie s ();'
    64                },
    65  
    66        'new_ topic': {  // new top ic
    67                'regexp'  : '^actio n=goto&new _topic=(.* )$', 
    68                'eval' :  'document .f.newTopi c (m[1]);'
    69                },
    70  
    71        'sear ch': { //  search
    72                'regexp'  : '^actio n=goto&sea rch=', 
    73                'eval' :  'document .f.showSea rch ();'
    74                },
    75  
    76        'sear ch_result' : { // sea rch result s
    77                'regexp'  : '^actio n=goto&sea rch_result =1&(.*?)&( .*?)&(.*?) &(.*?)&(.* ?)$', 
    78                'eval' :  'document .f.search  (m[1], m[2 ], m[3], m [4], m[5]) ;'
    79                },
    80  
    81        'my_f lags': { / / my flags
    82                'regexp'  : '^actio n=goto&my_ flags=', 
    83                'eval' :  'document .f.showMyF lags ();'
    84                },
    85  
    86        'my_t hreads': {  // my thr eads
    87                'regexp'  : '^actio n=goto&my_ threads=',
    88                'eval' :  'document .f.showMyT hreads (); '
    89                }
    90       };
29   }   91   }
30     92  
31   /**   93   /**
32    * go to t he specifi ed page -  override t his functi on to hand le specifi c actions   94    * go to t he specifi ed page -  override t his functi on to hand le specifi c actions
33    * @param  h     hash  (#)   95    * @param  h     hash  (#)
34    */   96    */
35   BxHistory. prototype. go = funct ion (h)   97   BxHistory. prototype. go = funct ion (h)
36   {   98   {
37       var a  = h.split( '&');    
38       if (!a .length) r eturn;    
39     99  
40       if (a[ 0] == 'act ion=goto')   100       for (v ar i in th is._rw)
41       {   101       {
42           va r aa = a[1 ].split('= ');   102           va r pattern  = new RegE xp(this._r w[i]['rege xp']); 
43           sw itch (aa[0 ])   103           va r m = h.ma tch(patter n);
44           {   104           if  (!m) cont inue;
45                // admin  functions   105           ev al (this._ rw[i]['eva l']);
46                case 'ed it_cats':    
47                    if ( document.o rca_admin)  document. orca_admin .editCateg ories ();    
48                    brea k;    
49      
50                // user  functions    
51      
52                case 'ca t_id':    
53                    docu ment.f.sel ectForumIn dex (aa[1] );    
54                    brea k;    
55                case 'fo rum_id':    
56                    docu ment.f.sel ectForum ( aa[1], a[2 ]);    
57                    brea k;    
58                case 'to pic_id':    
59                    docu ment.f.sel ectTopic ( aa[1]);    
60                    brea k;    
61      
62                case 'ne w_topic':    
63                    docu ment.f.new Topic (aa[ 1]);    
64                    brea k;    
65                case 'se arch':    
66                    docu ment.f.sho wSearch () ;    
67                    brea k;    
68                case 'se arch_resul t':    
69                    docu ment.f.sea rch (a[2],  a[3], a[4 ], a[5], a [6]);    
70                    brea k;    
71                case 'my _flags':    
72                    docu ment.f.sho wMyFlags ( );    
73                    brea k;    
74                case 'my _threads':    
75                    docu ment.f.sho wMyThreads  ();    
76                    brea k;    
77                case 'pr ofile':    
78                    docu ment.f.sho wProfile ( aa[1]);    
79                    brea k;   106           br eak;
80           }   107       }
81       }    
82     108  
83       return ;   109       return ;
84   }   110   }
85     111  
86   /**   112   /**
87    * history  initializ ation   113    * history  initializ ation
88    * @param  name       hame of hi story obje ct   114    * @param  name       hame of hi story obje ct
89    */   115    */
90   BxHistory. prototype. init = fun ction (nam e)   116   BxHistory. prototype. init = fun ction (nam e)
91   {   117   {
92       this._ en = name;   118       this._ en = name;
93     119  
94       if (is IE) this._ initHidden Frame();   120       if (is IE) this._ initHidden Frame();
95     121  
96       this.h andleHist  ();   122       this.h andleHist  ();
97       window .setInterv al(this._e n + ".hand leHist()",  this._to) ;   123       window .setInterv al(this._e n + ".hand leHist()",  this._to) ;
98     124  
99       return  true;   125       return  true;
100   }   126   }
101     127  
102   /**   128   /**
103    * handle  history (o ntimer fun ction)   129    * handle  history (o ntimer fun ction)
104    */   130    */
105   BxHistory. prototype. handleHist  =  functi on ()   131   BxHistory. prototype. handleHist  =  functi on ()
106   {   132   {
107       if (is IE)   133       if (is IE)
108       {   134       {
109           va r id = thi s._hf.cont entDocumen t || this. _hf.conten tWindow.do cument;   135           va r id = thi s._hf.cont entDocumen t || this. _hf.conten tWindow.do cument;
110           va r h = id.g etElementB yId('hidfr ').value;   136           va r h = id.g etElementB yId('hidfr ').value;
111     137  
112           if  ( h != wi ndow.locat ion.hash)   138           if  ( h != wi ndow.locat ion.hash)
113           {                             139           {                          
114                this._ha sh = h;   140                this._ha sh = h;
115                var h =  this._hash .substr(1) ;   141                var h =  this._hash .substr(1) ;
116                //alert  ('h = ' +  h + "\n" +  'window.l ocation.ha sh = ' + w indow.loca tion.hash) ;   142                //alert  ('h = ' +  h + "\n" +  'window.l ocation.ha sh = ' + w indow.loca tion.hash) ;
117                if (h.le ngth)   143                if (h.le ngth)
118                {    144                { 
119                    this .go (h);   145                    this .go (h);
120                }   146                }
121                else if  (!h.length  && window .location. hash.lengt h)   147                else if  (!h.length  && window .location. hash.lengt h)
122                {                   148                {                
123                    var  h = window .location. hash.charA t(0) == '# ' ? window .location. hash.subst r(1) : win dow.locati on.hash;   149                    var  h = window .location. hash.charA t(0) == '# ' ? window .location. hash.subst r(1) : win dow.locati on.hash;
124                    this .pushHist  (h);   150                    this .pushHist  (h);
125                    this .go (h);   151                    this .go (h);
126                }   152                }
127           }   153           }
128       }   154       }
129       else   155       else
130       {   156       {
131           if  ( window. location.h ash != thi s._hash )   157           if  ( window. location.h ash != thi s._hash )
132           {               158           {            
133                this._ha sh = windo w.location .hash;   159                this._ha sh = windo w.location .hash;
134                var h =  this._hash .substr(1) ;               160                var h =  this._hash .substr(1) ;            
135                if (h.le ngth) this .go (h);   161                if (h.le ngth) this .go (h);
136           }   162           }
137       }   163       }
138       return  true;   164       return  true;
139   }   165   }
140     166  
141   /**   167   /**
142    * record  history   168    * record  history
143    * @param  h hash   169    * @param  h hash
144    */   170    */
145   BxHistory. prototype. makeHist =  function  (h)   171   BxHistory. prototype. makeHist =  function  (h)
146   {   172   {
147       if (h. charAt(0)  != '#') h  = '#' + h;   173       if (h. charAt(0)  != '#') h  = '#' + h;
148          174       
149       if (wi ndow.locat ion.hash = = h) retur n;   175       if (wi ndow.locat ion.hash = = h) retur n;
150     176  
151       if (is IE)   177       if (is IE)
152       {   178       {
153           va r id = thi s._hf.cont entDocumen t || this. _hf.conten tWindow.do cument;   179           va r id = thi s._hf.cont entDocumen t || this. _hf.conten tWindow.do cument;
154     180  
155           va r hhh = id .getElemen tById('hid fr').value ;        181           va r hhh = id .getElemen tById('hid fr').value ;     
156     182  
157           id .getElemen tById('hid fr').value  = h;           183           id .getElemen tById('hid fr').value  = h;        
158     184  
159           if  (h != hhh )   185           if  (h != hhh )
160                this.pus hHist(h);   186                this.pus hHist(h);
161     187  
162           wi ndow.locat ion.hash =  h;   188           wi ndow.locat ion.hash =  h;
163       }   189       }
164       else   190       else
165       {   191       {
166           wi ndow.locat ion.hash =  h;   192           wi ndow.locat ion.hash =  h;
167           th is._hash =  window.lo cation.has h;   193           th is._hash =  window.lo cation.has h;
168       }   194       }
169     195  
170     196  
171       return  true;   197       return  true;
172   }   198   }
173     199  
174   /**   200   /**
175    * save hi story : IE  only   201    * save hi story : IE  only
176    * @param  h hash   202    * @param  h hash
177    */   203    */
178   BxHistory. prototype. pushHist =  function  (h)    204   BxHistory. prototype. pushHist =  function  (h) 
179   {   205   {
180       if (h. charAt(0)  != '#') h  = '#' + h;   206       if (h. charAt(0)  != '#') h  = '#' + h;
181     207  
182       var id  = this._h f.contentD ocument ||  this._hf. contentWin dow.docume nt;   208       var id  = this._h f.contentD ocument ||  this._hf. contentWin dow.docume nt;
183     209  
184       id.wri te ('<inpu t id="hidf r" value=" ' + h + '" />');   210       id.wri te ('<inpu t id="hidf r" value=" ' + h + '" />');
185       id.clo se();   211       id.clo se();
186     212  
187       this._ hash = win dow.locati on.hash;   213       this._ hash = win dow.locati on.hash;
188   }   214   }
189     215  
190   // private  --------- ---------- ---------- ---------- ----   216   // private  --------- ---------- ---------- ---------- ----
191     217  
192   /**   218   /**
193    * init hi dden frame  : IE only   219    * init hi dden frame  : IE only
194    */   220    */
195   BxHistory. prototype. _initHidde nFrame = f unction ()   221   BxHistory. prototype. _initHidde nFrame = f unction ()
196   {   222   {
197     223  
198       var b  = document .body;   224       var b  = document .body;
199       var i  = document .createEle ment('ifra me');   225       var i  = document .createEle ment('ifra me');
200          226       
201       i.styl e.display  = 'none';   227       i.styl e.display  = 'none';
202       i.id =  'hidfr';   228       i.id =  'hidfr';
203     229  
204       b.appe ndChild(i) ;   230       b.appe ndChild(i) ;   
205          231  
206       this._ hf = docum ent.getEle mentById(' hidfr');        232       this._ hf = docum ent.getEle mentById(' hidfr');     
207     233  
208       var id  = null;   234       var id  = null;
209       if (th is._hf.con tentDocume nt)   235       if (th is._hf.con tentDocume nt)
210           id  = this._h f.contentD ocument   236           id  = this._h f.contentD ocument
211       else   237       else
212       if (th is._hf.con tentWindow  && this._ hf.content Window.doc ument)   238       if (th is._hf.con tentWindow  && this._ hf.content Window.doc ument)
213           id  = this._h f.contentW indow.docu ment;   239           id  = this._h f.contentW indow.docu ment;
214     240  
215       if (id )   241       if (id )
216       {   242       {
217           id .write ('< input id=" hidfr" />' );   243           id .write ('< input id=" hidfr" />' );
218           id .close();   244           id .close();
219       }   245       }
220   }   246   }
221     247  
222     248   BxHistory. prototype. rw = funct ion (s)
223     249   {
    250       return  this._rw[ s];
    251   }