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 11-11-2016, 06:29 AM
muffel muffel is offline
 
Join Date: Mar 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default External Links to internal Links

Hello,

at the moment, we make the first steps to update from VB4 to VB5.

And in our current Forum, we had changed the class_bbcode.php in that way:
PHP Code:
   if ($current_host=="www.URL.com"):
      return 
"<a href=\"$rightlink\" target=\"_blank\">$text</a>";
   else:
      return 
"<a href=\"http://www.URL.com/link.php?url=$rightlink\" target=\"_blank\" rel=\"nofollow\">$text</a>";
   endif; 
This change makes all external links to internal links... because the link.php just forwards the user the right website.
I have tried to make this also in the class_bbcode.php of VB5 but without success. Does anyone have also changed this into the VB5? Or do anyone know, what I have to change?
Thank you!
Reply With Quote
  #2  
Old 11-11-2016, 10:07 AM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you changing it in the handle_bbcode_url() function?

Also make sure that you urlencode() the $rightlink variable in order to pass the external link properly. If the external link has querystrings, not all of them might be preserved and passed to link.php.
Reply With Quote
  #3  
Old 11-11-2016, 10:58 AM
muffel muffel is offline
 
Join Date: Mar 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I change it in that function - it is at the end of this function.

But when I change something, the forum still shows the old link... and I do not know why
Maybe has anyone an idea, where and what to change in detail? Thank you!
Reply With Quote
  #4  
Old 11-12-2016, 12:48 AM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try clearing system cache in AdminCP.
Reply With Quote
  #5  
Old 11-14-2016, 03:46 AM
muffel muffel is offline
 
Join Date: Mar 2007
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for your reply.

But this also does not work. The link in the forum is the same as before. Is there another place to change the link... or is it just in the class_bbcode-file?
Reply With Quote
  #6  
Old 11-14-2016, 08:31 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi muffel,

I figured out a solution to this. I posted it on my site.

http://vbmods.rocks/forum/vbulletin-...he-destination
Reply With Quote
  #7  
Old 11-15-2016, 10:29 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about posting the solution here instead of a site that requires registration.
Reply With Quote
  #8  
Old 11-15-2016, 07:36 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, this site also requires registration.
If I posted the solution here, then guests would also need to login/register here to see the solution.

I posts solutions here and in vb.com whenever I can and you know that. But in some instances like this where I spent a good amount of time figuring out a solution, then I don't think it would be too much to ask to see the solution on my site. It's free anyway but if it was not, then I wouldn't have posted the link here.
Reply With Quote
  #9  
Old 11-15-2016, 07:55 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noypiscripter View Post
Well, this site also requires registration.
If I posted the solution here, then guests would also need to login/register here to see the solution.

I posts solutions here and in vb.com whenever I can and you know that. But in some instances like this where I spent a good amount of time figuring out a solution, then I don't think it would be too much to ask to see the solution on my site. It's free anyway but if it was not, then I wouldn't have posted the link here.
But, the question was posted here, and requiring our users here to go to another site where they must register before being able to get your solution to the question posted in this thread seems like an unnecessary hurdle.
Reply With Quote
  #10  
Old 11-16-2016, 05:16 AM
shimei shimei is offline
 
Join Date: Feb 2015
Posts: 216
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
But, the question was posted here, and requiring our users here to go to another site where they must register before being able to get your solution to the question posted in this thread seems like an unnecessary hurdle.
For SEO reasons I can understand it. If I were for example, to post a mod and instructions here and the same on my own site there would be duplicate content. I would think there would be a chance that the mod would be published here before my own site on google, especially considering the page ranking of vb.org.

Regarding Glenn's site, to be honest it is making this site obsolete for Vbulletin 5 users. The staff here at this site kills Vbulletin 5 in my opinion. Nobody here helps out Vb 5 users (hyperbole), that's why so many people duplicate their post asking here and then at Vbulletin.com.

They should just archive this site from a Vbulletin 5 perspective. It is really only a good site if someone has vb 3 or 4 questions. The staff not answering or being capable to help with Vb 5 gives people the impression there is not much custom support for the product. I'd love to see support from here, but if I have a question or need help with Vb 5, especially for mods this is the last place I usually turn to.

Just sharing my opinion, hope nobody is offended.

Enjoy,
William
Reply With Quote
Благодарность от:
noypiscripter
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 08:18 PM.


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.04982 seconds
  • Memory Usage 2,266KB
  • 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_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete