Jump to content

Chrisj

Members
  • Posts

    551
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Chrisj

  1. I have this Form code that works successfully to Search a web site (below).

    How can I add text in the field/box that will disappear when the field/box is selected to add search keywords to?

    Also, how can I widen the field/box?

    Any help/examples/suggestions will be appreciated.

    <form method="get" action="search.php">
    <div id="siteSearch">
    Enter Search Words <img src="themes/default/images/arrow-red.png">  
    <input type="hidden" name="type" value="videos"/>
    <input type="text" name="keyword" id="sbi1" value="" onfocus="if(this.value==this.defaultValue) this.value='';">
    <input type="image" align="middle" src="images/search.png"  name="sa" value="Search" id="mySearch"/><br/>
    </div>
    </form>
    

    Thanks

  2. I'm trying to change the phpmotion script so that upon logging in, a user goes directly to the upload page.

    I've accomplished that, but after browse > select > upload there nothing happens.

    I suspect that the previous page (that I've skipped over) needs to be completed first, it's the video_upload_form.htm.

    Is there a way I can mod the form so it's always completed? Or so it's not required?

    Here's what appears on the upload page (the form part of the upload page video_upload.htm), which may help you help me:

    <!-- Start Upload Form -->
    <form name="form_upload" method="post" enctype="multipart/form-data"  action="[var.path_to_upload_script]" style="margin: 0px; padding: 0px;">
    <noscript><input type="hidden" name="no_script" value="1" /></noscript>
    <input type="hidden" name="title" value="[var.title]" />
    <input type="hidden" name="description" value="[var.description]" />
    <input type="hidden" name="tags" value="[var.tags]" />
    <input type="hidden" name="location_recorded" value="[var.location_recorded]" />
    <input type="hidden" name="allow_comments" value="[var.allow_comments]" />
    <input type="hidden" name="allow_embedding" value="[var.allow_embedding]" />
    <input type="hidden" name="public_private" value="[var.public_private]" />
    <input type="hidden" name="channel" value="[var.channel]" />
    <input type="hidden" name="channel_name" value="[var.channel_name]" />
    <input type="hidden" name="sub_cat" value="[var.sub_cat]" />
    <input type="hidden" name="form_submitted" value="yes" />
    
    <div id="upload_slots"><span class="font5_16"><b><br/><font size="3" color="#800000" face="Arial">[var.lang_please_upload]  </b></font></span><br/><br/><input type="file" name="upfile_0" size="72" value="" /></div>
    <noscript><br/><input type="reset" name="no_script_reset" value="Reset" />   <input type="submit" name="no_script_submit" value="Upload" /></noscript>
    </form>
    <!-- End Upload Form -->
    
    

    I'd be glad to provide the upload_video_form.htm code also. Any help/suggestion-to-try will be appreciated

  3. I'd like to change this code so that upon logging-in the user is redirected to upload.php.

    Can you help as to where in this code to make that change, please?

    <?php
    error_reporting (E_ALL);
    
    include_once ('classes/config.php');
    include_once ('classes/sessions.php');
    
    if ( $enable_forum == 1 ) header("Location: " . $smf_bridge_register);
    
    
    $referer	= $_SERVER[HTTP_REFERER];
    if ( !ereg ($base_url, $referer) ) $referer = $base_url;
    
    $type 	= mysql_real_escape_string( $_GET['type'] );
    
    if ( $_POST['submitted'] != 'yes' ) {
    
    	$show_signup	= 0;
    	$show_login		= 1;
    
    	if ( !isset($form_submitted) || ($form_submitted == '') ) {
    
    		if ( defined('SMF_INSTALLED') ) $show_login = 2;
    
    		$template		= "themes/$user_theme/templates/main_1.htm";
         		$inner_template1 	= "themes/$user_theme/templates/inner_signup_form.htm";
    
         		$TBS			= new clsTinyButStrong;
         		$TBS->NoErr = true;
         		$TBS->LoadTemplate("$template");
         		$TBS->Render = TBS_OUTPUT;
         		$TBS->Show();
         		@mysql_close();
         		die();
        	}
    }
    
    if ( $_POST['submitted'] == 'yes' && !isset($_POST['user_name_login']) || ($_POST['user_name_login'] == '') || !isset($_POST['password_login']) || ($_POST['password_login'] == '')) {
    
    	//display form with error message
    	$error_message	= $config['incorrect_logins'];
        	$message_type	= $lang_error;
        	$blk_notification = 1;
        	$show_signup	= 0;
    	$show_login		= 1;
        	$template		= "themes/$user_theme/templates/main_1.htm";
         	$inner_template1 	= "themes/$user_theme/templates/inner_signup_form.htm";
    
         	$TBS			= new clsTinyButStrong;
         	$TBS->NoErr = true;
         	$TBS->LoadTemplate("$template");
         	$TBS->Render = TBS_OUTPUT;
         	$TBS->Show();
    
         	@mysql_close();
         	die();
    }
    
    // GET LOGIN INFORMATION AND CHECK AGAINST DATABASE
    
    $user_name_login	= mysql_real_escape_string($_POST['user_name_login']);
    $password_login	= mysql_real_escape_string($_POST['password_login']);
    $password_login	= md5($password_login);
    $remember_me	= mysql_real_escape_string($_POST['remember_me']);
    $cookie_time 	= mysql_real_escape_string($_POST['cookie_time']);
    $referer_url	= mysql_real_escape_string($_POST['referer_url']);
    
    $config_redirect	= 'yes';
    
    if ($cookie_time == '-1' ) $cookie_time = 43200;
    
    // case insensitive login and registration
    $user_name_login			= strtolower($user_name_login);
    $sql 					= "SELECT user_name, password FROM member_profile WHERE user_name = '$user_name_login' AND password = '$password_login'";
    $query				= @mysql_query($sql);
    $result				= @mysql_fetch_array($query);
    $result_display_username	= $result['user_name'];
    $result_username			= strtolower($result['user_name']);
    
    if ( $result_username == $user_name_login ) {
    
    	//success login - checkinng if user has confirmed email
    
        	$sql			= "SELECT user_name, user_id, password, passwordSalt, account_status FROM member_profile WHERE user_name = '$user_name_login' AND password = '$password_login'";
        	$query		= @mysql_query($sql);
        	$outcome		= @mysql_fetch_array($query);
        	$result		= $outcome['account_status'];
    
        	if ( $result == 'new' ) {
    
        		//email not confirmed
        		$notification_type	= $config['notification_error'];
            	$message			= $config['email_not_confirmed'];
            	$blk_notification 	= 1;
    
            	$template			= "themes/$user_theme/templates/main_1.htm";
            	$inner_template1 		= "themes/$user_theme/templates/inner_notification.htm";
            	$TBS 				= new clsTinyButStrong;
            	$TBS->NoErr 		= true;
            	$TBS->LoadTemplate("$template");
            	$TBS->Render 		= TBS_OUTPUT;
            	$TBS->Show();
    
            	@mysql_close();
            	die();
        	}
    
        	elseif( $result == 'suspended' ) {
    
          	//account suspended
          	$notification_type	= $config['notification_error'];
            	$error_message 		= $config['account_suspended'];
            	$blk_notification 	= 1;
            	$template 			= "themes/$user_theme/templates/main_1.htm";
            	$inner_template1		= "themes/$user_theme/templates/inner_notification.htm";
            	$TBS 				= new clsTinyButStrong;
            	$TBS->NoErr 		= true;
            	$TBS->LoadTemplate("$template");
            	$TBS->Render 		= TBS_OUTPUT;
            	$TBS->Show();
    
    		@mysql_close();
            	die();
        	}
    
        	elseif( $result == 'active' ) {
    
        		@session_start();
            	@session_register('user_id');
            	@session_register('user_name');
            	@session_register('user_group');
            	$_SESSION['user_id']		= $outcome['user_id'];
            	$_SESSION['user_name']		= $result_display_username;
            	$_SESSION['user_group']		= $outcome['user_group'];
            	$password				= $outcome['password'];
            	$passwordSalt			= $outcome['passwordSalt'];
            	$loggedin				= 1;
    
            	// remember me
            	if ( $remember_me == 'remember_me' ) {
    
            		$how_long		= (60 * $cookie_time);
            		$cookie_pass	= sha1( sha1($password) . sha1($passwordSalt) );
            		setcookie('user', $result_display_username, time()+$how_long);
            		setcookie('pass', $cookie_pass, time()+$how_long);
            	}
    
            	header("Location: index.php");
    
            	/*
            	if ( $referer_url == '' ) $referer_url = "index.php";
            	if ($config_redirect == 'yes') {
            		header("Location: $referer_url");		//redirect to last page
            	} else {
            		header("Location: " . "index.php");	//redirect to Myaccount page
            	}
            	*/
    
            }
    
    } else {
    
    	//display form with error message
        	$error_message	= $config['incorrect_logins'];
        	$message_type	= $lang_error;
        	$blk_notification = 1;
        	$show_login		= 1;
    
        	$template 		= "themes/$user_theme/templates/main_1.htm";
        	$inner_template1 	= "themes/$user_theme/templates/inner_signup_form.htm";
    
        	$TBS 			= new clsTinyButStrong;
        	$TBS->NoErr 	= true;
        	$TBS->LoadTemplate("$template");
        	$TBS->Render 	= TBS_OUTPUT;
        	$TBS->Show();
    
        	@mysql_close();
        	die();
    }
    
    
    ?>
    

    Thanks

  4. This code;

    gb_page_center
    

    creates a pop-up to show another page, as hsow in the attched image. As you can see by the horizontal scrolling blue bar (at the bottom of the pop-up (greybox)), and the vertical scrolling blue bar (on the right side of the pop-up box), the video player can be centered by using those scroll bars manually. However, I'd like just the video player to be in the center of the pop-up box, without the blue scroll bars being there at all, when the box pops-up.

    Presently the line of code is:

    <a href="videos/[blk1.vid_id;block=div]/" rel="gb_page_center[470,370]" style="float:right"><br />
    

    How can I put the player in the box, and without the scroll bars?
    Any suggestions/help/remedy will be appreciated.

     

     

    post-20454-0-79531800-1374192959_thumb.jpg

  5. This Form works on another page on the site. But I'd like a log-in form also on the home page.

    A. I'd like to add this as the submit button:
     

    1.src="images/login.png"
    

    B. And I'd like to remove the options. (But when I remove the "select area" the form won't work).

    Can you help me modify this working form with my above A. & B. requests?

    ]<form action="login.php" method="post" accept-charset="UTF-8" class="middletext">
    <p>
    <style type="text/css">
    .form_label {
    font-size: 100%;
    color: #000000;
    }
    #user_name_login {
    width: 70px;
    }
    #password_login {
    width: 40px;
    }
    </style>
     <label for="user_name_login" class="form_label">     Username </label>
    <input type="text" name="user_name_login" id="user_name_login" size="10" />
    1<label for="password_login" class="form_label">     Password </label>
    <input type="password" name="password_login" size="10" />
    
    <select name="cookie_time"  class="login-field">
                   <option value="1440">[var.lang_1_day]</option>
                  <option value="10080">[var.lang_1_week]</option>
                    <option value="43200">[var.lang_1_month]</option>
                    <option value="-1" selected="selected">[var.lang_forever]</option>
                  </select>
    <input type="submit" value="[var.lang_login_now]" class="button-form" />
    <input type="hidden" name="submitted" value="yes" />
    <input type="hidden" name="remember_me" value="remember_me" />
    <input type="hidden" name="referer_url" value="[var.referer]">
    </p>
    </form>
    


     

  6. I'm using a php script. I received help modding version 1 of the script, which added this single line to the session file:

    $member_credits = get_member_credits($user_id);
    

    As seen here in this version 1 sessions file:

    <?php
    validate_user($_COOKIE['user']);
    
    // set user vars for passing around each php page
    $user_id	= $_SESSION['user_id'];
    $user_name	= $_SESSION['user_name'];
    $user_group = $_SESSION['user_group'];
    
    //get some basic user things like email for logged in members
    if ( $user_id != '' ) {
    
    	$loggedin 			= 1;
    	$login_out 			= $config['logout_text'];
    	$login_out_link 		= 'logout.php';
    	$register_menu 		= $config['fav_menu'];
    	$register_menu_link	= 'myfavorites.php';
    	require_once('functions.inc.php');
    	$member_credits = get_member_credits($user_id);
    	//email inbox
    	$sql			= "SELECT indexer FROM messages WHERE to_id = '$user_id' AND email_read = 'no'";
    	$number_of_emails = @mysql_num_rows(mysql_query($sql));
    	$show_email_count = 1;
    
    	if ( $number_of_emails == '' ) $number_of_emails = 0;
    
    	//Friend Invites
    	$sql = "SELECT * FROM friends WHERE friends_id = '$user_id' AND invitation_status ='pending'";
    	$number_of_invites = @mysql_num_rows(mysql_query($sql));
    	$show_invites_count = 1;
    
    	//show My favs link
    	$show_my_favs 	= 1;
    
    	//show My account link
    	$show_my_account 	= 1;
    
    	//do not show signup link
    	$show_register 	= '';
    
    } else {
    
    	$show_register 	= 1;
    }
    
    ?>
    

    Version 2, which I've upgraded to, has a new session file. Can you please tell me where the appropriate place to add this line:

    $member_credits = get_member_credits($user_id);
    

    intto this new version 2 session file, please?

    ?php
    validate_user($_COOKIE['user']);
    
    // set user vars for passing around each php page
    $user_id	= $_SESSION['user_id'];
    $user_name	= $_SESSION['user_name'];
    $user_group = $_SESSION['user_group'];
    
    $sql		= "SELECT user_id, user_name, account_status FROM member_profile WHERE user_id = '$user_id'";
    $query 		= @mysql_query($sql);
    $outcome		= @mysql_fetch_array($query);
    $result		= $outcome['account_status'];
    $result_user	= $outcome['user_name'];
    
    if ($result_user == '') {
    
    	$user_id				= '';
    	$user_name				= '';
    	$_SESSION['user_id'] 		= NULL;
    	$_SESSION['user_name'] 		= NULL;
    	$_SESSION['user_group'] 	= NULL;
    	$_SESSION['admin_logged']	= NULL;
    
    	@session_start();
    	@session_destroy();
    
    	foreach ( $_COOKIE as $key => $value ) {
         		$logout = '';
        		setcookie($key, $logout);
        	}
        	foreach ($_SESSION as $key => $value) {
       		$_SESSION[$key] 	= NULL;
    		unset($_SESSION[$key]);
    	}
    
    }
    
    if ( $result == 'suspended' ) {
    
    	$user_id				= '';
    	$user_name				= '';
    	$_SESSION['user_id'] 		= NULL;
    	$_SESSION['user_name'] 		= NULL;
    	$_SESSION['user_group'] 	= NULL;
    	$_SESSION['admin_logged']	= NULL;
    
    	@session_start();
    	@session_destroy();
    
    	foreach ( $_COOKIE as $key => $value ) {
         		$logout = '';
        		setcookie($key, $logout);
        	}
        	foreach ($_SESSION as $key => $value) {
       		$_SESSION[$key] 	= NULL;
    		unset($_SESSION[$key]);
    	}
    
    	//account suspended
          $notification_type	= $config['notification_error'];
          $error_message 		= $config['account_suspended'];
          $blk_notification 	= 1;
          $template 			= "themes/$user_theme/templates/main_1.htm";
          $inner_template1		= "themes/$user_theme/templates/inner_notification.htm";
          $TBS 				= new clsTinyButStrong;
          $TBS->NoErr 		= true;
          $TBS->LoadTemplate("$template");
          $TBS->Render 		= TBS_OUTPUT;
          $TBS->Show();
    
    	@mysql_close();
          die();
    }
    
    
    //get some basic user things like email for logged in members
    if ( $user_id != '' ) {
    
    	if ( defined('SMF_INSTALLED') ) {
    		$loggedin 			= 1;
    		$login_out 			= $config['logout_text'];
    		$login_out_link 		= 'logout.php';
    		$register_menu		= $config['fav_menu'];
    	} else {
    		$loggedin 			= 1;
    		$login_out 			= $config['logout_text'];
    		$login_out_link 		= 'logout.php';
    		$register_menu		= $config['fav_menu'];
    	}
    
    	//email inbox
    	$sql				= "SELECT indexer FROM messages WHERE to_id = '$user_id' AND email_read = 'no'";
    	$number_of_emails 	= @mysql_num_rows(mysql_query($sql));
    	$show_email_count 	= 1;
    
    	//Friend Invites
    	$sql 				= "SELECT * FROM friends WHERE friends_id = '$user_id' AND invitation_status ='pending'";
    	$number_of_invites	= @mysql_num_rows(mysql_query($sql));
    	$show_invites_count 	= 1;
    
    	//show My favs link
    	$show_my_favs 		= 1;
    
    	//show My account link
    	$show_my_account 		= 1;
    
    	//do not show signup link
    	$show_register 		= '';
    
    } else {
    
    	$show_register 		= 1;
    }
    
    ?>
    

    Any help will be greatly appreciated.

  7. I'm looking for a little js guidance with this:
    http://www.videojs.com/docs/setup/

    This code I'm currently using plays the video.js player in IOS, IE10 & Chrome, but not IE8 and FF

     

       <script _V_.options.flash.swf = "http://theurl.com/video-js/video.js.swf"
    </script>
    <script videojs.options.flash.swf = "http://theurl.com/video-js/video.js.swf"
    </script>
    <video id="_1200k.mp4" class="video-js vjs-default-skin"
          controls preload="none" width="640" height="264"
          poster="[var.base_url]/[var.thumb_file]"
          data-setup='{"example_option":true}'>
          <source src="http://theurl.com/uploads/Yr7fGNOH0ell3Ml_1200k.mp4" type='video/mp4' />
    </video>

    I'd like help getting it to work in IE8 and FF. Any help will be greatly appreciated.

  8. I replaced a working file, with the same file from another working web site, but the new file generates a HTTP 500 internal server error page.

     

    The only difference in the new page are these lines:

    ///////////////////////////////////////////////////
    $_SESSION['searched'] = $_GET['keyword'];
    $prch = $_GET['p'];
    if ($user_id == "") {
    $new_temp = "themes/$user_theme/search_results1.htm";
    }elseif ($prch == "1") {
    $new_temp = "themes/$user_theme/search_results2.htm";
    }else{
    $new_temp = "themes/$user_theme/search_results.htm";
    }
    

    I'm hoping to learn the reason why these lines might be creating this error.

    Thanks

  9. I'm creating a mobile version of a web site that's using the phpMotion script.
    In the desktop version when Registration link is selected it executes the code in join.php
    and displays inner_signup_form.htm, where visitors register.

    What's the easiest solution when visitors visit the web site, via a mobile device?
    I'm creating a mobile version of the website in a subdomain.
    I'm using GitHub code to redirect mobile users to the subdomain (Mobile Detect PHP).
    Can you suggest some code that I can add to join.php (not in the subdomain) that will
    say: If Mobile Then Go To The Mobile Page Version of inner_signup_form.htm?

     

  10. Has anyone tried PhpMobilizer?

    To show my website on my iPhone, I downloaded the PhpMobilzer program and followed the instructions:

     

    "Create a subdomain called 'm' for your website.

    Upload the files in the m folder to the m subdomain.

    If you would like to automaticaly redirect users to the mobile site if they are accessing it with their phone, add the following to a main include file or your index.php file on your main site.
    require_once('/home/path/to/subdomain/m/mobilize.php');  "

     

    And now my site appears less jumbled than before. So, it is definitely readable on a mobile device now.

    However, there is alot not there, like quite a few background colors, containers and images.

     

    Can you tell me if there is a way to add some modifications, like adding back in some images, and tweaking a few things that have wrapped?

    (I can't find any forum for support of the PhpMobilizer).

     

    Thanks.

     

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.