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: Как заставить ре  (Read 5577 times)

0 Members and 1 Guest are viewing this topic.

lol005

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Как заставить ре
« on: August 16, 2005, 08:51:20 am »

Как заставить гостей регистрироваться?! Заблокировать возможность гостям просматривать картинки, сделать это очень легко.
В файле displayimage.php, после строки "* Main code" нужно вставить строчку:
Code: [Select]
if(!USER_ID) cpg_die(ERROR, "Для просмотра изображений необходимо зарегистрироваться!", __FILE__, __LINE__);
Получится примерно так:
Code: [Select]
/**
 * Main code
 */
[color=Red]if(!USER_ID) cpg_die(ERROR, "Для просмотра изображений необходимо зарегистрироваться!", __FILE__, __LINE__);[/color]
$pos = isset($HTTP_GET_VARS['pos']) ? (int)$HTTP_GET_VARS['pos'] : 0;
$cat = isset($HTTP_GET_VARS['cat']) ? (int)$HTTP_GET_VARS['cat'] : 0;
$album = isset($HTTP_GET_VARS['album']) ? $HTTP_GET_VARS['album'] : '';
P.S. Совет предоставил гос-ин George_CC, за что ему огромное спасибо.
Logged

punk

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Как заставить р
« Reply #1 on: November 01, 2005, 04:30:14 pm »

можно ли это сделать не для всех картинок, а только для "normal" и "big", а для "thumb" оставить свободный просмотр.?
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.