Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
IMG to URL BBCode Converter (In Quotes) Details »»
IMG to URL BBCode Converter (In Quotes)
Version: 1.00, by Dannyloski Dannyloski is offline
Developer Last Online: Mar 2012 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.6.8 Rating:
Released: 08-18-2007 Last Update: Never Installs: 18
 
No support by the author.

Hey Guys,

I know I was searching for a feature like this for the longest time and had no luck. Well I decided to do some digging and after a while I was able to find the code that you can use to remove the [IMG] Tag from Quotes in Posts under vB 3.6.0 and up.

This specific Modification will change all [IMG] Tags into [URL] Tags when they are inside a Quote. I guess that's pretty self explanatory.

Special thanks to masalaman for the code, I'm just posting it here for others to use it as they may be searching for it and it took me a while to find it. I guess this will just make you life's easier :up:

Modification Instructions:

1) Open includes/class_bbcode.php
2) Find the following line:
Code:
eval('$html = "' . fetch_template($template) . '";');
3) After this line add the following:
Code:
// Start IMG to URL BBCode Converter
if ($this->contains_bbcode_img_tags($html)) 
{
$html = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $html);
}
// End IMG to URL BBCode Converter
4) Repeat steps 2-3 for every place that the line on Step 2 appears in the class_bbcode.php file (Four Times)
5) Save & Overwrite the File to your Server ... That's it! Enjoy!

- Danny

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-19-2007, 03:36 AM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved, just in case I need to update something
Reply With Quote
  #3  
Old 08-19-2007, 04:10 AM
HDT HDT is offline
 
Join Date: Sep 2006
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Subscibed first,installed later thanks for the mod
Reply With Quote
  #4  
Old 08-19-2007, 05:48 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't really need a file modification to do this...It can be done via plugins.
Reply With Quote
  #5  
Old 08-19-2007, 03:03 PM
maxicep maxicep is offline
 
Join Date: Oct 2006
Location: California
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice thanks.
Reply With Quote
  #6  
Old 08-19-2007, 05:32 PM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it can be useful for others :up:

Quote:
Originally Posted by Dismounted View Post
You don't really need a file modification to do this...It can be done via plugins.
Well I do not know how to do plugins, if you wish to create one using the code above, feel free to do so and post it here. I did not write the code, it was written by masalaman, like I said in the first post. I just posted the code here so that other can use it since if you search for it you really have to do some digging until you find it on the forums.
Reply With Quote
  #7  
Old 08-20-2007, 02:29 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx...would be really nice if it could be done via plugins (previously it was done by HeLLcat)

if [img] likes [Img] or [iMg] or [IMG] or [imG] will that work too?
asking cos hellcat's plugin had that error ..tho later on it was fixed by him.

waiting fr a plugings
Reply With Quote
  #8  
Old 08-20-2007, 02:45 PM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Zai, Im not going to be releasing a Plugin Version, so if you're gonna be waiting for that, you should ask someone else to see if they are willing to make a plug in. I might do it in the future, but I'm too busy right now to learn how to do Plugins, so I wont be dong it anytime soon.

As far as the error on the [img], [Img], [iMg], [IMG], [imG] that is not a problem with this Modification. It converts it anyway.
Reply With Quote
  #9  
Old 08-21-2007, 03:39 PM
Stifmeister2 Stifmeister2 is offline
 
Join Date: Feb 2006
Location: Finland
Posts: 755
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dannyloski View Post
Glad it can be useful for others :up:


Well I do not know how to do plugins, if you wish to create one using the code above, feel free to do so and post it here. I did not write the code, it was written by masalaman, like I said in the first post. I just posted the code here so that other can use it since if you search for it you really have to do some digging until you find it on the forums.
I would love that Dismounted.
Reply With Quote
  #10  
Old 08-25-2007, 03:05 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dannyloski View Post
Zai,
Hhaha

Zia here not Zai

any way thnx mate
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 02:04 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.04612 seconds
  • Memory Usage 2,298KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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