PDA

View Full Version : Where is this template hidding? It's the only one left.


JulienT
06-24-2008, 06:20 PM
I have integrated VB with my existing website community.
So part of the fun is now to customize all templates so that links to user profiles are changed to links to my community profiles (as I also use a different userID in both systems).

Using the template names in source code as well as the text search has helped me a lot and I covered nearly all of them.
But I have one left and I just cannot find it's name.
When you make a search on posts from user John, the posts result page start with "Search: Posts Made By: John". So where can I find the template to edit the link used for John.

Thanks for help, this one is driving me nuts.

JulienT
12-12-2008, 08:33 PM
Anyone would know about that one?
Still haven't found the solution.

Lynne
12-12-2008, 09:34 PM
It looks like it's right here in search_results:
<if condition="$starteronly">$vbphrase[threads_started_by]<else />$vbphrase[posts_made_by]</if>: $displayUsers
</if>

JulienT
12-12-2008, 10:20 PM
what I need to know is where $displayUsers is defined so i can change the URL associated to a member.

Lynne
12-12-2008, 11:57 PM
Do a search in search.php for the variable and you'll find it.

JulienT
12-13-2008, 07:41 AM
Thanks, that's my answer. I was looking in templates instead of looking into the function code itself.
All good now :)

--------------- Added 1229163729 at 1229163729 ---------------

I still have an issue in here. As this is code related, I'm not so good at finding the reason.

I found in search.php the code

$display['users']["$userid"] = '<a href="member.php?' . $vbulletin->session->vars['sessionurl'] . "u=$userid\"><b><u>$username</u></b></a>";

I want to replace it to point to the correct URL, so I edited it to be

$display['users']["$userid"] = '<a href="$vboptions[homeurl]/user.php?' . $vbulletin->session->vars['sessionurl'] . "iUsername=$username\"><b><u>$username</u></b></a>";

However, when I do that, $vboptions[homeurl] is not understood and instead it is included after the forum root URL.
So the link becomes:
http://forum.mydomain.com/$vboptions[homeurl]/user.php?iUsername=john
instead of
http://www.anotherdomain.com/user.php?iUsername=john

Would you have an idea of the problem?

Adam21
12-13-2008, 09:07 AM
$vboptions[base_url]

JulienT
12-13-2008, 12:30 PM
My problem is not the name of the variable I believe, but why it is not replaced in the URL with its value.

Lynne
12-13-2008, 02:30 PM
Try $vbulletin->options['homeurl']

JulienT
12-13-2008, 03:45 PM
Now it works. The code should have been:

$display['users']["$userid"] = '<a href="' . $vbulletin->options['homeurl'] . "/user.php?iUsername=$username\"><b><u>$username</u></b></a>";

Thanks for your help