Link Code not on Join_finish page.

top50servers

Active Member
Hi,

I'm going to try and explain this as best as I can, if you have any further questions please don't hesitate to comment as I would like to fix this.

My question is where are the links in join_finish being loaded from so I can edit them to the links I would prefer to show.

The join_finish page looks like this:


But the link_code isn't placing the links I made. Here is my link_code page:



In link_code.html there was link_code_content so I changed that in the join_finish and no change occurred.

My question is where are the links in join_finish being loaded from so I can edit them to the links I would prefer to show.
 

Basti

Administrator
Staff member
Its cos your plugin is not complete. You only use the user cp hook user_cp_extra_link_code.php

You should also have join_extra_link_code.php
 

top50servers

Active Member
The code inside join_finish is

Code:
<div style="padding-right: 20px;">
{$lng->join_thanks}<br /><br />
{$link_code}<br /><br />
{$lng->join_change_warning}
</div>
Surely it should include what is in link_code automatically on that page, but it doesn't.
 

Basti

Administrator
Staff member
No you simply dont understand the logic ;)
Each file ( join.php , join_existing.php, link_code.php ) have our default link codes in it ( static button etc ). And each file has a plugin hook to load possible extra link codes like you did with the user control panel extra vote link plugin ( hook user_cp_extra_link_code which is from link_code.php ).

So all your plugin does is load your extra code into the user_cp link code page.

thats why i said you also need join_extra_link_code.php in your plugin with the same content as the other file.
This file then will then include your code also into the join forms
 

top50servers

Active Member
Be that as it may, that still doesnt explain why the link inside the link code page has /vote/ and the ones on the join_finish page do not.

To expand: The ones on join_finish link directly to top50servers.com while the ones in link_code have a edited /vote/ option that I edited with my plugin.
 

Basti

Administrator
Staff member
Ah now i see what you mean, well still like i said earlier its generated in sources/join.php and sources/user_cp/join_existing.php

Quickest way to edit is editing this part
Code:
        if ($CONF['google_friendly_links']) {
          $TMPL['verbose_link'] = "";
        }
        else {
          $TMPL['verbose_link'] = "index.php?a=in&u={$TMPL['username']}";
        }
But i guess you know that since you must have edited link_code.php as well

P.s make your links end with trailing slash /
that saves you one redirect all the time when some votes
 
Top