Everything posted by irn3rd
-
Customising page templates
Currently starting development of a new theme for a project at work... I'm looking to create page templates to be used throughout the site. One of theme templates will have a slider at the top. I want to be able to customise what content is showed in each slide page by page. What would be the best approach? I was thinking i might be able to do a shortcode in the post of the page and then extract it and use it in the header. Below is an example of the shortcode. [slideshow] [slide image=example.png] [slide image=example2.png] [slideshow] So In the page template i have a the get_header() function with an argument of 'slideshow' to pull in the custom header. Now i'm a little stuck in the header-slideshow.php file that corresponds to the get_header function as to how i go about getting the images. If i can get away without using a plugin that would be more ideal.
-
jQuery ajax problem ie10/11
Just an update, we found a soloution for this, it wasn't anything to do with jQuery or the $.ajax method. The bugs stemmed from Microsoft changing the way some methods worked in IE10 and IE11
-
jQuery ajax problem ie10/11
I'm having a problem with Ie10/11. We have a jQuery ajax request that's firing, but instead of using the current domain, it's using the last domain you visited in the browser/another tab. Example : Domain1.co.uk - Site with the ajax request. I visit domain2.co.uk go and then do back to domain1.co.uk When the ajax request is fired the url given is appended to domain2.co.uk instead of domain1.co.uk. Has anyone ever encountered this? Ben EDIT: If i copy a paragraph from word instead of a website, It doesn't fire the ajax network request and gives a different error message
-
Looking for a paticular name or JS library
Say you have a selection of squares on screen, all flush against each other, some are bigger, some are smaller then others. When you click on one of the boxes it expands pushing other boxes beneath it. When it closes the boxes slide back into place. Does anyone know of a script or a tutorial that is similar to this? Many thanks Ben
-
FlexSlider in Drupal 7
I currently have a project that is being built in Drupal 7 which requires a slider to be incorperated into the website. I decided to go for FlexSlider to accomplish this. I've tried loads of different methods to accomplish this, they only seem to get so far and then nothing. All dependant modules are active, I've created the content type for the slider and I'm using views to control what is viewed. When I go to preview the slider, nothing appears. The documentation I've been finding for this isn't the best, does anyone know of any resources for accomplishing this? Many thanks Ben
-
Dynamic Registration Forms
I'm developing a website for a Obstacle Run event near my local area that will be allowing a single person or a group of people to register for the race. The race currently has capacity for 500 runners, with 5 waves of 100. For a single registration I would know how to handle it. But when it comes to the group entrants it can be anything from 2 to 5 people per group(maybe more). Would any of you know a suitable way to handle this or provide examples of where it is handled well? I have a feeling I'm going to have to handle this with a few AJAX requests and server side sessions? As a side note, they have to agree to a disclaimer and state any medical conditions they may have. Now can one person agree to this for how ever many people are in the group? Thank you for your help!
-
a jQuery plugin - Want critique
Hey all, Say a piece of JS i liked and thought I'd have a play myself and see if i could make it into a jQuery plugin. I used the a boilerplate as a base. /* * Author: Ben Cleverly * Website: http://www.bencleverly.me/#plugins * Description: A plugin to create an auto generated table of contents - inspired by a post on CSS tricks - http://css-tricks.com/automatic-table-of-contents/ * License: http://opensource.org/licenses/MIT */ ;(function ($, window, document, undefined) { var pluginName = "bcToc", defaults = { contentAreaID: 'content', contentLinkClass: 'contentLink', addClassToLink: '' }; function Plugin( element, options ) { this.element = element; //create original element object this.jele = $(element); //create jquery object of element this.options = $.extend( {}, defaults, options ); //add otpions onto default for full list this._defaults = defaults; this._name = pluginName; this._links = $('#' + this._defaults.contentAreaID + ' . ' + this._defaults.contentLinkClass); this.init(); } Plugin.prototype = { init: function() { this.getItems(this.element, this.options); }, getItems: function (el, options){ var thisObj = this; $(this._links).each(function(index, element) { var newline, title = $(this).attr('title'), links = '#' + $(this).attr('name'); thisObj.setItems(title, links, thisObj.options.addClassToLink); }); }, setItems: function(title, links, classes){ newLine = '<li><a href="' + links +'" class="' + classes + '">' + title + '</a></li>'; this.jele.append(newLine); } }; $.fn[pluginName] = function ( options ) { return this.each(function () { if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin( this, options )); } }); }; })( jQuery, window, document ); Wonder what improvements i could make or advice for the future. Feel free to take it and use as you want. Cheers
-
if JS is disabled use this stylesheet.
Coding a website up that is Js heavy(used for animations of content boxes), and i was wondering if there is a way to in the case if someone has JS disabled, gracefully degradation will kick in and make the site appear to the user just without the whiz bang and pop. Two solutions i have come up with so far are to, rebuild the mark-up and CSS as it would appear without JS Then add JS to make it have all the fancy stuff Second method Have an id or class on the body element by default and use this as a base to style a no JS version and if JS is enabled, remove or change this ID to show the JS script you can run. Just wondering if anyone else has come across this problem before and how they have tackled it. Thanks in advanced! Ben
-
jQuery plugin similar to this site
Ahh, my bad for not making it clear, What I'm mainly looking for is the fly-out style content. So when a nav link is clicked on the menu, the conten slides out from behind it. When the next link is clicked the next panel slides out from underneath the menu, above the previous content. So it would end up looking like Menu --- Content area 1 --- Content area 2(if required) Each will slide from under each other. Hope this makes sense!
-
jQuery plugin similar to this site
Sorry if this is in the wrong section, feel free to move if needed. I've got the chance to pull in a web deisgn job. Just doing some research into the functionality of the site and i'm trying to find a jQuery plugin that will enable me to do what this flash site does http://www.mcauleykitchens.co.uk/. Would anyone be able to point me in the direction of such plug-in for jquery. Thank you all
-
App Development
Hi all, Been given a job of developing an App for iOS and Android side by side, so I'm going to be using titanium appcelerator to build it. does anyone have experience in using this program and can point to any decent tutorials for beginners? or any resources for this software? Cheers in advance Ben
-
Wordpress forum
I know there is bbPress which is a forum script from the makers of wordpress, but i haven't had the chance to mess around with it yet. Has anyone had experience in combining the two so bbpress uses wordpress login? If not, what plugins can you suggest, and the plugin forum must have the feature to be set to not display unless a user is logged in. This is a must. All help is always appreciated Ben
-
.htaccess and password protections
Okay, so me and a friend are making a website where we have to password protect the whole site, due to the nature of it being for a school, and the owners not wanting it index or known by people who do not have a username and pass. We are using .htacces and its password protect feature. Now from my understanding if the user gets it wrong it just keeps re-asking, but is it possible that if they get it wrong x amount of times that it redirects to a 401 page for example? Thanks for any advice Ben
-
Include Google analytics in admin section
Hello All, I've seen it done before. I'm looking around Google at the moment but I'm wondering if anyone here has had experience including Google analytics within an admin control panel? Might not be the right section of the forum, so mods feel free to move if needed. Ben
-
License for image's to be used freely
Hello all, I'm planning a website out at the moment, and it will involce pictures I've created and pictures that a community will have created, but all these images will be free to use, but i want a reference to the site or something to do with the site on the work or along them lines. Would i be right in thinking i need to have a license to do this? I think its GPL/GNU licenses that i will need, although from what ive seen in the past, it is what people use. Would anyone be able to clear this up for me, as i have the foggiest idea to be honest, and this is all new to me. Many Thanks, Ben P.S sorry if spelling is bad, long day and very tired.
-
Captcha
Only ones I have ever seen that fit into the sites flow is in-house ones thats are custom made. or ones that have been really heavily modified. To edit the text of the captcha script you could use CSS3 @font-face but the text will still be easily read by intelligent bots. so php is usually used to distort the text and output it as an image. No idea if you can use the css3 @font-face with php to make the image like that, dont think its possible. Ben
-
First Mockup on PS
I've just had a quick look, your missing the slidecontainer div around the textbox and you haven't included the CSS for the slider, easy slider should have some documentation on how to set it up, have you read through their website? But include the parent container and then check the website to see if there is any documentation. Ben Edit: I think its just some styling issues now, and that div missing, i had to reload page to get it work propperly(not your fault) and the previous and next buttons can be changed within the js file.
-
isit possible to...
From what you've said there it looks like you are going to have to use jQuery. I'm not that experianced in jquery, just started learning how to use the bae liberary propperly(just learnt how to use the animate function ). But it should be possible to be honest, your just need one parent cotainer with two child containers that overlap depending on what action is active. Hopefully im reading what you want correctly. If im still understanding in-correctly would you be able to do a mock up of what you want done? say you have it coded but as you said in your OP it would be text above the image, then i can try and crack it out from that, as i can work/understand things better when i have a physical copy to play with. Ben
-
isit possible to...
I'm at work so can't make a detailed reply, but you will need to look into CSS posistion and z-index attributes to achieve this, note, z-index will only ever work when a posistion is used in with it, example #non-working{ z-index:6; } #working{ posistion:absolute; z-index:6; } Sorry i can't be much help at this moment in time. but if you head over to My linkthis should get you kick started in the right direction Ben
-
Disabled to get better web access?
My link Tis nice to see the goverment doing something positive for the community, what with all the cuts going on. Do you think this will have any impact on the way we will be coding out sites in the future? Once they start releasing these more accessable public sites? Lets see how long it takes them to implement this though hey Ben
-
First Mockup on PS
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" ></script> <script type="text/javascript" src="js/easySlider1.7.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#slider").easySlider({ auto: false, continuous: true }); }); </script> This is what the incldues for the jquery should look similar too. have you also inlcuded the css file as well? The HTML you will need to include is something like this <div id="slidecontainer"> <div id="slider"> <ul> <li><div class="sliderdiv"><img src="images/image1.png"/><h2>text</h2><p>text</p></div></li> <li><div class="sliderdiv"><img src="images/image1.png"/><h2>text</h2><p>text</p></div></li> <li><div class="sliderdiv"><img src="images/image1.png"/><h2>text</h2><p>text</p></div></li> </ul> </div> </div> If you visit my portfolio you can see a working example on the homepage, note i have changed the button images from the original, and ive added a text section but dont worry about that for now. You may also need to change the width settings in the css file, but you make be lucky with that.Also note that im linking to jquery from googles file felivery system instead of locally off of my server which is why it appears different. If you need anymore help post back and ill get an example page working when i get home if i have the time. Ben
-
iPhone or Blackberry?
The way I see it is, BB is the tool for anyone running or trying to run a business as that’s what its designed for, and if you want the iPhone for the apps and something to take up time when needed then just buy the iPod touch, as the iPod 4th gen is basically and iphone without "live" texting and calling, it also a money save on your phone bill This is what I’m aiming to do, and seems likes going to happen sooner rather then later as my ipod screen has just got a ton of cracks over it so, I’m buying the new ipod next week then upgrading my contract for a BB as my phone, seems like the perfect combination to me in all fairness. Ben
-
Stretching Divs - Quick Piece of Advice
html code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0034)http://www.pinpointgames.com/test/ --> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Mountain Skin</title> <link href="style/layout.css" rel="stylesheet" type="text/css"> <style type="text/css"> </style> </head> <body> <div id="wrapper"><!-- Container Div--> <div id="header"> <p>Header</p> </div> <div id="menu"> <p>Menu</p> </div> <div id="content"> <div id="left"> <p>Some content for the left hand side.</p> </div> <div id="right"> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p><p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> <p>Same again but for the right</p> </div> <div class="clr"></div> </div> <div id="footer"> </div> </div><!-- Container Div--> </body></html> css code: body,html,div,p{ margin:0; padding:0; } .clr{ clear:both; } #wrapper{ margin:0 auto; width:960px; } #header{ width:960px; height:100px; background:#333; } #menu{ height:45px; width:960px; } #content{ background:#70B5CC; } #left{ width:240px; float:left; } #right{ width:720px; float:right; background:#fff; } #footer{ width:960px; height:40px; clear:both; background:#999; } Replace everything in your html with the html code i supplied then the same with the css code, just make sure the link to the css file is correct and it should work for you, its a different way to code it, but it works, if you need the code explaining let me know Attached image of what it should look like. Ben
-
Stretching Divs - Quick Piece of Advice
Can you upload it with the css I provided so i can see why it isn't? Height:100% doesnt always work as intended which is a pain. I'll see if there is anything else i can come up with Ben
-
Stretching Divs - Quick Piece of Advice
You could try a min-height and a max-height functions within the css, Would look like this .grid_3{ min-height:250px; max-height:5000px; } for the max height do what ever you think you'd be comfortable with, Pat might be able to find a better solution but this one is worth a try for now. Good luck with the website Ben