Setting Diffrent Logos with with refrence ? Setting Diffrent Logos with with refrence ?
 

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

Main Menu

Setting Diffrent Logos with with refrence ?

Started by niks_007, November 30, 2006, 01:57:50 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

niks_007

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

Sami

‍I don't answer to PM with support question
Please post your issue to related board

niks_007

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

Sami

‍I don't answer to PM with support question
Please post your issue to related board

niks_007

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

Sami

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

$logo_name = $_GET['log'];
$logo = '<img src="images/'.'$logo . '.jpg" title="'.$logo_name.'"/>;


and then add something like this to $template_vars array
{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 ....
‍I don't answer to PM with support question
Please post your issue to related board

niks_007

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.


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