The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Png link auto embed(convert)
How can I automatically convert a picture when I add a link?
For example http://travian-reports.net/tr/img/154441a5f4e.png I do not want it to appear as a link. I find auto youtube embed(https://vborg.vbsupport.ru/showthread.php?t=261296) but ı dont find image link convert. |
#2
|
||||
|
||||
Create a plugin hooked at "postbit_display_start" with the code:
PHP Code:
|
Благодарность от: | ||
z3r0 |
#3
|
||||
|
||||
Mark to include more, png, gif, jpeg, etc ?
Thanks in advanced |
#4
|
|||
|
|||
Quote:
Thanks in advanced |
#5
|
||||
|
||||
You may recall I had to add some code because of post caching...please post the entire content of the plugin I put on your site, and I will modify it to include more file extensions.
|
#6
|
|||
|
|||
I do not know what you add: D
|
#7
|
||||
|
||||
admincp
Plugins & Products -> Plugin Manager -> You must remember the title to see it, maybe at top. Read and i thing you will understand which is.. * If you press on the title you will see the code |
Благодарность от: | ||
MarkFL |
#8
|
|||
|
|||
Quote:
--------------- Added [DATE]1487010990[/DATE] at [TIME]1487010990[/TIME] --------------- --------------- Added [DATE]1487011022[/DATE] at [TIME]1487011022[/TIME] --------------- --------------- Added [DATE]1487011282[/DATE] at [TIME]1487011282[/TIME] --------------- ok ı see. sory true? $content = preg_replace('/\[URL\](http.*?\.png)\[\/URL\]/i', '', $post['pagetext']); $content = preg_replace('/\[URL\](http.*?\.jpg)\[\/URL\]/i', '', $post['pagetext']); if ($content != $post['pagetext']) { global $vbulletin; $pagetext = $content; require_once(DIR . '/includes/class_bbcode.php'); $bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list()); $post['pagetext_html'] = $bbcode_parser->parse($pagetext, $post['forumid'], 1); $post['pagetext_html'] = html_entity_decode($post['pagetext_html']); } |
Благодарность от: | ||
Stratis |
#9
|
|||
|
|||
This looks interesting ..
So, for clarity, if I create a plugin titled with some name and hooked at "postbit_display_start" with the code: Quote:
Regards, Doug |
#10
|
||||
|
||||
What you would want for the first line is:
PHP Code:
|
Благодарность от: | ||
Stratis |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|