Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-04-2015, 11:42 PM
Vaskania's Avatar
Vaskania Vaskania is offline
 
Join Date: Aug 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default *Solved* VB5.1.6 Help with truncated url code

Trying to edit function handle_bbcode_url (includes/class_bbcode.php) to allow for longer urls. I thought it would be easier to just allow longer ones than to try to remove the code altogether, but I seem to be at a stand still.

Code:
if (vbstrlen($tmp) > 55 AND $this->is_wysiwyg() == false)
			{
				$text = htmlspecialchars_uni(vbchop($tmp, 36) . '...' . substr($tmp, -14));
			}
In theory, I should be able to change 55 to a higher number to allow for longer urls before truncation kicks in, but it's not working out that way. I could ramp it up to 5500 and it doesn't change anything. I've even tried raising 36 to a higher number- still nothing.

Has this method changed with VB5? Should I be looking elsewhere?
Reply With Quote
  #2  
Old 04-04-2015, 11:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you making sure to clear the cache (admincp > maintenance and also your browser) after you make the change?
Reply With Quote
  #3  
Old 04-05-2015, 12:06 AM
Vaskania's Avatar
Vaskania Vaskania is offline
 
Join Date: Aug 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Crap.. no. LOL

CTRL F5 a few times didn't change, but I didn't think to clear the cache in maintenance.

I'll try changing it again and clear everything and see.
Reply With Quote
  #4  
Old 04-06-2015, 05:11 PM
Vaskania's Avatar
Vaskania Vaskania is offline
 
Join Date: Aug 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No change. I set it to 1000 just to test. Cleared the maintenance cache as well as my browsers. Links are still being truncated.
Reply With Quote
  #5  
Old 04-06-2015, 08:03 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you tried just commenting out the line ($text=xxxx)? That should let you know whether you are even editing the correct code or not. Also, you are just talking about URLs in the [ URL ] tags, not the ones make with the Link button, right?

Also, handle_bbcode_url is also in the file /core/vb/library/bbcode.php Have you tried changing it there? It also happens to be in /includes/vb5/template/bbcode.php I honestly couldn't tell you which is the correct file without trying them out myself.
Reply With Quote
  #6  
Old 04-16-2015, 05:20 PM
Vaskania's Avatar
Vaskania Vaskania is offline
 
Join Date: Aug 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The ones affected seem to be ones that are just pasted right into the body of the post and auto-parsed into links. That's how most of our users insert links. I'll have to play around a bit with manually adding the [ url ][ /url ] tags and see if those are truncated as well.

Thanks for pointing me in the right direction. Had no idea there were multiple files.

For now I've installed this mod: https://vborg.vbsupport.ru/showthread.php?t=288954 which works so far, but the truncated links screw it up if you edit a post (links are truncated in the edit box, which destroy the title rewrite).

/edit
Solved. Did a search files/sub-folders via Notepad++ and got all 3 files at once and edited all 3. One of them did the trick. lol
Reply With Quote
Благодарность от:
Lynne
  #7  
Old 04-16-2015, 08:27 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm glad you got it working for you. And thanks for posting what you did.
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 01:53 AM.


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.07255 seconds
  • Memory Usage 2,220KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (1)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete