vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Display full URL instead of ? (https://vborg.vbsupport.ru/showthread.php?t=252544)

ppatil007 10-23-2010 10:00 PM

Display full URL instead of ?
 
1 Attachment(s)
What this does:
All this simple change in php file does is displays the complete url throughout your forum instead of truncated url with ? which is very useful for people who use downloader software to download files so they just can copy directly from the forum instead of clicking on files individually as hyperlinks and then copy . Refer screenshots below its self explanatory

http://img263.imageshack.us/img263/7232/14759007.jpg

Instructions :
? Find the php file under includes ?class_bbcode.php?
? Search for function handle_bbcode_url
? Look for
Code:

if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
                        {
                                $text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
                        }

? Replace 55 with 70 ; 36 with 50 & 14 with 20 and save
? Log in ADMINCP --> Maintenance --> Update Counter

Explanation :

X; 55 = number of characters before it's stripped
Y; 36 = number of characters before the (...)
Z; 14 = number of characters after the (...)

Logic has to be always X = Y + Z to work
I used 70 = 50 + 20 you can use any combination for bigger urls ( 90 = 60 + 30 ) etc

http://img156.imageshack.us/img156/7779/93171584.jpg

Note :
I am not a coder and this is my first attempt ; I needed this and found out how it works after lot of trial and error process I could not find any thread which had detailed explanation for people like me so created this one ; hope it helps

vB Version: Should work for all versions :)

NightLord 10-24-2010 05:07 PM

perfect thanks :)

adigaorg 10-24-2010 09:48 PM

thank you

compact123 10-31-2010 05:21 PM

thank you :O


All times are GMT. The time now is 06:51 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.01036 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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