[2.0.10] Select Expand BBcodes MOD

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
20
91%
Very Good
1
5%
Good
0
No votes
Fair
0
No votes
Poor
1
5%
 
Total votes: 22

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 27145
Joined: Sat Aug 16, 2003 7:36 am

[2.0.10] Select Expand BBcodes MOD

Post by Extensions Robot » Fri Oct 01, 2004 4:12 am

MOD Name: Select Expand BBcodes MOD
Author: markus_petrux
MOD Description: This MOD is a DHTML add-on for the Code and Quote BBCodes. It adds a couple of commands next to the BBCode block title. First one, allows you to Select its contents for easier copy/paste actions. Second one, allows you to Expand or Contract the BBCode block. It has been coded to degrade correctly even if the browser does not support the required features (please, read author notes for further information).

MOD Version: 1.0.2

Download File: select_expand_bbcodes_mod_v1_0_2.zip
mods overview page: View
File Size: 8710 Bytes

Security Score:
Last edited by Extensions Robot on Mon Apr 30, 2007 12:28 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extensions Team)

User avatar
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric » Sun Oct 03, 2004 9:01 pm

MOD Validated/Released

Notes:
This MOD makes it so your quote and code sections are in a small scroll box which you can open to see the full code. This MOD is nice for boards that require users to post large chunks of code or large quotes.

User avatar
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Sun Oct 03, 2004 11:57 pm

More tips and add-on for this MOD:


---- Original Post ------
...omg, already validated! ...I was planning to submit it tomorrow! :lol:

Seriously: Thanks a lot!

I'll update this post later with link to demos, etc.
Last edited by markus_petrux on Sun Nov 21, 2004 3:09 am, edited 1 time in total.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

User avatar
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Mon Oct 04, 2004 2:36 am

This MOD has been inspired by Daz's fi_divexpand control. Some day I was looking for his MOD... unfortunatelly I discovered Daz's site was down (www.forumimages.com). :( ....So, first thing I would like to post here is: BIG THANK YOU, DAZ (among other things) for your great idea when you wrote your fi_divexpand thingy. Best wishes wherever you are. ;)

So, my first motivation was to make Daz's MOD easilly available to the whole phpBB community. However, when I found his MOD (not an easy task atm) I discovered some technical problems related to lack of compatibility with legacy browsers (still on the wild) or malfunction when no javascript support available on the client browser. So, I ended up re-writing the whole thing from scratch. Though, the basic functionallity still remains.

Here you can see a couple of examples:
http://www.phpmix.com/phpBB2/viewtopic.php?p=1164#1164
http://www.phpmix.com/phpBB2/viewtopic.php?p=1165#1165

Please, read the Author Notes section in the MOD script.

IMPORTANT: If you have problems installling this MOD manually, try to carefully follow the MOD script again. It should work. ;)

I would suggest to give EasyMOD a try. It works! It rocks!

Oh, remember to make backups before installing MODs.


The ZIP file also contains a contrib folder with MOD scripts to add the Select/Expand functionallity to the following MODs:
* PHP Syntax Highlighter BBCode.
* Syntax Highlighting BBCode (Beta).

Please, let me know if you need help to implement this somewhere else.

That's all for now.

Enjoy! ;)
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

msie
Registered User
Posts: 15
Joined: Mon Oct 04, 2004 5:42 am

Post by msie » Mon Oct 04, 2004 5:49 am

Nice MOD!
But...

in IE 6 SP2
Image

in Opera 7.5
Image

in Firefox 1.0 Preview Release
Image

Why?
How to resolve this?

User avatar
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Mon Oct 04, 2004 8:08 am

Congratulations! You have just experienced the ability of this MOD to behave depending on browser's capabilities. :)

Let me explain this a bit. This MOD basically offers two commands (Select and Expand/Contract) but ONLY if they are supported.

The Expand command is based on the overflow:auto CSS attribute. This one IS supported by W3C standard. However, not all browsers support it. So this MOD tries to make some object detection to a) avoid javascript errors b) offer this feature only if supported and c) keep the Expand command hidden if useless, based on the required size of the box (ie. quoting just a few words). It also reacts to the onresize event to hide or show the expand command.

The Select command is based on two different propietary extensions (there's no standard here, ie. it is not part of the DOM specs). It relies on document.selection introduced by MSIE (I'm not sure but I read this is buggy on IEMac, so I disable this on IEMacs) and on document.getSelection introduced by Netscape (also supported by almost all Gecko based browsers). Unfortunatelly (or not, it depends ;) ), even the latest version of Opera seems to follow the DOM standards to the letter, so it does NOT support this feature. That's why you can't see the Select command on Opera 7.54. I don't know why you can't see it on MSIE 6 SP2, though. It might be caused by your browser configuration. If you have javascript enabled, check if you have other restrictions enabled.

