Advanced search  

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

Pages: [1]   Go Down

Author Topic: Uh-oh After Upgrade --- Config.php Not Working  (Read 4146 times)

0 Members and 1 Guest are viewing this topic.

ShelfSpot

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Uh-oh After Upgrade --- Config.php Not Working
« on: February 14, 2006, 01:34:47 am »

Hello,

As seen in the attachment, config.php is not working after an upgrade from 1.3.6. I can't even change the theme via phpMyAdmin in order to try to fix this. Please help.

Thanks!
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Uh-oh After Upgrade --- Config.php Not Working
« Reply #1 on: February 14, 2006, 01:40:27 am »

You need to use admin.php... 1.4 doesn't use config.php anymore due to silly server setups blocking the file.

You also need to update your custom theme as the Config link would have been updated to point to admin.php.
Logged

siegelscott

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Uh-oh After Upgrade --- Config.php Not Working
« Reply #2 on: March 12, 2006, 07:27:21 am »

Thanks for the helpful hint.. It was enough to get me started on fixing the problem.  I actually had two different problems to solve:
1. The box that I used to click on to go to the config screen is gone.
2. In its place was a white space that when clicked on linked over to config.php, a useless empty file.

These two problems are related and are fixed in 2 easy steps...

 The problem resides in your theme.psp file.  To solve problem #2, you need to search for the term "config.php".  Once you find it, you need to change it to "admin.php".  This is per TranzNDance's explaination and fix listed above....

FROM:
Code: [Select]
<td class="admin_menu"><a href="config.php" title="">{CONFIG_LNK}</a></td>
TO:
Code: [Select]
<td class="admin_menu"><a href="admin.php" title="">{CONFIG_LNK}</a></td>
This will make the white space point to the correct file.  Ah, half way there.

The second problem took me a couple seconds to figure out, but makes perfect sense now.  Simply put, the word "Config" itself is an english word.  If you were german, you'd want the german equivelant to appear on your administration menu, not the english.  The way the programmers of Coppermine solved this was not to hard program this menu in, but to have theme.php file pull the translation for each menu item box from your language php file (in my case, english.php).
You'll notice it references
Code: [Select]
{CONFIG_LNK} above, which is the variable it will have to get from a language file...

You need to look in your theme.php for the following entry:

Code: [Select]
'{CONFIG_LNK}' => $lang_gallery_admin_menu['config_lnk'],
This is where the theme.php says where to get the translation for CONFIG_LNK from.  You can think of this line of code as: "when you see a reference for {CONFIG_LNK} go to my language file, look for the admin menu entry, and return the value entered for config_lnk."

OOPS!  The language files have also been revised in the new version to remove the entry for config_lnk.  So, when your theme.php calls over to english.php (in my case) looking for a translation for config_lnk, it cannot find any, so it returns a blank, thus the blank space in my admin menu.  Alas, there IS an entry for admin_lnk in the english.php file that corresponds to the word "Config", so it seems that there is an easy way to fix this.. All you have to do is change the above refence ['config_lnk'] to ['admin_lnk'].  This now says:

"when you see a reference for {CONFIG_LNK} go to my language file, look for the admin menu entry, and return the value entered for admin_lnk."  This works perfectly!!!

The change in code for your theme.php should read:

Code: [Select]
'{CONFIG_LNK}' => $lang_gallery_admin_menu['admin_lnk'],
That's it...  two easy changes of a couple of characters of code and you are good to go.  My missing box reappeared after I made these changes.  It's came back labeled "Config", and when I click on it, it brings up the admin.php file...  Yay!

Logged
Pages: [1]   Go Up
 

Page created in 0.039 seconds with 19 queries.