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 ... 3 4 5 6 [7] 8   Go Down

Author Topic: Paypal shop hack, easy install, online admin  (Read 194762 times)

0 Members and 1 Guest are viewing this topic.

tantley

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • BayouMX
Re: Paypal shop hack, easy install, online admin
« Reply #120 on: January 20, 2007, 11:56:12 am »

For the beginning gallery ONLY, to set the same price on everything, as this will update ALL media throughout ALL of the gallery:

Through phpMyAdmin, I opened my CPG MySQL database, made two backups of CPG table for pictures through the "Operations" function, just in case.

Then, using the "SQL" tab, I ran this command:

Code: [Select]
UPDATE `cpg1410_pictures` SET `user1`="1"
Make sure the "cpg1410" corresponds to your CPG version.

This updated everything in the gallery to price structure #1, overwriting existing values that I had previously assigned.

If you're not familiar with SQL or otherwise don't believe in backups, I strongly encourage you not to use this method.

I had over 3,400 images online and needed to place a default value in one operation. This is NOT for an existing gallery who has already set prices up.
Logged

rusty1001

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Paypal shop hack, easy install, online admin
« Reply #121 on: January 22, 2007, 06:29:26 am »

Hi

Thanks for the contrib...I have just tried it out looks like it works great,,
I have one problem though,, how does a customer purchase more than one item??
it seems to do straight to the paypal? is that correct? there is no cart as such?
thanks

russell
Logged

dnsphoto

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Paypal shop hack, easy install, online admin
« Reply #122 on: February 22, 2007, 04:10:11 am »

Hey guys great job with the hack. Easy to install and works from what I can tell. BUT I only need the 1 price op. I dont need paper type  or any of the other stuff. How can I take that out? 2. When I load pictures I load between 300 to 1000 at a time and to edit all the pics to put the 1 in takes a long time. Can you make it so all pictures just get it right off the bat when loaded? I have been use gallery before this and you can do that but its not working real good on the loads so I think I need a change so I am trying this. I am willing to pay for the help to get this fixed.

Thanks again
Dan
Logged

arnestad

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
The shop admin menu dont show
« Reply #123 on: February 22, 2007, 08:44:52 pm »

Hi Casper.
I'm getting in late on this thread but I just found it, everything looks great by the way! I've just installed everything and was set to go for the shop admin, however there's only the the drop-down (expand) arrow visible and nothing happens when I click it, where did I go wrong?

Hope you can help me out on this one so I can get started:)

Thomas
Logged

arnestad

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: The shop admin menu dont show
« Reply #124 on: February 22, 2007, 08:46:06 pm »

Hi Casper.
I'm getting in late on this thread but I just found it, everything looks great by the way! I've just installed everything and was set to go for the shop admin, however there's only the the drop-down (expand) arrow visible and nothing happens when I click it, where did I go wrong?

Hope you can help me out on this one so I can get started:)

Thomas

The website adress is http://www.arnestadphotography.com/portofolio/
Logged

tantley

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • BayouMX
Re: Paypal shop hack, easy install, online admin
« Reply #125 on: February 23, 2007, 08:01:33 am »

I have made a PHP/MySQL script for mass-updating of price classes as set by Casper's PayPal mod.

This is recommended for newly modded galleries to easily change existing items all at once.

As always, backup your database prior to using this script. I have tested it extensively with my own database prior to posting it here.

The script does not have any security implementation; install and run for your needs, then remove from your site.

Modify the values in the script for your site. It has some very rudimentary error-checking for values and database connection.

Oh, it is my first MySQL script also...

Code: [Select]
<?php

// Update Price Class For Coppermine Photo Gallery w/ Casper's PayPal MOD
// Feb 23, 2006
// Tim Antley - www.bayoumx.com

// Standard Disclaimer!
// You should always make a backup of your files and databases prior to using any script of this nature.
// There is absolutely NO security with this script whatsoever. Use it and delete it from server to avoid security breaches. 

// This script has been tested and works as designed. Any modification to it will void the "90 seconds or 90 feet" warranty.
// The title bar will have the load time inserted; used to check for operation on multiple page loads.

// And if that wasn't enough warning to back up your database, this is my first MySQL script!

// Change values within the single quotes only; don't edit anything below the warning line.
// Minor error checking for variables to have set values only.
// General error check when accessing the MySQL database specified- no extensive error parsing.
// Specifying a price out of range may cause unwanted problems. Use the price classes you have set up in the mod.

$server =''; // Could be 'localhost' or 'mysql3.secureserver.net'.
$username =''; // User name for access to server.
$password =''; // Password for user name.
$database =''; // Name for the datebase that CPG is using.

$cpg_version=''; // CPG prefix; i.e. CPG1410_
$cpg_table  =''; // CPG table for pictures

$oldprice =''; // Existing price class to be changed; numeric value only
$newprice =''; // New price class; numeric value only

// *******************************************************************
// Nothing below this line should require modification.
// *******************************************************************

$table=$cpg_version.$cpg_table;

echo 
'<TITLE>Price Set Script : '.date("h:i:s").'</TITLE><CENTER>';

echo 
'Set Price Script For Coppermine Photo Gallery & Casper\'s Paypal Mod';
echo 
'<hr>Script by Tim Antley<br><a href="http://www.bayoumx.com">www.bayoumx.com</a><hr>';

if (!
$server or !$username or !$password or !$database)
{
echo 
'<b>Database information values has not been set up.</b>';
exit;
}

if (!
$cpg_version or !$cpg_table)
{
echo 
'<b>Coppermine Photo Gallery table information has not been set correctly.<b>';
exit;
}

if (!
$oldprice or !$newprice)
{
echo 
'<b>Error with price values!</b>';
exit;
}

echo 
'<TABLE align=center>';
echo 
'<TR><TD align=right>Server :  </TD><TD>'.$server.' </TD></TR>';
echo 
'<TR><TD align=right>Database : </TD><TD>'.$database.' </TD></TR>';
echo 
'<TR><TD align=right>User Name : </TD><TD>'.$username.' </TD></TR>';
echo 
'<TR><TD align=right>Table Name : </TD><TD>'.$table.' </TD></TR>';
echo 
'<TR><TD align=right>Existing Price Class :</TD><TD>'.$oldprice.' </TD></TR>';
echo 
'<TR><TD align=right>New Price Class : </TD><TD>'.$newprice.' </TD></TR>';
echo 
'</TABLE>';
echo 
'<HR>';

if (!
$con = @mysql_connect($server$username$password)) 
{
echo 
'<b>Error in MySQL connection!</b><br>';
echo 
'Verify above information with values in script.<br>';
echo 
'Check password (<i>not listed here</i>) for correct value.';
exit;
}

$con mysql_connect($server$username$password);
mysql_select_db($database$con);

$sql 'SELECT * FROM '.$table.' WHERE `user1`="'.$oldprice.'"';

mysql_query($sql);

$sql 'UPDATE '.$table.' SET `user1`="'.$newprice.'"';

mysql_query($sql);

print(
mysql_affected_rows() . " Items Modified\n");

mysql_close($con); 

?>
Logged

tantley

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • BayouMX
Re: Paypal shop hack, easy install, online admin
« Reply #126 on: February 23, 2007, 08:06:47 am »

And I see that the code box I posted has some undesireable characters in there from SMF...

Here it is (again):

<?php

// Update Price Class For Coppermine Photo Gallery w/ Casper's PayPal MOD
// Feb 23, 2006
// Tim Antley - www.bayoumx.com

// Standard Disclaimer!
// You should always make a backup of your files and databases prior to using any script of this nature.
// There is absolutely NO security with this script whatsoever. Use it and delete it from server to avoid security breaches. 

// This script has been tested and works as designed. Any modification to it will void the "90 seconds or 90 feet" warranty.
// The title bar will have the load time inserted; used to check for operation on multiple page loads.

// And if that wasn't enough warning to back up your database, this is my first MySQL script!

// Change values within the single quotes only; don't edit anything below the warning line.
// Minor error checking for variables to have set values only.
// General error check when accessing the MySQL database specified- no extensive error parsing.
// Specifying a price out of range may cause unwanted problems. Use the price classes you have set up in the mod.

$server
	
	
=
'';
	
// Could be 'localhost' or 'mysql3.secureserver.net'.
$username
	
=
'';
	
// User name for access to server.
$password
	
=
'';
	
// Password for user name.
$database
	
=
'';
	
// Name for the datebase that CPG is using.

$cpg_version='';
	
// CPG prefix; i.e. CPG1410_
$cpg_table  ='';
	
// CPG table for pictures

$oldprice
	
=
'';
	
// Existing price class to be changed; numeric value only
$newprice
	
=
'';
	
// New price class; numeric value only

// *******************************************************************
// Nothing below this line should require modification.
// *******************************************************************

$table=$cpg_version.$cpg_table;

echo 
'<TITLE>Price Set Script : '.date("h:i:s").'</TITLE><CENTER>';

echo 
'Set Price Script For Coppermine Photo Gallery & Casper\'s Paypal Mod';
echo 
'<hr>Script by Tim Antley<br><a href="http://www.bayoumx.com">www.bayoumx.com</a><hr>';

if (!
$server or !$username or !$password or !$database)
{
echo 
'<b>Database information values has not been set up.</b>';
exit;
}

if (!
$cpg_version or !$cpg_table)
{
echo 
'<b>Coppermine Photo Gallery table information has not been set correctly.<b>';
exit;
}

if (!
$oldprice or !$newprice)
{
echo 
'<b>Error with price values!</b>';
exit;
}

echo 
'<TABLE align=center>';
echo 
'<TR><TD align=right>Server : 
	
	
	
	
</TD><TD>'
.$server.'
	
	
	
</TD></TR>'
;
echo 
'<TR><TD align=right>Database :
	
	
	
</TD><TD>'
.$database.'
	
	
	
</TD></TR>'
;
echo 
'<TR><TD align=right>User Name :
	
	
	
</TD><TD>'
.$username.'
	
	
	
</TD></TR>'
;
echo 
'<TR><TD align=right>Table Name :
	
	
	
</TD><TD>'
.$table.'
	
	
	
	
</TD></TR>'
;
echo 
'<TR><TD align=right>Existing Price Class :</TD><TD>'.$oldprice.'
	
	
	
</TD></TR>'
;
echo 
'<TR><TD align=right>New Price Class :
	
	
</TD><TD>'
.$newprice.'
	
	
	
</TD></TR>'
;
echo 
'</TABLE>';
echo 
'<HR>';

if (!
$con = @mysql_connect($server$username$password)) 
{
echo 
'<b>Error in MySQL connection!</b><br>';
echo 
'Verify above information with values in script.<br>';
echo 
'Check password (<i>not listed here</i>) for correct value.';
exit;
}

$con mysql_connect($server$username$password);
mysql_select_db($database$con);

$sql 'SELECT * FROM '.$table.' WHERE `user1`="'.$oldprice.'"';

mysql_query($sql);

$sql 'UPDATE '.$table.' SET `user1`="'.$newprice.'"';

mysql_query($sql);

print(
mysql_affected_rows() . " Items Modified\n");

mysql_close($con); 

?>
« Last Edit: February 23, 2007, 09:30:10 am by GauGau »
Logged

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Paypal shop hack, easy install, online admin
« Reply #127 on: March 18, 2007, 11:59:56 am »

Thanks tantley! :)

I have been waiting so much for something like your  PHP/MySQL script for mass-updating of price classes ....
Caspers Plug in is wonderfull, just simple and effective!
But when you have 1000 pictures to give a prize you cant do it manually.... i'ts nuts!
I use a progam called quick keys which permits to record an action made on a web page and repeat it as many times you like.
That's fine for 50-100 photos or so, but when numbers grow it becomes a huge waste of time.

Now, i'm quite a newby in php - mysql... and really not shure obout what your script is doing.
Someone could be so kind to clarify me ideas?
If I understood right, I make a php page with the script, with my username, password server name and then just load the page.


This will change all the photos in cpg whith pricing structure $oldprice to $newprice ( example structure 2 to structure 5)
What if I need to give a struture price to all photos in a category (from none to 1)
If someone can help me on this issue I would be very thankfull.

 :) :) :)

Get happy!
Logged
Live long and prosper!
www.tripodart.net

ttfphoto

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Paypal shop hack, easy install, online admin
« Reply #128 on: March 24, 2007, 07:01:46 pm »

alright, every time I try to upload this plugin to coppermine I get a Critical Error

does anyone have any ideas?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Paypal shop hack, easy install, online admin
« Reply #129 on: March 26, 2007, 10:46:52 am »

1) This is not a plugin, but a mod
2) Post the actual error message (not the debug_output) - turn debug_mode on in Coppermine's config to enable it.
Logged

arnestad

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Can't access my index.php
« Reply #130 on: March 26, 2007, 11:31:12 am »

Hi.
I followed the all the instructions and modified all files as told. I had to replace all the codes etc due to using norwegian language for this gallery. However, when I'm finished I can't access my gallery, I only get a blank page and I cant tell where I went wrong.

My gallery is located within www.fotokunstner.no/kunst

Hope someone can check this out for me and tell me what to adjust so that I can get my gallery up and running.
Logged

tantley

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • BayouMX
Re: Paypal shop hack, easy install, online admin
« Reply #131 on: March 27, 2007, 06:07:04 am »

Now, i'm quite a newby in php - mysql... and really not shure obout what your script is doing.
Someone could be so kind to clarify me ideas?
If I understood right, I make a php page with the script, with my username, password server name and then just load the page.


This will change all the photos in cpg whith pricing structure $oldprice to $newprice ( example structure 2 to structure 5)
What if I need to give a struture price to all photos in a category (from none to 1)
If someone can help me on this issue I would be very thankfull.

I apologize for the delay in answering. Missed the notification for replies...

Insert your existing database information (server, user, password, and database name) in the first few lines of the script. You should only need to modify the 8 values in that section- no need to modify below those lines.

Use the $oldprice & $newprice lines to set the price class for the photos; this should be 1,2,3,4, or 5 based on your setting in the PayPal mod configuration panel.

The script should then be saved and placed on your webserver (by FTP). Using your browser, load the script (such as "www.yourserver.com/scriptname.php") and it should report the total number of items modified in your database. Otherwise, an simple error message will display, requiring correct values to run properly.

I must stress that you should immediately delete the script from your webserver after running it. It has crucial database connection information that need not be exploited.

You can run the script multiple times (for whatever reason) but once should modify the entire contents to the new price class you set.

To answer your last question, the script will set all items that are not priced already to the new price class.
Logged

tmas73

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Paypal shop hack, easy install, online admin
« Reply #132 on: March 31, 2007, 11:18:38 pm »

I just installed the mod the first time on "http://www.photobomb.com/components/com_copperminevis/cpg" but when I browse the Shop admin button I get page not found error. I use a joomla bridge. Any info on this error?

Thanks
TMAS
Logged

JJRuhle

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Paypal shop hack, easy install, online admin
« Reply #133 on: April 03, 2007, 01:40:50 am »

Umm.... I may sound like an idiot and open myself to some sever flaming, but where can I download this hack? I do not see a link in the Sourceforge site or this thread?

