vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   URL's (https://vborg.vbsupport.ru/showthread.php?t=42614)

Tyrant 08-22-2002 02:12 PM

URL's
 
The URLS on my site are not working

http://www.vbulletin.com gets changed to

" http://www.mb-tech.co.uk//%22http://...ulletin.com%22 "

Any idea what may be causing this?

Recently installed hacks are, shoutbox, local time in post and post counter.

Tyrant 08-22-2002 02:55 PM

Update: Ive created a fresh template set now to test with yet the same problem occurs therefore its going to be some incorrect PHP right?

Where will i find the code that manages URL parsing?

NTLDR 08-22-2002 03:04 PM

Quote:

Originally posted by Tyrant
Where will i find the code that manages URL parsing?
Should be in admin/functions.php

Tyrant 08-22-2002 03:09 PM

Thanks buddy thats what ive been going through but to be honest im not going to know the code if it has lights and stars around it... trying to track any changes that may have been made to the file :(

NTLDR 08-22-2002 03:12 PM

The parts that deal with the parsing of the URL are after:

PHP Code:

// ###################### Start checkurl ####################### 

And:
PHP Code:

// ###################### Start parseurl ####################### 

So try comparing those sections with the origional code from functions.php

Tyrant 08-22-2002 03:15 PM

PHP Code:


// ###################### Start checkurl #######################

function checkurl($url$hyperlink="") {

  
$righturl $url;

  if(!
preg_match("![a-z]://!si"$url)) {

    
$righturl "http://$righturl";

  }

  
// remove threat of users including javascript in url

  /*$righturl = preg_replace("/javascript:/si", "java script:", $righturl);

  $righturl = preg_replace("/about:/si", "about :", $righturl);*/

  
$hyperlink iif(trim($hyperlink)=="" or $hyperlink==$urliif(strlen($url)>55,substr($url,0,35)."...".substr($url,-15),$url) ,$hyperlink);

  return 
"<a href=..//%22$righturl/%22 target=\"_blank\">".str_replace('\"''"'$hyperlink)."</a>";

}



// ###################### Start parseurl #######################

unset($urlSearchArray);

unset(
$urlReplaceArray);

unset(
$emailSearchArray);

unset(
$emailReplaceArray);

function 
parseurl($messagetext)

// the auto parser - adds [url] tags around neccessary things 

Ive made no changes in this area. What do you think? Looks ok?

NTLDR 08-22-2002 03:24 PM

Quote:

Originally posted by Tyrant
[Ive made no changes in this area. What do you think? Looks ok?
Somethings changed it, the checkurl function should have this code in it:

PHP Code:

function checkurl($url$hyperlink="") {
  
$righturl $url;
  if(!
preg_match("![a-z]://!si"$url)) {
    
$righturl "http://$righturl";
  }
  
// remove threat of users including javascript in url
  /*$righturl = preg_replace("/javascript:/si", "java script:", $righturl);
  $righturl = preg_replace("/about:/si", "about :", $righturl);*/
  
$hyperlink iif(trim($hyperlink)=="" or $hyperlink==$urliif(strlen($url)>55,substr($url,0,35)."...".substr($url,-15),$url) ,$hyperlink);
  return 
"<a href=\"$righturl\" target=\"_blank\">".str_replace('\"''"'$hyperlink)."</a>";



Tyrant 08-22-2002 03:29 PM

Ill make the changes and try it. Thanks!

Tyrant 08-22-2002 03:32 PM

That solved it thanks! :D

NTLDR 08-22-2002 03:35 PM

No problem :D


All times are GMT. The time now is 05:11 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.01664 seconds
  • Memory Usage 1,746KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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