You never know, of course, but it should work. I have tested this MOD on the following browsers: Amaya 8.2, Hotjava 3.0, Netscape 4.8, Netscape 7.1, Mozilla 1.7.2, Firefox 0.93 and 1.0PR, Konqueror 3.2, IE6, Opera 5.12, Opera 6.06 and Opera 7.54. So, if supported by the browser, this MOD works with features enabled, if not supported, it tries to degrade nicely.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

reddog
Registered User
Posts: 32
Joined: Wed Jul 21, 2004 3:51 pm
Location: France ^^
Contact:

Post by reddog » Mon Oct 04, 2004 4:33 pm

Great :D

I repeat it, I like this MOD, congratulations markus_petrux :wink:

msie
Registered User
Posts: 15
Joined: Mon Oct 04, 2004 5:42 am

Post by msie » Tue Oct 05, 2004 1:33 am

markus_petrux wrote: I don't know why you can't see it on MSIE 6 SP2, though. It might be caused by your browser configuration. If you have javascript enabled, check if you have other restrictions enabled.

oh, i see.
i'll check my ie's settings.
thank you. :)

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Post by deny » Mon Oct 11, 2004 11:39 pm

I have a little bit different bbcode.tpl.
So i try to make it working but only Select appears.Expand/Colaps does not appear at all.I try with 3 different borwser (Ie6, Opera, Firefox).
Do you have any idea where i made mistake?

Code: Select all

<!-- BEGIN ulist_open --><ul><!-- END ulist_open -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->

<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->

<!-- BEGIN listitem --><li><!-- END listitem -->
<!-- BEGIN quote_open -->
<div class="quotetitle"><b>{L_QUOTE}:</b>
<script type="text/javascript" src="{U_SXBB_JSLIB}"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].T['select'] = '{L_SELECT}';
	SXBB[id].T['expand'] = '{L_EXPAND}';
	SXBB[id].T['contract'] = '{L_CONTRACT}';
	SXBB[id].writeCmd();
//-->
</script></div><div class="quotecontent">
<script type="text/javascript">
<!--
	SXBB[id].writeDiv();
//-->
</script>
<!-- END quote_open -->

<!-- BEGIN quote_close -->
</div>
<!-- END quote_close -->

<!-- BEGIN quote_username_open -->
<div class="quotetitle"><b>{USERNAME} {L_WROTE}:</b>
<script type="text/javascript" src="{U_SXBB_JSLIB}"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].T['select'] = '{L_SELECT}';
	SXBB[id].T['expand'] = '{L_EXPAND}';
	SXBB[id].T['contract'] = '{L_CONTRACT}';
	SXBB[id].writeCmd();
//-->
</script></div><div class="quotecontent">
<script type="text/javascript">
<!--
	SXBB[id].writeDiv();
//-->
</script><!-- END quote_username_open -->


<!-- BEGIN code_open -->
</span><div class="codetitle"><b>{L_CODE}:</b>
<script type="text/javascript" src="{U_SXBB_JSLIB}"></script>
<script type="text/javascript">
<!--
	var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
	SXBB[id] = new _SXBB(id);
	SXBB[id].T['select'] = '{L_SELECT}';
	SXBB[id].T['expand'] = '{L_EXPAND}';
	SXBB[id].T['contract'] = '{L_CONTRACT}';
	SXBB[id].writeCmd();
//-->
</script></div><div class="codecontent">
<script type="text/javascript">
<!--
	SXBB[id].writeDiv();
//-->
</script>
<!-- END code_open -->

<!-- BEGIN code_close -->
<script type="text/javascript">
<!--
	document.write('</div>');
//-->
</script>
</div><span class="postbody">
<!-- END code_close -->


<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->

<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->

<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->

<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->

<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->

<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->

<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->

<!-- BEGIN mod_username_open --></span>
<table width="75%" cellspacing="1" cellpadding="3" border="1" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_MOD} {L_BY}  {USERNAME}:</b></span></td>
	</tr>
	<tr>
	  <td class="mod"><!-- END quote_username_open -->
<!-- BEGIN mod_open --></span>
<table width="75%" cellspacing="1" cellpadding="3" border="1" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_MOD}:</b></span></color></td>
	</tr>
	<tr>
	  <td class="mod"><!-- END mod_open -->
<!-- BEGIN mod_close --></td>
	</tr>
</table>
<span class="postbody"><!-- END mod_close -->


<!-- BEGIN intro_open -->
<div class="quotetitle"><b>{L_INTRO}:</b></div><div class="quotecontent"><!-- END intro_open -->
<!-- BEGIN intro_close -->
</div><!-- END intro_close -->

<!-- BEGIN glow_open --><span style="filter: glow(color={GLOWCOLOR}); height:20"><!-- END glow_open -->
<!-- BEGIN glow_close --></span><!-- END glow_close -->

