[ABD] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

[ABD] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by ycl6 »

MOD Title: [phpBB3] Simple Hide URL MOD

MOD Description: Whenever BBcode is used in a message, the hyper ... de URL MOD

~Mac
Last edited by Sam on Tue Jun 08, 2010 7:32 pm, edited 1 time in total.
Reason: Marked mod as abandoned, if the original poster wishes to continue this, please PM any MOD team member to have it unlocked.
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by ChriZathens »

Nice Idea!!!
Congrats.. I'll test it and report any probs !!!

EDIT: OK, just tested it... Very simple installation, It works great and the prosilver edits are the same for my subsilver based style, too...

Main problem in my forum is that there are too many links without url bbcodes... :lol:
25% of the links get hidden with ur mod, the other 75% (without bbcode) are publically visible... :lol:

But the part that involves your mod works as it should.. Nice !!!
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
xnitelifex
Registered User
Posts: 126
Joined: Wed Jun 27, 2007 6:35 pm

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by xnitelifex »

Cool, it works the way it's described here!,

Suggestions:
-hide all URL, not just those using BBCode
-message to be in bold, color, etc. to stand out more
-if the post have multiple links, show [*xxx] with a notation below the message. that way, it won't display "URL is hidden from guests, please register and login to view the hyperlink" multiple times to clutter the post.

Thanks!
Sniiper
Registered User
Posts: 34
Joined: Sat Dec 22, 2007 4:55 pm

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by Sniiper »

is there anyway to get this mod without using bbcode..
because on my froum no links used with bbcode..but at the sametime i need a mod to hide links from guest to make them register
Blanky
Registered User
Posts: 253
Joined: Wed Aug 23, 2006 4:25 pm

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by Blanky »

Does this work with text also? Let's say I type bla bla lbla b notalink will that be higgen also?
methos3uk
Registered User
Posts: 1
Joined: Thu Jan 17, 2008 8:26 pm

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by methos3uk »

xnitelifex wrote: Suggestions:
-message to be in bold, color, etc. to stand out more
If you edit the new line in bbcode.html (in styles\...\template) and change it from:

Code: Select all

<!-- BEGIN url_hidden -->{L_URL_HIDDEN}<!-- END url_hidden -->
to

Code: Select all

<!-- BEGIN url_hidden --><span style="background-color:#FAFAFA; border:#D1D7DC solid 1px; color:#444444;">&nbsp;{L_URL_HIDDEN}&nbsp;</span><!-- END url_hidden -->
You can get it to look exactly as you want.
In this case I did this for proSilver and it appears in a light grey box on the blue background with a grey border.
Adding a font-weight:bold or changing the value of the color:#444444; within the style="" attribute may give you what you need.
The values are hard-coded in this sample, but could be set up as configurable
s60Addict
Registered User
Posts: 49
Joined: Tue Sep 26, 2006 5:08 pm

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by s60Addict »

Also, try to include the URL's in [ CODE ] tags..
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by Muad''Dib »

s60Addict wrote:Also, try to include the URL's in [ CODE ] tags..
That would be excellent.
User avatar
mysteryclub
Registered User
Posts: 20
Joined: Wed Oct 17, 2007 5:34 pm

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by mysteryclub »

Hey! This works great. Thanks for this mod but I have a tiny problem. The hidden text does not show up.

I did exactly what I should. Any idea? :|
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by Muad''Dib »

Ok i have good news for those of you who wanted to use this mod to hide "code" bbcode instead of or along with "url" bbcode:

Here is my example:

Image

Here are my instructions:

Open: includes/bbcode.php and find:

Code: Select all

				case 8:
					$this->bbcode_cache[$bbcode_id] = array(
						'preg' => array(
							'#\[code(?:=([a-z]+))?:$uid\](.*?)\[/code:$uid\]#ise'	=> "\$this->bbcode_second_pass_code('\$1', '\$2')",
						)
					);
				break;
Replace with:

Code: Select all

				case 8:
					if ($user->data['user_id'] != ANONYMOUS)
					{
						$this->bbcode_cache[$bbcode_id] = array(
							'preg' => array(
								'#\[code(?:=([a-z]+))?:$uid\](.*?)\[/code:$uid\]#ise'	=> "\$this->bbcode_second_pass_code('\$1', '\$2')",
							)
						);
					}
					else
					{
						$this->bbcode_cache[$bbcode_id] = array(
							'preg' => array(
								'#\[code(?:=([a-z]+))?:$uid\](.*?)\[/code:$uid\]#ise'	=> "\$this->bbcode_second_pass_code_hidden('\$1', '\$2')",
							)
						);
					}
				break;
Find:

Code: Select all

		$code = $this->bbcode_tpl('code_open') . $code . $this->bbcode_tpl('code_close');

		return $code;
	}
Add After:

Code: Select all

	function bbcode_second_pass_code_hidden($type, $code)
	{
		// when using the /e modifier, preg_replace slashes double-quotes but does not
		// seem to slash anything else
		$code = str_replace('\"', '"', $code);

		switch ($type)
		{
			case 'php':
				// Not the english way, but valid because of hardcoded syntax highlighting
				if (strpos($code, '<span class="syntaxdefault"><br /></span>') === 0)
				{
					$code = substr($code, 41);
				}

			// no break;

			default:
				$code = str_replace("\t", '&nbsp; &nbsp;', $code);
				$code = str_replace('  ', '&nbsp; ', $code);
				$code = str_replace('  ', ' &nbsp;', $code);

				// remove newline at the beginning
				if (!empty($code) && $code[0] == "\n")
				{
					$code = substr($code, 1);
				}
			break;
		}

		$code = $this->bbcode_tpl('code_open') . $code = $this->bbcode_tpl('code_hidden') . $this->bbcode_tpl('code_close');

		return $code;
	}
Save and close bbcode.php.

Open: language/en/viewtopic.php and find:

Code: Select all

));

?>
Add Before:

Code: Select all

'CODE_HIDDEN'			=> 'CODE is hidden from guests, please register and login to view the code',
Save and close viewtopic.php.

Open: styles/prosilver/template/bbcode.html and find:

Code: Select all

<!-- BEGIN code_open --><dl class="codebox"><dt>{L_CODE}: <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><code><!-- END code_open -->
<!-- BEGIN code_close --></code></dd></dl><!-- END code_close -->
Add After:

Code: Select all

<!-- BEGIN code_hidden -->{L_CODE_HIDDEN}<!-- END code_hidden -->
Save and close bbcode.html.

Upload all changed files, purge cache, and your all set!

I hope that helps someone!
talkbasket
Registered User
Posts: 41
Joined: Fri Jun 29, 2007 2:18 pm
Location: Lithuania
Contact:

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by talkbasket »

Code: Select all

Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /forums/includes/bbcode.php on line 600
I got this error :?
TalkBasket - Home of basketball

Create Blog | Forums | Ask the Coach
shinzo
Registered User
Posts: 27
Joined: Sun Mar 16, 2008 6:05 am

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by shinzo »

can be used with PHPPbb3 Olympus?
User avatar
Muad''Dib
Registered User
Posts: 311
Joined: Tue Jun 12, 2007 6:20 pm
Contact:

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by Muad''Dib »

shinzo wrote:can be used with PHPPbb3 Olympus?
Isnt that what the title says?? :?
shinzo
Registered User
Posts: 27
Joined: Sun Mar 16, 2008 6:05 am

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by shinzo »

Muad''Dib wrote:
shinzo wrote:can be used with PHPPbb3 Olympus?
Isnt that what the title says?? :?
oo i c.
im sorry, i dun know PHPbb3 Gold is Olympus too!
ill give it a try! ;)
shinzo
Registered User
Posts: 27
Joined: Sun Mar 16, 2008 6:05 am

Re: [BETA] Simple Hide URL MOD 0.0.1 (phpBB3 GOLD)

Post by shinzo »

Thanks Muad''Dib! it works! :D
Locked

Return to “[3.0.x] Abandoned MODs”