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: What a mess. How important is the upgrade to 1.4?  (Read 7736 times)

0 Members and 1 Guest are viewing this topic.

JasonR

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
What a mess. How important is the upgrade to 1.4?
« on: January 26, 2006, 08:07:30 pm »

Hi, I'm very frustrated to say the least right now. I'm running a gallery based on 1.3 and I decided I needed to upgrade to 1.4. At this point I've spent about 12 hrs working on it and at this present time I have no view-able gallery because my new theme.php is trash. Let me quickly explain where I'm at and then ask a couple questions.....

I have followed the upgrade docs the best I can right up to upgrading my template. For the record I'm using a version of project_vii that I've modified to resemble my Mambo website. After updating the template things started too look a little funny and I had no "config" option, after I logged in as the admin. I see that is a common problem, so I figured I'd figure it out when done. I then moved on to update the theme.php, which is basically creating a new one. I'm totally 100% lost here. I've tried to follow the steps but I get totally confused when it starts talking about the system buttons and whether my theme can use the new button template (whatever that is) or if I'll have to use my old code (I guess). I've played with the code, copying and pasting it back and forth from my old theme to my new one and I can get no where. The problem? First off, I know just enough PHP to be dangerous.lol I know almost nothing but I've managed to build a nice custom Mambo site and a very nice custom Coppermine 1.3 site. This upgrade has beaten me.

So I guess my question is this.....how important is this upgrade? What if I just uploaded my 1.3 gallery back to my server and stuck with it? I am no computer dummy and I'm actually in the process of starting a new computer/tech help and repair business. But that does not make me a coding expert. If this upgrade is very important is there anyone out there who do the upgrade for me, for a price? 

At this point I'm so frustrated, I'm willing to ditch the Coppermine route and find another gallery app. no matter if it is OS or paid, as long as the setup/customization and upgrades are not so difficult. I had no idea that an upgrade, which is a fairly common and expected event, was going to be so difficult, lenghthy and time consuming. Yes I'm griping but not at the developers as I'm just frustrated with myself.lol Forgive me for my bad mood.lol

Any ideas on where I should go from here?
« Last Edit: January 28, 2006, 03:50:23 am by GauGau »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: What a mess. How important is the upgrade to 1.4?
« Reply #1 on: January 26, 2006, 09:17:26 pm »

I'm sorry to hear how much time you have spent on this.  The fact that you were willing to post instead of just giving up completely is a good sign.   :)

It is true that the current theme engine is a bit difficult to figure out if you don't know PHP since it uses constructs besides simple variable assignment to HTML.  If you look at the main Coppermine page under "what does the future hold", you'll see one of the items is "template-building tutorial".  The theme upgrade guide could be improved and your post helps to figure out how by giving us a story of someone who doesn't know PHP, but should be able to create or modify a theme based on your other computer skills.

I just joined the dev team and didn't create any themes in 1.3 so I don't know the differences first-hand.  I do know the 1.4 theme system fairly well and while I agree it is more complicated, it is fairly well organized and the features gained with the new system are worth the effort.  The themes board has some basic tips that supplement the docs and has many threads with people learning how to customize or upgrade their themes.  I would suggest to go step-by-step and see what issues you're seeing.  If you've read the docs and searched the board with still no success, feel free to post on the themes board for assistance.  For each separate question you have, please use separate threads.  If you have upgrade-related questions unrelated to the theme, please post here.  Otherwise, theme questions, even if you are upgrading, should go on the themes board.

A quick answer about the new system buttons - no they are not necessary.  You should be able to use your old HTML in the $template_sys_menu and $template_sub_menu variables.  (For follow-up questions about this, please see the themes board and post there.)

I don't know if it's critically important for you to upgrade to 1.4 (someone else might know better), but I would recommend it.  Yes I realize you ran into a lot of issues and spent a lot of time already on it.  But the support is here and I think most of your issues are theme-related.  (Oh, the new config page is admin.php.)  You could verify that all your problems are theme-related by using the classic theme in 1.4 and make sure things work.  Then continue to work on your theme upgrade.

If you do want some paid help, please post on the freelancer board.  But I think that it should not be necessary, although I understand if you just want to be done with it and have someone else do the upgrade for you.

There are a number of features that make 1.4 worthwhile, particularly the plugin system which means you can add-on to your Coppermine without modifying the core code.  The new theme system does allow more functionality as well, once you get used to it (and maybe more usefully once the template-building tutorial is written).
Logged

JasonR

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
Re: What a mess. How important is the upgrade to 1.4?
« Reply #2 on: January 27, 2006, 06:37:41 pm »

Paver, thank you very much for the thoughtful, kind and informative reply. You have no idea how greatly I apprecaite it, especially when I was just about to chunk the whole idea of using this application out the window. ;)

Here is where I am am currently at..... I have renamed my partially upgraded Coppermine dir on my server for now. I purchased CoppermineVis, which I think will help me easily integrate Coppermine with my Mambo site. I do not know how much Coppermine customization I will need to do if CoppermineVis works the way I think it will. Sooo, I have started from scratch and installed 1.4 on my server. Now I will have several options not knowing how CoppermineVis is going to work; I can integrate using CoppermineVis and re-import all my albums, totally start over in 1.4 and customize my theme like it was in 1.3, or just ditch all of that and go back to upgrading my orginal 1.3 installation. I may be totally wrong but I have a feeling it would have been much easier and faster to just do a fresh install of 1.4 and customize it like my 1.3 theme was. I can't imagine how copying my customizations over and re-importing my albums could be any harder than the upgrade process. ;D 

Thank you for all your support and kind words. I do have one problem with my new 1.4 installation......

I am getting the common error of Unable to create thumbnail or reduced size image. I have searched the boards and found that is a common problem. I found this thread...  http://forum.coppermine-gallery.net/index.php?topic=23342.0  and followed the instrurctions to add
Code: [Select]
$fh=fopen($dest_file,'w');
fclose($fh);
above the line
Code: [Select]
imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);. This did not solve the problem and it brings to mind a couple questions. 1) Kegobeer said that line should be found around 209, I did not find it there but instead on line 245. He also said that if using GD1 (I think I am but I'm not sure?) to look a few lines above it for a "similar" change. I don't see anything identical, but some things that might be considered similar but I hate to just start adding code randomly to see if it works? Any ideas on this? Should I post this somewhere else? I'm sure someone else has asked the question but all the searches I've done pretty much lead me right back the thread I linked to above. Any help on this current issue would be greatly appreciated!

Thanks for all the help Paver.
« Last Edit: January 27, 2006, 07:01:13 pm by JasonR »
Logged

Nibbler

  • Guest
Re: What a mess. How important is the upgrade to 1.4?
« Reply #3 on: January 27, 2006, 06:45:31 pm »

That line occurs exactly twice in the file. Use your text editor's 'find' function to locate both of them and add in the extra lines. If you are not comfortable editing the code then make a backup of the file beforehand.
Logged

JasonR

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
Re: What a mess. How important is the upgrade to 1.4?
« Reply #4 on: January 27, 2006, 07:13:14 pm »

Thanks Nibbler. 100% my fault for not finding that second line. I was using the Find function, but I made a mistake and didn't find the second line. My bad.

However....(lol) I did find that same line again down around line 273 or so and I changed it also. Re-uploaded the file to the server and I got the exact same result; a broken link icon and when clicking on it, I get the same error of "unable to create thumbnail...." I am fully comfortable at this point editing code since I've been forced to do it so much with Mambo and Coppermine. However, being comfortable and knowing what the heck you are doing are two different things. ;)

Here is the code I edited, I am only showing the code in question. I also just pulled this file out of the orginal Coppermine zip file to edit these two changes again, to make sure I had made no other mistakes or changes. Here is the edited code:

Code: [Select]
             if (!$src_img) {
                $ERROR = $lang_errors['invalid_image'];
                return false;
            }
            $dst_img = imagecreate($destWidth, $destHeight);
            imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight, $srcWidth, $srcHeight);
            $fh=fopen($dest_file,'w');
fclose($fh);
imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
            imagedestroy($src_img);
            imagedestroy($dst_img);
            break;

        case "gd2" :
            if (!function_exists('imagecreatefromjpeg')) {
                cpg_die(CRITICAL_ERROR, 'PHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed', __FILE__, __LINE__);
            }
            if (!function_exists('imagecreatetruecolor')) {
                cpg_die(CRITICAL_ERROR, 'PHP running on your server does not support GD version 2.x, please switch to GD version 1.x on the admin page', __FILE__, __LINE__);
            }
            if ($imginfo[2] == GIS_GIF && $CONFIG['GIF_support'] == 1)
                $src_img = imagecreatefromgif($src_file);
            elseif ($imginfo[2] == GIS_JPG)
                $src_img = imagecreatefromjpeg($src_file);
            else
                $src_img = imagecreatefrompng($src_file);
            if (!$src_img) {
                $ERROR = $lang_errors['invalid_image'];
                return false;
            }
            if ($imginfo[2] == GIS_GIF)
              $dst_img = imagecreate($destWidth, $destHeight);
            else
              $dst_img = imagecreatetruecolor($destWidth, $destHeight);
            imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight, $srcWidth, $srcHeight);
            $fh=fopen($dest_file,'w');
fclose($fh);
imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
            imagedestroy($src_img);
            imagedestroy($dst_img);
            break;
    }

Any ideas on why it still might not be working?
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: What a mess. How important is the upgrade to 1.4?
« Reply #5 on: January 27, 2006, 09:20:36 pm »

Hi.. sorry to butt in here.. have no help to give but I am impressed at your perservarance.   Mine is so heavily hacked that I would have a mess if I tried to upgrade.  I am still interested in your original question... How important is this upgrade?
Logged

Nibbler

  • Guest
Re: What a mess. How important is the upgrade to 1.4?
« Reply #6 on: January 27, 2006, 09:23:23 pm »

It's entirely optional. If you like the new features then you can upgrade. 1.3 will still be supported for some time. 1.4 is a feature release as opposed to a security or bugfix release.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: What a mess. How important is the upgrade to 1.4?
« Reply #7 on: January 27, 2006, 10:09:24 pm »

@zac: Your case is one reason the new plugin system in 1.4 is so useful.  Plugins are continually being developed to obviate the need for hacking the core scripts.  In addition, the new theme system allows quite a bit more functionality to be put in theme.php that used to require a core hack.  As Nibbler said, it's entirely optional to upgrade, but even in the face of re-applying all your mods, I would - if it were me - put aside a chunk of time and try the upgrade.  What I would do is keep the current system up & running and copy it to a new directory (and copy the database tables to new tables or a new database) where I would do the upgrade.  You can then spend the time figuring things out and finally "go live" once it's ready.  To help find all the hacks to your 1.3 system, you can use a utility like 'diff' with the original 1.3 scripts.  It might be that some of the hacks are not necessary or not desirable for whatever reason once you see the 1.4 system running. 

@JasonR: I really think you should try to separate each of your questions into separate threads.  This is for your sanity and for the reference of future visitors to the forum.  This thread is appropriate to ask about the general importance of upgrading (as zac did), but otherwise, it's getting rather messy to address each of the issues in this one thread.  Related to this, if you have a question about a current thread, please post in that thread, for organizational purposes as well.  The supporters on this forum are good about watching all the boards so don't worry about heading off to another board or an older thread to ask a question.  Most of your upgrade questions should go in this board, but if you have theme questions or find a relevant existing thread somewhere else, please use the appropriate board.  I apologize if I misled you by answering some of your specific questions here.

The general policy on this forum is 1 question per thread.
Logged

JasonR

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
Re: What a mess. How important is the upgrade to 1.4?
« Reply #8 on: January 27, 2006, 10:56:15 pm »

Thanks. I do not mean to complaining but two devs have replied in detail below my last question and have offered no more help to. I think you can see from a user's perspective how it is frustrating to get the attention of the teacher but then have the question ignored and told to ask elsewhere. ;D  I'll resurrect an old thread in another forum or somewhere because if I can't get the above question answered about a clean new upgrade, I am at a standstill for another day.

I do apprecaite all the devs and what they do here for free. I realize their job is not always fun and they don't get credit for their hard work.
Logged

Nibbler

  • Guest
Re: What a mess. How important is the upgrade to 1.4?
« Reply #9 on: January 27, 2006, 11:10:33 pm »

Don't resurrect a thread, make a new one. If you want to ask a question about uploading use the upload board, your question about how important the upgrade is has been answered.

Devs read all posts to the entire board, so your post won't get lost if you put it in the right place.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: What a mess. How important is the upgrade to 1.4?
« Reply #10 on: January 27, 2006, 11:44:56 pm »

As Nibbler said, it's fine to make a new thread.  I just meant that if you find a solution in an existing thread and you have a question about it that might be useful for others, sometimes it's helpful to add your post to that thread.  But it's fine to make a new one and reference the old thread as you already have here.

The main thing is to make one thread per question.  About not answering your questions yet, I personally have not because I haven't had time during the last 24 hours to do so - in regards to access to the code.  As you said, all the supporters donate their time, and so each one has on and off times.  Overall though, things are covered well.

Another reason for separating your question is that most supporters (and dev members) have specialties - certain features & code sections they know better than other features & code.  One question may be easily handled by one person, whereas another by someone else.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: What a mess. How important is the upgrade to 1.4?
« Reply #11 on: January 28, 2006, 03:50:10 am »

The initial question has been solved, subsequent ones should be discussed in separate threads as suggested. Marking thread as "solved"
Logged

zac

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 153
Re: What a mess. How important is the upgrade to 1.4?
« Reply #12 on: January 28, 2006, 07:35:06 am »

Thanks.. I am convinced ;)  I will get some strong coffee (infused with Irish love) and go for the upgrade. 
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.