Everything posted by Ash Scott
- Active page link - :active only works when mouse button pressed
-
Noob Question No.1 - First of Many
Based on the title of "noob" question, I'm going to assume you have little to no experience lol. I suggest you buy a theme or download a free one capable of this, otherwise you'll have to edit PHP files, create child themes etc, which can get messy for a beginner. If you did want to get your hands dirty, take a look at this link; https://codex.wordpress.org/Alphabetizing_Posts
-
Has my site been hacked?
What's the domain mate? I'll take a look into it.
-
Active page link - :active only works when mouse button pressed
The method above will work fine, but there's a lot of additional classes and ID's needed, which only increases page size. You can do this by adding a single class and styling against that: <ul class="nav"> <li><a href="/">Home</a></li> <li class="current"><a href="about.html">About</a></li> <li><a href="services.html">Services</a></li> <li><a href="contact.html">Contact</a></li> </ul> Then, in your CSS can do something along the lines of: .nav .current { /* Active Styles Here */ } Need any help with this, let me know!
-
How to implement a search function
I see - it looks like a PHP system is your only option then :/ Have you considered putting your site on a CMS with a built in search function?
-
How to implement a search function
You can add this to your page and target with CSS, but the search results will be on Google, not on your site, unless you iframe the output: <form method="get" action="http://www.google.com/search"> <input type="text" name="q" size="31" maxlength="255" value=""> <input type="submit" value="Google Search"> </form> This will take whatever you type into the text input, and at the end of google.com/search will add ?q=XXXX, where XXXX is the term you typed into the input I that doesn't make sense let me know and I'll explain it better. Good luck!
-
How to implement a search function
Try 000 webhost for free, PHP ad free hosting - that's where I started. Only use it for testing though as it's unreliable and slow lol. As for your question I think the only way, without a load of Javascript would be PHP.
-
Drilldown navigation menu by Replacing Divs (Clumsy)
Do you have an example of the effect you want to achieve? I had a quick look at your fiddle, but i didn't understand where you were going with it!
-
Table / Table Cells
The only way I can see you'd achieve this is using jQuery. Take a look at this: http://jsbin.com/afupe/2/edit?html,js,output Try implementing this and seeing if it solves the issue
-
Please help me add a marker to my gmaps script
Give this a go: <script type="text/javascript"> $(document).ready(function(){ new GMaps({ el: '#map1', lat: 51.74673, lng: -0.26595, }); map.addMarker({ lat: -12.043333, lng: -77.028333, title: 'Lima', click: function(e) { alert('You clicked in this marker'); } }); }); </script> This should work - look at the source code of that page in the header to see how they done it for the demo map, and that'll get you going in the right direction
-
Please help me add a marker to my gmaps script
There's a bit of code on that page which will put the marked in for you: map.addMarker({ lat: -12.043333, lng: -77.028333, title: 'Lima', click: function(e) { alert('You clicked in this marker'); } }); Just change the co-ordinates where you want the marker. Not tried it myself, but that looks like your answer! Let me know how it goes
-
I've got an interview with a design agency what do I wear?
I agree with this - first impressions say a lot about a person!
-
After a long gap, I'm back!
Hi all, After a change in career from web development to networking, I am back. I have got a new job working as a css developer and as a result i shall be active again on the forums. I've missed this place - met some new people last time i was active and learnt a lot, so here's to a change in career and hopefully a successful one! Cheers! *clinks beers*
-
Top Nav Nightmare
Could you create a fiddle please with the raw code to save people trawling through the source code? http://jsfiddle.net/ Cheers! Ash
-
List of viewport sizes per device
Hi all, Stumbled across this earlier today whilst working on a site for someone, and thought i'd share - was very useful http://viewportsizes.com/
-
I'm back!
Ah hello :-) I've got smarter since 2010 In both networking and web development. Tis good to be back
-
I'm back!
Hi all, Not a new member, quite an old one, but went inactive for a while. I'm back Started web development again, alongside my job as a network engineer and currently working on a hosting style theme. So yeah, I'll be around Ash
-
wordpress hard coded theme SEO effects?
I saw a wordpress theme the other day, which was really abnormal. Basically, the main layout had been coded on a dynamic theme, but literally, the only things there, were a continer, the nav, and the header and footer. No columns or anything. The pages however, have columns. 3 of them. It has been hard coded into the page in the admin area, so has really been saved to the data base, not the actual website. What sort of impact will this have on SEO, if any?
-
Wordpress features plugin
Hi all, I'm looking for a plugin which will allow me to add a pitcure, title, and content to a widget box on the homepage of my new theme i'm building. I have created 4 widget area's on the homepage to show featured content. I would like it to be laid out like so: Image (links to page or post) Title short description All of these need to be add-able through the admin area to make it easier for the end user to update content on the theme. I'm gonna look for an example, and i will update this post if i find one. EDIT: Here is an example. The 4 boxes with find out more buttons. Similar to that but an image on top, followed by a heading, then a short description. If anyone can link me to a plugin which does this, or a link to a tutorial on how to code one, it would help massively!
-
PHP validation issue
oh lol, yeah it was just $password but then i looked at the form at it was password2 so i chenged it, but obviously failed to notice that.. Cheers! +1
-
PHP validation issue
Hi there, im testing out a PHP registration script i got off the internet, and when i try to signup, i get an error saying Password missing Passwords do not match This is my signup HTML <form action="register-exec.php" method="post"> <div class="textleft">User Name:</div> <div class="textright"><input name="login" type="text" class="textfield" id="login1" onKeyDown="CountLeft(this.form.login, this.form.log,30);" onKeyUp="CountLeft(this.form.login,this.form.log,30);" size="40"> </div> <div class="textleft">First Name:</div> <div class="textright"><input name="fname" type="text" class="textfield" id="fname" size="40"> </div> <div class="textleft">Last Name:</div> <div class="textright"><input name="lname" type="text" class="textfield" id="lname" size="40"> </div> <div class="textleft">Password:</div> <div class="textright"><input name="password2" type="password" class="textfield" id="password" size="40" /> </div> <div class="textleft">Cofirm Password:</div> <div class="textright"><input name="cpassword" type="password" class="textfield" id="cpassword" size="40" /> </div> <div class="textleft">Email:</div> <div class="textright"><input name="email" type="text" class="textfield" id="email" size="40"> </div> </form> And here is my register-exec.php: <?php //Start session session_start(); //Include database connection details require_once('config.php'); //Array to store validation errors $errmsg_arr = array(); //Validation error flag $errflag = false; //Connect to mysql server $link = mysql_connect('localhost','root',""); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select database $db = mysql_select_db(local, $link); if(!$db) { die("Unable to select database"); } //Function to sanitize values received from the form. Prevents SQL injection function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } //Sanitize the POST values $fname = clean($_POST['fname']); $lname = clean($_POST['lname']); $login = clean($_POST['login']); $password2 = clean($_POST['password']); $cpassword = clean($_POST['cpassword']); $address = clean($_POST['address']); $cnumber = clean($_POST['cnumber']); $email = clean($_POST['email']); $gender = clean($_POST['gender']); //$bdate = clean($_POST['bdate']); $propic = clean($_POST['propic']); $bday=$_POST['month'] . "/" . $_POST['day'] . "/" . $_POST['year']; $month=$_POST['month']; $day=$_POST['day']; $year=$_POST['year']; //Input Validations /*if($bdate == '') { $errmsg_arr[] = 'birthdate field is missing'; $errflag = true; }*/ //if($month == '') { //$errmsg_arr[] = 'month field is missing'; //$errflag = true; //} //if($day == '') { //$errmsg_arr[] = 'day field is missing'; //$errflag = true; //} //if($year == '') { //$errmsg_arr[] = 'year field is missing'; //$errflag = true; //} if($gender == '') { $errmsg_arr[] = 'gender field is missing'; $errflag = true; } if($email == '') { $errmsg_arr[] = 'email field is missing'; $errflag = true; } //if($cnumber == '') { //$errmsg_arr[] = 'contactnumber field is missing'; //$errflag = true; //} //if($address == '') { //$errmsg_arr[] = 'address field is missing'; //$errflag = true; //} if($fname == '') { $errmsg_arr[] = 'First name missing'; $errflag = true; } if($lname == '') { $errmsg_arr[] = 'Last name missing'; $errflag = true; } if($login == '') { $errmsg_arr[] = 'Login ID missing'; $errflag = true; } if($password2 == '') { $errmsg_arr[] = 'Password missing'; $errflag = true; } if($cpassword == '') { $errmsg_arr[] = 'Confirm password missing'; $errflag = true; } if( strcmp($password2, $cpassword) != 0 ) { $errmsg_arr[] = 'Passwords do not match'; $errflag = true; } //Check for duplicate login ID if($login != '') { $qry = "SELECT * FROM members WHERE UserName='$login'"; $result = mysql_query($qry); if($result) { if(mysql_num_rows($result) > 0) { $errmsg_arr[] = 'UserName already in use'; $errflag = true; } @mysql_free_result($result); } else { die("Query failed"); } } //If there are input validations, redirect back to the registration form if($errflag) { $_SESSION['ERRMSG_ARR'] = $errmsg_arr; session_write_close(); header("location: index.php"); exit(); } //Create INSERT query $qry = "INSERT INTO members(UserName, Password, FirstName, LastName, Address, ContactNo, Url, Birthdate, Gender, profImage, curcity, month, day, year) VALUES('$login','$password','$fname','$lname','$address','$cnumber','$email','$bday','$gender','$propic','$address','$month','$day','$year')"; $result = @mysql_query($qry); //Check whether the query was successful or not if($result) { $errmsg_arr[] = 'Success You can now log-in to the site!'; $errflag = true; if($errflag) { $_SESSION['ERRMSG_ARR'] = $errmsg_arr; session_write_close(); header("location: index.php"); exit(); } session_regenerate_id(); $member = mysql_fetch_assoc($result); $_SESSION['SESS_MEMBER_ID'] = $member['member_id']; $_SESSION['SESS_FIRST_NAME'] = $member['FirstName']; $_SESSION['SESS_LAST_NAME'] = $member['profImage']; //$_SESSION['SESS_PRO_PIC'] = $member['profImage']; session_write_close(); header("location: index.php"); exit(); }else { die("Query failed"); } ?> Help me please! Cheers, Ash
-
Nav bar scroll with page
Hi there, im developing a site on my localhost, and i have the nav bar about 1/4 of the way down the page, underneath the logo. I would like the navbar to stick to the top of the page when the user scrolls past it. A bit like what facebook have, but my navbar isn't stuck at the top, its about 200px down the page. Cheers Ash
-
phpMyAdmin doesnt work ubuntu 10.04
Hi all, Im trying to set up phpmyadmin on my dedi running ubuntu 10.04. I installed LAMP, and that works. I tried using sudo apt-get install phpmyadmin and it says it installed fine, but when i got to 127.0.0.1/phpmyadmin it doesnt find anything. How can i fix this? Cheers Ash
-
PHPBB3 Seating Plan
Thats not my site....Im looking for a way to create an interactive seating plan like that site. As i mentioned in my first post but, its not required, as i have a new method of doing it, thx anyway, Ash
-
PHPBB3 Seating Plan
Im at college at the moment, and the site is blocked, but if you go to http://www.llamalan.co.uk/events and on the left select one, and click floor plan on the right side, where its got squares or red green yellow and blue. Cheers, Ash