Jump to content
Stef's Coding Community

debmc99

Member
  • Content Count

    58
  • Joined

  • Last visited

Community Reputation

0 Neutral

About debmc99

  • Rank
    Member
  1. debmc99

    Php Sidebar Error

    Thanks Ben! It worked great!
  2. debmc99

    Php Sidebar Error

    Thanks Ben, I think I am almost there. But now I get this error. Do you see the problem? Parse error: syntax error, unexpected '<' in /home/xxxxx/www/www/wp-content/themes/theme-name/sidebar-df.php on line 8 <div class="m-blog-side"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home-Sidebar-Widgets") ) : ?> <div class="side-cats2"> <div class="sider-22"> <?php <div class="woodo"> <div class="ad_callout" onclick="location.href='/blog/register/';"> <!--<h2>Call To Action!</h2>--> <p>Subscribe to the blog for insider information!</p> </div><!-- #ad_callout --> </div> ?> <div class="woodo"> <?php /* sidebarlogin(); */ ?> </div> </div> </div> <?php endif; ?> </div></div>
  3. debmc99

    Php Sidebar Error

    Thanks Ben, Is there a way I can disable that thing all together? I think it was from a plugin. I am not sure. It is happening in the sidebar. Can you tell me how to disable the sidebar in the functions.php page?
  4. debmc99

    Php Sidebar Error

    Hello, not sure if this post should be here or WordPress. I migrated a WordPress site (an ordeal in itself) to a new server and new domain name. The theme has a sidebar with a login that is throwing this error: Fatal error: Call to undefined function sidebarlogin() in /home/domain_name/www/www/wp-content/themes/theme_name/sidebar-df.php on line 17 Can someone point me in the right direction? Here is the sidebar-df.php code below. Any help would be appreciated! <div class="m-blog-side"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home-Sidebar-Widgets") ) : ?> <div class="side-cats2"> <div class="sider-22"> <?php /* <div class="woodo"> <div class="ad_callout" onclick="location.href='/blog/register/';"> <!--<h2>Call To Action!</h2>--> <p>Subscribe to the blog for insider information!</p> </div><!-- #ad_callout --> </div> */ ?> <div class="woodo"> <?php sidebarlogin(); ?> </div> </div> </div> <?php endif; ?> </div></div> </div> </div>
  5. Hello, I have two responsive WordPress themes. However, neither resize when I touch the screen to zoom in or out. However, when I look at some sites on my tablet, they have that capability. Does anyone know what that capability to resize by pulling or dragging on the screen is called? Thanks!
  6. Yes, but the date needs to appear on the coupon automatically, for example, if the user gets redirected to the coupon on 7/14/2012, the coupon needs to show 7/14/2012. Not sure how to make that happen. Actually, maybe it is not an image that is displayed on coupons I have seen in some plugins, but maybe a form with text in between fields. So it will look like a coupon but it's really another form. What do you think?
  7. Hello Ben, Yes, I am building a website that just needs a single coupon. I am using the Formidable Pro plugin to create a short online survey. Once the survey is submitted, the user is directed to a page where they can right click the coupon and save it to their phone. The problem is that I need them to be able to email the coupon to themselves to print later if they want to. So your suggestion of "email to a friend" might work. The other problem is I need the date displayed somewhere near the coupon because it will only be valid for a certain time, like 30 days, next visit, etc. So my problem is if they right click the .png and save it, I lose the date that is displayed on the page. I know it is not super complicated but I can't find something that will solve both problems. The coupon is supposed to be saved on mobile phones, so I need the saved image to include the date, and I also need to offer the option of printing it later. I hope that makes sense. Any ideas you have would be extremely welcome. Thank you!
  8. Hello! I am building a client site with WordPress and I am looking all over for a simple coupon plugin. I have looked everywhere. I don't need anything with affiliate links, or Groupon type offers. I just need to make an coupon (.png file) available on the site and then have the ability to print or email it. Any suggestions would be helpful. I have been looking for 3 days and have not found anything that will work.
  9. Hi, sorry, this is a WordPress issue. Once I create a Home link on for the navigation, "Home" become the title for the homepage, and I was wondering where the php code is to edit it. I've checked header.php but can't find I need to edit the code.
  10. Hello, In Wordpress, does anyone know how to edit the default H1 tag titles on pages and posts? I've checked header.php but can't find the code. Any help would be appreciated!
  11. Hello, I don't really like Facebook and have stayed away from it. But I have clients that want me to set up pages for them and not profiles. I find that each time I try to set up a page for a client, Facebook asks me to log in. I have deleted all the cookies I can find on my computer but nothing works. Does anyone know how to set up accounts for clients? Any help would be appreciated. Thank you.
  12. Hello, I have a client who wants his email address on his website where you can click on it to contact him. He did not want a contact form. I advised him against the email address because I thought it would just get harvested and he'd get a lot of SPAM. I would just like to know if you would go ahead and add the email address since the client wants it, or would you make the email address not active or something. Just wondering. Thank you.
  13. Hello, I have a question about my code below which allows clients to upload files. In testing the code as it is, what happens is the error message does not display when I try to upload an incorrect file type, nor does the "File uploaded successfully" message display when I upload an acceptable file type. The files actually do get uploaded but you'd never know because but you automatically get redirected back to members.php which is where you start to upload a file in the first place. However, if I take out everything before the line "// begin Dave B's Q&D file upload security code" everything works fine. Is there a way to get the success or error message to display and I guess include a link to then get back to the members.php page without messing up the login part? Any help on this would be very much appreciated. Thank you very much. <?php /* * PROCESSFILE.PHP * Password protected area to process members' uploaded files */ //start session session_start(); include("includes/config.php"); /* * This section below checking if user is logged in/checking for inactivity * may be best put in a reusable function so it is easily reused/updated */ // check that the user is logged in if (!isset($_SESSION['username'])) { header("Location: login.php?unauthorized"); } //check that the user is an admin else if (!is_ceoadmin()) { header("Location: members.php"); } // check for inactivity if (time() > $_SESSION['last_active'] + $config['session_timeout']) { // log out user session_destroy(); header("Location: login.php?timeout"); } else { // update the session variable $_SESSION['last_active'] = time(); } // begin Dave B's Q&D file upload security code $allowedExtensions = array("doc","docx","xls","xlsx","pdf","jpg","jpeg","gif","png"); foreach ($_FILES as $file) { if ($file['tmp_name'] > '') { if (!in_array(end(explode(".", strtolower($file['name']))), $allowedExtensions)) { die($file['name'].' Sorry, this is an invalid file type!<br/>'. '<a href="javascript:history.go(-1);">'. '<&lt Go Back</a>'); } } } // end Dave B's Q&D file upload security code $uploadDir = "./uploaded/"; // Check if file has been uploaded if(isset($_POST['upload'])) { $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; $filePath = $uploadDir . $fileName; // get the file extension first $ext = substr(strrchr($fileName, "."), 1); // make the random file name $randName = md5(rand() * time()); // and now we have the unique file name for the upload file $filePath = $uploadDir . $randName . '.' . $ext; $result = move_uploaded_file($tmpName, $filePath); if (!$result) { echo "Error uploading file"; exit; } // Connect to the database $dbLink = new mysqli('I removed the db info for this post'); if(mysqli_connect_errno()) { die("MySQL connection failed: ". mysqli_connect_error()); } if(!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); $filePath = addslashes($filePath); } $query = "INSERT INTO uploadpath (name, type, size, path ) ". "VALUES ('$fileName', '$fileSize', '$fileType', '$filePath')"; mysqli_query($dbLink, $query) or die('Error, query failed : ' . mysqli_error($dbLink)); // close db connection $dbLink->close(); echo "<p> The file, $fileName, has been successfully uploaded.</p>"; } ?>
×
×
  • Create New...