View Full Version : External Links to internal Links
muffel
11-11-2016, 06:29 AM
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:
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!
noypiscripter
11-11-2016, 10:07 AM
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.
muffel
11-11-2016, 10:58 AM
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!
noypiscripter
11-12-2016, 12:48 AM
Try clearing system cache in AdminCP.
muffel
11-14-2016, 03:46 AM
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?
noypiscripter
11-14-2016, 08:31 PM
Hi muffel,
I figured out a solution to this. I posted it on my site.
http://vbmods.rocks/forum/vbulletin-5-modifications/vbulletin-5-core-hacks/1941-how-to-change-external-links-to-internal-links-to-do-something-before-redirecting-to-the-destination
Paul M
11-15-2016, 10:29 AM
How about posting the solution here instead of a site that requires registration. :)
noypiscripter
11-15-2016, 07:36 PM
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.
MarkFL
11-15-2016, 07:55 PM
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.
shimei
11-16-2016, 05:16 AM
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. :eek: 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
sticky
11-17-2016, 04:16 PM
How about posting the solution here instead of a site that requires registration. :)
Does this site require registration? Solid logic Paul.
MarkFL
11-17-2016, 04:27 PM
Does this site require registration? Solid logic Paul.
The question was posted on this site, so registration here isn't really relevant, since anyone posting here is already registered here. The mild objection I have, is for a user who posts a question here to be directed to a site that requires registration there in order to read the posted solution.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.