page for only registered users. What is the correct path? page for only registered users. What is the correct path?
 

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]

Main Menu

page for only registered users. What is the correct path?

Started by VEGA, October 23, 2008, 10:08:44 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

VEGA


<?php
define
('IN_COPPERMINE'true);
$d getcwd();
chdir('path/to/coppermine');
require(
'include/init.inc.php'); 
chdir($d);
if (!
USER_IDcpg_die(ERROR$lang_errors['access_denied'], __FILE____LINE__);
?



if my gallery is www.maranimage.it, and the page for only registered users is in the folder called member (root), the path my gallery is this?

httpdocs/



Fabricio Ferrero

The full path doesn't deal with the domain, it deppend on the server configuration. In most cases should be httpdocs/ indeed. The way to check is by FTP or the files manager of your webhost.

Try with "httpdocs/" you would not cause any harm if not the right path.  ;)
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

VEGA

Quote from: fabri on October 24, 2008, 02:01:55 AM
The full path doesn't deal with the domain, it deppend on the server configuration. In most cases should be httpdocs/ indeed. The way to check is by FTP or the files manager of your webhost.

Try with "httpdocs/" you would not cause any harm if not the right path.  ;)

i have try with:

chdir('/var/www/vhosts/maranimage.it/httpdocs');
require('/var/www/vhosts/maranimage.it/httpdocs/include/init.inc.php');

but show only text not any image!

Fabricio Ferrero

I think this should work:

<?php
define
('IN_COPPERMINE'true);
$d getcwd();
chdir('httpdocs/www');
require(
'include/init.inc.php'); 
chdir($d);
if (!
USER_IDcpg_die(ERROR$lang_errors['access_denied'], __FILE____LINE__);
?


Do not modify "require('include/init.inc.php');" line, it's not needed. The one you have to test it's the above line.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

VEGA

<?php
define('IN_COPPERMINE', true);
$d = getcwd();
chdir('httpdocs/www');
require('include/init.inc.php');
chdir($d);
if (!USER_ID) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
?>
<html>
<head>
<title>ghghgh</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
text sample
</body>
</html>
<?php
pagefooter();
?>


and this is the page ..

Coppermine Photo Gallery seems not to be installed correctly, or you are running coppermine for the first time. You'll be redirected to the installer. If your browser doesn't support redirect, click here.

VEGA

This path I see the page where it says that I do not have permits, but the images do not see that link and did not see the red x

<?php
define
('IN_COPPERMINE'true);
$d getcwd();
chdir('/var/www/vhosts/maranimage.it/httpdocs');
require(
'include/init.inc.php'); 
chdir($d);
if (!
USER_IDcpg_die(ERROR$lang_errors['access_denied'], __FILE____LINE__);
?>


look: http://www.maranimage.it/pp/

Nibbler

Add a HTML base tag into your theme's template.html that points to your Coppermine directory. Make sure you put it in the head section before the stylesheet.

VEGA

Quote from: Nibbler on October 25, 2008, 12:54:12 AM
Add a HTML base tag into your theme's template.html that points to your Coppermine directory. Make sure you put it in the head section before the stylesheet.

my gallery is in the root and can be seen well. This is the page within another folder (which I have always created in the root whit name pp) that should be lit only to registered users. I inserted the code suggested but perhaps not the correct path.
I have another page which I introduced into the root and not inside a folder with the following code:

<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('Hello member');
if (!
USER_ID) {
    
cpg_die(ERROR$lang_errors['access_denied'], __FILE____LINE__);
}
?>

<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
[b]TEXT SAMPLE[/b]
</body>
</html>
<?php
pagefooter
();
?>



and working properly


Joachim Müller

Why are you trying to do such complicated things? Why does the extra page for registered users need to reside outside of coppermine's root folder? Can't you just move that page into coppermine's root folder and everything will be dandy? You won't have to jump through loops to accomplish what you're after.

VEGA

Quote from: Joachim Müller on October 25, 2008, 12:20:34 PM
Why are you trying to do such complicated things? Why does the extra page for registered users need to reside outside of coppermine's root folder? Can't you just move that page into coppermine's root folder and everything will be dandy? You won't have to jump through loops to accomplish what you're after.

because I read that a user has requested this and you can do it. Everything is born from the fact that I work some things like the plug-in captcha, the plugin photo_shop is not displayed and distorts the look and feel. Because from what I understand we should pay to resolve ... I try alternative routes. ;)

Joachim Müller

We're not asking you to pay anything. Who said that you have to pay? I just suggested to put your members-only page into coppermine's root folder instead of putting it someplace else. This will keep you out of harms way with all the include stuff (as you can safely forget about it) and the modifications to your theme that you would need as a result.

VEGA

Quote from: Joachim Müller on October 25, 2008, 06:47:38 PM
We're not asking you to pay anything. Who said that you have to pay? I just suggested to put your members-only page into coppermine's root folder instead of putting it someplace else. This will keep you out of harms way with all the include stuff (as you can safely forget about it) and the modifications to your theme that you would need as a result.


I was referring in general.
What I do advice I put into practice with an 'other page by entering another code.
Now I need to plug it into a folder in the root. I thought it was easy and if you do not find another solution.

Joachim Müller

It's not my task to find another solution for you. Both options (putting your custom stuff into a sub-folder or keeping it within coppermine's root folder) have drawbacks. It's entirely up to you to decide for one option and apply it. We're not involved and frankly: I don't care which option you pick. After all, you're trying to come up with a custom hack, so I suggest reviewing your attitude.

VEGA


VEGA

I would like to have clarity. This custom hack are prohibited ?
thanks

Fabricio Ferrero

Not at all. Thanks for coming back and mark as 'solved' topic.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Joachim Müller

How could we possibly stop you applying custom hacks - it's your site after all? Of course you can apply that sort of hack as you see fit - you just can't expect to be spoon-fed, i.e. you can't expect that we provide instructions for each and every hack that you need. We're not your coding slaves.

VEGA

Quote from: Joachim Müller on October 26, 2008, 10:07:47 AM
How could we possibly stop you applying custom hacks - it's your site after all? Of course you can apply that sort of hack as you see fit - you just can't expect to be spoon-fed, i.e. you can't expect that we provide instructions for each and every hack that you need. We're not your coding slaves.

This I do not think so. If you think I am sorry

Joachim Müller

So you're convinced that we actually are your coding slaves ::)?

VEGA

Quote from: Joachim Müller on October 26, 2008, 12:19:52 PM
So you're convinced that we actually are your coding slaves ::)?

You are free to think anything.
Please do not make me move from stupid.  ;)
I have asked for help because I am not capable. If this can help thank those who help me. If the aid is not possible there are no problems and I thank the same. I hope to have been clear.