Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin Tips & Tricks
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Auto Code ALL Links
SiK xGODx
Join Date: Jul 2007
Posts: 7

 

Show Printable Version Email this Page Subscription
SiK xGODx SiK xGODx is offline 07-08-2007, 10:00 PM

This mod involves editing a PHP file from vBulletin.

open the includes/functions_newpost.php

Find
PHP Code:
        $urlReplaceArray = array(
            
"[url]\\2\\4[/url]"
        
); 
And replace with
PHP Code:
        $urlReplaceArray = array(
            
"[code]\\2\\4[/code]"
        
); 
What this will do is make any link such as http://google.com appear like this:
Code:
http://google.com
Reply With Quote
  #22  
Old 11-10-2007, 02:48 PM
edongski edongski is offline
 
Join Date: Jul 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice... Is there a way to keep it specific to a specific forum/subforum only?
Reply With Quote
  #23  
Old 01-24-2008, 09:14 PM
360junkie 360junkie is offline
 
Join Date: Dec 2007
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did u still this iv seen this post a diff website about 3months ago
Reply With Quote
  #24  
Old 01-27-2008, 04:35 PM
takworld takworld is offline
 
Join Date: Jan 2008
Location: Iran
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi , i change the url to code but does n't work curretly
Reply With Quote
  #25  
Old 01-27-2008, 08:53 PM
irfreedownload irfreedownload is offline
 
Join Date: Dec 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i cant finde these cod?!!!!!!
Reply With Quote
  #26  
Old 01-28-2008, 10:16 PM
ReaperUK ReaperUK is offline
 
Join Date: Sep 2005
Location: UK
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by edongski View Post
Nice... Is there a way to keep it specific to a specific forum/subforum only?
would like this feature also
Reply With Quote
  #27  
Old 01-29-2008, 04:25 PM
takworld takworld is offline
 
Join Date: Jan 2008
Location: Iran
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
Reply With Quote
  #28  
Old 01-30-2008, 07:28 PM
Nitro212 Nitro212 is offline
 
Join Date: Mar 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

meh this is good and sucks at the same time.. cuz if u add more then one url u going to have 10 code boxes.. should be better to include all url's in the same code box
Reply With Quote
  #29  
Old 03-16-2008, 10:48 PM
free-offline free-offline is offline
 
Join Date: Dec 2007
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Last Way Just Can Put Code Tag Near Every URl And Cant Code Multi Urls Near Like It :

http://www.google.com
http://www.google.com
http://www.google.com
http://www.google.com

If You Want To Code Links Like That To This:

Code:
http://www.google.com
http://www.google.com
http://www.google.com
http://www.google.com
Just Do It :

Replace This :

PHP Code:
        $urlReplaceArray = array(
            
"[url]\\2\\4[/url]"
        
); 
With This :

PHP Code:
        $urlReplaceArray = array(
            
"[code]\\2\\4[/code]"
        
); 

And After This :

PHP Code:
    $text preg_replace($urlSearchArray$urlReplaceArray$messagetext); 
Put This Line :

PHP Code:
$text str_replace("[/code]\r\n[code]","\r\n",$text);
$text str_replace("[/code]\n[code]","\n",$text); 
Reply With Quote
  #30  
Old 03-17-2008, 10:27 AM
F0xy's Avatar
F0xy F0xy is offline
 
Join Date: Mar 2008
Location: Ireland
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by free-offline View Post
Last Way Just Can Put Code Tag Near Every URl And Cant Code Multi Urls Near Like It :

http://www.google.com
http://www.google.com
http://www.google.com
http://www.google.com

If You Want To Code Links Like That To This:

Code:
http://www.google.com
http://www.google.com
http://www.google.com
http://www.google.com
Just Do It :

Replace This :

PHP Code:
        $urlReplaceArray = array(
            
"[url]\\2\\4[/url]"
        
); 
With This :

PHP Code:
        $urlReplaceArray = array(
            
"[code]\\2\\4[/code]"
        
); 

And After This :

PHP Code:
    $text preg_replace($urlSearchArray$urlReplaceArray$messagetext); 
Put This Line :

PHP Code:
    $text str_replace("[/code]\r\n[code]","\r\n",$text); 
i did this but it still codes each link separately
Reply With Quote
  #31  
Old 03-17-2008, 07:49 PM
free-offline free-offline is offline
 
Join Date: Dec 2007
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry , Post Edited !
I Forgot To Put One Line .
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.15976 seconds
  • Memory Usage 2,319KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (10)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete