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.

Mr Ben

Privileged
  • Joined

  • Last visited

  1.    rallport reacted to a post in a topic: How do Wordpress custom template files work?
  2. Thank you for such an awesome response - you have helped me out massively I looked through the source code and found the function called get_page_templates() but I doubted that I was looking at the right function. Your post has shown me that I should trust what I know already and push through to get answers and also to believe in myself a lot more that I can read the code just fine! Thanks Rallport!
  3. Hey guys, Wordpress has the ability to recognize a custom page and make it available to select it and use when you are logged in in the pages section of the admin ui. To make it work you add this: <?php /* * Template Name: My Custom Page * Description: A Page Template with a darker design. */ // Code to display Page goes here... My question is how does wordpress scan and find these files and then show them in a drop down menu on the pages tab of the admin? Is it done with regular expressions? Many thanks for any help!
  4. Then pay someone or get learning - It seems that people have already been using their own time to help you.
  5. Hey all, Im used to Rails so I will explain my problem using that as im not that experienced with PHP frameworks, its the theory I need help with anyway Basically Im not sure how I should use a model in an MVC pattern - I know its skinny controller, fat model but I just dont know what code to write in a model. Heres an example RAILS USER CONTROLLER //Rails User Controller class UsersController < ApplicationController def index //Finds all users in the db and stores them in @users @users = @Users.all end def other end end RAILS INDEX VIEW <h1>Users index</h1> //Loop through all users in database <% @users.each do | u | %> //Print out fields stored in the database <p>User ID: <%= u.id %></p> <p>User NAME: <%= u.name %></p> <p>User AGE:<%= u.age %></p> <% end %> RAILS MODEL class User < ActiveRecord::Base //What sort of thing do I put in here? end The way I see it is that I pass data from a controller to a view and if I want any custom logic, I write it in the model. So for instance if I wanted to add 10 to all users ages I might do something like : class User < ActiveRecord::Base def add_ten_to_age(user) @new_age = user.age + 10 return @new_age end end This would be a method I could use if I wanted to in my controllers and then send the result to the view - is that how they are meant to be used? If using PHP helps in an explanation, go for it Thanks for any help
  6. Mr Ben replied to NerdTech's topic in Server Side
    Can you do something like this: <html> <head> <meta charset="UTF-8"> <title>main.php</title> <link rel="stylesheet" href="main.css"> </head> <body> <?php include 'nav.php' ?> <?php include 'table.php' ?> <!-- Carry on with the rest of the code here. --> </body> </html>
  7. My favourite designer from the UK is Orman Clark but you rarely see anything about him in .net/web designer mag. Elliot Jay Stocks is a name that comes up quite a lot though. Sarah Paramenter is another Most of the designers I like aren't actually form the UK.
  8.    dpuk44 reacted to a post in a topic: Variable question
  9. Mr Ben replied to dpuk44's topic in Server Side
    I have just seen the mangled comments, sorry about that. Its mean to demonstrate this: <?php public function calcWage() { // Wrong $totalWage = ($this->wk1 + $this->wk2 + $this->wk3 + $this->wk4 + $this->wk5) - $this->totalVat; /* You are returning a value from this method so you have to use the method to get the value, the varible is only local to the method that it is in */ $totalWage = ($this->wk1 + $this->wk2 + $this->wk3 + $this->wk4 + $this->wk5) - $this->calcVat(); return $totalWage; } ?>
  10. Mr Ben replied to dpuk44's topic in Server Side
    The correct syntax is : <?php public function calcWage() { Wrong //------------------------------------------------------------------------------!!**************** $totalWage = ($this->wk1 + $this->wk2 + $this->wk3 + $this->wk4 + $this->wk5) - $this->totalVat; //------------------------------------------------------------------------------!!**************** /* You are returning a value from this method so you have to use the method to get the value, the varible is only local to the method that it is in */ //------------------------------------------------------------------------------!!**************** $totalWage = ($this->wk1 + $this->wk2 + $this->wk3 + $this->wk4 + $this->wk5) - $this->calcVat(); //------------------------------------------------------------------------------!!**************** return $totalWage; } ?>
  11. Mr Ben replied to dpuk44's topic in Server Side
    You get at it but returning value you want from the method. When you return something from a method, that method is equal to what it is returning. <?php class someClass { public function century() { return 100; } public function addition() { //Will return 200; return $this->century + 100; } } ?> you can do this: <?php $demo_var = $this->a_method(); ?>
  12. Mr Ben replied to dpuk44's topic in Server Side
    You are returning $totalVat from your calcVat method - that means that your calcVat method is equal to $totalVat, so just do this: <?php public function calvWages() { // This makes the returned value available here $this->calcVat(); //You can also do this $vat_calculation = $this->calcVat(); // carry on with the code, etc } ?> Have I understood you correctly?
  13. Heres my two cents: Look at sites like Pinterest, dribbble,Behance etc. Make notes of what you like when you see it (if you pick multiple things from designs that are made by multiple different designers, your style will comprise of a mix of your own inspirations making your own style unique) Find a site you like and build it from scratch with code or PS etc Carry a note book around with you and a pen/pencil so when you get ideas you can make a note. Look at everything for design ideas. Logos and posters are easy but look at shop signs, cars, furniture, technology, photos and also make a note of colours that you like, maybe even take a picture of a colour you like so that you can eye drop it in Photoshop Im not sure what you mean about the images part - A good design will use what ever it needs to get the message across, imagery, colours, typefaces, wording whatever is needed. When you say 'fancy images' do you mean some graphics that have been created in photoshop or illustrator etc? if that is the case, just spend some time learning the software.
  14. Just thought Id add that for sass/compass users there is a mixin that will make the footer stick to the bottom of the http://compass-style.org/reference/compass/layout/sticky_footer/
  15. I think if you want to go with working for your client you have 2 options - hire a developer or learn how to code (that will benefit you in the long run). I would be dubious about how well the psd - wordpress will work. Im my opinion, cutting corners now will lead to issues later and the final project you deliver will be sub par. Do you know which languages to use to build a Wordpress theme? I would suggest if the answer is no, or at least not comfortable with (insert language here), hire a developer.
  16.    gaznev2000 reacted to a post in a topic: Can anyone help with a php contact form?
  17. Hey all, I am experimenting with prototypes and I am wondering how I can extend and existing object in javascript - the Array object in this case and get access to the values? Example: Array.prototype.duplicate = function() { //GET VALUES OF ARRAY SO THEY CAN BE USED console.log(this.values); } var a = [1,2,3,4,5]; Is this kind of thing possible?
  18. I cant see the issue yet but a couple of things I have noticed: Your text area has no value in the name attribute so your $suggestions var is empty Your $mail_address has an address but no .com to finish it Also, as a separate note for the future, your javascript might benefit from being at the bottom of the page, thats just a tip though

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.