Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin Tips & Tricks

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
  #32  
Old 03-17-2008, 10:23 PM
sunny_girl's Avatar
sunny_girl sunny_girl is offline
 
Join Date: Mar 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea
Reply With Quote
  #33  
Old 03-17-2008, 10:48 PM
ReaperUK ReaperUK is offline
 
Join Date: Sep 2005
Location: UK
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx again...
Reply With Quote
  #34  
Old 03-18-2008, 09:55 AM
F0xy's Avatar
F0xy F0xy is offline
 
Join Date: Mar 2008
Location: Ireland
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great thanks a million, it works a charm
Reply With Quote
  #35  
Old 04-06-2008, 05:36 PM
wage the war wage the war is offline
 
Join Date: Feb 2008
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would be great if this was developed a little more. If members put their own code tags around the url it gets double coded
Reply With Quote
  #36  
Old 05-01-2008, 02:22 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone know what the code would be to only do the change on certain forums?

Within those specified forums the urls should have the [code] tags. Any other forum should have the default [url].

I imagine it would be something using IF and ELSE but I'm still a noob.
Reply With Quote
  #37  
Old 05-01-2008, 03:21 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nevermind
Reply With Quote
  #38  
Old 05-06-2008, 09:36 AM
Big Barry Big Barry is offline
 
Join Date: Apr 2008
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to make this only happen on a certain extension? for example if it was a .mp3 it would automatically code? If it is possible, this would rock as I could use it to auto embed mp3 files (as I have the [mp3] bb code
Reply With Quote
  #39  
Old 05-06-2008, 12:30 PM
smonabav smonabav is offline
 
Join Date: Apr 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, i'm new in vB, where can i find and edit "includes/functions_newpost.php"
Reply With Quote
  #40  
Old 05-06-2008, 03:49 PM
dancue dancue is offline
 
Join Date: Feb 2008
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by smonabav View Post
sorry, i'm new in vB, where can i find and edit "includes/functions_newpost.php"
This is a file uploaded when you first installed vbulletin. If you were to search for it on your server it would be located within your forum under the includes foler.
Reply With Quote
  #41  
Old 05-16-2008, 01:01 PM
Mecho's Avatar
Mecho Mecho is offline
 
Join Date: Aug 2006
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by free-offline View Post
Sorry , Post Edited !
I Forgot To Put One Line .
not working for me . each link goes separately
Reply With Quote
Reply

Thread Tools

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 05:15 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.10278 seconds
  • Memory Usage 2,299KB
  • Queries Executed 27 (?)
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
  • (1)bbcode_code
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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