HTML BBCode Mod without Multiple BBCode MOD 1.14
 
 
Post new topic   Reply to topic   printer-friendly view    phpMiX.org Forum Index -> phpBB MODs -> HTML BBcode
View previous topic :: View next topic  
Author Message
RvdH
Junior Member
Junior Member


Joined: 28 Dec 2004
Posts: 22
Location: The Netherlands

PostPosted: Wed Dec 29, 2004 10:21 am    Post subject: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

Is it posssible to add your "HTML BBCode Mod" without using the "Multiple BBCode MOD 1.14" ?
and what are the basic replacements i have to use without it?

As said in the other topic i posted i'm using PNphpBB2 (forked phpBB2 to work with postnuke) and Mods ain't released with same standards you guys and the people over at phpbb2 like to use. (like the Multiple BBCode MOD 1.14)

Anyway i think i need a Mod like this very badly, as my site needs a way to properly display LINGO (macromedia director programming language)
There a tools available that will export code in HTML format so codes can easily exported to dreamweaver and such.
Allthough i'm not sure if the HTML mod completly works for the purpose i need it i am curious if it keeps formatted the right way (spaces and such).

Can you post the code below using the HTML bbcode mod? (i understand only admin and people with permission to do so can)

Code:
<p>
<font color="#C80000">-----------------------------------------------------------------------</font><br><font color="#C80000">-- A Wallpaper installation script utilizing the Buddy API Xtra.</font><br><font color="#C80000">-- Intended mainly to install a Desktop Wallpaper from a CD.</font><br><font color="#C80000">-- * Source images must be bitmaps files (BMP).</font><br><font color="#C80000">-- PARAMETERS</font><br><font color="#C80000">-- sourcePath: Wallpaper image file location (Ex. &quot;c:\images\&quot; or the moviePath &amp; &quot;Images\&quot;)</font><br><font color="#C80000">-- SourceImage: Wallpaper image file name, must be a bitmap file (BMP).</font><br><font color="#C80000">-- Tile: True = If the Wallpaper image is smaller than the desktop, it will be tiled.</font><br><font color="#C80000">------------------------------------------------------------------------</font>

<P>
<font color="#0000C8">on</font> setWallpaper sourcePath,sourceImage, tile<br>&nbsp;&nbsp;<font color="#0000C8">Global</font> prevPaper <font color="#C80000">-- {String} Holds the previous Wallpaper file name.</font>

<P>
&nbsp;&nbsp;<font color="#C80000">-- Gets the location of the system folder.</font><br>&nbsp;&nbsp;systemFolder = baSysFolder(<font color="#808080">&quot;Windows&quot;</font>)<br>&nbsp;&nbsp;<font color="#C80000">-- Copy the Wallpaper file from its source location (preferably - our CD) to the system folder.</font><br>&nbsp;&nbsp;OK = baCopyFile(sourcePath &amp; sourceImage, systemFolder &amp; sourceImage, <font color="#808080">&quot;IfNotExist&quot;</font>)<br>&nbsp;&nbsp;<font color="#C80000">-- This section handles error situations. The OK variable hold the error code.</font><br>&nbsp;&nbsp;<font color="#0000C8">if</font> OK <font color="#0000C8">then</font><br>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">case</font> OK <font color="#0000C8">of</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">1</font> : msg = <font color="#808080">&quot;Invalid Source file name.&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">2</font> : msg = <font color="#808080">&quot;Invalid Dest file name.&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">3</font> : msg = <font color="#808080">&quot;Error reading the Source file.&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">4</font> : msg = <font color="#808080">&quot;Error writing the Dest file.&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">5</font> : msg = <font color="#808080">&quot;Couldn't create directory for Dest file.&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">6</font> : msg = <font color="#808080">&quot;Destination file already exists.&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#808080">7</font> : msg = <font color="#808080">&quot;Destination file is newer that Source file.&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">end</font> <font color="#0000C8">case</font><br>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">if</font> OK = <font color="#808080">6</font> <font color="#0000C8">then</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#C80000">-- If a file with the same name already exists in the system folder,</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#C80000">-- Prompt the user with a dialog box.</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg = msg &amp;  <font color="#0000C8">Return</font> &amp; <font color="#808080">&quot;Do you want to overwrite it?&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">Result</font> = baMsgBox( msg, <font color="#808080">&quot;Notice&quot;</font>, <font color="#808080">&quot;YesNo&quot;</font>, <font color="#808080">&quot;Question&quot;</font>, <font color="#808080">1</font> )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">if</font> <font color="#0000C8">Result</font> = <font color="#808080">&quot;Yes&quot;</font> <font color="#0000C8">then</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#C80000">-- The user answered positively to overwrite the existing file.</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OK = baCopyFile(sourcePath &amp; sourceImage, systemFolder &amp; sourceImage, <font color="#808080">&quot;Always&quot;</font>) <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">else</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#C80000">-- The user answered &quot;No&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">exit</font> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">end</font> <font color="#0000C8">if</font><br>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">else</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#C80000">-- Seems to be some kind of a trouble. Aborting the installation.</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">alert</font> msg &amp; <font color="#0000C8">Return</font> &amp; <font color="#808080">&quot;Aborting operation!&quot;</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">exit</font><br>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000C8">end</font> <font color="#0000C8">if</font><br>&nbsp;&nbsp;<font color="#0000C8">end</font> <font color="#0000C8">if</font><br>&nbsp;&nbsp;<font color="#C80000">-- This is the actual setting of the Wallpaper.</font><br>&nbsp;&nbsp;prevPaper = baSetWallpaper(systemFolder &amp; sourceImage, tile )<br><font color="#0000C8">end</font>

<P>
</font></p>
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Wed Dec 29, 2004 4:36 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

RvdH wrote:
Can you post the code below using the HTML bbcode mod? (i understand only admin and people with permission to do so can)


Let's see how it looks here... Smile

-----------------------------------------------------------------------
-- A Wallpaper installation script utilizing the Buddy API Xtra.
-- Intended mainly to install a Desktop Wallpaper from a CD.
-- * Source images must be bitmaps files (BMP).
-- PARAMETERS
-- sourcePath: Wallpaper image file location (Ex. "c:\images\" or the moviePath & "Images\")
-- SourceImage: Wallpaper image file name, must be a bitmap file (BMP).
-- Tile: True = If the Wallpaper image is smaller than the desktop, it will be tiled.
------------------------------------------------------------------------

on setWallpaper sourcePath,sourceImage, tile
  Global prevPaper -- {String} Holds the previous Wallpaper file name.

  -- Gets the location of the system folder.
  systemFolder = baSysFolder("Windows")
  -- Copy the Wallpaper file from its source location (preferably - our CD) to the system folder.
  OK = baCopyFile(sourcePath & sourceImage, systemFolder & sourceImage, "IfNotExist")
  -- This section handles error situations. The OK variable hold the error code.
  if OK then
    case OK of
      1 : msg = "Invalid Source file name."
      2 : msg = "Invalid Dest file name."
      3 : msg = "Error reading the Source file."
      4 : msg = "Error writing the Dest file."
      5 : msg = "Couldn't create directory for Dest file."
      6 : msg = "Destination file already exists."
      7 : msg = "Destination file is newer that Source file."
    end case
    if OK = 6 then
      -- If a file with the same name already exists in the system folder,
      -- Prompt the user with a dialog box.
      msg = msg & Return & "Do you want to overwrite it?"
      Result = baMsgBox( msg, "Notice", "YesNo", "Question", 1 )
      if Result = "Yes" then
        -- The user answered positively to overwrite the existing file.
        OK = baCopyFile(sourcePath & sourceImage, systemFolder & sourceImage, "Always")
      else
        -- The user answered "No"
        exit
      end if
    else
      -- Seems to be some kind of a trouble. Aborting the installation.
      alert msg & Return & "Aborting operation!"
      exit
    end if
  end if
  -- This is the actual setting of the Wallpaper.
  prevPaper = baSetWallpaper(systemFolder & sourceImage, tile )
end


 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Wed Dec 29, 2004 4:47 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

Well, it seems it worked pretty well. So I guess we need to find a workaround for you...

RvdH wrote:
Is it posssible to add your "HTML BBCode Mod" without using the "Multiple BBCode MOD 1.14" ?
and what are the basic replacements i have to use without it?

Please try to apply the HTML BBCode MOD ignoring the following instructions:

In includes/bbcode.php, ignore this step:

Code:
#
#-----[ FIND ]------------------------------------------------
#
#  NOTE --- The lines to look for are like the following, much longer if you have other BBCode MODs installed:
#   $EMBB_widths = array('') ;
#   $EMBB_values = array('') ;
#
$EMBB_widths = array(''
$EMBB_values = array(''
#
#-----[ AFTER, ADD ]------------------------------------------
#
//+MOD: HTML BBCode MOD
   if( bbcode_html_allowed() )
   {
      $EMBB_widths[] = '40';
      $EMBB_values[] = 'HTML';
   }
//-MOD: HTML BBCode MOD


In language/lang_english/lang_main.php, ignore this step:

Code:
#
#-----[ FIND ]------------------------------------------------
#
#  NOTE --- The whole line to look for should be similar to this:
# $lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';
#
$lang['bbcode_f_help'] =
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['bbcode_help']['html'] = 'HTML: [html]text[/html] (alt+%s)';


In templates/subSilver/posting_body.tpl, ignore this step:

Code:
#
#-----[ FIND ]------------------------------------------------
#
#  NOTE --- the actual line to find is MUCH longer, containing all the bbcode tags
#
bbtags = new Array(
#
#-----[ AFTER, ADD ]------------------------------------------
#
//+MOD: HTML BBCode MOD
bbtags[bbtags.length] = '[html]';
bbtags[bbtags.length] = '[/html]';
//-MOD: HTML BBCode MOD


I believe, it should work. The only drawback is you (your members allowed to use the HTML BBCode) won't see the [ HTML ] button. So you (they) have to remember the syntax.

Works Question

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
RvdH
Junior Member
Junior Member


Joined: 28 Dec 2004
Posts: 22
Location: The Netherlands

PostPosted: Wed Dec 29, 2004 5:17 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

Great, the HTML displayed looks perfect Smile

Don't think the [ HTML ] Button will cause a real problem as only a few (the real coders) will get the permission to use it.

btw, i've converted a older mod for phpBB2 (flash), this one has the appropriate BBcode buttons, i have to look it up but if i find it i'll post it in a topic on my site...maybe u can see whats needed to add bbcode buttons to your mod. (that is, if your interested Wink )

Anyway gona try your workaround now...thanks!

Greetings,

RvdH
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Wed Dec 29, 2004 5:44 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

Feel free to reply to this topic with your workaround, if you wish. Wink


Happy new year! Smile

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
RvdH
Junior Member
Junior Member


Joined: 28 Dec 2004
Posts: 22
Location: The Netherlands

PostPosted: Wed Dec 29, 2004 6:02 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

Ah, well ok

I have to tell you this was my first mod made/coverted so there be some issues with it's format

Code:


##############################################################
## MOD Title:      Flash BBCode Mod For PNphpBB2
## MOD Author:      RvdH
##
## MOD Description:   This mod adds the Flash BBCode functions
##         on your PNphpBB2 based forum.
##
## MOD Release Date:   25th October, 2004
## MOD Version:      1.0.1
## PNpphpBB2 Version:   1.2g (CVS/RC1/RC2)
##
## Installation Level:   Easy
## Installation Time:   10 Minutes
##
## Files To Edit: 7
##         posting.php
##         privmsg.php
##         includes/bbcode.php
##         language/lang_english/lang_bbcode.php
##         language/lang_english/lang_main.php
##         templates/PNTheme/bbcode.tpl
##         templates/PNTheme/posting_body.tpl
##     
## Included Files: None
##
##############################################################
##
## Author Notes: This mod assumes your using the default
## PNphpBB2 install with NO other Mods installed.
##
##############################################################
## MOD History:
##
##   25/10/2004 - Version 1.0.1
##   - Updated it to support Flash 7.x (MX 2004)
##   22/09/2004 - Version 1.0
##      - initial release for PNphpBB2 1.2g (CVS)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD.
##############################################################



#
#-----[ OPEN ]------------------------------------------------
#

posting.php

#
#-----[ FIND ]------------------------------------------------
#
   
   'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   //START Flash Mod for PNphpBB2
        'L_BBCODE_R_HELP' => $lang['bbcode_r_help'],
   //END Flash Mod for PNphpBB2

#
#-----[ OPEN ]------------------------------------------------
#

privmsg.php

#
#-----[ FIND ]------------------------------------------------
#
   
   'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   //START Flash Mod for PNphpBB2
        'L_BBCODE_R_HELP' => $lang['bbcode_r_help'],
   //END Flash Mod for PNphpBB2

#
#-----[ OPEN ]------------------------------------------------
#

includes/bbcode.php

#
#-----[ FIND ]------------------------------------------------
#
   
   $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

        //START Flash Mod for PNphpBB2
      $bbcode_tpl['flash'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['flash']);
      $bbcode_tpl['flash'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['flash']);
      $bbcode_tpl['flash'] = str_replace('{LOOP}', '\\3', $bbcode_tpl['flash']);
      $bbcode_tpl['flash'] = str_replace('{URL}', '\\4', $bbcode_tpl['flash']);
   //END Flash Mod for PNphpBB2

#
#-----[ FIND ]------------------------------------------------
#
   
   $replacements[] = $bbcode_tpl['email'];
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

       //START Flash Mod for PNphpBB2
      //[ flash width= height= loop= ]and[ /flash ]code..
      $patterns[] = "#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]) loop=(true|false):$uid\](.*?)\[/flash:$uid\]#si";
      $replacements[] = $bbcode_tpl[flash];
   //END Flash Mod for PNphpBB2

#
#-----[ FIND ]------------------------------------------------
#
   
   $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpe|jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
   // End PNphpBB2 Module
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   //START Flash Mod for PNphpBB2
      //[flash width= heigth= loop=] and[ /flash ]
      $text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]) loop=(true|false)\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2 loop=\\3:$uid\]\\4[/flash:$uid]", $text);
      $text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2 loop=false:$uid\]\\3[/flash:$uid]", $text); 
   //END Flash Mod for PNphpBB2

