forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: MikaK on October 25, 2004, 04:12:39 pm
-
My profile page currently shows the Home Page link defined by the user right below the User Name.
How could I create a profile view where the link would appear as a clickable phrase "Link To Main Profile" or such while the actual link url would not show (a matter of hiding ugly stuff - no security issues involved).
My php skills are next to nada - a practical example or even better a hack would be really appreciated!
Thanks for any feedback,
-Mika
-
There are multiple instances in coppermine where the user name is being displayed - please post in detail on what page the link should be something different but the user name - a screenshot where the address bar is visible might help.
Joachim
-
...please post in detail on what page the link should be something different but the user name - a screenshot where the address bar is visible might help.
Here is a screen:
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.soundchilds.net%2Fgalleryprofilemod.jpg&hash=6bf05afa5f20ad8afbb9c9cd4244f5724d29115b)
I mean the link inside the green circle (that is the usal Home Page 'website' based link).
-Mika
-
Haven't tested this, but a quick-and-dirty hack might look like this:
edit profile.php, find case 'text' :
if ($form_data[$element[1]] == '') break;
echo <<<EOT
<tr>
<td width="40%" class="tableb" height="25">
{$element[2]}
</td>
<td width="60%" class="tableb">
{$form_data[$element[1]]}
</td>
</tr>
EOT;
break;
and replace with case 'text' :
if ($form_data[$element[1]] == '') break;
if ($element[2] == $lang_register_php['website']) {
$wrapper_start = '<a href="';
$wrapper_end = '">Link To Main Profile</a>';
} else {
$wrapper_start = '';
$wrapper_end = '';
}
echo <<<EOT
<tr>
<td width="40%" class="tableb" height="25">
{$element[2]}
</td>
<td width="60%" class="tableb">
$wrapper_start{$form_data[$element[1]]}$wrapper_end
</td>
</tr>
EOT;
break;
Then find'website' => make_clickable($user_data['user_website']),
and replace with'website' => $user_data['user_website'],
Please report if this works for you.
Joachim
-
Please report if this works for you.
Worked like a charm:) Thank you!
-Mika