The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
vb:link modification help
I want to change the value of vb:link member to point to an external profile. I understand the syntax: https://www.vbulletin.com/docs/html/...s_syntax_links but what I'd like to do is wherever there is a link to the users' profile, have it point somewhere else.
Example: Currently it is pointed to: http://mysite.com/member.php?u=1 I would like to change it to: http://mysecondsite/profile.php?u=1 I've tried playing with class_friendly_url and member.php to disable or change the friendly url, but didn't really find a way to change the values spread throughout the installation. I've been searching on and off all day, and decided just to ask. I've also tried playing with PHP headers and redirects, but that's a bit messy. I'd like to have it change the site url throughout. I'm on vb 4.1.10 Thanks for your help! |
#2
|
|||
|
|||
You might be able to change includes/class_friendly_url.php and change member.php to profile.php. Or you might try using a replacement variable. But I think the best way would be to find all the links in the templates and change them to what you want them to be (doesn't look like there's a vb:link for profile, so you'd just have to replace it with the url).
|
Благодарность от: | ||
Crimm |
#3
|
||||
|
||||
Thank you for your response. Unfortunately I can't find a way to change domains or subdomains in this case. I did a search for the instances in templates and there were at least 50, and I'm probably missing some, so I can't realistically catch them all.
I'm going to try a replacement variable today, and if that doesn't work then I'm going to set class_friendly_url to point to a dummy PHP file that does the redirect for me. Thank you for your time! |
#4
|
|||
|
|||
Quote:
Another thing you might be able to do is use a .htaccess file to rewrite the url if it has member.php in it (but I don't know enough about that to tell you exactly how to do it). |
#5
|
||||
|
||||
Replacement variables took care of it quick, but I have a new question:
How do you use Replacement Variables with "usernames" of everyone on the page? I can do it with one - Example: Replace: href="member/1-crimm" with href="anotherdomain.com/crimm" but how can I implement, something like, $bbuserinfo? Thanks! |
#6
|
|||
|
|||
Hmm...I guess you can't, it only does simple replacements. You might want to check out the .htaccess thing, I think it lets you do pattern matching. Or you might be able to do it in a plugin using preg_replace().
|
#7
|
||||
|
||||
Okay I got it working. What I did in basics:
1) Changed class_friendly_url.php to change to a folder I could better control (Not listed in vbulletin anywhere) 2) Changed member.php to ignore friendly urls 3) Change my .htaccess to rewrite/redirect the new folder to the domain where the profile is located It seems to work well. Thanks for your time. Maybe I can drop in what I did in the articles section later today |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|