Author Topic: [MOD] Pixaco Interface  (Read 70646 times)

0 Members and 1 Guest are viewing this topic.

Offline djw

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • http://www.dj-w.de
[MOD] Pixaco Interface
« on: October 23, 2005, 03:34:09 AM »
[MOD] Pixaco Interface
- This mod enable to Print Pictures over Pixaco Affili Partnerprogram
- tested with 4images 1.7.1
- you can copy your Printable Pictures (better Quality) to an Directory like 4images/data/media/{cat_id}/big/{image_file_name} if the Pic isn`t there than don`t apear the Link
- you can store the Printable Pictures (better Quality) on an other Server (Url des Bildes Lokal) first the script looks there if the image exists

FILES
Files to be modified: (please take a backup copy of all of these!)
  • includes/functions.php
  • templates/your_template/details.html

New file:
  • admin/plugins/PixacoPrint.php

INSTALL
1 Make New File: admin/plugins/PixacoPrint.php
Code: [Select]
<?php // PLUGIN_TITLE: Pixaco Partner
$nozip 1;
define('IN_CP'1);
$root_path = (eregi("\/personal_plugins\/"$PHP_SELF)) ? "./../../" "./../";
define('ROOT_PATH'$root_path);
require(
ROOT_PATH.'admin/admin_global.php');
show_admin_header();
$CreateCode "CREATE TABLE IF NOT EXISTS `".$table_prefix."Pixaco` (
  `ID` int(11) NOT NULL auto_increment,
  `affiliLink` text NOT NULL,
  `LinkText` text NOT NULL,
  `Popupheigh` int(4) NOT NULL default '0',
  `Popupwidth` int(4) NOT NULL default '0',
  `PicdirfullRemote` text NOT NULL,
  `PicdirfullLocal` text NOT NULL,
  UNIQUE KEY `ID` (`ID`)

"
;
$resultCreate $site_db->query($CreateCode);
$action $_GET["action"];
if (
$action == "update") {
    global 
$site_db;
    
$sql $MODE." ".$table_prefix."Pixaco SET
                    affiliLink='
$affiliLink',
                    LinkText='
$LinkText',
                    Popupheigh='
$Popupheigh',
                    Popupwidth='
$Popupwidth',
                    PicdirfullRemote='
$PicdirfullRemote',
                    PicdirfullLocal='
$PicdirfullLocal'
    "
;
    
$result $site_db->query($sql);
    
printf ("Daten geändert<br>");
}
function 
display_Pixaco() {
global $site_db,$table_prefix;
    
$sql "SELECT * FROM ".$table_prefix."Pixaco";
    
$result $site_db->query($sql);
$i=0;
    while(
$row $site_db->fetch_array($result)){
  
$i++;
                    
$affiliLink$row["affiliLink"];
                    
$LinkText$row["LinkText"];
                    
$Popupheigh$row["Popupheigh"];
                    
$Popupwidth$row["Popupwidth"];
                    
$PicdirfullRemote$row["PicdirfullRemote"];
                    
$PicdirfullLocal$row["PicdirfullLocal"];
    }
if (
$affiliLink =="") {
$affiliLink"http://partners.webmasterplan.com/click.asp?ref=145817&site=3043&type=text&tnb=6 ";
}
if (
$LinkText =="") {
$LinkText"Bild zum PIXACO Warenkorb hinzufügen ";
}
if (
$Popupheigh=="") {
$Popupheigh"250";
}
if (
$Popupwidth =="") {
$Popupwidth"310";
}
if (
$PicdirfullRemote =="") {
$PicdirfullRemote"http://URL/galerie/4images/data/media/{cat_id}/big/{image_file_name}";
}
if (
$PicdirfullLocal=="") {
$PicdirfullLocal"http://URL/galerie/4images/data/media/{cat_id}/big/{image_file_name}";
}
    if (
$i==0) {
    
$Mode ="INSERT";
    } else {
        
$Mode ="UPDATE";
    }
echo 
'
<style type="text/css">
    <!--
        .Stil1 {font-size: xx-small}
        .Beispiele {
            font-size: xx-small;
            font-style: italic;
            font-weight: normal;
        }
    -->
</style>
<form action="PixacoPrint.php?action=update" method="post">
    <input name="MODE" type="hidden" value="'
.$Mode.'"  size="8">
    <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#0000FF">
        <tr>
            <td class="tableborder">
                <table cellpadding="3" cellspacing="1" border="0" width="100%">
                    <tr class="tableheader">
                        <td colspan="2"><a name=""><b><span class="tableheader">Pixaco</span></b></a></td>
                    </tr>
                    <tr class="tablerow" valign="top">
                        <td colspan="2">
                            <table width="100%" border="0">
                                <tr>
                                    <td><strong>Affili Link: <br><span class="Beispiele">http://partners.webmasterplan.com/click.asp?ref=145817&amp;site=3043&amp;type=text&amp;tnb=6 </span></strong></td>
                                    <td width="40%"><textarea name="affiliLink" cols="50" rows="4">'
.$affiliLink.'</textarea></td>
                                </tr>
                                <tr>
                                    <td><strong>Link Text:<br><span class="Beispiele">Bild zum PIXACO Warenkorb hinzuf&uuml;gen </span> </strong></td>
                                    <td width="40%"><textarea name="LinkText" cols="50" rows="4">'
.$LinkText.'</textarea></td>
                                </tr>
                                <tr>
                                    <td><strong>H&ouml;he des Popup Fensters <br><span class="Beispiele">250</span> </strong></td>
                                    <td width="40%"><input name="Popupwidth" type="text" value="'
.$Popupwidth.'" size="4"></td>
                                </tr>
                                <tr>
                                    <td><strong>Breite des Popup Fensters</strong> <br><span class="Beispiele">310</span></td>
                                    <td width="40%"><input name="Popupheigh" type="text" value="'
.$Popupheigh.'" size="4"></td>
                                </tr>
                                <tr>
                                    <td><strong>Url des Bildes Remote </strong><br>Platzhalter:<br>
                                        <table border="1">
                                            <tr>
                                                <td class="Stil1">{cat_id} = Kategorie ID </td>
                                            </tr>
                                            <tr>
                                                <td class="Stil1">{image_file_name} = Datei Name des Bildes </td>
                                            </tr>
                                        </table>
                                        <span class="Beispiele">http://URL/galerie/4images/data/media/{cat_id}/{PicChartOptions[Picdirlocal]}/{image_file_name}</span><span class="Stil1"><br></span>
                                    </td>
                                    <td width="40%"><textarea name="PicdirfullRemote" cols="50" rows="4">'
.$PicdirfullRemote.'</textarea></td>
                                </tr>
                                <tr>
                                    <td><strong>Url des Bildes Lokal</strong><br>Platzhalter:<br>
                                        <table border="1">
                                            <tr>
                                                <td class="Stil1">{cat_id} = Kategorie ID </td>
                                            </tr>
                                            <tr>
                                                <td class="Stil1">{image_file_name} = Datei Name des Bildes </td>
                                            </tr>
                                        </table>
                                        <span class="Beispiele">http://URL/galerie/4images/data/media/{cat_id}/{PicChartOptions[Picdirlocal]}/{image_file_name}</span><br>
                                    </td>
                                    <td width="40%"><textarea name="PicdirfullLocal" cols="50" rows="4">'
.$PicdirfullLocal.'</textarea></td>
                                </tr>
                          </table>
                            <p class="rowtitle">                            Pixaco: <a href="http://partners.webmasterplan.com/click.asp?ref=145817&site=3043&type=text&tnb=1" target="_blank">www.pixaco.de</a></p>
                            <p class="rowtitle">Programmer: <a href="mailto:markus@dj-w.de">Markus Grampp </a><a href="http://www.dj-w.de" target="_blank">DJ W. Eventservice</a> </p>
                            <p class="rowtitle"><br>
                            </p></td>
                    </tr>
                    <tr class="tablefooter">
                        <td colspan="2" align="center"> &nbsp; <input type="submit" value="   Einstellungen Speichern   " class="button">&nbsp; </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</form>
'
;

}
display_Pixaco();
show_admin_footer();
?>


2 Insert Into includes/functions.php
bevore
Code: [Select]
?>
Code: [Select]
/* Druck über Pixaco Partnerprogramm affilinet */
function PicLargeforPixacoPrint($cat_id,$image_file_name) {
global $site_db,$table_prefix;
$sql="";
    $sql = "SELECT * FROM ".$table_prefix."Pixaco";
    $result = $site_db->query($sql);
    // Werte aus DB holen
    while ($row = $site_db->fetch_array($result)) {
        $PicChartOptions[affiliLink]=  $row[affiliLink];
        $PicChartOptions[Linktext]=  $row[LinkText];
        $PicChartOptions[Popupheight]=  $row[Popupheigh];
        $PicChartOptions[Popupwidth]=  $row[Popupwidth];
        $PicChartOptions[PicdirfullRemote] = $row[PicdirfullRemote];
        $PicChartOptions[PicdirfullLocal]=  $row[PicdirfullLocal];

}
$PicChartOptions[PicdirfullLocal]= str_replace("{cat_id}", $cat_id, $PicChartOptions[PicdirfullLocal]);
$PicChartOptions[PicdirfullLocal]= str_replace("{image_file_name}", $image_file_name, $PicChartOptions[PicdirfullLocal]);
        if (@fopen ($PicChartOptions[PicdirfullLocal], "r")) {
        $PicChartOptions[PicdirfullLocal] = $PicChartOptions[PicdirfullLocal];
        } else {
        $PicChartOptions[PicdirfullLocal]="";
        echo $PicChartOptions[PicdirfullLocal];
        }
$PicChartOptions[PicdirfullRemote]= str_replace("{cat_id}", $cat_id, $PicChartOptions[PicdirfullRemote]);
$PicChartOptions[PicdirfullRemote]= str_replace("{image_file_name}", $image_file_name, $PicChartOptions[PicdirfullRemote]);
if (@fopen ($PicChartOptions[PicdirfullRemote], "r")) {
        $PicChartOptions[PicdirfullRemote] = $PicChartOptions[PicdirfullRemote];
        } else {
        $PicChartOptions[PicdirfullRemote]="";
        }
        if ($PicChartOptions[PicdirfullRemote]=="") {
                if ($PicChartOptions[PicdirfullLocal]=="") {
                        $PicChartOptions[Picdirfull] = "";
                        return "";
                } else {
                $PicChartOptions[Picdirfull] = $PicChartOptions[PicdirfullLocal];
                }
        } else {
        $PicChartOptions[Picdirfull] = $PicChartOptions[PicdirfullRemote];
        }


        // Falls kein Bild in großer Version existiert
        if ($PicChartOptions[Picdirfull] !="") {
                $OutURL= "<a href=\"#\" onclick=\"javascript:window.open('".$PicChartOptions[affiliLink]."&prd=yes&smm=cookie&cmd=addimage&url0=".$PicChartOptions[Picdirfull]."','popup',
                'width=".$PicChartOptions[Popupwidth].",height=".$PicChartOptions[Popupheight].",menubar=no,status=no,scrollbars=no,resizable=yes,left=50,top=50');\"> ".$PicChartOptions[Linktext]."</a>";
        } else {
                $OutURL= "";
        }
        return $OutURL;
}

3 Insert Into templates/your_template/details.html
On the place where do you want
Code: [Select]
<?php echo  PicLargeforPixacoPrint($cat_id,$image_file_name);?>

4 Open Admin Control Panel
goto Pixaco
klick "Einstellungen Speichern"
Admin Panel Pic:

User Pic:


If you want to allow only, that user can print the own images:
in Details.html:
bevore
Code: [Select]
<?php insert
Code: [Select]
{if PrintPartner}after
Code: [Select]
?>insert
Code: [Select]
{endif PrintPartner}
in Details.php:
change
Code: [Select]
  "admin_links" => $admin_linksto
Code: [Select]
"admin_links" => $admin_links,
"PrintPartner" => $PrintPartner

after
Code: [Select]
elseif ($is_image_owner) { (2X)
insert
Code: [Select]
$PrintPartner = "1";
Wenn  Debuggen  der  Vorgang  ist, Fehler aus einem Programm auszubauen,
dann ist Programmieren der Vorgang, Fehler in ein Programm einzubauen.

Offline beseech

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: [MOD] Pixaco Interface
« Reply #1 on: October 23, 2005, 04:30:16 AM »
but this do the same of some other Mod before here posted some called "bilder" , this look the same , well with another name... this do the same ? what is the difference ?

http://www.4homepages.de/forum/index.php?topic=10118.msg49502#msg49502

Offline djw

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • http://www.dj-w.de
Re: [MOD] Pixaco Interface
« Reply #2 on: October 23, 2005, 04:40:35 AM »
but this do the same of some other Mod before here posted some called "bilder" , this look the same , well with another name... this do the same ? what is the difference ?

http://www.4homepages.de/forum/index.php?topic=10118.msg49502#msg49502
This one is for www.pixaco.de
the other
Quote
http://www.4homepages.de/forum/index.php?topic=10118.msg49502#msg49502
Quote
is for www.bildpartner.de
Wenn  Debuggen  der  Vorgang  ist, Fehler aus einem Programm auszubauen,
dann ist Programmieren der Vorgang, Fehler in ein Programm einzubauen.

Offline beseech

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: [MOD] Pixaco Interface
« Reply #3 on: October 24, 2005, 05:21:17 AM »
but do both the same , right ?

:)

Offline djw

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • http://www.dj-w.de
Re: [MOD] Pixaco Interface
« Reply #4 on: October 24, 2005, 12:02:50 PM »
but do both the same , right ?

:)
yes with different Partner
Wenn  Debuggen  der  Vorgang  ist, Fehler aus einem Programm auszubauen,
dann ist Programmieren der Vorgang, Fehler in ein Programm einzubauen.

Michael

  • Guest
Re: [MOD] Pixaco Interface
« Reply #5 on: October 24, 2005, 12:27:52 PM »
Hallo, kann man das so einstellen das User nur ihre eigenen Bilder in den Warenkorb hinzufügen können?

Offline djw

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • http://www.dj-w.de
Re: [MOD] Pixaco Interface
« Reply #6 on: October 24, 2005, 12:47:35 PM »
Hallo, kann man das so einstellen das User nur ihre eigenen Bilder in den Warenkorb hinzufügen können?
nein derzeit nicht (ausser ggf mit if)
Wenn  Debuggen  der  Vorgang  ist, Fehler aus einem Programm auszubauen,
dann ist Programmieren der Vorgang, Fehler in ein Programm einzubauen.

Michael

  • Guest
Re: [MOD] Pixaco Interface
« Reply #7 on: October 24, 2005, 01:00:45 PM »
das mit dem "if" gilt dann nur für eingeloggte User, Problem dabei ist das © des einzelnen Users auf seine Bilder  :!:

Offline djw

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • http://www.dj-w.de
Re: [MOD] Pixaco Interface
« Reply #8 on: October 24, 2005, 01:38:57 PM »
das mit dem "if" gilt dann nur für eingeloggte User, Problem dabei ist das © des einzelnen Users auf seine Bilder  :!:

ok kurzer Mod:
in Details.html:
vor dem <?php Tag:
{if PrintPartner}
nach dem ?> Tag
{endif PrintPartner}

in Details.php:
ändere  "admin_links" => $admin_links
zu  "admin_links" => $admin_links,
            "PrintPartner" => $PrintPartner

unter elseif ($is_image_owner) { (2X)
$PrintPartner = "1";

Wenn  Debuggen  der  Vorgang  ist, Fehler aus einem Programm auszubauen,
dann ist Programmieren der Vorgang, Fehler in ein Programm einzubauen.

Michael

  • Guest
Re: [MOD] Pixaco Interface
« Reply #9 on: October 24, 2005, 03:30:36 PM »
Hallo djw,

ich werde das heute Abend mal testen, vielen Dank für Deine Antworten (ist hier ja leider nicht selbstverständlich).

Gruß, Michael

Offline djw

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • http://www.dj-w.de
Re: [MOD] Pixaco Interface
« Reply #10 on: October 24, 2005, 11:55:32 PM »
Hallo djw,

ich werde das heute Abend mal testen, vielen Dank für Deine Antworten (ist hier ja leider nicht selbstverständlich).

Gruß, Michael
Sobald ich Zeit habe versuche ich immer zu antworten - weis wie das ist wenn man auf ne antwort wartet und es kommt keine.
Wenn  Debuggen  der  Vorgang  ist, Fehler aus einem Programm auszubauen,
dann ist Programmieren der Vorgang, Fehler in ein Programm einzubauen.

Offline Maweryk

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: [MOD] Pixaco Interface
« Reply #11 on: October 25, 2005, 02:49:06 AM »
Gelungener Mod. Bei mir funzt der zwar noch nicht so, wie er soll, aber das wird schon.  :wink:
Idee für einen neuen Mod: Bilder-Planet.de Interface

Gruß

Markus


Offline djw

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • http://www.dj-w.de
Re: [MOD] Pixaco Interface
« Reply #12 on: October 25, 2005, 10:18:49 AM »
Gelungener Mod. Bei mir funzt der zwar noch nicht so, wie er soll, aber das wird schon.  :wink:
Idee für einen neuen Mod: Bilder-Planet.de Interface nur hab ich von denen noch keine genehmigung zum veröffentlichen

Gruß

Markus


hätte noch mycopyshop24 im angeboit
Wenn  Debuggen  der  Vorgang  ist, Fehler aus einem Programm auszubauen,
dann ist Programmieren der Vorgang, Fehler in ein Programm einzubauen.

Offline Maweryk

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: [MOD] Pixaco Interface
« Reply #13 on: October 25, 2005, 11:41:29 AM »
Idee für einen neuen Mod: Bilder-Planet.de Interface nur hab ich von denen noch keine genehmigung zum veröffentlichen

Angeschrieben hast Du sie aber schon?

Musste aus der ...print.php den SQL-Block rausnehmen, da er bei mir immer auf einen Fehler gelaufen ist.

Code: [Select]
$CreateCode = "CREATE TABLE IF NOT EXISTS `".$table_prefix."Pixaco` (
  `ID` int(11) NOT NULL auto_increment,
  `affiliLink` text NOT NULL,
  `LinkText` text NOT NULL,
  `Popupheigh` int(4) NOT NULL default '0',
  `Popupwidth` int(4) NOT NULL default '0',
  `PicdirfullRemote` text NOT NULL,
  `PicdirfullLocal` text NOT NULL,
  UNIQUE KEY `ID` (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
";

Problem bei mir war die letzte Zeile: DEFAULT CHARSET=latin1 AUTO_INCREMENT=2

Ich habe dann die Tabelle selber angelegt und nun scheint es zu klappen.

Desweiteren sehe ich noch keinen Bestelllink unter dem Foto. Liegt wohl daran, dass er bei mir {cat_id} verschluckt und immer im Ordner media\\big anstatt media\20\big sucht. :(

Gruß

Markus
 

Offline djw

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • http://www.dj-w.de
Re: [MOD] Pixaco Interface
« Reply #14 on: October 25, 2005, 12:28:21 PM »
Idee für einen neuen Mod: Bilder-Planet.de Interface nur hab ich von denen noch keine genehmigung zum veröffentlichen

Angeschrieben hast Du sie aber schon?
hab ops meinte -
Bilder-planet hab ich angeschrieben noch keine antowrt auch noch nichts programmiert
mycopyshop24 iss fertig entwickelt nur noch keine genehmigung (aber angeschrieben)
Quote
Desweiteren sehe ich noch keinen Bestelllink unter dem Foto. Liegt wohl daran, dass er bei mir {cat_id} verschluckt und immer im Ordner media\\big anstatt media\20\big sucht. :(
geh ins admin panel und passe den link an (das big verzeichniss musst erst anlegen und da die bilder reinmachen unter selben namen - oder big löschen dann greift schnittstelle auf orginal bilder zu (die angezeigt werden))
Wenn  Debuggen  der  Vorgang  ist, Fehler aus einem Programm auszubauen,
dann ist Programmieren der Vorgang, Fehler in ein Programm einzubauen.