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: Linking to phpBB Referral mod  (Read 6011 times)

0 Members and 1 Guest are viewing this topic.

Jimbo_Test

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Linking to phpBB Referral mod
« on: October 20, 2005, 10:15:05 am »

I'm using the phpBB Referral mod which creates urls in the following format...

/board/rp_center.php?mode=referralcp&u=xxx

where xxx is the profile number of the user.

How do I recreate the same link in my Coppermine pages - ie, so that Coppermine automatically replaces the xxx with the correct phpBB profile number?
« Last Edit: October 20, 2005, 07:27:44 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Linking to phpBB Referral mod
« Reply #1 on: October 20, 2005, 10:23:31 am »

Use the USER_ID constant.
Logged

Jimbo_Test

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Linking to phpBB Referral mod
« Reply #2 on: October 20, 2005, 05:17:11 pm »

I'm a bit confused here.

What how would I use this to form a URL and where do I put it? Does it go in template.html or template.php? I'm a newbie to all of this.
Logged

Nibbler

  • Guest
Re: Linking to phpBB Referral mod
« Reply #3 on: October 20, 2005, 06:10:07 pm »

Show me how you are creating the link currently and I will show you how to add the USER_ID to it. I can't give you code unless you tell me where you want the link to appear.
Logged

Jimbo_Test

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Linking to phpBB Referral mod
« Reply #4 on: October 20, 2005, 06:26:30 pm »

Okay, the link can currently be found at http://www.modelsanctum.com/board/ in the right column entitled 'Earn Upgrade Points - Invite A Friend'

and it links to http://www.modelsanctum.com/board/rp_center.php?mode=referralcp&u=xxx where xxx is the user_id

I would like to create this link in exactly the same place on my Coppermine installation which can be found at

http://www.modelsanctum.com/portfolios/

I've not added link yet because each time I've tried, it buggers up. :(
Logged

Nibbler

  • Guest
Re: Linking to phpBB Referral mod
« Reply #5 on: October 20, 2005, 06:44:29 pm »

OK, you need to setup that link as a custom footer. To do this you need to first modify your theme's template.html, finding

Code: [Select]
<a href="/board/template.php?page=10" target="_top"><img src="../../../images/button_upgrade_now.gif" width="120" height="23" border="0"></a>
and changing it to

Code: [Select]
<a href="{REF_LINK}" target="_top"><img src="../../../images/button_upgrade_now.gif" width="120" height="23" border="0"></a>
Then you need to modify your theme's theme.php, finding this:

Code: [Select]
// Function for writing a pagefooter
function pagefooter()
{
    global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
    global $template_footer;

    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
    cpg_debug_output();
    }

    echo $template_footer;
}

and changing it to this:

Code: [Select]
// Function for writing a pagefooter
function pagefooter()
{
    global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;
    global $template_footer;

    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {
    cpg_debug_output();
    }

$template_vars = array(
'{REF_LINK}' => "http://www.modelsanctum.com/board/rp_center.php?mode=referralcp&u=" . USER_ID
);

echo template_eval($template_footer, $template_vars);
}

Save and upload the changes. I'm going to move this into themes as it's not really bridge related.
Logged

Jimbo_Test

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Linking to phpBB Referral mod
« Reply #6 on: October 20, 2005, 07:25:13 pm »

Nibbler, thank you so much - it works perfectly, and best of all, I can apply this to other links like this.

And your reply was so quick - just long enough for me to make toast and coffee!  ;D ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 21 queries.