Page 2 of 18

Posted: Sat Aug 28, 2004 10:39 pm
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 :)

Posted: Sat Aug 28, 2004 10:54 pm
by Cuper
this is don't do nothing

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

Posted: Sun Aug 29, 2004 6:35 am
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...

Posted: Sun Aug 29, 2004 8:42 am
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.

Posted: Sun Aug 29, 2004 11:19 pm
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.

Posted: Mon Aug 30, 2004 2:44 am
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

Posted: Tue Sep 07, 2004 9:59 pm
by Darkmonkey
MOD Updated to version 1.2.2
See first post for Download Link

Posted: Tue Sep 07, 2004 10:14 pm
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)

Posted: Fri Sep 10, 2004 9:29 pm
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.

Posted: Fri Sep 10, 2004 10:12 pm
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.)

Posted: Sat Sep 11, 2004 12:27 am
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.

Posted: Fri Sep 17, 2004 2:59 am
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

Posted: Fri Sep 17, 2004 6:26 am
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?

Posted: Fri Sep 17, 2004 6:45 am
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.

Posted: Fri Sep 17, 2004 8:19 am
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.