[2.0.12] Hide BBcode MOD

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

Rating:

Excellent!
42
72%
Very Good
3
5%
Good
8
14%
Fair
0
No votes
Poor
5
9%
 
Total votes: 58

EGIS
Registered User
Posts: 60
Joined: Sat Apr 24, 2004 3:37 am
Location: Norway
Contact:

Post by EGIS »

Cuper wrote: how can i use this mod in ezportal

It's not currently working very well because ezportal adds linebreaks inside the javascript-code. This is only happening on the front page, in forum view the bbcode works as intended.
(Code below is from the submitted mod, not the one you can download above)

Normal output:

Code: Select all

<script language="javascript1.2" type="text/javascript"> 
<!-- 
   hideBBCode.open('Click to reveal hidden content'); 
//--> 
</script> 
Hidden text
<script language="javascript1.2" type="text/javascript"> 
<!-- 
   hideBBCode.close(); 
//--> 
</script> 
Ezportal front page output:

Code: Select all

<script language="javascript1.2" type="text/javascript"> <br />
<!-- <br />
   hideBBCode.open('Click to reveal hidden content'); <br />
//--> <br />
</script> <br />
Hidden text <br />
<script language="javascript1.2" type="text/javascript"> <br />
<!-- <br />
   hideBBCode.close(); <br />
//--> <br />
</script>
As you see, this is a problem with ezportal, not my mod :(

I found a fix for it (backup fetchposts.php before editing):

Code: Select all

# 
#-----[ OPEN ]------------------------------------------ 
#
fetchposts.php

# 
#-----[ FIND ]--------------------------------- 
# 
stripslashes($posts[$i]['post_text']);

# 
#-----[ BEFORE, ADD ]-------------------------------------- 
#
$posts[$i]['post_text'] = nl2br($posts[$i]['post_text']);

# 
#-----[ FIND ]--------------------------------- 
# NOTE: not the same we added above
$posts[$i]['post_text'] = nl2br($posts[$i]['post_text']);

#
#-----[ REPLACE WITH ]--------------------------------
# NOTE: nothing, just delete it

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
# EoM
The reason why you have to move the $posts[$i]['post_text'] = nl2br($posts[$i]['post_text']); is because Ezportal is adding the linebreaks after the bbcodes has been parsed.

Hope this helps :)
My mod: [Hide BBcode MOD]

User avatar
Cuper
Registered User
Posts: 22
Joined: Tue Aug 19, 2003 12:05 pm
Location: Israel
Contact:

Post by Cuper »

this is don't do nothing

its look like this
[hide:1e1c10e0ba]]text[/hide:1e1c10e0ba]

SirAndrew
Registered User
Posts: 5
Joined: Thu Jul 01, 2004 4:35 am
Contact:

Post by SirAndrew »

EGIS wrote: SirAndrew: I have tested installing it with Easymod and it works, so it should find the lines. Another mod may have changed this, so try looking for

Code: Select all

$EMBB_keys
as Shof515 said.

They do not exist. Please help me here...

EGIS
Registered User
Posts: 60
Joined: Sat Apr 24, 2004 3:37 am
Location: Norway
Contact:

Post by EGIS »

SirAndrew wrote: They do not exist. Please help me here...

They should if you have installed the Multi BBcode mod, try reinstalling it.
My mod: [Hide BBcode MOD]

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

Post by Traiklin »

Excellent mod, I remember one like this for invision and have been dying for someone to make it for PHPBB. this one is also much better cause when one of the hidden tags is oppened they aren't ALL opened with it.

SirAndrew
Registered User
Posts: 5
Joined: Thu Jul 01, 2004 4:35 am
Contact:

Post by SirAndrew »

Okay... after stepping away from the computer for a while, going out to dinner at a very expensive place, drinking espresso, being intimate with the girl, and finally redownloading all files to edit I was able to find the stupid keys in which to alter.

I have since mod'ed all the files and FTP'ed them to their proper place. I am not sure if this is because I stepped away from a bit - or because I removed the RPG mod (which was also causing problems).

In any case, it works. Like a champ, no less. Thank you everyone for helping me on this and for enduring the pains I have placed you through during my time of pulling out hair and throwing things. You all are wonderful and this mod is incredible! Again, thank you!

--
SirAndrew - Administrator of http://www.contboard.com, http://www.lyghtning.com, and http://www.wruckus.com

Darkmonkey
Former Team Member
Posts: 1707
Joined: Fri Oct 24, 2003 3:48 pm
Location: Where the trout streams flow and the air is nice

Post by Darkmonkey »

MOD Updated to version 1.2.2
See first post for Download Link

