vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   tweak of existing mod (own redirector) (https://vborg.vbsupport.ru/showthread.php?t=99271)

tokenyank 10-25-2005 10:17 AM

tweak of existing mod (own redirector)
 
Redlabour has said it is ok to have someone else look into this for me so I am posting a request. (oringinal mod: https://vborg.vbsupport.ru/showthrea...1&page=1&pp=15)

Basically what this mod does (if you haven't yet seen it) is parse all links through your own redirector (local links.php rather than a service like anon.to or safeurl.de)...

This works fine as it is now, but it only parses links with www. in the url so any links posted without the www is still a direct link.

I've tried to change the code myself with no success


Basically, all I want is the abilibilty to declare multiple domains in class_bbcode...

i.e. this:
Code:

$url_info = parse_url($rightlink);
                if ($url_info["host"]=="www.YOURDOMAIN.de"):
                return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
                else:
                return "<a href=\"http://www.YOURDOMAIN.de/forum/links.php?url=$rightlink\" target=\"_blank\">$text</a>";
                endif;

to this:
Code:

$url_info = parse_url($rightlink);
                if ($url_info["host"]=="www.YOURDOMAIN.de") || ($url_info["host"]=="YOURDOMAIN.de") || ($url_info["host"]=="http://YOURDOMAIN.de") || ($url_info["host"]=="http://www.YOURDOMAIN.de") || ($url_info["host"]=="YOURDOMAIN2.de") || ($url_info["host"]=="YOURDOMAIN3.de"):
                return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
                else:
                return "<a href=\"http://www.YOURDOMAIN.de/forum/links.php?url=$rightlink\" target=\"_blank\">$text</a>";
                endif;

Could someone good in php tell me how to add extra domains to that variable so that they do not parse?

Thanks in advance

Anyone? Bueller?

haha, I like the automerge! Bumping has to be more creative now, eh? :D



So what happens if you need to make another post ? Weired!


All times are GMT. The time now is 02:19 PM.

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.01038 seconds
  • Memory Usage 1,713KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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