<!-- BEGIN shadow_open --><span style="filter: shadow(color={SHADOWCOLOR}); height:20"><!-- END shadow_open -->
<!-- BEGIN shadow_close --></span><!-- END shadow_close -->

bcs10
Registered User
Posts: 1525
Joined: Mon Jul 14, 2003 4:45 am
Location: Chicago, IL

Post by bcs10 » Tue Oct 12, 2004 1:06 am

i see you are into the DHTML stuff markus... nice mod...
/DD

Traiklin
Registered User
Posts: 94
Joined: Wed Dec 10, 2003 10:30 pm

Post by Traiklin » Tue Oct 12, 2004 4:32 am

THANK YOU SO MUCH!

I have been looking everywheres for this mod but could not find it for the life of me, the only time I saw it was on PHPNuke or PhpBB Plus installs (they didn't name it)

It works exactly like I was hoping in Firefox (I gave up IE and the others awhile ago) so once again

Edit: It even works like I thought it would in IE6 under SP2


THANK YOU SO MUCH! :D

User avatar
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Tue Oct 12, 2004 4:55 am

deny:
Please, post your original bbcode.tpl. I mean, before applying this MOD. It seems your template uses DIV instead of TABLE for the code/quote BBCodes. I need to see how it was before.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Post by deny » Tue Oct 12, 2004 10:33 am

markus_petrux wrote: deny:
Please, post your original bbcode.tpl. I mean, before applying this MOD. It seems your template uses DIV instead of TABLE for the code/quote BBCodes. I need to see how it was before.


Thanks for your response.I've solved problem in mean time by myself.
KIndly thanks again!

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Post by deny » Tue Oct 12, 2004 2:27 pm

I just thought that i solve problem but there is still bugs.
Example if i would to reply on quote then is my reply inside quote too.
So here is again bbcode.tpl before changing(and above is after changing):

Code: Select all

<!-- BEGIN ulist_open --><ul><!-- END ulist_open -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->

<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->

<!-- BEGIN listitem --><li><!-- END listitem -->
<!-- BEGIN quote_open -->
<div class="quotetitle"><b>{L_QUOTE}:</b></div><div class="quotecontent">
<!-- END quote_open -->

<!-- BEGIN quote_close -->
</div>
<!-- END quote_close -->

<!-- BEGIN quote_username_open -->
<div class="quotetitle"><b>{USERNAME} {L_WROTE}:</b></div><div class="quotecontent">
<!-- END quote_username_open -->


<!-- BEGIN code_open -->
</span><div class="codetitle"><b>{L_CODE}:</b></div><div class="codecontent">
<!-- END code_open -->

<!-- BEGIN code_close -->
</div><span class="postbody">
<!-- END code_close -->


<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->

<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->

<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->

<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->

<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->

<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->

<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->

<!-- BEGIN mod_username_open --></span>
<table width="75%" cellspacing="1" cellpadding="3" border="1" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_MOD} {L_BY}  {USERNAME}:</b></span></td>
	</tr>
	<tr>
	  <td class="mod"><!-- END quote_username_open -->
<!-- BEGIN mod_open --></span>
<table width="75%" cellspacing="1" cellpadding="3" border="1" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_MOD}:</b></span></color></td>
	</tr>
	<tr>
	  <td class="mod"><!-- END mod_open -->
<!-- BEGIN mod_close --></td>
	</tr>
</table>
<span class="postbody"><!-- END mod_close -->


<!-- BEGIN intro_open -->
<div class="quotetitle"><b>{L_INTRO}:</b></div><div class="quotecontent"><!-- END intro_open -->
<!-- BEGIN intro_close -->
</div><!-- END intro_close -->

<!-- BEGIN glow_open --><span style="filter: glow(color={GLOWCOLOR}); height:20"><!-- END glow_open -->
<!-- BEGIN glow_close --></span><!-- END glow_close -->

<!-- BEGIN shadow_open --><span style="filter: shadow(color={SHADOWCOLOR}); height:20"><!-- END shadow_open -->
<!-- BEGIN shadow_close --></span><!-- END shadow_close -->
Last edited by deny on Tue Oct 12, 2004 4:03 pm, edited 1 time in total.

User avatar
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Tue Oct 12, 2004 3:37 pm

deny: Please, edit your previous post and replace the bbcode.tpl code. You have posted the one with my MOD applied again. :lol:

It seems a problem with nested HTML tags. In subSilver, all "boxed" BBCodes begin with </span> and end with <span class="postbody">. So, the BBCode depends on viewtopic.tpl.

I need to see your bbcode.tpl BEFORE applying my MOD to figure out what's going on.

Also, a URL would help.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

Post Reply

Return to “[2.0.x] MOD Database Cleanup”

Who is online

Users browsing this forum: No registered users and 6 guests