vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to show full URL in vb4.2.x (https://vborg.vbsupport.ru/showthread.php?t=321078)

helenblog 12-13-2015 12:17 PM

How to show full URL in vb4.2.x
 
Hello,

I have read all guides from vbulletin.org and vbulletin.com to show full URL in vb4.2x but seem there is any guides to make this work as expected.

Can you share me ways to enable/show full URL in vbulletin post (vb4.2x) without trim URL with (...) when showing on post content.

Thanks

Dave 12-13-2015 12:29 PM

The /includes/class_bbcode.php file will have to be modified for this.
Look for
PHP Code:

$text htmlspecialchars_uni(vbchop($tmp36) . '...' substr($tmp, -14)); 

around line 2421 and replace with
PHP Code:

$text str_replace('  '''$text); 


MarkFL 12-13-2015 01:31 PM

Another alternative would be to create the following plugin:

Product: vBulletin

Hook Location: postbit_display_complete

Title: Show Full Links

Execution Order: 5

Plugin PHP Code:

PHP Code:

$post['message'] = preg_replace('/(<a.*?href=")(.*?)(".*?>)(.*?\.\.\..*?)<\/a>/'"$1$2$3$2" '</a>'$post['message']); 

Plugin is Active: Yes

helenblog 12-14-2015 01:20 AM

Thanks Dave and MarkFL!

I like MarkFL's way because I will not lose codes when updating vb versions.

MarkFL 12-14-2015 01:26 AM

Quote:

Originally Posted by helenblog (Post 2560370)
Thanks Dave and MarkFL!

I like MarkFL's way because I will not lose codes when doing update vb versions.

Dave's suggestion is more efficient as it stops the trimming from even being done in the first place (and will work anywhere BBCodes are parsed), but you're right, using a plugin will ensure you won't have to edit the core file again if you do an update (and you only need it to work in post content). :)

Dave 12-14-2015 06:27 AM

Yep, I would rather use a plugin as well.


All times are GMT. The time now is 11:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00970 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete