vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Modify Link URL (https://vborg.vbsupport.ru/showthread.php?t=318269)

wdwms 04-16-2015 03:54 PM

Modify Link URL
 
I want to modify link URLs (that is, URLs that users have included in a thread/post using the insert link icon in the editor). Specifically this is so that I can re-write ebay URLs to be compliant with their affiliate program.

I've been able to modify in-line URLs by adding some custom code to /includes/vb5/template/bbcode.php - essentially before the // standard URL hyperlink code is called in function handle_bbcode_url I review the URL and modify it.

This works for in-line links, but not for those that users insert via the Link button.

I'd like to do the same for the link button, but can't seem to find where the code is that displays the URL. I see it is using the link template, but i can't find what calls it. Can you advise? Thanks!

Replicant 04-16-2015 04:26 PM

Check in the ckeditor javascript files in {Your forum root}/js/ckeditor/plugins/link/dialogs/link.js

This looks like what you're looking for. Their javascript is compressed and minified, so use a good editor that can expand and indent the code for easier reading.

wdwms 04-16-2015 05:03 PM

That would do it client side, I want to do this even before it gets to the browser.


All times are GMT. The time now is 12:19 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.01066 seconds
  • Memory Usage 1,705KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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