Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 430 online users. » 0 Member(s) | 429 Guest(s) Bing
|
Latest Threads |
UserSpice Alpha Testing a...
Forum: News Center
Last Post: ivinsons
11-08-2024, 06:13 PM
» Replies: 13
» Views: 42,475
|
UserSpice 4.4 Development
Forum: News Center
Last Post: Amelie12
09-21-2024, 12:23 PM
» Replies: 4
» Views: 15,199
|
Welcome to the new UserSp...
Forum: News Center
Last Post: ivinsons
08-25-2024, 07:39 AM
» Replies: 2
» Views: 27,918
|
How to use hasPerm
Forum: UserSpice 4.4
Last Post: mudmin
07-20-2019, 02:45 PM
» Replies: 1
» Views: 13,755
|
Session issue? What I sho...
Forum: UserSpice 4.4
Last Post: Parth
07-17-2019, 05:06 PM
» Replies: 4
» Views: 14,502
|
Email Error
Forum: UserSpice 4.4
Last Post: Brandin
07-17-2019, 04:47 PM
» Replies: 1
» Views: 6,623
|
{ Missing Text } after up...
Forum: UserSpice 4.4
Last Post: Brandin
07-16-2019, 04:23 PM
» Replies: 22
» Views: 53,638
|
Best Practice Info
Forum: New to UserSpice?
Last Post: Brandin
07-16-2019, 11:55 AM
» Replies: 1
» Views: 13,490
|
Force to use 2FA -always-
Forum: UserSpice 4.4
Last Post: Brandin
07-12-2019, 12:43 PM
» Replies: 1
» Views: 6,636
|
e-mail not verifying
Forum: UserSpice 4.4
Last Post: LBC
07-10-2019, 11:34 AM
» Replies: 31
» Views: 76,232
|
|
|
header.php in usersc not overwriting? |
Posted by: fylking - 07-03-2017, 04:30 AM - Forum: UserSpice 4.3 and Below
- Replies (7)
|
|
Hi,
I'm just trying to adjust US (4.2.8) to another bootstrap site and have therefore changed a copy of header.php and saved it in /usersc/includes. Same for navigation.php
But when i as a test loads join.php, the new header.php is not loaded or overwriting the original. But the navigation actually are.
My understanding is that files placed in /usersc/ by the same name will overwrite files in the /users/?
But not for header.php?
|
|
|
function checkMenu |
Posted by: faguss - 06-30-2017, 01:18 PM - Forum: Modifications and Hackery
- No Replies
|
|
I've noticed that the same query is being used multiple times which I see as a waste. The offender is function from Code: users\helpers\us_helpers.php
. I've modified it so that the database will be accessed only once.
function checkMenu($permission, $id) {
global $user, $access_checkMenu;
if (isset($access_checkMenu)) return $access_checkMenu;
...
$access_checkMenu=true; return true;
...
$access_checkMenu=false; return false;
Functions and are similar so if you use them a lot you might want to apply the same changes.
|
|
|
mysqldump localhost |
Posted by: firestorm - 06-30-2017, 05:52 AM - Forum: Off-topic Discussions
- No Replies
|
|
im working on back up & restore for my US build which i'll share when finished, so far ive completed the backup feature where we can backup db & us files, just db , just us files or a single table, works perfectly on remote server i.e shared cpanel hosting however on mamp pro and ampps on mac i get mysqldump cannot be found error on the db dump function, i believe this is related to localhost and not the script itself, but i could be wrong, has anyone come accross this issue ? ive attenpted all fixes found on stack etc but. o go and is there an alternative to mysqldump ?
|
|
|
modal form under UserSpice with bootstrap and jquery |
Posted by: marceloatmartins - 06-29-2017, 05:25 PM - Forum: UserSpice 4.3 and Below
- Replies (3)
|
|
Hi Everybody,
I'm using US 4.2 and I need to do a modal form in my wbesite, but the modal don't open.
I need to use this below:
<!-- Latest minified bootstrap css -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<!-- Latest minified bootstrap js -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
And here is my form:
<script>
function submitContactForm(){
var reg = /^[A-Z0-9._{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
var name = $('#inputName').val();
var email = $('#inputEmail').val();
var message = $('#inputMessage').val();
if(name.trim() == '' ){
alert('Please enter your name.');
$('#inputName').focus();
return false;
}else if(email.trim() == '' ){
alert('Please enter your email.');
$('#inputEmail').focus();
return false;
}else if(email.trim() != '' && !reg.test(email)){
alert('Please enter valid email.');
$('#inputEmail').focus();
return false;
}else if(message.trim() == '' ){
alert('Please enter your message.');
$('#inputMessage').focus();
return false;
}else{
$.ajax({
type:'POST',
url:'submit_form.php',
data:'contactFrmSubmit=1&name='+name+'&email='+email+'&message='+message,
beforeSend: function () {
$('.submitBtn').attr("disabled","disabled");
$('.modal-body').css('opacity', '.5');
},
success:function(msg){
if(msg == 'ok'){
$('#inputName').val('');
$('#inputEmail').val('');
$('#inputMessage').val('');
$('.statusMsg').html('<span style="color:green;">Thanks for contacting us, we\'ll get back to you soon.</p>');
}else{
$('.statusMsg').html('<span style="color:red;">Some problem occurred, please try again.</span>');
}
$('.submitBtn').removeAttr("disabled");
$('.modal-body').css('opacity', '');
}
});
}
}
</script>
<!-- Button to trigger modal -->
<button class="btn btn-success btn-lg" data-toggle="modal" data-target="#modalForm">
Open Contact Form
</button>
<!-- Modal -->
<div class="modal fade" id="modalForm" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">×</span>
<span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="myModalLabel">Contact Form</h4>
</div>
<!-- Modal Body -->
<div class="modal-body">
<p class="statusMsg"></p>
<form role="form">
<div class="form-group">
<label for="inputName">Name</label>
<input type="text" class="form-control" id="inputName" placeholder="Enter your name"/>
</div>
<div class="form-group">
<label for="inputEmail">Email</label>
<input type="email" class="form-control" id="inputEmail" placeholder="Enter your email"/>
</div>
<div class="form-group">
<label for="inputMessage">Message</label>
<textarea class="form-control" id="inputMessage" placeholder="Enter your message"></textarea>
</div>
</form>
</div>
<!-- Modal Footer -->
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary submitBtn" onclick="submitContactForm()">SUBMIT</button>
</div>
</div>
</div>
</div>
Can someone help me to find the issue?
Or send some example of model form under UserSpice.
Thanks
|
|
|
javascript and php |
Posted by: marceloatmartins - 06-27-2017, 05:13 PM - Forum: UserSpice 4.3 and Below
- No Replies
|
|
Help Everybody,
I need assign php variable from javascript function code when occur "onchange()" in a select field.
Are there some resouce in UserSpice to help me in this situation? Like put value in a SESSION variable.
Can someone help me?
Thanks
|
|
|
|