[2.0.12] Hide BBcode MOD

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

Rating:

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

Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

I can't get this to work, though:

Code: Select all

	$patterns = array('<!--', '//-->', ':');
	$replacements = array("\r<!--\r", "\r//-->\r", "");

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

Post by EGIS »

To add additional characters (colon as an example):

Code: Select all

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/bbcode.php

# 
#-----[ FIND ]------------------------------------------ 
# NOTE: Full line is longer
# 
$text = preg_replace("/\[hide:$uid=([a-zA-Z0-9&\-_.æøåÆØÅ ?!\\\"]

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
#
\\\"]

# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
# Add the colon (escape it by using a backslash)
#
\:

# 
#-----[ FIND ]------------------------------------------ 
# NOTE: Full line is longer
#
$text = bbencode_first_pass_pda($text, $uid, '/\[hide=([a-zA-Z0-9&\-_.æøåÆØÅ ?!\\\"]

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# Add the colon again (escape it by using a backslash)
#
\\\"]

# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
#
\:

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
My mod: [Hide BBcode MOD]

Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Works perferctly, thanks :D

tweetybird
Registered User
Posts: 11
Joined: Sat Jun 28, 2003 10:07 am

Post by tweetybird »

Adds a Hide BBcode to your forum, which reveals the hidden code (images too) when some text is clicked. Great if you want other users to agree before viewing information about for example the ending of a book.



How can I use this so that users also must first reply a post to see what the hidden text is.

Or is this another mod that I must download?

Help..

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

Post by EGIS »

No. The mod you are talking about can be found here.
My mod: [Hide BBcode MOD]

tweetybird
Registered User
Posts: 11
Joined: Sat Jun 28, 2003 10:07 am

Post by tweetybird »

Thanks for the quick respons and the link.

:wink:

tweetybird
Registered User
Posts: 11
Joined: Sat Jun 28, 2003 10:07 am

Post by tweetybird »

Dear friends or EGIS,

Ok I have installing the mod but it seems that i wasn't searching for this one I was searching for the Hide BBCode on the following link that I get from member EGIS.

But now the question because the both is installed I'm getting still the message Click to reveal hidden content when I use the hide function.

Must I remove the first mod.
And if yess I can't find a uninstall guide.
Can someone help me through with this.

Thanks for helping.


--

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

Post by EGIS »

Try first uninstalling the mod you installed last, then the mod you installed first. Then you install the mod you want to use.
For uninstalling you simply follow the step backwards, removing what you added and so on.
My mod: [Hide BBcode MOD]

tweetybird
Registered User
Posts: 11
Joined: Sat Jun 28, 2003 10:07 am

Post by tweetybird »

Thanks it's working!

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

MOD Updated to version 1.2.6
See first post for Download Link

phpBeeBeeK
Registered User
Posts: 32
Joined: Thu Dec 02, 2004 9:00 am

Post by phpBeeBeeK »

This mod works very well, top marks.

Does anyone know if it is possible to replace the text with an image? What I mean is, instead of having a text link to click to unhide, I want to use an image. Is this possible?

kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

Merri wrote: Lacks support for scandinavian alphabets: [hide=tдstд] doesn't work, for example. Pretty nasty, because most "click here" variation texts in Finnish use the Д letter in one of the words.


I have the same problem with cyrillic alphabet. Help, plz! I added "charset=windows-1251" (encoding of my forum pages) in:

Code: Select all

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/overall_header.tpl 


# 
#-----[ FIND ]------------------------------------------ 
# 
</head> 


# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
<script charset="windows-1251" "language="javascript1.2" type="text/javascript" src="templates/hidebbcode.js"></script>
but nothing changed.

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

Post by EGIS »

Code: Select all

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/bbcode.php


# 
#-----[ FIND ]------------------------------------------ 
# 
   $text = preg_replace("/\[hide:$uid=([a-zA-Z0-9&\-_.æøåÆØÅ ?!\\\"]+?)\]/si", $bbcode_tpl['hide_owntext_open'], $text); 


# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
   $text = preg_replace("/\[hide:$uid=([^\'\]\n\\\]+)\]/si", $bbcode_tpl['hide_owntext_open'], $text); 


# 
#-----[ FIND ]------------------------------------------ 
# 
   $text = bbencode_first_pass_pda($text, $uid, '/\[hide=([a-zA-Z0-9&\-_.æøåÆØÅ ?!\\\"]+?)\]/is', '[/hide]', '', false, '', "[hide:$uid=\\1]"); 


# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
   $text = bbencode_first_pass_pda($text, $uid, '/\[hide=([^\'\]\n\\\]+)\]/is', '[/hide]', '', false, '', "[hide:$uid=\\1]"); 


# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
I have submitted an update that include these changes.
My mod: [Hide BBcode MOD]

kulinar
Registered User
Posts: 657
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar »

I did the changes. Still doesn't work with cyrillic encoding :cry:

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

Post by EGIS »

Here I've tested some cyrillic characters (think so) and it seems like they are working fine. Sure you didn't use any single quotes, right square brackets, backslashes or new lines?
My mod: [Hide BBcode MOD]

Post Reply

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