Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fractal Fragger

Members
  • Joined

  • Last visited

  1. heres one i made yesterday: You will Need JQuery & JQuery Cookie Plugin: <script type="text/javascript" src="/js/jquery.js"></script> <script src="/js/jquery.cookie.js" type="text/javascript"></script> HTML: <? if(!isset($_COOKIE['cookieLaw'])){ echo ' <div class="cookieLaw"> <div id="wrapper"> <div class="paddRoundR"> <div class="oneQuarterWidth floatLeft"> <div class="paddRoundR"> <div class="margTopTen"> <h1>Cookies on the</h1> <h1>ALTech UK Website</h1> </div> </div> </div> <div class="halfWidth floatLeft"> <div class="paddRoundR"> <p>This site uses cookies to ensure that you receive the best possible experience on our website. If you click on the continue button, we\'ll assume that you are hapy to recieve all cookies on the ALTech UK website. However if you wouldn\'t like to receive cookies then please use any of the links below to instruct you on how to turn off cookies.</p> <ul> <li><a href="'.$prefix.'cookies/index.htm#ie">Internet Explorer</a></li> <li><a href="'.$prefix.'cookies/index.htm#ff">Firefox</a></li> </ul> </div> </div> <div class="oneQuarterWidth floatLeft"> <div class="paddRoundR"> <a href="/inc/cookie.htm" class="cookieSlide">Continue</a> </div> </div> <div class="clearboth"></div> </div> </div> </div> '; } ?> CSS: div.cookieLaw {display: block; width: 100%; height: 150px; background:#323232; z-index: 99999;} div.cookieLaw .margTopTen {margin: 20px 0 0 0;} div.cookieLaw h1 {margin: 0; padding: 0; color: #FFF; text-align: left;} div.cookieLaw p {margin: 0; padding: 0; color: #EDEDED; text-align: justify;} div.cookieLaw ul {display: inline-block; width: 100%; height: auto; list-style: none; list-style-image: none; margin: 10px 0 0 0; padding: 0;} div.cookieLaw ul li {display: inline-block; width: auto; margin-right: 5px;} div.cookieLaw ul li a, div.cookieLaw ul li a:active, div.cookieLaw ul li a:visited {display: block; padding: 5px 10px; background: #d6d6d6; color: #111; text-decoration: none; border: 1px solid #444444; border-radius: 3px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;} div.cookieLaw ul li a:hover {background: #043260; color: #FFF; border-color: #043260;} div.cookieLaw div.oneQuarterWidth a {margin: 10px 0 0 0; display: block; padding: 15px 25px; color: #FFF; font-size: 20pt; background: #d6d6d6; color: #111; text-decoration: none; border: 1px solid #444444; border-radius: 3px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;} div.cookieLaw div.oneQuarterWidth a:hover {background: #043260; color: #FFF;} PHP: <? setcookie("cookieLaw","1",time()+24*60*60*364,"/"); ?> <meta http-equiv="refresh" content="0;URL='http://url.com/'"> Javascript: $(function(){ $("a.cookieSlide").click(function(e){ e.preventDefault(); $.cookie("cookieLaw", 1, { expires : 365, // expires in one year path : '/' // root of site }); $(this).parent().parent().parent().parent().parent().slideUp(); }); }); This is very basic but it uses JS to create a cookie if the user clicks continue but if there is no JS enabled it reverts to PHP and creates it that way Hope this helps
  2. the weird thing is i have the exact same code set on another website and it work perfectly
  3. hi ocorrieododiogo the Class Page is located in out includes/global/page.php and contains the abstract class then that page uses <?=$this->output?> to pull the pages in Structure is - Includes -global page.php -index index.php heres my index page from the web root <? error_reporting(E_ALL); ini_set("display_errors", "true"); //die(ini_get("upload_max_filesize")); session_start(); if(!isset($_GET['dir'])) $_GET['dir']="index"; if(!isset($_GET['p'])) $_GET['p']="index"; function __autoload($class_name) { $file="includes/{$_GET['dir']}/{$_GET['dir']}.php"; $altFile="includes/{$_GET['dir']}/{$_GET['p']}.php"; if(file_exists($file)) require_once $file; elseif(file_exists($altFile)) require_once $altFile; else die("$file $class_name<br />404"); } function recurseDir($dir){ if ($handle = opendir($dir)) { $dirs=$files=array(); while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if(is_dir("$dir/$file")) $dirs[]="$dir/$file"; else $files[]="$dir/$file"; } } closedir($handle); sort($files);//includes files starting with 0 as they are most important etc sort($dirs); foreach($dirs as $d) recurseDir($d); foreach($files as $f) require_once $f; } } recurseDir ("includes/global"); if(isset($_POST['getParsedBBCode'])) { echo parseBB($_POST['getParsedBBCode']); exit; } include "includes/globalVars.php"; $user=User::Singleton(); $c=null; //the page which gets set in the next switch //print_r($_GET); switch($_GET['dir']){ case 'about': $c=new About(); break; case 'contact' : $c=new Contact(); break; case 'blog' : $c=new Blog(); break; case 'portfolio' : $c=new Portfolio(); break; case 'services' : $c=new Services(); break; case 'rss' : include "includes/rss/rss.php"; break; case 'reg' : $c=new Reg(); break; case 'activate' : $c=new Activate; break; case 'members' : $c=new Members(); break; case 'login': $c=User::Singleton(); break; case 'rearm-yourself': require_once("includes/register/register.php"); case 'register': $c=new Register(); break; case 'cpanel': $c=new Cpanel(); break; case 'logout': User::Singleton()->logout(); $c=new Index(); /*$c->JSONExtra(array("usermenu"=>array( "panels"=>$c->getMenu(true), "links"=>$c->getMenuLinks(true) )));*/ break; case "E404": $c=new ErrNotFound(); break; default:$c=new Index(); } if($c != null) $c->output(); //call the output function on the page made in the switch ?> which then uses a switch statement to determine which page to load by the url GET variable. on page.php where the abstract class Page { is <? //must .... commment..... argh..... abstract class Page { private $title = ''; private $titleChanged = false; private $head = ''; private $output=''; private $JSON_Extra=array(); private $outputBuf=''; private $extraJS=array(); private $breadcrumb=array(); private $outputCallbacks=array(); public $dontTrackThisPage = false; public function registerOutputCallback($callback){ $this->outputCallbacks[] = $callback; } private function fireOutputCallbacks(){ if(!$this->dontTrackThisPage) $_SESSION['previous'] = array("url"=>$_SERVER["REQUEST_URI"], "get"=>$_GET); foreach($this->outputCallbacks as $callback){ call_user_func($callback); } } abstract protected function output(); protected function getJSONExtra(){ return $this->JSON_Extra; } protected function JSONExtra(Array $arr){ foreach($arr as $k=>$v) $this->JSON_Extra[$k]=$v; } /** * @param string $javascriptSource Source of the javascript file to include exluding the JS directory! so just the name probably */ public function addJS($javascriptSource){ if(is_array($javascriptSource)) { foreach($javascriptSource as $itm) $this->addJS($itm); return; } if(in_array($javascriptSource, $this->extraJS)) return; $this->extraJS[] = $javascriptSource; } /** * Add an item to the list * * @param string $text the text to display * @param string $url the url to point to */ protected function addBreadcrumb($text, $url) { $this->breadcrumb[] = array("text"=>$text, "url"=>$url); } protected function setTitle($val){ $this->title = $val . " - The Design Gurus"; } protected function startOutput(){ $this->outputBuf = ob_get_clean(); ob_start(); } protected function endOutput(){ $this->fireOutputCallbacks(); $content = ob_get_clean(); ob_start(); $this->output .= $this->outputBuf . $content; $this->outputBuf=''; $this->outputHTML(); } public function redirect($url,$force=false){ $this->fireOutputCallbacks(); if(isset($_POST['HIJAX'])){ ob_end_clean(); if($force) $this->JSONExtra(array("force"=>true)); $arr = $this->JSON_Extra; $arr['redir']=$url; echo json_encode($arr); } else { header("Location: " . $url); } exit; } public function cause404(){ $this->fireOutputCallbacks(); ob_end_clean(); header("Status: 404 Not Found"); require_once("includes/error/E404.php"); $e = new Index(); $e->output(); exit; } protected function outputJSON() { $this->fireOutputCallbacks(); ob_end_clean(); echo json_encode($this->JSON_Extra); exit; } private function getBreadcrumbHtml() { $html=""; for($i=0, $c=count($this->breadcrumb); $i < $c; $i++) $html .= ($this->breadcrumb[$i]['url'] != "" ? '<a href="' . $this->breadcrumb[$i]['url'] . '">' : '') . $this->breadcrumb[$i]['text'] . ($this->breadcrumb[$i]['url'] != "" ? '</a>' : "") . ($i < $c-1 ? " > " : ""); return $html; } protected function outputHTML(){ if(User::Singleton()->loggedIn) $this->addJS("cpanel.js"); if(User::Singleton()->userLevel == User::ADMIN) $this->addJS("bbcode.js"); ob_start(); if(isset($_POST['HIJAX'])){ $arr = $this->JSON_Extra; $arr["content"]=$this->output; $arr["title"]=$this->title; $arr["breadcrumb"]=$this->getBreadcrumbHtml(); if(count($this->extraJS) > 0) $arr["extraJS"] = $this->extraJS; echo json_encode($arr); } else { ?> //HTML output here and the <?=$this->output?> line to get the relevant page hope this helps
  4. Hi guys, dont know if anyone can assist me but im having an issue with something i have the following error on no matter what page i go to Fatal error: Class 'Page' not found in /var/www/clients/client2/web17/web/includes/index/index.php on line 7 Heres the code for that line <?php include "includes/portfolio/required.php"; include "includes/blog/required.php"; //laters evil ted class Index extends Page { public function output(){ $this->setTitle("Welcome"); global $mysqli; $this->startOutput(); ?> and class Page is like this abstract class Page { //Stuff Here } any help would be great
  5. i freelance as well and have made a few websites that have both client and portfolio in mind. why not pop on over to http://www.thedesigngurus.co.uk or email me at mark@thedesigngurus.co.uk and we can have a chat. We are very competitive and can offer many many things for you.
  6. Editor Name: NuSphere PHPeD URL: http://www.nusphere.net Price: $200 Description: NuSphere is provider of the best PHP Tools, the home of PhpED - state of the art PHP Editor. Thousands of people use our tools including our PHP IDE with the leading debugging tool for PHP. NEW MAJOR RELEASE: PhpED 8.0 - super fast PHP Editor/IDE featuring top notch PHP debugger, code insight, full support for Javascript, HTML 5, CSS3 is now shipping new features: WorkSets, SSH tunneling for Php Debugger and much more. PhpED 8.0 is PHP IDE for both front and backend developers.
  7. in reply to that however rather than using three margin elements body { width: 950px; margin-top: 10px; margin-left: auto; margin-right: auto; font: 75%/120% Arial, Helvetica, sans-serif; } you can do the following: body { width: 950px; margin: 0 auto; margin-top: 10px; font: 75%/120% Arial, Helvetica, sans-serif; } this way you use less lines of code and is still valid markup [/code]
  8. also another point you had floating elements inside a non floating div so the height would not be set a simple fix would have been .clearFix {clear: both;} nd then where you have: <div class="content"> <div class="column_left">Content for class "column_left" Goes Here</div> <div class="column_right">Content for class "column_right" Goes Here</div> </div> add this after the <div class="column_right"> bit: <div class="content"> <div class="column_left">Content for class "column_left" Goes Here</div> <div class="column_right">Content for class "column_right" Goes Here</div> <div class="clearFix"></div> </div> that would then set the height and it would be contained Also on a more cleaner code note try not to use inline styling instead make a styles.css stylesheet and link to it like so: <link type="text/css" rel="stylesheet" href="styles.css" media="all" /> Better semantics :lol::lol:
  9. As you can see from the graphical representation to the right, I am extremely proficient using HTML, CSS, Dreamweaver, Photoshop and Wordpress. - think you mean to the left???
  10. i know they are semantically correct but i try to use them as little as possible.
  11. Very nice looking site mate good use of colours and white space balance. couple of points that i think have already been made the timetableavoid the use of an actual table for this i would use a combination of divs with CSS [*]Justify your text on all p tags it makes the text look more professionally laid out. (IMHO)[*]Make all your page titles along with the welcome text actual text (i suggest using Google Web fonts they have a wide selection of font types at your disposal)[*]Get rid of the "peely" social icons in favour of more aesthetically pleasing ones (maybe grey scale or grey scale with red in it to keep in tune with your colour scheme[*]Style the form on the contact page to be more in line with the rest of the sites layout and colour scheme you will be surprised what you can do when styling form items.[*]and finally on the home page maybe use a content slider to advertise the martial arts more kinda like a billboard effect. other than those the site is very well made.
  12. yes the first link is better than the second link by far but they are equally as bad layout wise
  13. footer needs to be more prominent contact form needs to be styled to look like the rest of the site other than that its a pretty tidy site good clean colour scheme and well proportioned
  14. do you have anything at the moment or nothing at all???

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.