Thanks!
Logged

JJRuhle

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Paypal shop hack, easy install, online admin
« Reply #134 on: April 03, 2007, 01:45:57 am »

Nevermind.... I AM an idiot, but figured it out  :o
Logged

erika_conn

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 91
Re: Paypal shop hack, easy install, online admin
« Reply #135 on: April 19, 2007, 08:50:47 pm »

Here is a new paypal shop hack, which is designed so that non-coders can easily install it with no code editing needed, and is administered from an online admin page.

It is based on Madeinhawaii's simple server-side shop hack.

Features;
  • Up to 5 different pricing structures, each with up to 10 options
  • Up to 5 further option sets, including;
    • One radio button set, with 3 options
    • Three drop down lists for up to 5 options each list
    • One dropdown list for up to 8 options
  • Only those options used are shown
  • Each additional option can charged extra (or discounted)
  • On-line administration, change your prices or options anytime, from within an easy to use admin page
  • A seperate instruction page for both installation and administration.

Installation for unmodified coppermine installations using any of the stock themes, and the english (or english_gb) language file is simple, just upload the mod files (replace the existing ones where they exist), and then run update (admin menu/admin tools/update database)

Read the docs/shop.html for how to administer your shop.

Installation for existing modified installs, or those using non-stock themes or other language is easy following the instructions in the docs/shop_install.html.
The mod is 'internationalised', if using a stock theme but a different language, it is only your own language file that will need editing.

You can see my test version of this here and a live install using just 2 pricing structures and no other options at this site, http://www.landscapeandlight.co.uk/


updated 30/1/06 to include fix for bug found here
I just visited your website.  Just beautiful.  You're telling me that is using your paypal shop hack?  It's so clean and elegant.  Much nicer than coppermine themes, I think.
I'd like to create something like that as well.  I uploaded your program into coppermine and there it sits.  I'm afraid to go further. 
I think what spooked me is overwriting files.  What if Coppermine doesn't work at all after that?
Logged

QBO

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Paypal shop hack, easy install, online admin
« Reply #136 on: April 24, 2007, 05:42:00 am »

I've just installed everything and was set to go for the shop admin, however there's only the the drop-down (expand) arrow visible and nothing happens when I click it, where did I go wrong? I have updated the database. I'm using the eyeball theme, cpg 1.4.6. in the thumbnail I can see all the default spaces in "Buy with confidence" and "Place your order here".
Please help.

Logged

sharon1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Paypal shop hack, easy install, online admin
« Reply #137 on: July 21, 2007, 07:42:11 pm »

My first time with .php, I have installed Coppermine and your paypal shop hack.  I would like to add something into the "Place your order here area".  With the same font used for "Main options name" and to the right of that, I would like to add a line that says For Rights-Managed Usage, Please Email ...and include my email address that is linkable.  Is this possible? 

Thanks,

Sharon
Logged

sharon1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Paypal shop hack, easy install, online admin
« Reply #138 on: July 22, 2007, 02:09:41 pm »

Hello,

I thought since I had worked with Coppermine more since my last post, I might be a little clearer.  Here is a link to my gallery.

http://www.vanlieuphotography.com/stock/

I have the one option of Royalty Free Images.  I need another option for Rights Managed Images.  But I need to have both options for each image.  I would like to add this second drop down menu to the right of the existing one.  If that is not possible, I would like to put a clickable email link to the right of the drop down menu.  Is this possible?  If not, do you have any suggestions for something I could use with Coppermine that would allow that option?

Thanks for your help,

Sharon
Logged

sharon1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Paypal shop hack, easy install, online admin
« Reply #139 on: July 24, 2007, 07:25:18 pm »

I guess there's no longer any support for this mod.   

Sharon
Logged
Pages: 1 ... 3 4 5 6 [7] 8   Go Up
 

Page created in 0.028 seconds with 21 queries.