Jump to content

Chrisj

Members
  • Posts

    551
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Chrisj

  1. With some great forum help my nav menu shows nav options in the main menu, and when the user logs-in, it lines up additional menu choices all on a horizontal line. The issue I'd like to fix is to make the "log-in" menu choice disappear when the user is logged-in. If you can overlook all the font tags, in the code below, I'd greatly appreciate any help. <!--Begin Sub-Navigation. This only appears when a user is logged in.--> <div class="sub-nav"> <img src="themes/default/images/arrow-red.gif"> <a href="members/[var.user_name]"><font color="#333333" face="verdana">my account</font></a> <img src="themes/default/images/arrow-red.gif"> <a href="credits.php"><font color="#333333" face="verdana">[var.lang_my_credits]: [var.member_credits]</font></a> <img src="themes/default/images/arrow-red.gif"> <a href="logout.php"><font color="#000000" face="verdana">log out</font></a> <!--[onload;block=div;when [var.loggedin]=1;comm]--> </div> <!--Begin Sub-Navigation. This only appears when a user is logged in.--> <div class="sub-nav1"> <p class="account"> <span id="welc"><span style="color:#333333; font-size: 12px; font-face=verdana;"> Welcome! You Are Now Logged In.</span></p> <!--[onload;block=div;when [var.loggedin]=1;comm]--> </div> <div class="menu1"> <a href="[var.base_url]"> <font color="#333333" font face="verdana">home</font></a> <a href="page.php?page=16"><font color="#333333" face="verdana">faq</font></a> <a href="[var.base_url]/join.php"><font color="#333333" face="verdana">register</font></a> <a href="[var.login_out_link]"><font color="#333333" face="verdana">log in</font></a> <a href="page.php?page=9"><font color="#333333" face="verdana">search</font></a> <a href="page.php?page=6"><font color="#333333" face="verdana">upload</font></a> </div> .menu1 { font-size: 11px; font-family: verdana; text-align: right; float: right; color: #333333; margin: 0px 5px 0px 0px; padding: 0px 0px 0px 0px; } .sub-nav { font-size: 11px; font-family: verdana; text-align: right; color: #333333; margin: 0px 22px 0px 0px; padding: 0px 0px 0px 0px; } .sub-nav-links { color: #; font-size: 14px; margin: 0px 0px -20px 0px; } .sub-nav1 { font-size: 11px; font-family: verdana; text-align: right; float: left; color: #333333; margin: 0px 22px 0px 0px; padding: 0px 0px 0px 0px; } .sub-nav {float:right} .sub-nav1 p { margin:0 font-size: 11px; font-family: verdana; color: #333333; } #welc{ float left; } .account font-size: 11px; font-family: arial; color: #333333; }
  2. Thanks, but none of those affected the color of the text. Any other help/suggestions would be appreciated.
  3. This is the php file code to a video jukebox add-on script, for a popular web video script. I'd like to modify it so the "Click Here" text font and color can be changed. Can you help or suggest what I can do to accomplish this? Thanks <?php include("../classes/config.php");?> <artworkinfo> <? $query = "select * from videos where viewtime<>'0000-00-00 00:00:00' and public_private='public' AND approved ='yes' AND promoted ='yes' limit 10"; // Max 10!"; $db=mysql_connect ($dbhost,$dbusername,$dbpassword) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ($dbname); $num_rows = mysql_num_rows(mysql_query("select * from videos WHERE public_private = 'public' AND promoted = 'yes' AND approved ='yes'")); $result = mysql_query($query) or die ('Query Error: ' . mysql_error()); while ($results = mysql_fetch_array($result)) { ?> <albuminfo> <artLocation>../uploading/thumbs/<?=$results['video_id']; ?>.jpg</artLocation> <artist>Click Here!!</artist> <albumName><?=$results['title']; ?></albumName> <artistLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</artistLink> <albumLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</albumLink> </albuminfo> <? } mysql_close(); ?> </artworkinfo>
  4. I'm using this web script that works successfully. It has a section where I can add a text box to appear upon a web user log-in. Instead, what I'd like to do is make the log-in box (form) disappear as soon as the user logs-in. Can you tell where(how) I can change this code to accomplish that? Thanks for any help. <br/> <form action="login.php" method="post" accept-charset="UTF-8" class="middletext"> <label><font class="font4_15">Username</font></label><span class="username"><input type="text" name="user_name_login" size="9" style="width:70px;" /> <label><font class="font4_15">Password</font></label><span class="password"><input type="password" name="password_login" size="9" style="width:70px;" /> <input type="submit" value="[var.lang_login_now]" class="btn_vid1" /></a><!--<a href="login.php"></a>--> <input type="hidden" name="submitted" value="yes" /> <input type="hidden" name="remember_me" value="remember_me" /> </form> </td></tr></table> <!--Begin Text Box--> <!--<div id="txt-box">--> <table id="tabX44"> <tbody> <tr><td> <!--<div class="header-narrow">Text Box</div>--> <div class="txt-narrow"> </div> <!--<div class="container-narrow-bottom"></div>--> <!--[onload_337;block=div;when [var.show_login_box]!=1;comm]--> </td></tr> </tbody> </table> <!--</div>--> <!--End Text Box-->
  5. Thanks for those replies. Live host testing would be preferable because I need to know the changes work with the script. Such as making changes to the search functioning. As I've named the files in my first post, would you be interested in giving me an example of what I would add to the .htaccess file? Thanks again
  6. I'm using a popular PHP script for my web site, which uses main_1.htm for the header and footer, and inner_index.htm for the main part of the home page. Also, of course it has index.php. How can I set up a duplicates of these files to work on and test changes to the home page, before I actually deploy the changes on to my live site's home page? Thanks
  7. That was it. Thanks much....
  8. In my registration page the Company name field is required, how do I un-require it? Here is the code. thanks <?php error_reporting (0); include_once ('classes/config.php'); include_once ('includes/reserved_names.php'); // define access for loading non display php files define('access',true); $ahah = 1; $show_register = ''; $load_ajax = ''; $form_submitted = ''; $action = ''; $new_user_name = ''; $account_type = ''; $first_name = ''; $last_name = ''; $Company = ''; $Address_1 = ''; $Address_2 = ''; $City = ''; $State = ''; $email_address = ''; $email_address2 = ''; $user_name = ''; $password = ''; $confirm_password = ''; $country_list = ''; $dob_month = ''; $dob_day = ''; $dob_year = ''; $zip_code = ''; $birthday = ''; $error_message = ''; $checked = ''; $show_register = 1; $load_ajax = 1; $procede = true; $action = mysql_real_escape_string( $_GET['action'] ); $new_user_name = mysql_real_escape_string( $_GET['new_user_name'] ); $site_name = mysql_real_escape_string($config['site_name']); $form_submitted = mysql_real_escape_string( $_POST['form_submitted'] ); if ( $action == 'check_user' ) { $new_user_name = trim(strtolower($new_user_name)); if ( $new_user_name == '' ) { echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['fill_all_fields']."</b></font>"; die(); } if ( strlen($new_user_name) < 4 ) { echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['username_4_chars']."</b></font>"; die(); } // check against reserved names e.g. -> admin etc... or adult words ban if ( in_array( $new_user_name, $reserved_names ) ) { echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['username_not_allowed'] .""; die(); } $sql = "SELECT user_name FROM member_profile WHERE user_name = '$new_user_name'"; $query = @mysql_query($sql); $count = @mysql_num_rows($query); if ( $count > 0 ) { echo "<font size=\"2\"><b>$new_user_name</b></font><font color=\"#EE0000\" size=\"2\"> <b>=> $lang_not_available</b></font>"; } else { echo "<font size=\"2\"><b>$new_user_name</b></font><font color=\"#00DD00\" size=\"2\"> <b>=> $lang_available </b></font>"; } @mysql_free_result($result); @mysql_close(); die(); } if ( $action == 'show_country' ) { $country_fields_all = ''; $show_fields = ''; $country_list = file('includes/country.list'); foreach ( $country_list as $country_select ) { $country_fields_all = $country_fields_all . $country_select; } $show_fields = '<div style="margin-left:30px; float:left;"><b>'.$lang_country.':</b></div>'; $show_fields .= '<div style="margin-left:95px; float:left;" id="country_list">'; $show_fields .= '<select class="FormSpecialInput_1" id="country_list" name="country_list" style="font-size: 9pt; width:128px; height:20px; font-weight:bold; color:#444444; letter-spacing: 1; border: 1px solid #DFDCDC; background-color: #FDFDFD">'; $show_fields .= $country_fields_all; $show_fields .= '</select></div>'; echo $show_fields; die(); } if ( $procede == true ) { $account_type = 'Standard'; $first_name = trim(mysql_real_escape_string( $_POST['first_name'] )); $last_name = trim(mysql_real_escape_string( $_POST['last_name'] )); $Company = trim(mysql_real_escape_string( $_POST['Company'] )); $Address_1 = trim(mysql_real_escape_string( $_POST['Address_1'] )); $Address_2 = trim(mysql_real_escape_string( $_POST['Address_2'] )); $City = trim(mysql_real_escape_string( $_POST['City'] )); $State = trim(mysql_real_escape_string( $_POST['State'] )); $email_address = trim(mysql_real_escape_string( $_POST['email_address'] )); $email_address2 = trim(mysql_real_escape_string( $_POST['email_address2'] )); $user_name = trim(mysql_real_escape_string( $_POST['user_name'] )); $password = trim(mysql_real_escape_string( $_POST['password'] )); $confirm_password = trim(mysql_real_escape_string( $_POST['confirm_password'] )); $country_list = trim(mysql_real_escape_string( $_POST['country_list'] )); $dob_month = (int) mysql_real_escape_string( $_POST['dob_month'] ); $dob_day = (int) mysql_real_escape_string( $_POST['dob_day'] ); $dob_year = (int) mysql_real_escape_string( $_POST['dob_year'] ); $zip_code = (int) mysql_real_escape_string( $_POST['zip_code'] ); if ( $_POST['terms'] == 'yes' ) { $checked = 'checked=\"checked\"'; $procede = true; } else { $procede = false; $error_message = $config['agree_to_terms']; } // dDB birthday must be this format =>2008-09-17 $birthday = $dob_year .'-'. $dob_month .'-'. $dob_day; foreach ($_POST as $key => $value) { if (!isset($value) || ($value == '')) { $display_key = @str_replace('_', ' ', $key); if ( $display_key == 'zip code' && $value == '' ) { $value = 'none'; } else if ($key != 'Address_2') { $error_message = $error_message . ' - ' . $display_key . ' '.$lang_required.' '; $procede = false; } } else { if ( $key == 'email_address2' ) $key = 'email_address'; if ( $key !== 'email_address' && (!eregi("^[ _a-zA-Z0-9-].*$", $value)) ) { $display_key = @str_replace('_', ' ', $key); $error_message = $error_message . ' - ' . $display_key . ' '.$config['invalid_email_text'].' '; $procede = false; } if ( $key == 'email_address' && !eregi("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-z]{2,3})$", $value) ) { $display_key = @str_replace('_', ' ', $key); $error_message = $error_message . ' - ' . $display_key . ' '.$config['invalid_email_format'].' '; $procede = false; } if ( $key == 'user_name' ) { // check against reserved names e.g. -> admin etc... or adult words ban if ( in_array( $user_name, $reserved_names ) ) { $display_key = @str_replace('_', ' ', $key); $error_message = $error_message . ' ' .$config['username_not_allowed'] . ' !'; $procede = false; } } } } } // checking if emails match if ( $procede == true ) { if ( $email_address !== $email_address2 ) { $error_message = ' '.$config['emails_do_not_match']; $procede = false; } } // checking if passwords match if ( $procede == true ) { if ($confirm_password !== $password) { $error_message = ' '.$config['password_do_not_match']; $procede = false; } } // checking if username and email is unique if ( $procede == true ) { $sql = "SELECT user_name, email_address FROM member_profile"; $query = @mysql_query($sql); while ($result = (@mysql_fetch_array($query))) { if ( !empty($result['user_name']) || !empty($result['email_address']) ) { // case insensitive login and registration $reg_user_name = strtolower($user_name); $db_user_name = strtolower($result['user_name']); if ($db_user_name == $reg_user_name) { $error_message = ' '.$config['username_is taken']; $procede = false; } if ( $result['email_address'] == $email_address ) { $error_message = $error_message . ' -'.$config['email_already_exists']; $procede = false; } } } } // if any errors display error message => [var.message_type] - [var.error_message] if ($procede == false && $form_submitted == "yes") { $message_type = $lang_error; $blk_notification = 1; $show_signup = 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(); } // START => load page with form if ( !isset($form_submitted) || ($form_submitted == '') ) { $show_signup = 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(); die(); } // if no errors register user and load welcome page if ($procede == true) { $random_code = randomcode(); $password_email = $password; $password = md5($password); $passwordSalt = substr(md5(rand()), 0, 4); if ( $zip_code > '' ) { $country_list = 'USA'; } // insert new user record $sql = "INSERT into member_profile (email_address, user_name, password, passwordSalt, first_name, last_name, Company, Address_1, Address_2, City, State, zip_code, country, birthday, account_status, account_type, date_created, random_code) VALUES ('$email_address', '$user_name', '$password', '$passwordSalt', '$first_name', '$last_name', '$Company', '$Address_1', '$Address_2', '$City', '$State', '$zip_code', '$country_list', '$birthday', 'new', 'standard', NOW(), '$random_code')"; @mysql_query($sql) or die($config['error_26']);//error // get new user_id $sql = "SELECT user_id, email_address, random_code FROM member_profile WHERE random_code = '$random_code' AND email_address = '$email_address'"; $query = @mysql_query($sql); while ($result = @mysql_fetch_array($query)) { $user_id = $result['user_id']; } // set new user default privacy settings $sql = "INSERT INTO privacy (videocomments, profilecomments, privatemessage, friendsinvite, newsletter, user_id, publicfavorites, publicplaylists) VALUES ('yes', 'yes', 'yes', 'yes', 'yes', '$user_id', 'yes', 'yes')"; $query = @mysql_query($sql); // Credits Mod by DD // Update new user with default credits $sql01 = "SELECT start FROM credit_config LIMIT 1"; $query1 = @mysql_query($sql01); while ($result = @mysql_fetch_array($query1)) { $startcredit = $result['start']; } $sql2 = "INSERT INTO credits (user_id, total_credits, pending_credits, last_purchase, total_purchases, name) VALUES ('$user_id', '$startcredit', '0', NOW(), '0', '$user_name')"; $query2 = @mysql_query($sql2) or DIE(mysql_error()); $sql02 = "INSERT INTO purchases (id, type, user_id, vid_id, date, name, uploader, uploaderID, title, amount, videoid, descr, promo) VALUES ('', 'adjustment', $user_id, 0, NOW(), '$user_name', 'none', 'none', 'none', '$startcredit', 'none', 'none', 'none')"; $query02 = mysql_query($sql02) or die(mysql_error()); // END CREDITS MOD @mysql_close(); // send email $email_template = 'email_templates/newmember.htm'; $subject = $config['email_welcome']; $to = $email_address; $from = $config['notifications_from_email']; //send email template to TBS for rendering of variable inside $template = $email_template; $TBS = new clsTinyButStrong; $TBS->NoErr = true; $TBS->LoadTemplate("$template"); $TBS->tbs_show(TBS_NOTHING); $message = $TBS->Source; //load postage.php define('access',true); include ('includes/postage.php'); // show success $notification_type = $config['notification_success']; $message = $config['registration_success']; $blk_notification = 0; $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(); } ?>$TBS->Source; //load postage.php define('access',true); include ('includes/postage.php'); // show success $notification_type = $config['notification_success']; $message = $config['registration_success']; $blk_notification = 0; $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(); } ?>
  9. I have been replacing my web's square boxes with round-cornered boxes using this CSS: .t {background: url(images/dot_B76E62.gif) 0 0 repeat-x; width: 53em} .l {background: url(images/dot_B76E62.gif) 0 0 repeat-y; height: 15em} .r {background: url(images/dot_B76E62.gif) 100% 0 repeat-y; height: 15em} .b {background: url(images/dot_B76E62.gif) 0 100% repeat-x;} .bl {background: url(images/box_bottom_left.gif) 0 100% no-repeat;border:none;height: 15em} .br {background: url(images/box_bottom_right.gif) 100% 100% no-repeat;height: 15em} .tl {background: url(images/box_top_left.gif) 0 0 no-repeat;height: 15em} .tr {background: url(images/box_top_right.gif) 100% 0 no-repeat;padding:10px;height: 15em} And it works fine, along with this html: <div class="t"><div class="b"><div class="l"><div class="r"><div class="b"><div class="br"><div class="tl"><div class="tr"> </div></div></div></div></div></div></div></div> I tried replacing this content-list box, css (below), with the above css, but it didn't work correctly, can you assist me? /*--Content List Container--*/ #content-list { width: 640px; display: inline-block; list-style-type: none; border: 6px solid #960000; margin-bottom: 5px; float: left; } #content-list li { list-style-type: none; } .content-list-narrow { width: 256px; padding: 5px 4px; } #content-list-narrow li { margin: 5px 0px; } #content-list a:link { color: #000000; text-decoration: none; } #content-list a:visited { color: #5798ca; text-decoration: none; } #content-list a:hover { color: #a9ceea; } .content-list-thumb { width: 102px;
  10. On a web site I'm using, the php credit script succeeds when, upon a return from paypal, purchased credits are added to the users account. However, the return location is a success page that has a "click here to return to the home page" link. If a user stays on that success page and refreshes the page, the amount of credits purchased keeps adding that amount to the users account, upon every refresh (without paying for those extras credits). Rather than find someone to modify the script, I thought one solution might be to add something so that the page never appears and somehow the "click here to return to the home page" link automatically re-directs the successful purchaser to the home page, so he doesn't have the chance to refresh the success page. Is this a sound solution? Can you suggest what might be nedded to accomplish this? Or suggest a better solution?
  11. I'm trying to figure out why, when I do a test purchase on my web site, that the purchase completes at Paypal, but the purchase info is not being sent back to the site. It worked successfully, but for some reason now it is not. Any thoughts/suggestions would be apprecaited.
  12. I'm using a php script for a video web site. After a search, a thumbnail appears with a description next to it. I've added to move the description to the right of the thumbnail image, but it only moves the first line of text, the next line, in the description, is flush up against the thumbnail image again. I'm looking for a solution where all of the description lines have a margin a space between themselves and the thumbnail image. I believe this line of code is where the description is generated/displayed from: [blk1.vid_desc;htmlconv=no;block=div;ope=max:268;comm] Any suggestions? Thanks. Here's the whole file: <!--Begin Wide Column--> <div id="column-wide" style="margin: 0px auto; float: none;"> <div id="generic-container" > <div style="margin-left:12px; float:left;"> <!--<img src="themes/[var.user_theme]/images/icons/members_32.png" alt="members" width="32" height="32" align="absmiddle" /> <strong>Videos: [var.members_total;comm]</strong>--> </div> <br /> <div id="members-search"> <br/><br/> <center><div class="container8"> <p> <center><font face="verdana"><font size="2";font color=#000000;">Please find your search results below for your search word(s) "<font face="verdana"><font size="2";font color=#800000;">[var.keyword]</font>" .<br/> <font face="verdana"><font size="2";font color=#800000;">To view, simply select the video thumbnail image.</font><br/> <font face="verdana"><font size="2";font color=#000000;">To search again, simply select the word "search" in the navigation menu above.</center></font> </p> </div></center> <br/> <div id="content-list" style="float:none;width:590px;text-align:center"> <br/> <table style="border:none"> <tr> <td width="10px"><a href="videos/[blk1.vid_id;block=div]/" rel="gb_page_center[600, 440]" style="float:right"><img src="uploads/thumbs/[blk1.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></td> <td width="400px"><span style="color: #000000;"><!--[var.lang_title]--></span> <a href="videos/[blk1.vid_id;block=div]/" rel="gb_page_center[600, 440] "><!--[blk1.Title;htmlconv=no;block=div;ope=max:70;comm]--></a><br /><!--[var.lang_description]:--> [blk1.vid_desc;htmlconv=no;block=div;ope=max:268;comm]</td> </tr> </table> <br/> </div> </div> <!--End Wide Column-->
  13. I'm using a php video script where you can select a thumbnail image and the corresponding video plays in a pop-up box. I've added a php JukeBox script for videos, where thumbnails are displayed and the corresponding video plays on another page (instead of in a pop-up box) which works successfully. However, I'm trying to integrate the existing pop-up box code into the jukebox php page, to see if I can get the jukebox video to play in the pop-up box. The jukebox php page code is at the bottom of this posting. I'm trying to integrate the pop-up box line of code into the jukebox line of code. Pop-up box line of code: <a href="videos/[blk1.vid_id;block=div]/" rel="gb_page_center[600, 440] "> Jukebox line of code: <artistLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</artistLink>Can you help me? Here is the entire jukebox.php page: <?php include("../classes/config.php");?> <artworkinfo> <? $query = "select * from videos where viewtime<>'0000-00-00 00:00:00' and public_private='public' AND approved ='yes' AND promoted ='yes' limit 10"; // Max 10!"; $db=mysql_connect ($dbhost,$dbusername,$dbpassword) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ($dbname); $num_rows = mysql_num_rows(mysql_query("select * from videos WHERE public_private = 'public' AND promoted = 'yes' AND approved ='yes'")); $result = mysql_query($query) or die ('Query Error: ' . mysql_error()); while ($results = mysql_fetch_array($result)) { ?> <albuminfo> <artLocation>../uploads/play_thumbs/<?=$results['video_id']; ?>.jpg</artLocation> <font color="#000000"><artist> CLICK HERE !!</artist></font> <albumName><?=$results['title']; ?></albumName> <artistLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</artistLink> <albumLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</albumLink> </albuminfo> <? } mysql_close(); ?> </artworkinfo>
  14. I'm using a php JukeBox script for videos, where a user selects "Click Here", below a displayed thumbnail image, and the corresponding video plays on another page. I'm trying to substitute videoBox script which will pop-up the thumbnail's corresponding video, and play it in the pop-up box, rather than on another page(play.php) Here is the current jukebox.php page: <?php include("../classes/config.php");?> <artworkinfo> <? $query = "select * from videos where viewtime<>'0000-00-00 00:00:00' and public_private='public' AND approved ='yes' AND promoted ='yes' limit 10"; // Max 10!"; $db=mysql_connect ($dbhost,$dbusername,$dbpassword) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ($dbname); $num_rows = mysql_num_rows(mysql_query("select * from videos WHERE public_private = 'public' AND promoted = 'yes' AND approved ='yes'")); $result = mysql_query($query) or die ('Query Error: ' . mysql_error()); while ($results = mysql_fetch_array($result)) { ?> <albuminfo> <artLocation>../uploads/play_thumbs/<?=$results['video_id']; ?>.jpg</artLocation> <font color="#000000"><artist> [b]CLICK HERE !!</[/b]artist></font> <albumName><?=$results['title']; ?></albumName> <artistLink>../[b]play.php[/b]?vid=<?=$results['indexer']; ?>&src=jukebox</artistLink> <albumLink>../[b]play.php[/b]?vid=<?=$results['indexer']; ?>&src=jukebox</albumLink> </albuminfo> <? } mysql_close(); ?> </artworkinfo> Here are VideoBox lines of code that they instruct me to paste onto the page. I've added these lines to the Jukebox display page: <script type="text/javascript" src="js/mootools.js"></script> <script type="text/javascript" src="js/swfobject.js"></script> <script type="text/javascript" src="js/videobox.js"></script>And you must include the css file(for the styles). <link rel="stylesheet" href="css/videobox.css" type="text/css" media="screen" />And, here is the thing: <a href="http://www.youtube.com/watch?v=uhi5x7XCCRTE" rel="vidbox" title="caption">our video</a> Can you give me an idea/suggestion of how I can change the code to link the videobox with the jukebox so that a video will play in the videobox instead of playing at play.php? Currently, the jukebox plays videos from my database, not from youtube. This is waht I'd like videobox to do. Thanks.
  15. Can you recommend a flash video jukebox type of php script(s) that will show a number of video thumbnails on a web page, that can be paged-thru for selection, and then clicked to play? Is "jukebox" the correct search term? thanks
  16. I'm using an open source php script for my web site, where the main header, footer and index page are all centered vertically in the browser, with an inch and a half of white space on the left side and right side. How do I add color to the white space on each side?
  17. Is there a way to change www.website.com/newpage.php, so it will appear in a browser as only www.website.com/newpage ? Thanks
  18. I'm using an existing php script. In this script you need to add code to page.php in order to add a web page. But when you add a page, the browser shoes something like this, for example: http://www.webexample.com/page.php?page=12 I'd like to add a page that looks something like this instead: http://www.webexample.com/newpage Can you help me? Here is the existing code of page.php: <?php include_once ("classes/config.php"); include_once ('classes/menu.php'); include_once ('classes/sessions.php'); $page = $_GET['page']; //use this script to load various generic pages (e.g. about us, terms etc) switch ($page){ case 1: $which_page = 'generic_aboutus.htm'; break; case 2: $which_page = 'generic_contactus.htm'; break; case 3: $which_page = 'generic_terms.htm'; break; default: header( 'Location: index.php' ) ; break; } //START----------------------- $template = "templates/main.htm"; $inner_template1 = "templates/$which_page";//middle of page $TBS = new clsTinyButStrong; $TBS->NoErr = true;// no more error message displayed. $TBS->LoadTemplate("$template"); $TBS->MergeBlock('mp', $recent); $TBS->MergeBlock('blkfeatured', $result_featured); $TBS->Render = TBS_OUTPUT; $TBS->Show(); @mysql_close(); die(); ?>
  19. Thanks alot. That was very very helpful. It now works when I enter a company name such as: ABC Inc But when I enter: ABC Inc. (with a period) the script shows this error: Error - - Company Invalid character(s) I'm guessing it has to do with the set up in phpmyadmin? Any assistance would be appreciated.
  20. Thanks for your reply. That's probaly a good idea, but I have no idea how to do that. Any additional help will be appreciated.
  21. In the PHP script I'm using, I added the field: Company to the registration html page like so: <div> <div style="margin-left:30px; display:inline;float:left;"> <b>Company Name:</b> </div> <div style="margin-right:65px; display:inline;float:right;"> <input type="text" name="Company" size="26" value="[var.Company]" /> </div> </div> which resembles the other registration fields. Then I added the word Company, everywhere I thought it was needed on the php page (below) but when I look into the db table, after registering with a ABC Inc., for example, the db table shows only the word 'company" instead of showing ABC Inc. Can you help me figure out why? Or give me a suggestion? Thanks <?php error_reporting (0) include_once ('classes/config.php'); include_once ('includes/reserved_names.php'); // define access for loading non display php files define('access',true); $ahah = 1; $show_register = ''; $load_ajax = ''; $form_submitted = ''; $action = ''; $new_user_name = ''; $account_type = ''; $first_name = ''; $last_name = ''; $Company = ''; $Address_1 = ''; $Address_2 = ''; $City = ''; $State = ''; $email_address = ''; $email_address2 = ''; $user_name = ''; $password = ''; $confirm_password = ''; $country_list = ''; $dob_month = ''; $dob_day = ''; $dob_year = ''; $zip_code = ''; $birthday = ''; $error_message = ''; $checked = ''; $show_register = 1; $load_ajax = 1; $procede = true; $action = mysql_real_escape_string( $_GET['action'] ); $new_user_name = mysql_real_escape_string( $_GET['new_user_name'] ); $site_name = mysql_real_escape_string($config['site_name']); $form_submitted = mysql_real_escape_string( $_POST['form_submitted'] ); if ( $action == 'check_user' ) { $new_user_name = trim(strtolower($new_user_name)); if ( $new_user_name == '' ) { echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['fill_all_fields']."</b></font>"; die(); } if ( strlen($new_user_name) < 4 ) { echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['username_4_chars']."</b></font>"; die(); } // check against reserved names e.g. -> admin etc... or adult words ban if ( in_array( $new_user_name, $reserved_names ) ) { echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['username_not_allowed'] .""; die(); } $sql = "SELECT user_name FROM member_profile WHERE user_name = '$new_user_name'"; $query = @mysql_query($sql); $count = @mysql_num_rows($query); if ( $count > 0 ) { echo "<font size=\"2\"><b>$new_user_name</b></font><font color=\"#EE0000\" size=\"2\"> <b>=> $lang_not_available</b></font>"; } else { echo "<font size=\"2\"><b>$new_user_name</b></font><font color=\"#00DD00\" size=\"2\"> <b>=> $lang_available </b></font>"; } @mysql_free_result($result); @mysql_close(); die(); } if ( $action == 'show_country' ) { $country_fields_all = ''; $show_fields = ''; $country_list = file('includes/country.list'); foreach ( $country_list as $country_select ) { $country_fields_all = $country_fields_all . $country_select; } $show_fields = '<div style="margin-left:30px; float:left;"><b>'.$lang_country.':</b></div>'; $show_fields .= '<div style="margin-left:95px; float:left;" id="country_list">'; $show_fields .= '<select class="FormSpecialInput_1" id="country_list" name="country_list" style="font-size: 9pt; width:128px; height:20px; font-weight:bold; color:#444444; letter-spacing: 1; border: 1px solid #DFDCDC; background-color: #FDFDFD">'; $show_fields .= $country_fields_all; $show_fields .= '</select></div>'; echo $show_fields; die(); } if ( $procede == true ) { $account_type = 'Standard'; $first_name = trim(mysql_real_escape_string( $_POST['first_name'] )); $last_name = trim(mysql_real_escape_string( $_POST['last_name'] )); $Company = trim(mysql_real_escape_string( $_POST['Company'] )); $Address_1 = trim(mysql_real_escape_string( $_POST['Address_1'] )); $Address_2 = trim(mysql_real_escape_string( $_POST['Address_2'] )); $City = trim(mysql_real_escape_string( $_POST['City'] )); $State = trim(mysql_real_escape_string( $_POST['State'] )); $email_address = trim(mysql_real_escape_string( $_POST['email_address'] )); $email_address2 = trim(mysql_real_escape_string( $_POST['email_address2'] )); $user_name = trim(mysql_real_escape_string( $_POST['user_name'] )); $password = trim(mysql_real_escape_string( $_POST['password'] )); $confirm_password = trim(mysql_real_escape_string( $_POST['confirm_password'] )); $country_list = trim(mysql_real_escape_string( $_POST['country_list'] )); $dob_month = (int) mysql_real_escape_string( $_POST['dob_month'] ); $dob_day = (int) mysql_real_escape_string( $_POST['dob_day'] ); $dob_year = (int) mysql_real_escape_string( $_POST['dob_year'] ); $zip_code = (int) mysql_real_escape_string( $_POST['zip_code'] ); if ( $_POST['terms'] == 'yes' ) { $checked = 'checked=\"checked\"'; $procede = true; } else { $procede = false; $error_message = $config['agree_to_terms']; } // dDB birthday must be this format =>2008-09-17 $birthday = $dob_year .'-'. $dob_month .'-'. $dob_day; foreach ($_POST as $key => $value) { if (!isset($value) || ($value == '')) { $display_key = @str_replace('_', ' ', $key); if ( $display_key == 'zip code' && $value == '' ) { $value = 'none'; } else if ($key != 'Address_2') { $error_message = $error_message . ' - ' . $display_key . ' '.$lang_required.' '; $procede = false; } } else { if ( $key == 'email_address2' ) $key = 'email_address'; if ( $key !== 'email_address' && (!eregi("^[ _a-zA-Z0-9-]*$", $value)) ) { $display_key = @str_replace('_', ' ', $key); $error_message = $error_message . ' - ' . $display_key . ' '.$config['invalid_email_text'].' '; $procede = false; } if ( $key == 'email_address' && !eregi("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-z]{2,3})$", $value) ) { $display_key = @str_replace('_', ' ', $key); $error_message = $error_message . ' - ' . $display_key . ' '.$config['invalid_email_format'].' '; $procede = false; } if ( $key == 'user_name' ) { // check against reserved names e.g. -> admin etc... or adult words ban if ( in_array( $user_name, $reserved_names ) ) { $display_key = @str_replace('_', ' ', $key); $error_message = $error_message . ' ' .$config['username_not_allowed'] . ' !'; $procede = false; } } } } } // checking if emails match if ( $procede == true ) { if ( $email_address !== $email_address2 ) { $error_message = ' '.$config['emails_do_not_match']; $procede = false; } } // checking if passwords match if ( $procede == true ) { if ($confirm_password !== $password) { $error_message = ' '.$config['password_do_not_match']; $procede = false; } } // checking if username and email is unique if ( $procede == true ) { $sql = "SELECT user_name, email_address FROM member_profile"; $query = @mysql_query($sql); while ($result = (@mysql_fetch_array($query))) { if ( !empty($result['user_name']) || !empty($result['email_address']) ) { // case insensitive login and registration $reg_user_name = strtolower($user_name); $db_user_name = strtolower($result['user_name']); if ($db_user_name == $reg_user_name) { $error_message = ' '.$config['username_is taken']; $procede = false; } if ( $result['email_address'] == $email_address ) { $error_message = $error_message . ' -'.$config['email_already_exists']; $procede = false; } } } } // if any errors display error message => [var.message_type] - [var.error_message] if ($procede == false && $form_submitted == "yes") { $message_type = $lang_error; $blk_notification = 1; $show_signup = 1; $template = "themes/$user_theme/templates/main.htm"; $inner_template1 = "themes/$user_theme/templates/inner_signup_.htm"; $TBS = new clsTinyButStrong; $TBS->NoErr = true; $TBS->LoadTemplate("$template"); $TBS->Render = TBS_OUTPUT; $TBS->Show(); @mysql_close(); die(); } // START => load page with form if ( !isset($form_submitted) || ($form_submitted == '') ) { $show_signup = 1; $template = "themes/$user_theme/templates/main.htm"; $inner_template1 = "themes/$user_theme/templates/inner_signup.htm"; $TBS = new clsTinyButStrong; $TBS->NoErr = true; $TBS->LoadTemplate("$template"); $TBS->Render = TBS_OUTPUT; $TBS->Show(); die(); } // if no errors register user and load welcome page if ($procede == true) { $random_code = randomcode(); $password_email = $password; $password = md5($password); $passwordSalt = substr(md5(rand()), 0, 4); if ( $zip_code > '' ) { $country_list = 'USA'; } // insert new user record $sql = "INSERT into member_profile (email_address, user_name, password, passwordSalt, first_name, last_name, Company, Address_1, Address_2, City, State, zip_code, country, birthday, account_status, account_type, date_created, random_code) VALUES ('$email_address', '$user_name', '$password', '$passwordSalt', '$first_name', '$last_name', '$Company', '$Address_1', '$Address_2', '$City', '$State', '$zip_code', '$country_list', '$birthday', 'new', 'standard', NOW(), '$random_code')"; @mysql_query($sql) or die($config['error_26']);//error // get new user_id $sql = "SELECT user_id, email_address, random_code FROM member_profile WHERE random_code = '$random_code' AND email_address = '$email_address'"; $query = @mysql_query($sql); while ($result = @mysql_fetch_array($query)) { $user_id = $result['user_id']; } // set new user default privacy settings $sql = "INSERT INTO privacy (videocomments, profilecomments, privatemessage, friendsinvite, newsletter, user_id, publicfavorites, publicplaylists) VALUES ('yes', 'yes', 'yes', 'yes', 'yes', '$user_id', 'yes', 'yes')"; $query = @mysql_query($sql); @mysql_close(); // send email $email_template = 'email_templates/newmember.htm'; $subject = $config['email_welcome']; $to = $email_address; $from = $config['notifications_from_email']; //send email template to TBS for rendering of variable inside $template = $email_template; $TBS = new clsTinyButStrong; $TBS->NoErr = true; $TBS->LoadTemplate("$template"); $TBS->tbs_show(TBS_NOTHING); $message = $TBS->Source; //load postage.php define('access',true); include ('includes/postage.php'); // show success $notification_type = $config['notification_success']; $message = $config['registration_success']; $blk_notification = 0; $template = "themes/$user_theme/templates/main.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(); } ?>$TBS->Source; //load postage.php define('access',true); include ('includes/postage.php'); // show success $notification_type = $config['notification_success']; $message = $config['registration_success']; $blk_notification = 0; $template = "themes/$user_theme/templates/main.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(); } ?>
  22. Thanks again for your reply. I've completed and sent this form and it goes to the support@domain.com mail box and shows the FROM field to be feedback-form@domain.com
  23. Thanks for your replies. I've looked around and have no idea where php.ini may be or if it exists. Any ideas where this file may typically be? Regarding "have you tried sending it to yourself to verify?" I'm not sure what you are suggesting. What is "it"? Please clarify. thanks
  24. I'm having an email issue, my web host support tells me "you are sending out messages as nobody@host1domain.com" (changed domain for this posting). I don't know where to fix this to something other than "nobody". I've looked in files, in the script, and don't know where this can be remedied. Couls this be the place: //Start Feedback - if($_POST['submited'] == "1"){ $your_email = "support@domain.com"; //This is your email address - $from = "From: feedback-form@domain.com". "\r\n"; //This will show as the email sender. - $user_email = $_POST['email']; $user_name = $_POST['name']; $subject = $_POST['subject']; $email_body = $_POST['comments']; $first_custom = $_POST['custom1']; $second_custom = $_POST['custom2']; if($user_email == "" or $user_name == "" or $subject == "" or $email_body == ""){ $error = "Please Fill In All Fields"; }else{ $message = "Feedback : \n \nUsers Email : $user_email \nUsers Name : $user_name \n\n\n Users Message : \n\n$email_body"; //SEND THE EMAIL - mail($your_email, $subject, $message, $from); $result = "Your Message Has Been Sent. Thank You"; } } //End Feedback -
  25. I see these lines in the script I'm using. Can you tell me what they mean and what they do? Thanks <!--[onload_300;block=div;when [var.show_login_box]=1;comm]--> <!--[onload_337;block=div;when [var.show_login_box]!=1;comm]-->
×
×
  • 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.