Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Setting Diffrent Logos with with refrence ?  (Read 5005 times)

0 Members and 1 Guest are viewing this topic.

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Setting Diffrent Logos with with refrence ?
« on: November 30, 2006, 01:57:50 pm »

Hi... Friends i wish to add a new feture to copermine gallery on my site. i want custom logo according to the refrence the link has made.

example:- http://www.abc.com/gallery/index.php?ref=xyz

then the home page should show the logo of xyz site. and this ref should be automatically added to each link in copermine gallery so on each page that has come from that link shows the same logo.

this idea is implemented here.
http://cards.123greetings.com/cgi-bin/cards/sendcard.pl?log=lakesparadise
here on each link ?log=lakesparadise is attached and the logo of my site can be seen.

i have the idea but dont know how to implement. can any one help.

Thanks
Nishant Shrivastava
www.lakesparadise.com
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Setting Diffrent Logos with with refrence ?
« Reply #1 on: November 30, 2006, 02:06:33 pm »

Use custom header feature of CPG
Logged
‍I don't answer to PM with support question
Please post your issue to related board

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Setting Diffrent Logos with with refrence ?
« Reply #2 on: November 30, 2006, 02:34:04 pm »

Thank you Mr. Sami,
              but i need more assistence from you i guess custom header for those who wish to add some specific header to the gallery. but what i want is little bit diffrent i want to keep my current header which i have set by editing templet file intect for my site. but when a visitor who is visits some other website and find my gallery link which also have refrence to his site. in that case for that url which include the refrence must replace my site logo with his/her.

please visit this link you will have some idea what i am looking for.
http://cards.123greetings.com/cgi-bin/cards/sendcard.pl?log=lakesparadise

here on site cards.123greetings.com the logo is of mine site because if has my ref. but when we visit this site without ref. it will show there logo. check this out.
http://cards.123greetings.com/cgi-bin/cards/sendcard.pl

by visiting both the links above you will have the idea what i am talking about.

Thanks
Nishant
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Setting Diffrent Logos with with refrence ?
« Reply #3 on: November 30, 2006, 02:39:45 pm »

Then ,post a link to your gallery
Logged
‍I don't answer to PM with support question
Please post your issue to related board

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Setting Diffrent Logos with with refrence ?
« Reply #4 on: November 30, 2006, 04:27:14 pm »

Here is the link for my gallery

http://www.lakesparadise.com/wallpapers/index.php

here you can see my site logo.

i want to give this facilities to other webmaster that they place a link to my gallery from there site there logo can be seen on that page.
then link will look some what like
http://www.lakesparadise.com/wallpapers/index.php?ref=friendstime


Thanks
Nishant
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Setting Diffrent Logos with with refrence ?
« Reply #5 on: November 30, 2006, 05:28:42 pm »

You need custom PHP code to
- get the file name from URL variable
- add the extention (.gif or .jpg)

first you need to put pageheader() function from themes/sample/theme.php to themes/yourtheme/theme.php
then add something like this to that function
Code: [Select]
$logo_name = $_GET['log'];
$logo = '<img src="images/'.'$logo . '.jpg" title="'.$logo_name.'"/>;

and then add something like this to $template_vars array
Code: [Select]
{REF_LOGO}  => $logo;
and then you can put {REF_LOGO} to your themes/yourtheme/template.html where ever you want

sorry I don't have much time to test that and
hope it work ....
Logged
‍I don't answer to PM with support question
Please post your issue to related board

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: Setting Diffrent Logos with with refrence ?
« Reply #6 on: December 02, 2006, 04:33:36 am »

hi... Mr. Sami 
         Thanks a lot for your valable time.

i cant find any pageheader() function in themes/sample/theme.php but what i find is below and tried to do what you told me but it does seems like working. i guess even if it starts woking it will not append the log=friendstime to all links on gallery what will happen that only once the logo of ref site can be seen and after that the same old logo will be there but it should not be the case as long as the user is visiting the gallery from the same ref the log=friendstime should be appended to the end.

one more thing i will provide iframe code to other site where cpmfetch will be used to show thum pics on those pics the log=friendstime should be appended how can i do that.

Code: [Select]
function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR;
    global $template_header, $lang_charset, $lang_text_dir;

    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);

    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
    user_save_profile();

    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => strip_tags(bb_decode($section)) . ' Wallpapers @ 1024x768 resolution on Lakesparadise.com',
        '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu'),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{CUSTOM_HEADER}' => $custom_header,
        );

    echo template_eval($template_header, $template_vars);
}

See this eample which i told you earlier
http://cards.123greetings.com/cgi-bin/cards/sendcard.pl?log=lakesparadise

this is what i want for gallery.

Thanks
Nishant
Logged
Pages: [1]   Go Up
 

Page created in 0.052 seconds with 21 queries.