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
  #12  
Old 08-27-2007, 12:57 AM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ Oops, sorry ... Guess I got a typo there, must've been busy with other things

Still no news on the Plugin Version of this Mod guys ... Sorry, I looked into it, but seems kinda more in depth and stuff, so I'm not gonna be able to release it. Anyone and everyone is welcome to make the Plugin Version of this Hack and post it up if they want, so if you know how to do it, then do it - It would be best. I'm really busy now with other stuff, so I doubt I'll get around to it anytime soon ...
Reply With Quote
  #13  
Old 02-01-2008, 03:07 PM
TeamDevotion TeamDevotion is offline
 
Join Date: Sep 2006
Location: Westchester County, NY
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

alright, heres what I'm trying to do.

With this hack, the quote is modified once its submitted and not before, because even when you hit edit, it still says image tags, but when viewed, they are links.

The problem with this is that if you quoted 6 images, and wanted just one to show up as a picture and the other 5 as links you couldn't do this.

Is there anyway to get the code to convert the img to url when you first hit the quote button rather than right before it returns the value of the quote.
Reply With Quote
  #14  
Old 04-06-2008, 04:05 AM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ I do not think that is possible, but I did not make this Code I simply posted it so others could find it easier. It was made by masalaman, so maybe he would know the answer to this question ...

Anyways, I want BUMP this because it seems to not be working in vBulletin 3.6.9 ... When installed, the code makes anything that's inside the Quote Tags not visible. This was working fine in vB 3.6.8 PL2, but with the release of vB 3.6.9 the class_bbcode.php File was changed and that seems to have had an effect on this. The 4 Lines of the original code below are still there, but when replaced with the IMG to URL BBCode Converter Code, like you're suppose to, it does not work and causes the error that was previously stated.

Code:
eval('$html = "' . fetch_template($template) . '";');
I hope someone can shine some light as to why its happening and maybe even fix the code. Hopefully too, someone can come out with a Plugin Version rather than Manual File Edits. Anyone that can help would be highly appreciated and credit will be given appropriately in the Thread and First Post. If you wish to release a Fix in your own thread that is fine, just post the link here and I will edit the first post to point to that Link.
Reply With Quote
  #15  
Old 04-06-2008, 04:12 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought uploading vb files was against the rules. You might want to make sure it is allowed now as it never used to be.
Reply With Quote
  #16  
Old 04-06-2008, 04:16 AM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ Well nobody has said anything for the past 8 Months that this has been out, so I guess its not against the Rules ... If it is in fact against the rules, then I would guess they would've removed the Attachment.

Anyone out there with an idea on a Fix for this in vB 3.6.9?
Reply With Quote
  #17  
Old 04-06-2008, 07:28 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Attachment removed, as per out rules.
Quote:
Originally Posted by General Site Rule #10
No spreading of any copyrighted material (vBulletin or other) is to take place on this site without the expressed permission of the copyright holder, which must be attached to the material. For example, you cannot upload complete vBulletin files. Partial code is permitted, as long as it is solely for the location of the correct place in the code. Any copyrighted code snippets should be no more than 10 lines in length, unless approved by a member of Staff.
Reply With Quote
  #18  
Old 04-06-2008, 01:55 PM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ Thanks, no one had removed it before or said anything, so I didnt know ...

We still have the issue that there is no Hack available for vB 3.6.9 to convert [img] Tags to [url] Tags in Quotes, so can anyone help on a fix?
Reply With Quote
  #19  
Old 04-08-2008, 05:28 PM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Somebody, anybody ... Please!
Reply With Quote
  #20  
Old 04-10-2008, 10:02 PM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no one out there who has a Working [img] Tag to [url] Tag in Quotes Hack?
Reply With Quote
  #21  
Old 04-11-2008, 02:56 PM
Dannyloski Dannyloski is offline
 
Join Date: Jun 2006
Location: FL
Posts: 401
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think its crazy that no one has been able to get a Fix for this in vB 3.6.9. I know there is someone out there ..
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:11 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.18346 seconds
  • Memory Usage 2,307KB
  • 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
  • (1)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
  • (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