#
#-----[ OPEN ]------------------------------------------------
#

language/lang_english/lang_bbcode.php

#
#-----[ FIND ]------------------------------------------------
#
   
   $faq[] = array("--", "Other matters");
   
#
#-----[ BEFORE, ADD ]-----------------------------------------
#

   //START Flash Mod for PNphpBB2
$faq[] = array("--", "Using Flash");
$faq[] = array("Using Macromedia Flash", "phpBB BBCode Flash tag supports a two ways of
   using flash URIs, Uniform Resource Indicators better known as URLs, to display
   stunning flash animations, games etc...
   <p>You may use the flash tag in your posts, and signature, and any other BBcode
   enabled fields on your site. Flash isn't for the faint hearted, and it is
   recommended that you know what you are doing before using these tags.</p>
   <ul><li>The first of these uses the <b>[flash width= height=][/flash]</b> tag, everything
       inbetween the tags, it the URI for the swf file. For example to make a flash tag with this file you could use:<br /><br /><b>[flash width=300 height=120]</b>http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.swf<b>[/flash]</b><br /><br />This would generate the following
       ,</li></ul>
   <p>
   <object codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swf lash.cab#version=7,0,0,0\" height=\"120\" width=\"300\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">
     <param NAME=\"_cx\" VALUE=\"11113\">
     <param NAME=\"_cy\" VALUE=\"6350\">
     <param NAME=\"Movie\" VALUE=\"http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.swf\">
     <param NAME=\"Src\" VALUE=\"http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.swf\">
     <param NAME=\"Play\" VALUE=\"1\">
     <param NAME=\"Loop\" VALUE=\"-1\">
     <param NAME=\"Quality\" VALUE=\"High\">
     <param NAME=\"SAlign\" VALUE>
     <param NAME=\"Menu\" VALUE=\"-0\">
     <param NAME=\"Base\" VALUE>
     <param NAME=\"Scale\" VALUE=\"NoBorder\">
     <param NAME=\"DeviceFont\" VALUE=\"0\">
     <param NAME=\"EmbedMovie\" VALUE=\"0\">
     <param NAME=\"BGColor\" VALUE=\"FFFFFF\">
     <param NAME=\"SWRemote\" VALUE>
     <param NAME=\"Stacking\" VALUE=\"below\"><embed src=\"http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.swf\" quality=\"high\" scale=\"noborder\" bgcolor=\"#FFFFFF\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P 1_Prod_Version=ShockwaveFlash\">
   </object>
   </p>
   <ul><li>You might also want the so set the loop params yourself.<br /><br /><b>[flash
       width=468 height=60 loop=true]</b>http://www.flashkit.com/graphics/buttons/flashkit.swf<b>[/flash]</b><br /><br />This would generate the following:&nbsp;</li></ul>
   <p>
   <object codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" height=\"60\" width=\"469\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">
     <param NAME=\"_cx\" VALUE=\"13229\">
     <param NAME=\"_cy\" VALUE=\"1191\">
     <param NAME=\"Movie\" VALUE=\"http://www.flashkit.com/graphics/buttons/flashkit.swf\">
     <param NAME=\"Src\" VALUE=\"http://www.flashkit.com/graphics/buttons/flashkit.swf\">
     <param NAME=\"WMode\" VALUE=\"Transparent\">
     <param NAME=\"Play\" VALUE=\"-1\">
     <param NAME=\"Loop\" VALUE=\"-1\">
     <param NAME=\"Quality\" VALUE=\"High\">
     <param NAME=\"SAlign\" VALUE>
     <param NAME=\"Menu\" VALUE=\"-0\">
     <param NAME=\"Base\" VALUE>
     <param NAME=\"Scale\" VALUE=\"NoBorder\">
     <param NAME=\"DeviceFont\" VALUE=\"0\">
     <param NAME=\"EmbedMovie\" VALUE=\"0\">
     <param NAME=\"BGColor\" VALUE=\"000000\">
     <param NAME=\"SWRemote\" VALUE>
     <param NAME=\"Stacking\" VALUE=\"below\"><embed src=\"http://www.flashkit.com/graphics/buttons/flashkit.swf\" loop=\"true\" quality=\"high\" scale=\"noborder\" wmode=\"transparent\" bgcolor=\"#000000\" WIDTH=\"469\" HEIGHT=\"60\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P 1_Prod_Version=ShockwaveFlash\">
   </object>
   <br>
   </p>
   <ul><li>If you don't set the loop param, and just post using the width and
       height params the loop is set to a default value of, off.</li></ul>
   <p>Make sure you use flash correctly otherwise you may end up with a mess, it is required to set the height and width params
   properly. By param, we mean parameter which is just a value which makes it
   behave the way it does.</p>
   <p>Enjoy the flash tag.<br />");
   //END Flash Mod for PNphpBB2
#
#-----[ OPEN ]------------------------------------------------
#

language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------------
#
   
   $lang['bbcode_f_help'] = "Font size: [size=x-small]small text[/size]";
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#
   //START Flash Mod for PNphpBB2
   $lang['bbcode_r_help'] = "flash: [flash width= height= loop=]http://url to SWF[/flash] (alt+r)";
   //END Flash Mod for PNphpBB2

#
#-----[ OPEN ]------------------------------------------------
#

templates/PNTheme/bbcode.tpl

#
#-----[ FIND ]------------------------------------------------
#
   
   <!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</a><!-- END email -->
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   <!-- BEGIN flash --><!-- URL's used in the movie-->
   <!-- text used in the movie-->
   <!-- -->
   <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swfl ash.cab#version=7,0,0,0"
   WIDTH={WIDTH} HEIGHT={HEIGHT}>
   <PARAM NAME=movie VALUE="{URL}"> <PARAM NAME=loop VALUE={LOOP}> <PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noborder> <PARAM NAME=wmode VALUE=transparent> <param NAME=Menu VALUE=0>  <EMBED src="{URL}" loop={LOOP} quality=high scale=noborder wmode=transparent menu=0 WIDTH={WIDTH} HEIGHT={HEIGHT} TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1 _Prod_Version=ShockwaveFlash"></EMBED>
   </OBJECT><!-- END flash -->

#
#-----[ OPEN ]------------------------------------------------
#

templates/PNTheme/posting_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
   
   w_help = "{L_BBCODE_W_HELP}";
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   //START Flash Mod for PNphpBB2
   r_help = "{L_BBCODE_R_HELP}";
   //END Flash Mod for PNphpBB2

#
#-----[ FIND ]------------------------------------------------
#
   
   bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
   
#
#-----[ REPLACE WITH ]----------------------------------------
#

   bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]' ,'[url]','[/url]','[flash width= height=]','[/flash]');

#
#-----[ FIND ]------------------------------------------------
#
   
   <td>
   <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" />
   </td>
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   <td>
   <input type="button" class="button" accesskey="r" name="addbbcode18" value="SWF" style="width: 40px" onclick="bbstyle(18)" onmouseover="helpline('r')" />
   </td>

#
#-----[ FIND ]------------------------------------------------
#
   
   <select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">

#
#-----[ REPLACE WITH ]----------------------------------------
#

   <select name="addbbcode20" onChange="bbfontstyle('[color=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">

#
#-----[ FIND ]------------------------------------------------
#
   
   </select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">

#
#-----[ REPLACE WITH ]----------------------------------------
#

   </select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode22" onChange="bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">

#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
 
Back to top
View user's profile Send private message
RvdH
Junior Member
Junior Member


Joined: 28 Dec 2004
Posts: 22
Location: The Netherlands

PostPosted: Wed Dec 29, 2004 10:03 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

So far i've got it running without problems, after studying the flash mod, i think i can add a button, by assigning them manually, like so:

for posting.php & privmsg.php
Code:

#
#-----[ FIND ]------------------------------------------------
#
   
   'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   //START HTML Mod for PNphpBB2
        'L_BBCODE_H_HELP' => $lang['bbcode_h_help'],
   //END HTML Mod for PNphpBB2