EGIS
Registered User
Posts: 60
Joined: Sat Apr 24, 2004 3:37 am
Location: Norway
Contact:

Post by EGIS »

This is a recommended update because it fixes a security issue where users could run javascript code.
This version also fixes some javascript errors and has better compatibility with older browsers (thanks to markus-petrux)
My mod: [Hide BBcode MOD]

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

Post by Traiklin »

I updated to the latest version but now it doesn't work in Mozilla or IE6.

It was working fine before updating so I have no clue what happened.

Here's what the Mozilla javaconsole says (testing it offline for now)

Code: Select all

Error: hiddenBBCode is not defined
Source File: http://localhost/forums2/viewtopic.php?p=7&sid=160c9f36b7446f4375067e2617291ae8#7
Line: 390
I renamed it to hidden because I have the other hide hack installed and didn't want it to create conflicts.

EGIS
Registered User
Posts: 60
Joined: Sat Apr 24, 2004 3:37 am
Location: Norway
Contact:

Post by EGIS »

I guess it's the HideBBcode @ phpbbhacks you're talking about(?).
Have you done any changes to the "hidebbcode.js" file too? And you don't need to change the javascript, only the replace pattern (in bbcode.php), for it to work with the other mod. (If the other mod also use the javascript function "hideBBCode.something", you'll have to edit the javascript though.)
My mod: [Hide BBcode MOD]

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

Post by Traiklin »

oh I think I know what it is,

I just opened up the instructions and renamed everything from hide to hidden but i never renamed the .js file :oops:

and I think it is the phpbbhacks hide file, you have to reply in order to see the stuff between the hide tags.

edit: yep that fixed it, always something simple.

User avatar
thewizard
Registered User
Posts: 356
Joined: Sun Sep 29, 2002 7:46 am

Post by thewizard »

I have installed this mod on my forums and for some reason It doesn't work. I have tried in several browsers. I doesn't make the clickable link to display the the hidden data. heh, forgot to link you to my test thread. http://www.theanimeplace.com/forums/vie ... ?p=322#322

EGIS
Registered User
Posts: 60
Joined: Sat Apr 24, 2004 3:37 am
Location: Norway
Contact:

Post by EGIS »

It seams like the javascript in the body is outputted on one line like this:

Code: Select all

<script language="javascript1.2" type="text/javascript"> <!--    hideBBCode.open('Click to reveal hidden content'); //--> </script> test <script language="javascript1.2" type="text/javascript"> <!--    hideBBCode.close(); //--> </script>
and not llike this:

Code: Select all

<script language="javascript1.2" type="text/javascript"> 
<!-- 
   hideBBCode.open('{L_HIDE}'); 
//--> 
</script> 
as it should be.
Have you edited the code inserted into bbcode.tpl in any way?
Any other mods installed?
My mod: [Hide BBcode MOD]

User avatar
thewizard
Registered User
Posts: 356
Joined: Sun Sep 29, 2002 7:46 am

Post by thewizard »

Yea, I have a few mods installed, but nothing that should conflict with that. I have the Profile Control Panel mod. the Multiple BBCode mod, and a couple of others. I have not made any changes to the mod itself. The mod is installed exactly as the instructions detail. I have uninstalled the mod and let EasyMod give it a go and it was still non operational. I see what you mean. I saved my test thread as an HTML file and altered it to see if it would work and it does. So I guess this narrows down the problem area.

EGIS
Registered User
Posts: 60
Joined: Sat Apr 24, 2004 3:37 am
Location: Norway
Contact:

Post by EGIS »

Try removing the

Code: Select all

<!--
and

Code: Select all

//-->
in the javascript in bbcode.tpl This will not look good in browsers that doesn't know javascript, but I think it will fix your problem.
Before you try this, try to change the code in bbcode.tpl to:

Code: Select all

<!-- BEGIN hide_open --> 
<script language="javascript1.2" type="text/javascript"> 

<!-- 

   hideBBCode.open('{L_HIDE}'); 

//--> 

</script> 
<!-- END hide_open --> 
<!-- BEGIN hide_owntext_open --> 
<script language="javascript1.2" type="text/javascript"> 

<!-- 

   hideBBCode.open('{L_HIDE}'); 

//--> 

</script> 
<!-- END hide_owntext_open --> 
<!-- BEGIN hide_close --> 
<script language="javascript1.2" type="text/javascript"> 

<!-- 

   hideBBCode.close(); 

//--> 

</script> 
<!-- END hide_close --> 
Instead of the old without the extra linebreaks. I haven't tested this though, but it's worth a try.
My mod: [Hide BBcode MOD]

Post Reply

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

cron