Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Q: How to link from Profile page Username to the Home Page  (Read 5677 times)

0 Members and 1 Guest are viewing this topic.

MikaK

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Q: How to link from Profile page Username to the Home Page
« 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
« Last Edit: October 28, 2004, 09:33:23 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Q: How to link from Profile page Username to the Home Page
« Reply #1 on: October 26, 2004, 05:44:15 am »

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
Logged

MikaK

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Q: How to link from Profile page Username to the Home Page
« Reply #2 on: October 26, 2004, 11:09:52 am »

...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:
(http://www.soundchilds.net/galleryprofilemod.jpg)

I mean the link inside the green circle (that is the usal Home Page 'website' based link).

-Mika
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Q: How to link from Profile page Username to the Home Page
« Reply #3 on: October 27, 2004, 06:52:00 am »

Haven't tested this, but a quick-and-dirty hack might look like this:

edit profile.php, find
Code: [Select]
        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
Code: [Select]
        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
Code: [Select]
'website' => make_clickable($user_data['user_website']),and replace with
Code: [Select]
'website' => $user_data['user_website'],
Please report if this works for you.

Joachim
Logged

MikaK

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Q: How to link from Profile page Username to the Home Page
« Reply #4 on: October 28, 2004, 09:12:45 am »

Please report if this works for you.

Worked like a charm:) Thank you!
-Mika
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.