changing CPG directory changing CPG directory
 

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

changing CPG directory

Started by new_user, January 27, 2005, 05:25:28 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

new_user

I am a new user of CPG , so i instaled my cpg at mydomin.com/hellotesting/
butas i love it and want to keep it working. But now i want to use  " mydomain.com " to access CPG directly. I know i can do it bu using an index.php file and redirecting to CPG. But is that possible if i COPY aal the files and directry to my root  "mydomain.com "
Will CPG work  ?? 
coz now i just want to have CPG at that domin nothing else . so index.php kind of thing will look a bit odd to me.
So copying files will work ???  may be i need to edit few files like "config.ph" but in the end, WILL IT WORK ???
thanks 4 Your support

Casper

You can move your folders and files into the root, and it will work fine.  You will just need to change the 'target address of see more pic......' in config.  No files will need editing.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

new_user

Waoo Thats really amazing, Meands i have nothing to change just one line. Thats great news 
Ok i want to ask one more thing related to it, Suppose i have copied all the files to root directory so now i will be able to accec CPG using both  "mydomin.com" & "mydomain.com/hellotesting"  (same CPG)

If i Try changing certain thing on the root one ( like applying few hacks or mods ) and i in the end i got some error and screwed my CPG (which is root) so i can redirect my users to (/hellotesting)  And the Backup version will work as before  ??

Inshort .. I can keep Both the copies of CPG and switch to any one in case i did wrong with some file. So one will be acting as a BACKUP  and there will be no changes to make  (certainly if i will not add any new pic )

AM I RIGHT ??????


Tranz

If they are both using the same database... it depends on what you want to happen regarding changes to the database. For example, the picture views in the subdir would be added to that of the root.

kegobeer

It doesn't work that way.  The database contains a link to where your gallery is, so it knows where to find your pictures.  If your link points to yoursite.com/, the gallery you have located at yoursite.com/gallery/ won't go to the correct location for the pictures.

If you want to use the root location (and you've already changed the target address in your config settings), and have /hellotesting as the emergency backup, do this to the gallery at yourdomain.com/hellotesting:

You can try hard coding the variable $CONFIG['ecards_more_pic_target'] in your init.inc.php file.  In yourdomain.com/hellotesting/include/init.inc.php, right before
require 'include/media.functions.inc.php';
insert this
$CONFIG['ecards_more_pic_target'] = 'http://yourdomain.com/hellotesting/';

Obviously, change yourdomain.com to whatever it is for your site.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

new_user

Quote
It doesn't work that way.  The database contains a link to where your gallery is, so it knows where to find your pictures.  If your link points to yoursite.com/, the gallery you have located at yoursite.com/gallery/ won't go to the correct location for the pictures.

I guess that u r probabbly saying if i keep Album flder ar "/mydomin.com/CPG"  But i m going to have totally 2 differnet copis of all the folder and files at two locations.  Still I need to implement what u said ??? more clearly  "mydomain.com" will look for pictures in "mydomain.com/album" while the otherone at "mydomain.com/CPG/album" So  do i need to implement
$CONFIG['ecards_more_pic_target'] = 'http://yourdomain.com/hellotesting/';
Or will it work without it ????

Also i think if i will upload anything using Root CPG it will not available at "root/CPG" But thats not the problem , But Will there be any error kind of thing when i will use Backup ( i mean root/cpg)
I hope There should not be any such thing. But asking for ur support is much easier way in any case   :)
Thanks

new_user

I Just DID it, and  its working fine without any error atleast i try my best to get some error but nope. Its all clean. ( i m talking about copying file at root)

So i was just wondering do i need to do the change as suggested By  " kegobeer  " or not >????  Any idea ??

Presently without that chnage things r looking fine to me, SO was just wondering if its required or not.

thanks

Joachim Müller

yes, you have to do as kegober suggested - that's why he did post it.

Joachim