Support > English Support

Where is the code for these elements, where are they stored?

(1/2) > >>

danmsmith018f:
Hi,

Where is the link (href) code for these elements and in what file are they stored? File paths would be helpful!

The account profile links on the board index.


The login, register and activation email links in this simple portal block.


The account profile links in this 'Recent Contributions' simple portal block.


For anyone wondering which site this is for, and would rather take a look at its code in detail, the site is called Lets Chat Love and goes by the domain name of https://letschatlove.com. It's a relationship/love/dating/lifestyle forum that utilises simple portal.

Thank you!

ccbtimewiz:
Open ./Sources/Load.php

Find:

--- Code: ---$memberContext[$user] = array(
--- End code ---

A bit further down you'll find them.


--- Code: --- 'title' => !empty($modSettings['titlesEnable']) ? $profile['usertitle'] : '',
'href' => $scripturl . '?action=profile;u=' . $profile['id_member'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . $profile['real_name'] . '</a>',
--- End code ---

danmsmith018f:

--- Quote from: Kaede Akamatsu on December 25, 2018, 02:06:23 AM ---Open ./Sources/Load.php

Find:

--- Code: ---$memberContext[$user] = array(
--- End code ---

A bit further down you'll find them.


--- Code: --- 'title' => !empty($modSettings['titlesEnable']) ? $profile['usertitle'] : '',
'href' => $scripturl . '?action=profile;u=' . $profile['id_member'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . $profile['real_name'] . '</a>',
--- End code ---

--- End quote ---

Hey, thank you, however, those look to be the links that appear when logged in.

Is there any way to get access to the guest links? e.g the 'Welcome, Guest. Please login or register. Did you miss you activation email? Those links.

ccbtimewiz:
Open /Themes/default/languages/index.english.php

Find:

--- Code: ---$txt['welcome_guest'] = 'Welcome, <strong>%1$s</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
$txt['login_or_register'] = 'Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
$txt['welcome_guest_activate'] = '<br />Did you miss your <a href="' . $scripturl . '?action=activate">activation email</a>?';
--- End code ---

♦ Ninja ZX-10RR ♦:
Note: last edit affects the login page too because it's not SP code but rather SMF code itself.

Navigation

[0] Message Index

[#] Next page

Go to full version