• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

User Login System for Chevereto

Because many of users ask me about hiding upload box on index page, so here is small tut.

Open index.php and find:
Code:
<form id="upload" action="">

above add:
Code:
<?php if(isset($_SESSION['LOGGEDIN']) && ($_SESSION['LOGGEDIN'] == true)) { ?>



Find
Code:
</form>

bellow add:
Code:
<?  } else {  ?>
Only Registered Users Can Upload Images
<? } ?>

You can change this text Only Registered Users Can Upload Images or put some image html or what u like.. ;)
 
In the same way you can put also ads on your site...

Code:
<?php if(isset($_SESSION['LOGGEDIN']) && ($_SESSION['LOGGEDIN'] == true)) { ?>
No Ads For Registered Users

<?  } else {  ?>

Ads code to show for not logged in users
<? } ?>
 
:D thanks, by the way is there any chance we can do it so it comes up with an error in the yellow box saying need to be registred to upload. As in the same error box which comes up when it says image upload failed
 
open style.css
and add this:

Code:
#amn_error 
{
display: none;
margin-left:auto; 
margin-right:auto;
text-align: center;
width: 200px;  
margin-bottom:10px;
font-size: 14px;
color: #4F4500;
border: 1px solid #FFEA61;
padding: 8px 14px;
background: #FFF4AB; 
background: -moz-linear-gradient(top, #FFF4AB 1%, #FFEC72 100%); 
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#FFF4AB), color-stop(100%,#FFEC72)); 
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFF4AB', endColorstr='#FFEC72',GradientType=0 ); 
}

#amn_error span 
{
background: url(./theme-img/cancel-ico.gif) no-repeat right center;
padding-right: 20px;
}


Open index.php find line:
Code:
<div align="center" id="contentDiv">

Above add:
Code:
<script>
var amn_chevereto=function(){return $('#amn_error').slideDown(200).delay(3000).slideUp(200);}
</script>
<div id="amn_error"><span>Please <a href="register">register</a> or <a href="login">login</a></span></div>



Find line:
Code:
<div id="upload-action"><a id="upload-button"><span><?php show_lang_txt('button_upload'); ?></span></a><a id="cancel-upload"><?php show_lang_txt('txt_cancel'); ?></a></div>


and replace with:
Code:
<div id="upload-action"><a <?php if(isset($_SESSION['LOGGEDIN']) && ($_SESSION['LOGGEDIN'] == true)) { ?>id="upload-button"<?  } else {  ?>id="upload-button2"  onclick="amn_chevereto()"<? } ?>><span><?php show_lang_txt('button_upload'); ?></span></a><a id="cancel-upload"><?php show_lang_txt('txt_cancel'); ?></a></div>



You can check here how is work http://demo.imgup.it/
 
Any chance you can integrate the user system into the api, so people can upload directly into their accounts via an external source
 
Sorry but no.
As mentioned before, this can't be done for same reason as the option to remember the logged in user.
Chevereto is using different session id everytime the picture is uploaded.

EDIT: Actually it can be done, but the user need to be logged in first.
 
AmN said:
Requirements:
Installation of this mod requires one available MySQL database
Tutorial for editing and configuring this mod is included.
Future update will cover creation and organizing by albums, , sorting images and much more.

Are you still working on the album-function?
 
Back
Top