language/lang_english/lang_main.php
Code:

#
#-----[ FIND ]------------------------------------------------
#
   
   $lang['bbcode_f_help'] = "Font size: [size=x-small]small text[/size]";
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#
   //START HTML Mod for PNphpBB2
   $lang['bbcode_h_help'] = "HTML: [HTML]your HTML[/HTML] (alt+h)";
   //END HTML Mod for PNphpBB2


templates/{The Template Used}/posting_body.tpl
Code:

#
#-----[ FIND ]------------------------------------------------
#
   
   w_help = "{L_BBCODE_W_HELP}";
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   //START HTML Mod for PNphpBB2
   h_help = "{L_BBCODE_H_HELP}";
   //END HTML Mod for PNphpBB2

#
#-----[ FIND ]------------------------------------------------
#
   
   bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
   
#
#-----[ REPLACE WITH ]----------------------------------------
#

   bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]' ,'[url]','[/url]','[HTHL]','[/HTML]');

#
#-----[ FIND ]------------------------------------------------
#
   
   <td>
   <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" />
   </td>
   
#
#-----[ AFTER, ADD ]-----------------------------------------
#

   <td>
   <input type="button" class="button" accesskey="h" name="addbbcode18" value="HTML" style="width: 40px" onclick="bbstyle(18)" onmouseover="helpline('r')" />
   </td>

#
#-----[ FIND ]------------------------------------------------
#
   
   <select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">

#
#-----[ REPLACE WITH ]----------------------------------------
#

   <select name="addbbcode20" onChange="bbfontstyle('[color=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">

#
#-----[ FIND ]------------------------------------------------
#
   
   </select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">

#
#-----[ REPLACE WITH ]----------------------------------------
#

   </select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode22" onChange="bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">

#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#


what do you think?

RvdH
 
Back to top
View user's profile Send private message
RvdH
Junior Member
Junior Member


Joined: 28 Dec 2004
Posts: 22
Location: The Netherlands

PostPosted: Thu Dec 30, 2004 11:53 am    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

Actually it's pretty easy converting it to make the button work, anyway i saw that "Multi BBcode Mod" works pretty friendly, so i am now converting my other mods to work with it Smile

RvdH
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Thu Dec 30, 2004 8:14 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

ROFL Laughing

BTW, have you seen the Syntax Highlighting MOD?
http://www.phpbb.com/phpBB/viewtopic.php?t=217723

It supports nearly 30 languages and it's extensible with more. It's still in beta, though.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
RvdH
Junior Member
Junior Member


Joined: 28 Dec 2004
Posts: 22
Location: The Netherlands

PostPosted: Thu Dec 30, 2004 8:33 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

Yes i've noticed that Mod, once it gets completed i will consider to try it.
Also this needs the correct sysntax highlighter etc, but i'm too lame Smile

Also for now i don't really need it, as we have a tool available that outputs the code as html, so we can copy & paste it from Director into PNphpBB.

RvdH
 
Back to top
View user's profile Send private message
RvdH
Junior Member
Junior Member


Joined: 28 Dec 2004
Posts: 22
Location: The Netherlands

PostPosted: Fri Dec 31, 2004 3:15 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

BTW,, how come your HTML BBCode mod gets the accesskey (h) assigned automaticly?

Can i define accesskeys using Multi BBcode Mod?
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sat Jan 01, 2005 9:13 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

accesskeys are assigned automatically since latest version of the Multiple BBCode MOD.

So they (the phpBB MOD Team) do not need to maintain a list of assigned hotkeys anymore. It was full and most of the BBCode MODs in that list were obsolete. Look at this topic:
http://www.phpbb.com/phpBB/viewtopic.php?t=224425

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
RvdH
Junior Member
Junior Member


Joined: 28 Dec 2004
Posts: 22
Location: The Netherlands

PostPosted: Tue Jan 04, 2005 1:18 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

Aw well...that sounds good.

my goal is to use alt+f for adding Flash BBCode instead of fontsize.
So assuming this new impletation has merged in yet, if i reasign the default alt + f (fontsize) with another letter, the "f" value stays open for a mod added with the multi BBCode mod?

RvdH
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Tue Jan 04, 2005 1:48 pm    Post subject: Re: HTML BBCode Mod without Multiple BBCode MOD 1.14 Reply with quote

You could easilly change the hotkey assigned to fontsize in the posting_body.tpl, however...

...you should also see how the Multi_BBCode() function works. If you have already applied the Multiple BBCode MOD look at includes/bbcode.php, find the Multi_BBCode() function. You'll see an array of chars and a little for loop. Hotkeys are assigned dynamically at that point from the $hotkeys array.

So, you could remove the hotkey you already assigned to fontsize (in the posting_body.tpl), and add the 'f' element in the position that the Flash BBCode will match.

Hint: You can't simply move the Flash BBCode entries in the $EMBB_widths and $EMBB_values arrays to the first or last place. When you install a new BBCode, it will insert their own entries at the begining of those arrays.

Tricky, but I believe this is the easiest approach. Don't mess further with that piece of code (unless you know what you're doing Wink ). This is a "standard" phpBB MOD which might change in the future. You'll need the new versions for the same reason you needed it this time. Razz

Just remind what you do now, in case you install new BBCodes in your board, to review the assigned hotkeys again, if necessary.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    phpMiX.org Forum Index -> phpBB MODs -> HTML BBcode All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum