vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Remove hyperlinking.Please read this thread. (https://vborg.vbsupport.ru/showthread.php?t=127816)

Z@N@ 09-29-2006 02:53 AM

Remove hyperlinking.Please read this thread.
 
Guys,

I will cut to the chase. I wont to be able to DISABLE REMOVE hyperlinking / url parsing.

I am using VB3.6.1.

I know its in the attached code - class_bbcode.php

Somewhere in these lines of this file -

Code:

/**
        * Handles a [url] tag. Creates a link to another web page.
        *
        * @param        string        If tag has option, the displayable name. Else, the URL.
        * @param        string        If tag has option, the URL.
        *
        * @return        string        HTML representation of the tag.
        */
        function handle_bbcode_url($text, $link)
        {
                $rightlink = trim($link);
                if (empty($rightlink))
                {
                        // no option -- use param
                        $rightlink = trim($text);
                }
                $rightlink = str_replace(array('`', '"', "'", '['), array('`', '"', ''', '['), $this->strip_smilies($rightlink));

                if (!preg_match('#^[a-z0-9]+(?<!about|javascript|vbscript|data):#si', $rightlink))
                {
                        $rightlink = "http://$rightlink";
                }

                if (!trim($link) OR $text == $rightlink)
                {
                        $tmp = unhtmlspecialchars($rightlink);
                        if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
                        {
                                $text = htmlspecialchars_uni(substr($tmp, 0, 36) . '...' . substr($tmp, -14));
                        }
                }

                // remove double spaces -- fixes issues with wordwrap
                $rightlink = str_replace('  ', '', $rightlink);

                // standard URL hyperlink
                return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
        }


I have tried replacing lines, removing bits of this code, I got it to work at one stage, the links I was posting in a test thread were just text, but they had the

Tags at the ends of my just text links, in other words links were not clickable at all, but had these tags on each end.

I have seaqrched google, vb.org, vbulletin.com I have tried all idea's in about the 20 threads I had found, but none have worked.

Please help.

DaveTomneyUK 09-29-2006 09:30 AM

Have you tried this within the code you posted above.

Search for :
Code:

return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
Change to :
Code:

return "$text";

Z@N@ 09-29-2006 09:48 AM

Dave,

Cheers for this, worked a treat. Funny thing is I had also played with that line, bu instead of replacing with the text you said, I was actually removing that whole bit of code.

Thanks again.


All times are GMT. The time now is 07:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01129 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete